aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--application/PageBuilder.php10
-rw-r--r--index.php15
-rw-r--r--tests/Url/UrlTest.php4
-rw-r--r--tpl/configure.html2
5 files changed, 13 insertions, 20 deletions
diff --git a/Makefile b/Makefile
index 75c54f28..52d20090 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
1# Shaarli, the personal, minimalist, super-fast, no-database delicious clone. 1# The personal, minimalist, super-fast, database free, bookmarking service.
2# Makefile for PHP code analysis & testing 2# Makefile for PHP code analysis & testing
3 3
4# Prerequisites: 4# Prerequisites:
diff --git a/application/PageBuilder.php b/application/PageBuilder.php
index 7cd88370..1ca0260a 100644
--- a/application/PageBuilder.php
+++ b/application/PageBuilder.php
@@ -68,18 +68,12 @@ class PageBuilder
68 $this->tpl->assign('source', index_url($_SERVER)); 68 $this->tpl->assign('source', index_url($_SERVER));
69 $this->tpl->assign('version', shaarli_version); 69 $this->tpl->assign('version', shaarli_version);
70 $this->tpl->assign('scripturl', index_url($_SERVER)); 70 $this->tpl->assign('scripturl', index_url($_SERVER));
71 $this->tpl->assign('pagetitle', 'Shaarli');
72 $this->tpl->assign('privateonly', !empty($_SESSION['privateonly'])); // Show only private links? 71 $this->tpl->assign('privateonly', !empty($_SESSION['privateonly'])); // Show only private links?
73 if ($this->conf->exists('general.title')) { 72 $this->tpl->assign('pagetitle', $this->conf->get('general.title', 'Shaarli'));
74 $this->tpl->assign('pagetitle', $this->conf->get('general.title'));
75 }
76 if ($this->conf->exists('general.header_link')) { 73 if ($this->conf->exists('general.header_link')) {
77 $this->tpl->assign('titleLink', $this->conf->get('general.header_link')); 74 $this->tpl->assign('titleLink', $this->conf->get('general.header_link'));
78 } 75 }
79 if ($this->conf->exists('pagetitle')) { 76 $this->tpl->assign('shaarlititle', $this->conf->get('general.title', 'Shaarli'));
80 $this->tpl->assign('pagetitle', $this->conf->get('pagetitle'));
81 }
82 $this->tpl->assign('shaarlititle', $this->conf->get('title', 'Shaarli'));
83 $this->tpl->assign('openshaarli', $this->conf->get('security.open_shaarli', false)); 77 $this->tpl->assign('openshaarli', $this->conf->get('security.open_shaarli', false));
84 $this->tpl->assign('showatom', $this->conf->get('feed.show_atom', false)); 78 $this->tpl->assign('showatom', $this->conf->get('feed.show_atom', false));
85 $this->tpl->assign('hide_timestamps', $this->conf->get('privacy.hide_timestamps', false)); 79 $this->tpl->assign('hide_timestamps', $this->conf->get('privacy.hide_timestamps', false));
diff --git a/index.php b/index.php
index b9576de8..55b12adc 100644
--- a/index.php
+++ b/index.php
@@ -2,7 +2,7 @@
2/** 2/**
3 * Shaarli v0.7.0 - Shaare your links... 3 * Shaarli v0.7.0 - Shaare your links...
4 * 4 *
5 * The personal, minimalist, super-fast, no-database Delicious clone. 5 * The personal, minimalist, super-fast, database free, bookmarking service.
6 * 6 *
7 * Friendly fork by the Shaarli community: 7 * Friendly fork by the Shaarli community:
8 * - https://github.com/shaarli/Shaarli 8 * - https://github.com/shaarli/Shaarli
@@ -1159,6 +1159,7 @@ function renderPage($conf, $pluginManager)
1159 $PAGE->assign('timezone_form', $timezone_form); 1159 $PAGE->assign('timezone_form', $timezone_form);
1160 $PAGE->assign('timezone_js',$timezone_js); 1160 $PAGE->assign('timezone_js',$timezone_js);
1161 $PAGE->assign('private_links_default', $conf->get('privacy.default_private_links', false)); 1161 $PAGE->assign('private_links_default', $conf->get('privacy.default_private_links', false));
1162 $PAGE->assign('session_protection_disabled', $conf->get('security.session_protection_disabled', false));
1162 $PAGE->assign('enable_rss_permalinks', $conf->get('feed.rss_permalinks', false)); 1163 $PAGE->assign('enable_rss_permalinks', $conf->get('feed.rss_permalinks', false));
1163 $PAGE->assign('enable_update_check', $conf->get('updates.check_updates', true)); 1164 $PAGE->assign('enable_update_check', $conf->get('updates.check_updates', true));
1164 $PAGE->assign('hide_public_links', $conf->get('privacy.hide_public_links', false)); 1165 $PAGE->assign('hide_public_links', $conf->get('privacy.hide_public_links', false));
@@ -1675,10 +1676,7 @@ function buildLinkList($PAGE,$LINKSDB, $conf, $pluginManager)
1675 $keys[] = $key; 1676 $keys[] = $key;
1676 } 1677 }
1677 1678
1678 // If there is only a single link, we change on-the-fly the title of the page. 1679
1679 if (count($linksToDisplay) == 1) {
1680 $conf->set('pagetitle', $linksToDisplay[$keys[0]]['title'] .' - '. $conf->get('general.title'));
1681 }
1682 1680
1683 // Select articles according to paging. 1681 // Select articles according to paging.
1684 $pagecount = ceil(count($keys) / $_SESSION['LINKS_PER_PAGE']); 1682 $pagecount = ceil(count($keys) / $_SESSION['LINKS_PER_PAGE']);
@@ -1740,9 +1738,10 @@ function buildLinkList($PAGE,$LINKSDB, $conf, $pluginManager)
1740 'links' => $linkDisp, 1738 'links' => $linkDisp,
1741 'tags' => $LINKSDB->allTags(), 1739 'tags' => $LINKSDB->allTags(),
1742 ); 1740 );
1743 // FIXME! temporary fix - see #399. 1741
1744 if ($conf->exists('pagetitle') && count($linkDisp) == 1) { 1742 // If there is only a single link, we change on-the-fly the title of the page.
1745 $data['pagetitle'] = $conf->get('pagetitle'); 1743 if (count($linksToDisplay) == 1) {
1744 $data['pagetitle'] = $linksToDisplay[$keys[0]]['title'] .' - '. $conf->get('general.title');
1746 } 1745 }
1747 1746
1748 $pluginManager->executeHooks('render_linklist', $data, array('loggedin' => isLoggedIn())); 1747 $pluginManager->executeHooks('render_linklist', $data, array('loggedin' => isLoggedIn()));
diff --git a/tests/Url/UrlTest.php b/tests/Url/UrlTest.php
index 4bf53b2d..05862372 100644
--- a/tests/Url/UrlTest.php
+++ b/tests/Url/UrlTest.php
@@ -184,9 +184,9 @@ class UrlTest extends PHPUnit_Framework_TestCase
184 } 184 }
185 185
186 /** 186 /**
187 * Test IndToAscii. 187 * Test International Domain Name to ASCII conversion
188 */ 188 */
189 function testIndToAscii() 189 function testIdnToAscii()
190 { 190 {
191 $ind = 'http://www.académie-française.fr/'; 191 $ind = 'http://www.académie-française.fr/';
192 $expected = 'http://www.xn--acadmie-franaise-npb1a.fr/'; 192 $expected = 'http://www.xn--acadmie-franaise-npb1a.fr/';
diff --git a/tpl/configure.html b/tpl/configure.html
index ad9a2085..983bcd08 100644
--- a/tpl/configure.html
+++ b/tpl/configure.html
@@ -36,7 +36,7 @@
36 <td><b>Security:</b></td> 36 <td><b>Security:</b></td>
37 <td> 37 <td>
38 <input type="checkbox" name="disablesessionprotection" id="disablesessionprotection" 38 <input type="checkbox" name="disablesessionprotection" id="disablesessionprotection"
39 {if="$private_links_default"}checked{/if}> 39 {if="$session_protection_disabled"}checked{/if}>
40 <label 40 <label
41 for="disablesessionprotection">&nbsp;Disable session cookie hijacking protection (Check this if you get 41 for="disablesessionprotection">&nbsp;Disable session cookie hijacking protection (Check this if you get
42 disconnected often or if your IP address changes often.)</label> 42 disconnected often or if your IP address changes often.)</label>