summaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorPascal Chevrel <pascal@chevrel.org>2012-03-09 09:02:34 +0100
committerPascal Chevrel <pascal@chevrel.org>2012-03-09 09:02:34 +0100
commit926e36b8fdf8ceaf59ac72e1b28b862f42978b84 (patch)
tree302f7892e24e5a6a0b3582b7b137328824116058 /index.php
parent66c2ad84d4d493865fbc5a5fbfbbc61ff0bb3edf (diff)
downloadplanet-926e36b8fdf8ceaf59ac72e1b28b862f42978b84.tar
planet-926e36b8fdf8ceaf59ac72e1b28b862f42978b84.tar.gz
planet-926e36b8fdf8ceaf59ac72e1b28b862f42978b84.tar.bz2
planet-926e36b8fdf8ceaf59ac72e1b28b862f42978b84.tar.xz
planet-926e36b8fdf8ceaf59ac72e1b28b862f42978b84.zip
convert all files saved in Windows(CRLF) to Unix (LF)
Diffstat (limited to 'index.php')
-rw-r--r--index.php34
1 files changed, 17 insertions, 17 deletions
diff --git a/index.php b/index.php
index cf23238..e8644c2 100644
--- a/index.php
+++ b/index.php
@@ -1,37 +1,37 @@
<?php
include_once(dirname(__FILE__).'/app/app.php');
include_once(dirname(__FILE__).'/app/lib/Cache.php');
-
+
//Installed ?
-if (!isset($Planet)) {
+if (!isset($Planet)) {
echo '<p>You might want to <a href="install.php">install moonmoon</a>.</p>';
- exit;
-}
+ exit;
+}
//Load from cache
-$items = Array();
+$items = Array();
if (0 < $Planet->loadOpml(dirname(__FILE__).'/custom/people.opml')) {
- $Planet->loadFeeds();
- $items = $Planet->getItems();
+ $Planet->loadFeeds();
+ $items = $Planet->getItems();
}
//Prepare output cache
-Cache::$enabled = false;
+Cache::$enabled = false;
$cache_key = (count($items)) ? $items[0]->get_id() : '';
$last_modified = (count($items)) ? $items[0]->get_date() : '';
$cache_duration = $PlanetConfig->getOutputTimeout()*60;
-Cache::setStore(dirname(__FILE__).'/'.$conf['cachedir']);
-
-//Go display
+Cache::setStore(dirname(__FILE__).'/'.$conf['cachedir']);
+
+//Go display
if (!isset($_GET['type']) ||
!is_file(dirname(__FILE__).'/custom/views/'.$_GET['type'].'/index.tpl.php') ||
- strpos($_GET['type'], DIRECTORY_SEPARATOR)){
- $_GET['type'] = 'default';
+ strpos($_GET['type'], DIRECTORY_SEPARATOR)){
+ $_GET['type'] = 'default';
}
-
-if (!OutputCache::Start($_GET['type'], $cache_key, $cache_duration)) {
- include_once(dirname(__FILE__).'/custom/views/'.$_GET['type'].'/index.tpl.php');
- OutputCache::End();
+
+if (!OutputCache::Start($_GET['type'], $cache_key, $cache_duration)) {
+ include_once(dirname(__FILE__).'/custom/views/'.$_GET['type'].'/index.tpl.php');
+ OutputCache::End();
}
echo "<!--";