From: Keith Carangelo Date: Wed, 2 Sep 2020 15:38:56 +0000 (-0400) Subject: Merge branch 'master' of https://github.com/shaarli/Shaarli into links_per_page X-Git-Tag: v0.12.0-beta-1~13^2~1^2 X-Git-Url: https://git.immae.eu/?p=github%2Fshaarli%2FShaarli.git;a=commitdiff_plain;h=82fcace8fc4288254952efd1fdafd7dc5a6f9a20;hp=4479aff18f4ff80e274b52548c08e9ed9379bd51 Merge branch 'master' of https://github.com/shaarli/Shaarli into links_per_page --- diff --git a/application/security/SessionManager.php b/application/security/SessionManager.php index 76b0afe8..36df8c1c 100644 --- a/application/security/SessionManager.php +++ b/application/security/SessionManager.php @@ -183,7 +183,6 @@ class SessionManager unset($this->session['expires_on']); unset($this->session['username']); unset($this->session['visibility']); - unset($this->session['untaggedonly']); } } diff --git a/index.php b/index.php index e7471823..869f42de 100644 --- a/index.php +++ b/index.php @@ -95,7 +95,7 @@ $app->group('', function () { $this->get('/add-tag/{newTag}', '\Shaarli\Front\Controller\Visitor\TagController:addTag'); $this->get('/remove-tag/{tag}', '\Shaarli\Front\Controller\Visitor\TagController:removeTag'); $this->get('/links-per-page', '\Shaarli\Front\Controller\Visitor\PublicSessionFilterController:linksPerPage'); - $this->get('/untagged-only', '\Shaarli\Front\Controller\Admin\PublicSessionFilterController:untaggedOnly'); + $this->get('/untagged-only', '\Shaarli\Front\Controller\Visitor\PublicSessionFilterController:untaggedOnly'); })->add('\Shaarli\Front\ShaarliMiddleware'); $app->group('/admin', function () { diff --git a/tests/security/SessionManagerTest.php b/tests/security/SessionManagerTest.php index 60695dcf..11a59f9c 100644 --- a/tests/security/SessionManagerTest.php +++ b/tests/security/SessionManagerTest.php @@ -207,15 +207,16 @@ class SessionManagerTest extends TestCase 'expires_on' => time() + 1000, 'username' => 'johndoe', 'visibility' => 'public', - 'untaggedonly' => false, + 'untaggedonly' => true, ]; $this->sessionManager->logout(); - $this->assertFalse(isset($this->session['ip'])); - $this->assertFalse(isset($this->session['expires_on'])); - $this->assertFalse(isset($this->session['username'])); - $this->assertFalse(isset($this->session['visibility'])); - $this->assertFalse(isset($this->session['untaggedonly'])); + $this->assertArrayNotHasKey('ip', $this->session); + $this->assertArrayNotHasKey('expires_on', $this->session); + $this->assertArrayNotHasKey('username', $this->session); + $this->assertArrayNotHasKey('visibility', $this->session); + $this->assertArrayHasKey('untaggedonly', $this->session); + $this->assertTrue($this->session['untaggedonly']); } /** diff --git a/tpl/default/linklist.paging.html b/tpl/default/linklist.paging.html index 009692b9..aa637868 100644 --- a/tpl/default/linklist.paging.html +++ b/tpl/default/linklist.paging.html @@ -1,27 +1,29 @@