From 839bb21e66af9b6450a6d066f6f20f46b21ac9f3 Mon Sep 17 00:00:00 2001 From: Laurent Raufaste Date: Sun, 12 May 2013 16:02:29 -0400 Subject: [PATCH] Moved lastRSS in its lib folder --- cron.php | 9 ++++----- index.php | 3 +-- lib/README.md | 3 +++ lastRSS.php => lib/lastrss/lastRSS.php | 0 4 files changed, 8 insertions(+), 7 deletions(-) create mode 100644 lib/README.md rename lastRSS.php => lib/lastrss/lastRSS.php (100%) diff --git a/cron.php b/cron.php index 32a4f37..8d98941 100644 --- a/cron.php +++ b/cron.php @@ -4,13 +4,13 @@ header("Content-type: text/plain"); printf("START %s - ",date("Y-m-d H:i:s")); -include('/home/hosted/pouet/sites/www.pouet.net/lastRSS.php'); +require_once('lib/lastrss/lastRSS.php'); // create lastRSS object $rss = new lastRSS; // setup transparent cache -$rss->cache_dir = '/home/hosted/pouet/sites/www.pouet.net/cache'; +$rss->cache_dir = 'cache'; $rss->cache_time = 5*60; // in seconds $rss->CDATA = 'strip'; $rss->date_format = 'Y-m-d'; @@ -24,8 +24,7 @@ $rss->itemtags[] = "demopartynet:endDate"; $r = $rss->get('http://feeds.feedburner.com/demoparty/parties'); -//var_dump($rss); -//var_dump($r); +// var_dump($rss); +// var_dump($r); printf("END %s\n",date("Y-m-d H:i:s")); -?> diff --git a/index.php b/index.php index 24d0ba3..853ff09 100644 --- a/index.php +++ b/index.php @@ -2,6 +2,7 @@ require("include/top.php"); require("include/libbb.php"); require("include/awardscategories.inc.php"); +require_once('lib/lastrss/lastRSS.php'); if ($user["indexoneliner"]>0) { @@ -9,8 +10,6 @@ if ($user["indexoneliner"]>0) $onelines = array_slice($onelines, 0, $user["indexoneliner"]); } -include './lastRSS.php'; - // create lastRSS object $rss = new lastRSS; diff --git a/lib/README.md b/lib/README.md new file mode 100644 index 0000000..dc9679e --- /dev/null +++ b/lib/README.md @@ -0,0 +1,3 @@ +# Libraries + +Let's put external libraries in this folder, one for each even for single files diff --git a/lastRSS.php b/lib/lastrss/lastRSS.php similarity index 100% rename from lastRSS.php rename to lib/lastrss/lastRSS.php