[Bridge] Enable all calls to message($)

The 'message' function will only execute in debug mode, so
no harm done if left active.
This commit is contained in:
logmanoriginal 2016-08-24 18:19:42 +02:00
parent d80efed1f4
commit c0c4759cde

View file

@ -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);
}
}