aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--index.php4
-rw-r--r--tpl/configure.html3
-rw-r--r--tpl/page.header.html2
3 files changed, 7 insertions, 2 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).'; ';
diff --git a/tpl/configure.html b/tpl/configure.html
index 62296cb2..2a433ad0 100644
--- a/tpl/configure.html
+++ b/tpl/configure.html
@@ -11,6 +11,7 @@
11 11
12 <tr><td><b>Page title:</b></td><td><input type="text" name="title" id="title" size="50" value="{$title}"></td></tr> 12 <tr><td><b>Page title:</b></td><td><input type="text" name="title" id="title" size="50" value="{$title}"></td></tr>
13 13
14 <tr><td><b>Title link:</b></td><td><input type="text" name="titleLink" id="titleLink" size="50" value="{$titleLink}"></td></tr>
14 <tr><td valign="top"><b>Timezone:</b></td><td valign="top">{$timezone_form}</td></tr> 15 <tr><td valign="top"><b>Timezone:</b></td><td valign="top">{$timezone_form}</td></tr>
15 16
16 <tr><td valign="top"><b>Redirector</b></td><td><input type="text" name="redirector" id="redirector" size="50" value="{$redirector}"><br>(e.g. <i>http://anonym.to/?</i> will mask the HTTP_REFERER)</td></tr> 17 <tr><td valign="top"><b>Redirector</b></td><td><input type="text" name="redirector" id="redirector" size="50" value="{$redirector}"><br>(e.g. <i>http://anonym.to/?</i> will mask the HTTP_REFERER)</td></tr>
@@ -29,4 +30,4 @@
29</div> 30</div>
30{include="page.footer"} 31{include="page.footer"}
31</body> 32</body>
32</html> \ No newline at end of file 33</html>
diff --git a/tpl/page.header.html b/tpl/page.header.html
index 125b365b..37a18f70 100644
--- a/tpl/page.header.html
+++ b/tpl/page.header.html
@@ -2,7 +2,7 @@
2 <div id="logo" title="Share your links !" onclick="document.location='?';"></div> 2 <div id="logo" title="Share your links !" onclick="document.location='?';"></div>
3 <div style="float:right; font-style:italic; color:#bbb; text-align:right; padding:0 5 0 0;" class="nomobile">Shaare your links...<br> 3 <div style="float:right; font-style:italic; color:#bbb; text-align:right; padding:0 5 0 0;" class="nomobile">Shaare your links...<br>
4 {if="!empty($linkcount)"}{$linkcount} links{/if}</div> 4 {if="!empty($linkcount)"}{$linkcount} links{/if}</div>
5 <span id="shaarli_title"><a href="?">{$shaarlititle|htmlspecialchars}</a></span> 5 <span id="shaarli_title"><a href="{$titleLink}">{$shaarlititle|htmlspecialchars}</a></span>
6 6
7{if="!empty($_GET['source']) && $_GET['source']=='bookmarklet'"} 7{if="!empty($_GET['source']) && $_GET['source']=='bookmarklet'"}
8 {ignore} When called as a popup from bookmarklet, do not display menu. {/ignore} 8 {ignore} When called as a popup from bookmarklet, do not display menu. {/ignore}