aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/index.php b/index.php
index bd34c0cd..dbc2bb3b 100644
--- a/index.php
+++ b/index.php
@@ -887,7 +887,7 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history, $sessionManager,
887 if (empty($params['searchtags'])) { 887 if (empty($params['searchtags'])) {
888 $params['searchtags'] = trim($_GET['addtag']); 888 $params['searchtags'] = trim($_GET['addtag']);
889 } 889 }
890 else if ($addtag) { 890 elseif ($addtag) {
891 $params['searchtags'] = trim($params['searchtags']).' '.trim($_GET['addtag']); 891 $params['searchtags'] = trim($params['searchtags']).' '.trim($_GET['addtag']);
892 } 892 }
893 893
@@ -953,7 +953,7 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history, $sessionManager,
953 } else { 953 } else {
954 unset($_SESSION['visibility']); 954 unset($_SESSION['visibility']);
955 } 955 }
956 } else if ($_GET['visibility'] === 'public') { 956 } elseif ($_GET['visibility'] === 'public') {
957 if (empty($_SESSION['visibility']) || $_SESSION['visibility'] !== 'public') { 957 if (empty($_SESSION['visibility']) || $_SESSION['visibility'] !== 'public') {
958 // See only public links 958 // See only public links
959 $_SESSION['visibility'] = 'public'; 959 $_SESSION['visibility'] = 'public';
@@ -1093,7 +1093,6 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history, $sessionManager,
1093 $conf->set('general.title', escape($_POST['title'])); 1093 $conf->set('general.title', escape($_POST['title']));
1094 $conf->set('general.header_link', escape($_POST['titleLink'])); 1094 $conf->set('general.header_link', escape($_POST['titleLink']));
1095 $conf->set('resource.theme', escape($_POST['theme'])); 1095 $conf->set('resource.theme', escape($_POST['theme']));
1096 $conf->set('redirector.url', escape($_POST['redirector']));
1097 $conf->set('security.session_protection_disabled', !empty($_POST['disablesessionprotection'])); 1096 $conf->set('security.session_protection_disabled', !empty($_POST['disablesessionprotection']));
1098 $conf->set('privacy.default_private_links', !empty($_POST['privateLinkByDefault'])); 1097 $conf->set('privacy.default_private_links', !empty($_POST['privateLinkByDefault']));
1099 $conf->set('feed.rss_permalinks', !empty($_POST['enableRssPermalinks'])); 1098 $conf->set('feed.rss_permalinks', !empty($_POST['enableRssPermalinks']));
@@ -1126,7 +1125,6 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history, $sessionManager,
1126 $PAGE->assign('title', $conf->get('general.title')); 1125 $PAGE->assign('title', $conf->get('general.title'));
1127 $PAGE->assign('theme', $conf->get('resource.theme')); 1126 $PAGE->assign('theme', $conf->get('resource.theme'));
1128 $PAGE->assign('theme_available', ThemeUtils::getThemes($conf->get('resource.raintpl_tpl'))); 1127 $PAGE->assign('theme_available', ThemeUtils::getThemes($conf->get('resource.raintpl_tpl')));
1129 $PAGE->assign('redirector', $conf->get('redirector.url'));
1130 list($continents, $cities) = generateTimeZoneData( 1128 list($continents, $cities) = generateTimeZoneData(
1131 timezone_identifiers_list(), 1129 timezone_identifiers_list(),
1132 $conf->get('general.timezone') 1130 $conf->get('general.timezone')
@@ -1376,7 +1374,12 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history, $sessionManager,
1376 if (empty($title) && strpos(get_url_scheme($url), 'http') !== false) { 1374 if (empty($title) && strpos(get_url_scheme($url), 'http') !== false) {
1377 // Short timeout to keep the application responsive 1375 // Short timeout to keep the application responsive
1378 // The callback will fill $charset and $title with data from the downloaded page. 1376 // The callback will fill $charset and $title with data from the downloaded page.
1379 get_http_response($url, 25, 4194304, get_curl_download_callback($charset, $title)); 1377 get_http_response(
1378 $url,
1379 $conf->get('general.download_max_size', 4194304),
1380 $conf->get('general.download_timeout', 30),
1381 get_curl_download_callback($charset, $title)
1382 );
1380 if (! empty($title) && strtolower($charset) != 'utf-8') { 1383 if (! empty($title) && strtolower($charset) != 'utf-8') {
1381 $title = mb_convert_encoding($title, 'utf-8', $charset); 1384 $title = mb_convert_encoding($title, 'utf-8', $charset);
1382 } 1385 }