aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2018-04-06 18:21:47 +0200
committerArthurHoaro <arthur@hoa.ro>2018-07-05 20:34:22 +0200
commit787faa42f3a2bcbf83a7853f23f3667a6febf9da (patch)
treec24e9da3affe84820cf40c4d1904c2621de6d828 /index.php
parent8b5b7dcc831a0ff1c660a0c0bca5d3cec376a5fc (diff)
downloadShaarli-787faa42f3a2bcbf83a7853f23f3667a6febf9da.tar.gz
Shaarli-787faa42f3a2bcbf83a7853f23f3667a6febf9da.tar.zst
Shaarli-787faa42f3a2bcbf83a7853f23f3667a6febf9da.zip
Take code review into account
Upgrade web-thumbnailer and display thumbs right after download
Diffstat (limited to 'index.php')
-rw-r--r--index.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/index.php b/index.php
index 899edd67..953f1085 100644
--- a/index.php
+++ b/index.php
@@ -1036,7 +1036,7 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history, $sessionManager,
1036 $conf->set('api.enabled', !empty($_POST['enableApi'])); 1036 $conf->set('api.enabled', !empty($_POST['enableApi']));
1037 $conf->set('api.secret', escape($_POST['apiSecret'])); 1037 $conf->set('api.secret', escape($_POST['apiSecret']));
1038 $conf->set('translation.language', escape($_POST['language'])); 1038 $conf->set('translation.language', escape($_POST['language']));
1039 $conf->set('thumbnails.enabled', !empty($_POST['enableThumbnails'])); 1039 $conf->set('thumbnails.enabled', extension_loaded('gd') && !empty($_POST['enableThumbnails']));
1040 1040
1041 try { 1041 try {
1042 $conf->write($loginManager->isLoggedIn()); 1042 $conf->write($loginManager->isLoggedIn());
@@ -1076,6 +1076,7 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history, $sessionManager,
1076 $PAGE->assign('api_secret', $conf->get('api.secret')); 1076 $PAGE->assign('api_secret', $conf->get('api.secret'));
1077 $PAGE->assign('languages', Languages::getAvailableLanguages()); 1077 $PAGE->assign('languages', Languages::getAvailableLanguages());
1078 $PAGE->assign('language', $conf->get('translation.language')); 1078 $PAGE->assign('language', $conf->get('translation.language'));
1079 $PAGE->assign('gd_enabled', extension_loaded('gd'));
1079 $PAGE->assign('pagetitle', t('Configure') .' - '. $conf->get('general.title', 'Shaarli')); 1080 $PAGE->assign('pagetitle', t('Configure') .' - '. $conf->get('general.title', 'Shaarli'));
1080 $PAGE->renderPage('configure'); 1081 $PAGE->renderPage('configure');
1081 exit; 1082 exit;
@@ -1618,6 +1619,7 @@ function buildLinkList($PAGE, $LINKSDB, $conf, $pluginManager, $loginManager)
1618 $elem['thumbnail'] = $thumbnailer->get($link['url']); 1619 $elem['thumbnail'] = $thumbnailer->get($link['url']);
1619 $LINKSDB[$keys[$i]] = $elem; 1620 $LINKSDB[$keys[$i]] = $elem;
1620 $updateDB = true; 1621 $updateDB = true;
1622 $link['thumbnail'] = $elem['thumbnail'];
1621 } 1623 }
1622 1624
1623 // Check for both signs of a note: starting with ? and 7 chars long. 1625 // Check for both signs of a note: starting with ? and 7 chars long.