aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/index.php b/index.php
index 93e89709..6b02942f 100644
--- a/index.php
+++ b/index.php
@@ -690,7 +690,7 @@ class pageBuilder
690// This RSS feed cannot be filtered. 690// This RSS feed cannot be filtered.
691function showDailyRSS() { 691function showDailyRSS() {
692 // Cache system 692 // Cache system
693 $query = $_SERVER["QUERY_STRING"]; 693 $query = $_SERVER['QUERY_STRING'];
694 $cache = new CachedPage( 694 $cache = new CachedPage(
695 $GLOBALS['config']['PAGECACHE'], 695 $GLOBALS['config']['PAGECACHE'],
696 page_url($_SERVER), 696 page_url($_SERVER),
@@ -948,7 +948,7 @@ function renderPage()
948 exit; 948 exit;
949 } 949 }
950 // -------- User wants to logout. 950 // -------- User wants to logout.
951 if (isset($_SERVER["QUERY_STRING"]) && startswith($_SERVER["QUERY_STRING"],'do=logout')) 951 if (isset($_SERVER['QUERY_STRING']) && startsWith($_SERVER['QUERY_STRING'], 'do=logout'))
952 { 952 {
953 invalidateCaches($GLOBALS['config']['PAGECACHE']); 953 invalidateCaches($GLOBALS['config']['PAGECACHE']);
954 logout(); 954 logout();
@@ -1630,7 +1630,7 @@ function renderPage()
1630 } 1630 }
1631 1631
1632 // -------- User is uploading a file for import 1632 // -------- User is uploading a file for import
1633 if (isset($_SERVER["QUERY_STRING"]) && startswith($_SERVER["QUERY_STRING"],'do=upload')) 1633 if (isset($_SERVER['QUERY_STRING']) && startsWith($_SERVER['QUERY_STRING'], 'do=upload'))
1634 { 1634 {
1635 // If file is too big, some form field may be missing. 1635 // If file is too big, some form field may be missing.
1636 if (!isset($_POST['token']) || (!isset($_FILES)) || (isset($_FILES['filetoupload']['size']) && $_FILES['filetoupload']['size']==0)) 1636 if (!isset($_POST['token']) || (!isset($_FILES)) || (isset($_FILES['filetoupload']['size']) && $_FILES['filetoupload']['size']==0))
@@ -1733,7 +1733,7 @@ function importFile($LINKSDB)
1733 { 1733 {
1734 $link = array('linkdate'=>'','title'=>'','url'=>'','description'=>'','tags'=>'','private'=>0); 1734 $link = array('linkdate'=>'','title'=>'','url'=>'','description'=>'','tags'=>'','private'=>0);
1735 $d = explode('<DD>',$html); 1735 $d = explode('<DD>',$html);
1736 if (startswith($d[0],'<A ')) 1736 if (startsWith($d[0], '<A '))
1737 { 1737 {
1738 $link['description'] = (isset($d[1]) ? html_entity_decode(trim($d[1]),ENT_QUOTES,'UTF-8') : ''); // Get description (optional) 1738 $link['description'] = (isset($d[1]) ? html_entity_decode(trim($d[1]),ENT_QUOTES,'UTF-8') : ''); // Get description (optional)
1739 preg_match('!<A .*?>(.*?)</A>!i',$d[0],$matches); $link['title'] = (isset($matches[1]) ? trim($matches[1]) : ''); // Get title 1739 preg_match('!<A .*?>(.*?)</A>!i',$d[0],$matches); $link['title'] = (isset($matches[1]) ? trim($matches[1]) : ''); // Get title
@@ -2204,7 +2204,7 @@ function genThumbnail()
2204 2204
2205 // Is this a link to an image, or to a flickr page ? 2205 // Is this a link to an image, or to a flickr page ?
2206 $imageurl=''; 2206 $imageurl='';
2207 if (endswith(parse_url($url,PHP_URL_PATH),'.jpg')) 2207 if (endsWith(parse_url($url, PHP_URL_PATH), '.jpg'))
2208 { // This is a direct link to an image. e.g. http://farm1.staticflickr.com/5/5921913_ac83ed27bd_o.jpg 2208 { // This is a direct link to an image. e.g. http://farm1.staticflickr.com/5/5921913_ac83ed27bd_o.jpg
2209 preg_match('!(http://farm\d+\.staticflickr\.com/\d+/\d+_\w+_)\w.jpg!',$url,$matches); 2209 preg_match('!(http://farm\d+\.staticflickr\.com/\d+/\d+_\w+_)\w.jpg!',$url,$matches);
2210 if (!empty($matches[1])) $imageurl=$matches[1].'m.jpg'; 2210 if (!empty($matches[1])) $imageurl=$matches[1].'m.jpg';
@@ -2381,8 +2381,8 @@ function resizeImage($filepath)
2381 return true; 2381 return true;
2382} 2382}
2383 2383
2384if (isset($_SERVER["QUERY_STRING"]) && startswith($_SERVER["QUERY_STRING"],'do=genthumbnail')) { genThumbnail(); exit; } // Thumbnail generation/cache does not need the link database. 2384if (isset($_SERVER['QUERY_STRING']) && startsWith($_SERVER['QUERY_STRING'], 'do=genthumbnail')) { genThumbnail(); exit; } // Thumbnail generation/cache does not need the link database.
2385if (isset($_SERVER["QUERY_STRING"]) && startswith($_SERVER["QUERY_STRING"],'do=dailyrss')) { showDailyRSS(); exit; } 2385if (isset($_SERVER['QUERY_STRING']) && startsWith($_SERVER['QUERY_STRING'], 'do=dailyrss')) { showDailyRSS(); exit; }
2386if (!isset($_SESSION['LINKS_PER_PAGE'])) $_SESSION['LINKS_PER_PAGE']=$GLOBALS['config']['LINKS_PER_PAGE']; 2386if (!isset($_SESSION['LINKS_PER_PAGE'])) $_SESSION['LINKS_PER_PAGE']=$GLOBALS['config']['LINKS_PER_PAGE'];
2387renderPage(); 2387renderPage();
2388?> 2388?>