aboutsummaryrefslogtreecommitdiff
path: root/blocks/rss_agw
diff options
context:
space:
mode:
Diffstat (limited to 'blocks/rss_agw')
-rw-r--r--blocks/rss_agw/index.php19
1 files changed, 9 insertions, 10 deletions
diff --git a/blocks/rss_agw/index.php b/blocks/rss_agw/index.php
index e59414a..4438a98 100644
--- a/blocks/rss_agw/index.php
+++ b/blocks/rss_agw/index.php
@@ -13,38 +13,37 @@ function stripBBCode($text_to_search) {
$cacheFile = dirname(__FILE__) . "/rss.cache";
$url = 'http://www.armedglobalwarfare.com/index.php?type=rss;action=.xml;limit=150';
-
if(!file_exists($cacheFile))
{
- decho("creating cache<br/>");
+ decho("Creating RSS cache");
$fp = fopen($cacheRead, "x+");
fclose($fp);
}
- decho("reading internal cache state<br/>");
+ decho("Reading internal RSS cache state");
$internal = fopen($cacheFile, "r");
$cacheRead = fread($internal, $cacheReadLength);
fclose($internal);
- decho("reading inbound cache data<br/>");
- $inbound = fopen($url, "r+");
+ decho("Reading inbound RSS cache data");
+ $inbound = fopen($url, "r");
$cacheTempRead = fread($inbound, $cacheReadLength);
fclose($inbound);
- decho("comparing<br/>");
+ decho("Comparing RSS caches");
if((strncmp($cacheTempRead, $cacheRead, $cacheReadLength)) == 0)
{
$cacheTemp = implode('', file($url));
- decho("Length of cached RSS is " . strlen($cacheTemp) . "<br/>");
- decho("Writing cached data to file <br/>");
+ decho("Length of cached RSS is " . strlen($cacheTemp));
+ decho("Writing cached RSS data to file");
$cachefp = fopen($cacheFile, "w+");
$cacheWritten = fwrite($cachefp, $cacheTemp, strlen($cacheTemp));
fclose($cachefp);
- decho("$cacheWritten bytes written to cache.<br/>");
+ decho("$cacheWritten bytes written to RSS cache.<br/>");
}
else
{
- decho("cache matches external source, using internal<br/>");
+ decho("RSS cache matches external source, using internal");
}
$rss->load($cacheFile);