aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
authorSeb Sauvage <sebsauvage@sebsauvage.net>2011-09-18 14:35:46 +0200
committerEmilien Klein <emilien@klein.st>2011-09-18 14:35:46 +0200
commit1e49378a27c151e54f90979860fee450aaf6a164 (patch)
tree5d7c900c9e704d5acccc8ecc0e0afd4c5e9c0528 /index.php
parent4887ceda72ed74fb13879e0502cbc848f06ac890 (diff)
downloadShaarli-1e49378a27c151e54f90979860fee450aaf6a164.tar.gz
Shaarli-1e49378a27c151e54f90979860fee450aaf6a164.tar.zst
Shaarli-1e49378a27c151e54f90979860fee450aaf6a164.zip
Version 0.0.10 beta
Diffstat (limited to 'index.php')
-rw-r--r--index.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/index.php b/index.php
index d46bd84f..499243bd 100644
--- a/index.php
+++ b/index.php
@@ -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");
28header("Cache-Control: no-store, no-cache, must-revalidate"); 28header("Cache-Control: no-store, no-cache, must-revalidate");
29header("Cache-Control: post-check=0, pre-check=0", false); 29header("Cache-Control: post-check=0, pre-check=0", false);
30header("Pragma: no-cache"); 30header("Pragma: no-cache");
31define('shaarli_version','0.0.9 beta'); 31define('shaarli_version','0.0.10 beta');
32if (!is_dir(DATADIR)) { mkdir(DATADIR,0705); chmod(DATADIR,0705); } 32if (!is_dir(DATADIR)) { mkdir(DATADIR,0705); chmod(DATADIR,0705); }
33if (!is_file(DATADIR.'/.htaccess')) { file_put_contents(DATADIR.'/.htaccess',"Allow from none\nDeny from all\n"); } // Protect data files. 33if (!is_file(DATADIR.'/.htaccess')) { file_put_contents(DATADIR.'/.htaccess',"Allow from none\nDeny from all\n"); } // Protect data files.
34if (!is_file(CONFIG_FILE)) install(); 34if (!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 }