aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/index.php b/index.php
index fdc4fbac..5dd0353b 100644
--- a/index.php
+++ b/index.php
@@ -105,6 +105,7 @@ if (empty($GLOBALS['redirector'])) $GLOBALS['redirector']='';
105if (empty($GLOBALS['disablesessionprotection'])) $GLOBALS['disablesessionprotection']=false; 105if (empty($GLOBALS['disablesessionprotection'])) $GLOBALS['disablesessionprotection']=false;
106if (empty($GLOBALS['disablejquery'])) $GLOBALS['disablejquery']=false; 106if (empty($GLOBALS['disablejquery'])) $GLOBALS['disablejquery']=false;
107if (empty($GLOBALS['privateLinkByDefault'])) $GLOBALS['privateLinkByDefault']=false; 107if (empty($GLOBALS['privateLinkByDefault'])) $GLOBALS['privateLinkByDefault']=false;
108if (empty($GLOBALS['titleLink'])) $GLOBALS['titleLink']='?';
108// I really need to rewrite Shaarli with a proper configuation manager. 109// I really need to rewrite Shaarli with a proper configuation manager.
109 110
110// Run config screen if first run: 111// Run config screen if first run:
@@ -657,6 +658,7 @@ class pageBuilder
657 $this->tpl->assign('pagetitle','Shaarli'); 658 $this->tpl->assign('pagetitle','Shaarli');
658 $this->tpl->assign('privateonly',!empty($_SESSION['privateonly'])); // Show only private links ? 659 $this->tpl->assign('privateonly',!empty($_SESSION['privateonly'])); // Show only private links ?
659 if (!empty($GLOBALS['title'])) $this->tpl->assign('pagetitle',$GLOBALS['title']); 660 if (!empty($GLOBALS['title'])) $this->tpl->assign('pagetitle',$GLOBALS['title']);
661 if (!empty($GLOBALS['titleLink'])) $this->tpl->assign('titleLink',$GLOBALS['titleLink']);
660 if (!empty($GLOBALS['pagetitle'])) $this->tpl->assign('pagetitle',$GLOBALS['pagetitle']); 662 if (!empty($GLOBALS['pagetitle'])) $this->tpl->assign('pagetitle',$GLOBALS['pagetitle']);
661 $this->tpl->assign('shaarlititle',empty($GLOBALS['title']) ? 'Shaarli': $GLOBALS['title'] ); 663 $this->tpl->assign('shaarlititle',empty($GLOBALS['title']) ? 'Shaarli': $GLOBALS['title'] );
662 return; 664 return;
@@ -1395,6 +1397,7 @@ function renderPage()
1395 $tz = $_POST['continent'].'/'.$_POST['city']; 1397 $tz = $_POST['continent'].'/'.$_POST['city'];
1396 $GLOBALS['timezone'] = $tz; 1398 $GLOBALS['timezone'] = $tz;
1397 $GLOBALS['title']=$_POST['title']; 1399 $GLOBALS['title']=$_POST['title'];
1400 $GLOBALS['titleLink']=$_POST['titleLink'];
1398 $GLOBALS['redirector']=$_POST['redirector']; 1401 $GLOBALS['redirector']=$_POST['redirector'];
1399 $GLOBALS['disablesessionprotection']=!empty($_POST['disablesessionprotection']); 1402 $GLOBALS['disablesessionprotection']=!empty($_POST['disablesessionprotection']);
1400 $GLOBALS['disablejquery']=!empty($_POST['disablejquery']); 1403 $GLOBALS['disablejquery']=!empty($_POST['disablejquery']);
@@ -2257,6 +2260,7 @@ function writeConfig()
2257 if (is_file($GLOBALS['config']['CONFIG_FILE']) && !isLoggedIn()) die('You are not authorized to alter config.'); // Only logged in user can alter config. 2260 if (is_file($GLOBALS['config']['CONFIG_FILE']) && !isLoggedIn()) die('You are not authorized to alter config.'); // Only logged in user can alter config.
2258 $config='<?php $GLOBALS[\'login\']='.var_export($GLOBALS['login'],true).'; $GLOBALS[\'hash\']='.var_export($GLOBALS['hash'],true).'; $GLOBALS[\'salt\']='.var_export($GLOBALS['salt'],true).'; '; 2261 $config='<?php $GLOBALS[\'login\']='.var_export($GLOBALS['login'],true).'; $GLOBALS[\'hash\']='.var_export($GLOBALS['hash'],true).'; $GLOBALS[\'salt\']='.var_export($GLOBALS['salt'],true).'; ';
2259 $config .='$GLOBALS[\'timezone\']='.var_export($GLOBALS['timezone'],true).'; date_default_timezone_set('.var_export($GLOBALS['timezone'],true).'); $GLOBALS[\'title\']='.var_export($GLOBALS['title'],true).';'; 2262 $config .='$GLOBALS[\'timezone\']='.var_export($GLOBALS['timezone'],true).'; date_default_timezone_set('.var_export($GLOBALS['timezone'],true).'); $GLOBALS[\'title\']='.var_export($GLOBALS['title'],true).';';
2263 $config .= '$GLOBALS[\'titleLink\']='.var_export($GLOBALS['titleLink'],true).'; ';
2260 $config .= '$GLOBALS[\'redirector\']='.var_export($GLOBALS['redirector'],true).'; '; 2264 $config .= '$GLOBALS[\'redirector\']='.var_export($GLOBALS['redirector'],true).'; ';
2261 $config .= '$GLOBALS[\'disablesessionprotection\']='.var_export($GLOBALS['disablesessionprotection'],true).'; '; 2265 $config .= '$GLOBALS[\'disablesessionprotection\']='.var_export($GLOBALS['disablesessionprotection'],true).'; ';
2262 $config .= '$GLOBALS[\'disablejquery\']='.var_export($GLOBALS['disablejquery'],true).'; '; 2266 $config .= '$GLOBALS[\'disablejquery\']='.var_export($GLOBALS['disablejquery'],true).'; ';