diff options
author | Seb Sauvage <sebsauvage@sebsauvage.net> | 2011-09-27 15:35:32 +0200 |
---|---|---|
committer | Emilien Klein <emilien@klein.st> | 2011-09-27 15:35:32 +0200 |
commit | 02188b066540f2e461d551b398dc05913b51eaa3 (patch) | |
tree | a093bba21922e94744bef91abce5f32e6baa94cc /index.php | |
parent | 8e92abac218a7419b4a4f0826b32daba46cfa926 (diff) | |
download | Shaarli-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
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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"); | |||
47 | header("Cache-Control: no-store, no-cache, must-revalidate"); | 47 | header("Cache-Control: no-store, no-cache, must-revalidate"); |
48 | header("Cache-Control: post-check=0, pre-check=0", false); | 48 | header("Cache-Control: post-check=0, pre-check=0", false); |
49 | header("Pragma: no-cache"); | 49 | header("Pragma: no-cache"); |
50 | define('shaarli_version','0.0.19 beta'); | 50 | define('shaarli_version','0.0.20 beta'); |
51 | if (!is_dir(DATADIR)) { mkdir(DATADIR,0705); chmod(DATADIR,0705); } | 51 | if (!is_dir(DATADIR)) { mkdir(DATADIR,0705); chmod(DATADIR,0705); } |
52 | if (!is_file(DATADIR.'/.htaccess')) { file_put_contents(DATADIR.'/.htaccess',"Allow from none\nDeny from all\n"); } // Protect data files. | 52 | if (!is_file(DATADIR.'/.htaccess')) { file_put_contents(DATADIR.'/.htaccess',"Allow from none\nDeny from all\n"); } // Protect data files. |
53 | if (!is_file(CONFIG_FILE)) install(); | 53 | if (!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=''; |