diff options
author | Seb Sauvage <sebsauvage@sebsauvage.net> | 2011-09-18 14:35:46 +0200 |
---|---|---|
committer | Emilien Klein <emilien@klein.st> | 2011-09-18 14:35:46 +0200 |
commit | 1e49378a27c151e54f90979860fee450aaf6a164 (patch) | |
tree | 5d7c900c9e704d5acccc8ecc0e0afd4c5e9c0528 | |
parent | 4887ceda72ed74fb13879e0502cbc848f06ac890 (diff) | |
download | Shaarli-1e49378a27c151e54f90979860fee450aaf6a164.tar.gz Shaarli-1e49378a27c151e54f90979860fee450aaf6a164.tar.zst Shaarli-1e49378a27c151e54f90979860fee450aaf6a164.zip |
Version 0.0.10 beta
-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.9 beta - Shaare your links... | 2 | // Shaarli 0.0.10 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 |
@@ -28,7 +28,7 @@ header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); | |||
28 | header("Cache-Control: no-store, no-cache, must-revalidate"); | 28 | header("Cache-Control: no-store, no-cache, must-revalidate"); |
29 | header("Cache-Control: post-check=0, pre-check=0", false); | 29 | header("Cache-Control: post-check=0, pre-check=0", false); |
30 | header("Pragma: no-cache"); | 30 | header("Pragma: no-cache"); |
31 | define('shaarli_version','0.0.9 beta'); | 31 | define('shaarli_version','0.0.10 beta'); |
32 | if (!is_dir(DATADIR)) { mkdir(DATADIR,0705); chmod(DATADIR,0705); } | 32 | if (!is_dir(DATADIR)) { mkdir(DATADIR,0705); chmod(DATADIR,0705); } |
33 | if (!is_file(DATADIR.'/.htaccess')) { file_put_contents(DATADIR.'/.htaccess',"Allow from none\nDeny from all\n"); } // Protect data files. | 33 | if (!is_file(DATADIR.'/.htaccess')) { file_put_contents(DATADIR.'/.htaccess',"Allow from none\nDeny from all\n"); } // Protect data files. |
34 | if (!is_file(CONFIG_FILE)) install(); | 34 | if (!is_file(CONFIG_FILE)) install(); |
@@ -731,8 +731,8 @@ HTML; | |||
731 | if (empty($title) && parse_url($url,PHP_URL_SCHEME)=='http') | 731 | if (empty($title) && parse_url($url,PHP_URL_SCHEME)=='http') |
732 | { | 732 | { |
733 | list($status,$headers,$data) = getHTTP($url,4); // Short timeout to keep the application responsive. | 733 | list($status,$headers,$data) = getHTTP($url,4); // Short timeout to keep the application responsive. |
734 | // FIXME: Decode charset according to charset specified in either 1) HTTP response headers or 2) <head> in html | 734 | // FIXME: Decode charset according to specified in either 1) HTTP response headers or 2) <head> in html |
735 | if (strpos($status,'200 OK')) $title=html_extract_title($data); | 735 | if (strpos($status,'200 OK')) $title=html_entity_decode(html_extract_title($data),ENT_QUOTES,'UTF-8'); |
736 | } | 736 | } |
737 | $link = array('linkdate'=>$linkdate,'title'=>$title,'url'=>$url,'description'=>$description,'tags'=>$tags,'private'=>0); | 737 | $link = array('linkdate'=>$linkdate,'title'=>$title,'url'=>$url,'description'=>$description,'tags'=>$tags,'private'=>0); |
738 | } | 738 | } |