aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSeb Sauvage <sebsauvage@sebsauvage.net>2011-09-27 15:35:32 +0200
committerEmilien Klein <emilien@klein.st>2011-09-27 15:35:32 +0200
commit02188b066540f2e461d551b398dc05913b51eaa3 (patch)
treea093bba21922e94744bef91abce5f32e6baa94cc
parent8e92abac218a7419b4a4f0826b32daba46cfa926 (diff)
downloadShaarli-02188b066540f2e461d551b398dc05913b51eaa3.tar.gz
Shaarli-02188b066540f2e461d551b398dc05913b51eaa3.tar.zst
Shaarli-02188b066540f2e461d551b398dc05913b51eaa3.zip
Version 0.0.20 beta:
- Corrected: RSS feed is now served as application/rss+xml instead of application/xhtml+xml (which was causing problem in RSS Lounge) - Corrected: ATOM feed is now served as application/atom+xml instead of application/xhtml+xml
-rw-r--r--index.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/index.php b/index.php
index 276deb84..e1da9bc0 100644
--- a/index.php
+++ b/index.php
@@ -1,5 +1,5 @@
1<?php 1<?php
2// Shaarli 0.0.19 beta - Shaare your links... 2// Shaarli 0.0.20 beta - Shaare your links...
3// The personal, minimalist, super-fast, no-database delicious clone. By sebsauvage.net 3// The personal, minimalist, super-fast, no-database delicious clone. By sebsauvage.net
4// http://sebsauvage.net/wiki/doku.php?id=php:shaarli 4// http://sebsauvage.net/wiki/doku.php?id=php:shaarli
5// Licence: http://www.opensource.org/licenses/zlib-license.php 5// Licence: http://www.opensource.org/licenses/zlib-license.php
@@ -47,7 +47,7 @@ header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
47header("Cache-Control: no-store, no-cache, must-revalidate"); 47header("Cache-Control: no-store, no-cache, must-revalidate");
48header("Cache-Control: post-check=0, pre-check=0", false); 48header("Cache-Control: post-check=0, pre-check=0", false);
49header("Pragma: no-cache"); 49header("Pragma: no-cache");
50define('shaarli_version','0.0.19 beta'); 50define('shaarli_version','0.0.20 beta');
51if (!is_dir(DATADIR)) { mkdir(DATADIR,0705); chmod(DATADIR,0705); } 51if (!is_dir(DATADIR)) { mkdir(DATADIR,0705); chmod(DATADIR,0705); }
52if (!is_file(DATADIR.'/.htaccess')) { file_put_contents(DATADIR.'/.htaccess',"Allow from none\nDeny from all\n"); } // Protect data files. 52if (!is_file(DATADIR.'/.htaccess')) { file_put_contents(DATADIR.'/.htaccess',"Allow from none\nDeny from all\n"); } // Protect data files.
53if (!is_file(CONFIG_FILE)) install(); 53if (!is_file(CONFIG_FILE)) install();
@@ -574,7 +574,7 @@ function showRSS()
574 elseif (!empty($_GET['searchtags'])) $linksToDisplay = $LINKSDB->filterTags(trim($_GET['searchtags'])); 574 elseif (!empty($_GET['searchtags'])) $linksToDisplay = $LINKSDB->filterTags(trim($_GET['searchtags']));
575 else $linksToDisplay = $LINKSDB; 575 else $linksToDisplay = $LINKSDB;
576 576
577 header('Content-Type: application/xhtml+xml; charset=utf-8'); 577 header('Content-Type: application/rss+xml; charset=utf-8');
578 $pageaddr=htmlspecialchars(serverUrl().$_SERVER["SCRIPT_NAME"]); 578 $pageaddr=htmlspecialchars(serverUrl().$_SERVER["SCRIPT_NAME"]);
579 echo '<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">'; 579 echo '<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">';
580 echo '<channel><title>'.htmlspecialchars($GLOBALS['title']).'</title><link>'.$pageaddr.'</link>'; 580 echo '<channel><title>'.htmlspecialchars($GLOBALS['title']).'</title><link>'.$pageaddr.'</link>';
@@ -606,7 +606,7 @@ function showATOM()
606 elseif (!empty($_GET['searchtags'])) $linksToDisplay = $LINKSDB->filterTags(trim($_GET['searchtags'])); 606 elseif (!empty($_GET['searchtags'])) $linksToDisplay = $LINKSDB->filterTags(trim($_GET['searchtags']));
607 else $linksToDisplay = $LINKSDB; 607 else $linksToDisplay = $LINKSDB;
608 608
609 header('Content-Type: application/xhtml+xml; charset=utf-8'); 609 header('Content-Type: application/atom+xml; charset=utf-8');
610 $pageaddr=htmlspecialchars(serverUrl().$_SERVER["SCRIPT_NAME"]); 610 $pageaddr=htmlspecialchars(serverUrl().$_SERVER["SCRIPT_NAME"]);
611 $latestDate = ''; 611 $latestDate = '';
612 $entries=''; 612 $entries='';