X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=index.php;h=84282b8dc6c6ecc41dd67cae0eae0e9c3fdf883a;hb=e2e6ec0f4d771c92f5fce0cbdf53f819ac1db59e;hp=f7e73bde956c161d043d627361b92d7ca6eed519;hpb=7fde6de1212323418401c15efba06026c704ca87;p=github%2Fshaarli%2FShaarli.git diff --git a/index.php b/index.php index f7e73bde..84282b8d 100644 --- a/index.php +++ b/index.php @@ -606,8 +606,6 @@ function showDailyRSS($conf) { $absurl = escape(index_url($_SERVER).'?do=daily&day='.$day); // Absolute URL of the corresponding "Daily" page. // Build the HTML body of this RSS entry. - $html = ''; - $href = ''; $links = array(); // We pre-format some fields for proper output. @@ -833,7 +831,7 @@ function renderPage($conf, $pluginManager) // Get only links which have a thumbnail. foreach($links as $link) { - $permalink='?'.escape(smallhash($link['linkdate'])); + $permalink='?'.escape(smallHash($link['linkdate'])); $thumb=lazyThumbnail($conf, $link['url'],$permalink); if ($thumb!='') // Only output links which have a thumbnail. { @@ -867,7 +865,7 @@ function renderPage($conf, $pluginManager) $maxcount = max($maxcount, $value); } - // Sort tags alphabetically: case insensitive, support locale if avalaible. + // Sort tags alphabetically: case insensitive, support locale if available. uksort($tags, function($a, $b) { // Collator is part of PHP intl. if (class_exists('Collator')) { @@ -1213,7 +1211,7 @@ function renderPage($conf, $pluginManager) $value['tags']=trim(implode(' ',$tags)); $LINKSDB[$key]=$value; } - $LINKSDB->savedb($conf->get('resource.page_cache')); + $LINKSDB->save($conf->get('resource.page_cache')); echo ''; exit; } @@ -1230,7 +1228,7 @@ function renderPage($conf, $pluginManager) $value['tags']=trim(implode(' ',$tags)); $LINKSDB[$key]=$value; } - $LINKSDB->savedb($conf->get('resource.page_cache')); // Save to disk. + $LINKSDB->save($conf->get('resource.page_cache')); // Save to disk. echo ''; exit; } @@ -1285,7 +1283,7 @@ function renderPage($conf, $pluginManager) $pluginManager->executeHooks('save_link', $link); $LINKSDB[$linkdate] = $link; - $LINKSDB->savedb($conf->get('resource.page_cache')); + $LINKSDB->save($conf->get('resource.page_cache')); pubsubhub($conf); // If we are called from the bookmarklet, we must close the popup: @@ -1327,7 +1325,7 @@ function renderPage($conf, $pluginManager) $pluginManager->executeHooks('delete_link', $LINKSDB[$linkdate]); unset($LINKSDB[$linkdate]); - $LINKSDB->savedb('resource.page_cache'); // save to disk + $LINKSDB->save('resource.page_cache'); // save to disk // If we are called from the bookmarklet, we must close the popup: if (isset($_GET['source']) && ($_GET['source']=='bookmarklet' || $_GET['source']=='firefoxsocialapi')) { echo ''; exit; } @@ -1670,8 +1668,6 @@ function buildLinkList($PAGE,$LINKSDB, $conf, $pluginManager) $next_page_url = '?page=' . ($page-1) . $searchtermUrl . $searchtagsUrl; } - $token = isLoggedIn() ? getToken($conf) : ''; - // Fill all template fields. $data = array( 'previous_page_url' => $previous_page_url,