From c0c4759cdea9b131cf25ed716840c54062332e11 Mon Sep 17 00:00:00 2001 From: logmanoriginal Date: Wed, 24 Aug 2016 18:19:42 +0200 Subject: [PATCH] [Bridge] Enable all calls to message($) The 'message' function will only execute in debug mode, so no harm done if left active. --- lib/Bridge.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/Bridge.php b/lib/Bridge.php index 9d195b1a..3ac5cd25 100644 --- a/lib/Bridge.php +++ b/lib/Bridge.php @@ -182,15 +182,15 @@ abstract class HttpCachingBridgeAbstract extends BridgeAbstract { $filename = $filename."index.html"; } if(file_exists($filename)) { -// $this->message("loading cached file from ".$filename." for page at url ".$url); + $this->message("loading cached file from ".$filename." for page at url ".$url); // TODO touch file and its parent, and try to do neighbour deletion $this->refresh_in_cache($pageCacheDir, $filename); $content=file_get_contents($filename); } else { -// $this->message("we have no local copy of ".$url." Downloading to ".$filename); + $this->message("we have no local copy of ".$url." Downloading to ".$filename); $dir = substr($filename, 0, strrpos($filename, '/')); if(!is_dir($dir)) { -// $this->message("creating directories for ".$dir); + $this->message("creating directories for ".$dir); mkdir($dir, 0777, true); } $content=$this->getContents($url); @@ -346,13 +346,13 @@ abstract class RssExpander extends HttpCachingBridgeAbstract{ if (empty($name)) { $this->returnServerError('There is no $name for this RSS expander'); } -// $this->message("Loading from ".$param['url']); + $this->message("Loading from ".$param['url']); // Notice WE DO NOT use cache here on purpose : we want a fresh view of the RSS stream each time $content=$this->getContents($name) or $this->returnServerError('Could not request '.$name); $rssContent = simplexml_load_string($content); - // $this->message("loaded RSS from ".$param['url']); + $this->message("loaded RSS from ".$param['url']); // TODO insert RSS format detection // we suppose for now, we have some RSS 2.0 $this->collect_RSS_2_0_data($rssContent); @@ -360,10 +360,10 @@ abstract class RssExpander extends HttpCachingBridgeAbstract{ protected function collect_RSS_2_0_data($rssContent) { $rssContent = $rssContent->channel[0]; -// $this->message("RSS content is ===========\n".var_export($rssContent, true)."==========="); + $this->message("RSS content is ===========\n".var_export($rssContent, true)."==========="); $this->load_RSS_2_0_feed_data($rssContent); foreach($rssContent->item as $item) { -// $this->message("parsing item ".var_export($item, true)); + $this->message("parsing item ".var_export($item, true)); $this->items[] = $this->parseRSSItem($item); } }