X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=index.php;h=2fe3f8215f659683cf96ed1e403089a1775aad62;hb=f28396a2f82fe61af05f19c1df367f4c660655ab;hp=bd34c0cd05aeab499d26fc8b650218544adf53b1;hpb=e746c237cdff932cf4c6510becc185c149fa4592;p=github%2Fshaarli%2FShaarli.git diff --git a/index.php b/index.php index bd34c0cd..2fe3f821 100644 --- a/index.php +++ b/index.php @@ -887,7 +887,7 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history, $sessionManager, if (empty($params['searchtags'])) { $params['searchtags'] = trim($_GET['addtag']); } - else if ($addtag) { + elseif ($addtag) { $params['searchtags'] = trim($params['searchtags']).' '.trim($_GET['addtag']); } @@ -953,7 +953,7 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history, $sessionManager, } else { unset($_SESSION['visibility']); } - } else if ($_GET['visibility'] === 'public') { + } elseif ($_GET['visibility'] === 'public') { if (empty($_SESSION['visibility']) || $_SESSION['visibility'] !== 'public') { // See only public links $_SESSION['visibility'] = 'public'; @@ -1093,7 +1093,6 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history, $sessionManager, $conf->set('general.title', escape($_POST['title'])); $conf->set('general.header_link', escape($_POST['titleLink'])); $conf->set('resource.theme', escape($_POST['theme'])); - $conf->set('redirector.url', escape($_POST['redirector'])); $conf->set('security.session_protection_disabled', !empty($_POST['disablesessionprotection'])); $conf->set('privacy.default_private_links', !empty($_POST['privateLinkByDefault'])); $conf->set('feed.rss_permalinks', !empty($_POST['enableRssPermalinks'])); @@ -1126,7 +1125,6 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history, $sessionManager, $PAGE->assign('title', $conf->get('general.title')); $PAGE->assign('theme', $conf->get('resource.theme')); $PAGE->assign('theme_available', ThemeUtils::getThemes($conf->get('resource.raintpl_tpl'))); - $PAGE->assign('redirector', $conf->get('redirector.url')); list($continents, $cities) = generateTimeZoneData( timezone_identifiers_list(), $conf->get('general.timezone') @@ -1376,7 +1374,12 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history, $sessionManager, if (empty($title) && strpos(get_url_scheme($url), 'http') !== false) { // Short timeout to keep the application responsive // The callback will fill $charset and $title with data from the downloaded page. - get_http_response($url, 25, 4194304, get_curl_download_callback($charset, $title)); + get_http_response( + $url, + $conf->get('general.download_timeout', 30), + $conf->get('general.download_max_size', 4194304), + get_curl_download_callback($charset, $title) + ); if (! empty($title) && strtolower($charset) != 'utf-8') { $title = mb_convert_encoding($title, 'utf-8', $charset); }