aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/PageBuilder.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/PageBuilder.php')
-rw-r--r--application/PageBuilder.php21
1 files changed, 0 insertions, 21 deletions
diff --git a/application/PageBuilder.php b/application/PageBuilder.php
index 0902d00d..3233d6b6 100644
--- a/application/PageBuilder.php
+++ b/application/PageBuilder.php
@@ -85,7 +85,6 @@ class PageBuilder
85 $this->tpl->assign('scripturl', index_url($_SERVER)); 85 $this->tpl->assign('scripturl', index_url($_SERVER));
86 $visibility = ! empty($_SESSION['visibility']) ? $_SESSION['visibility'] : ''; 86 $visibility = ! empty($_SESSION['visibility']) ? $_SESSION['visibility'] : '';
87 $this->tpl->assign('visibility', $visibility); 87 $this->tpl->assign('visibility', $visibility);
88 $this->tpl->assign('nextVisibility', $this->getNextVisibility($visibility));
89 $this->tpl->assign('untaggedonly', !empty($_SESSION['untaggedonly'])); 88 $this->tpl->assign('untaggedonly', !empty($_SESSION['untaggedonly']));
90 $this->tpl->assign('pagetitle', $this->conf->get('general.title', 'Shaarli')); 89 $this->tpl->assign('pagetitle', $this->conf->get('general.title', 'Shaarli'));
91 if ($this->conf->exists('general.header_link')) { 90 if ($this->conf->exists('general.header_link')) {
@@ -172,24 +171,4 @@ class PageBuilder
172 $this->tpl->assign('error_message', $message); 171 $this->tpl->assign('error_message', $message);
173 $this->renderPage('404'); 172 $this->renderPage('404');
174 } 173 }
175
176 /**
177 * Return the next visibility option:
178 * private -> public -> all
179 *
180 * @param string $current visibility value
181 *
182 * @return string next visibility value
183 */
184 protected function getNextVisibility($current)
185 {
186 switch ($current) {
187 case 'private':
188 return 'public';
189 case 'public':
190 return '';
191 default:
192 return 'private';
193 }
194 }
195} 174}