diff --git a/index.php b/index.php index fdc4fba..5dd0353 100644 --- a/index.php +++ b/index.php @@ -105,6 +105,7 @@ if (empty($GLOBALS['redirector'])) $GLOBALS['redirector']=''; if (empty($GLOBALS['disablesessionprotection'])) $GLOBALS['disablesessionprotection']=false; if (empty($GLOBALS['disablejquery'])) $GLOBALS['disablejquery']=false; if (empty($GLOBALS['privateLinkByDefault'])) $GLOBALS['privateLinkByDefault']=false; +if (empty($GLOBALS['titleLink'])) $GLOBALS['titleLink']='?'; // I really need to rewrite Shaarli with a proper configuation manager. // Run config screen if first run: @@ -657,6 +658,7 @@ class pageBuilder $this->tpl->assign('pagetitle','Shaarli'); $this->tpl->assign('privateonly',!empty($_SESSION['privateonly'])); // Show only private links ? if (!empty($GLOBALS['title'])) $this->tpl->assign('pagetitle',$GLOBALS['title']); + if (!empty($GLOBALS['titleLink'])) $this->tpl->assign('titleLink',$GLOBALS['titleLink']); if (!empty($GLOBALS['pagetitle'])) $this->tpl->assign('pagetitle',$GLOBALS['pagetitle']); $this->tpl->assign('shaarlititle',empty($GLOBALS['title']) ? 'Shaarli': $GLOBALS['title'] ); return; @@ -1395,6 +1397,7 @@ function renderPage() $tz = $_POST['continent'].'/'.$_POST['city']; $GLOBALS['timezone'] = $tz; $GLOBALS['title']=$_POST['title']; + $GLOBALS['titleLink']=$_POST['titleLink']; $GLOBALS['redirector']=$_POST['redirector']; $GLOBALS['disablesessionprotection']=!empty($_POST['disablesessionprotection']); $GLOBALS['disablejquery']=!empty($_POST['disablejquery']); @@ -2257,6 +2260,7 @@ function writeConfig() if (is_file($GLOBALS['config']['CONFIG_FILE']) && !isLoggedIn()) die('You are not authorized to alter config.'); // Only logged in user can alter config. $config='Page title: + Title link: Timezone:{$timezone_form} Redirector
(e.g. http://anonym.to/? will mask the HTTP_REFERER) @@ -29,4 +30,4 @@ {include="page.footer"} - \ No newline at end of file + diff --git a/tpl/page.header.html b/tpl/page.header.html index 125b365..37a18f7 100644 --- a/tpl/page.header.html +++ b/tpl/page.header.html @@ -2,7 +2,7 @@
Shaare your links...
{if="!empty($linkcount)"}{$linkcount} links{/if}
- {$shaarlititle|htmlspecialchars} + {$shaarlititle|htmlspecialchars} {if="!empty($_GET['source']) && $_GET['source']=='bookmarklet'"} {ignore} When called as a popup from bookmarklet, do not display menu. {/ignore}