diff options
| author | 2014-04-15 12:16:31 +0200 | |
|---|---|---|
| committer | 2014-04-15 12:16:31 +0200 | |
| commit | f25783ef5de2c4b7f9746eb7ad92fb0b018738b1 (patch) | |
| tree | 2dfc4271bc36d774adc88ef24cb8290842283f13 /app/layout | |
| parent | 339a12698c07eb466c6a1ab8ffa856d8a8e1f506 (diff) | |
Minor syntax changes for: New toggle buttons to filter articles
See
http://programmers.stackexchange.com/questions/23852/bitwise-or-vs-adding-flags
https://github.com/marienfressinaud/FreshRSS/pull/486
https://github.com/marienfressinaud/FreshRSS/issues/376
Diffstat (limited to 'app/layout')
| -rw-r--r-- | app/layout/nav_menu.phtml | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/app/layout/nav_menu.phtml b/app/layout/nav_menu.phtml index 58e561754..9990448ba 100644 --- a/app/layout/nav_menu.phtml +++ b/app/layout/nav_menu.phtml @@ -9,11 +9,11 @@ <?php if ($this->loginOk) { ?> <?php $url_state = $this->url; if ($this->state & FreshRSS_Entry::STATE_READ) { - $url_state['params']['state'] = $this->state - FreshRSS_Entry::STATE_READ; + $url_state['params']['state'] = $this->state & ~FreshRSS_Entry::STATE_READ; $checked = 'true'; $class = 'active'; } else { - $url_state['params']['state'] = $this->state + FreshRSS_Entry::STATE_READ; + $url_state['params']['state'] = $this->state | FreshRSS_Entry::STATE_READ; $checked = 'false'; $class = ''; } @@ -28,11 +28,11 @@ </a> <?php if ($this->state & FreshRSS_Entry::STATE_NOT_READ) { - $url_state['params']['state'] = $this->state - FreshRSS_Entry::STATE_NOT_READ; + $url_state['params']['state'] = $this->state & ~FreshRSS_Entry::STATE_NOT_READ; $checked = 'true'; $class = 'active'; } else { - $url_state['params']['state'] = $this->state + FreshRSS_Entry::STATE_NOT_READ; + $url_state['params']['state'] = $this->state | FreshRSS_Entry::STATE_NOT_READ; $checked = 'false'; $class = ''; } @@ -46,11 +46,11 @@ </a> <?php if ($this->state & FreshRSS_Entry::STATE_FAVORITE) { - $url_state['params']['state'] = $this->state - FreshRSS_Entry::STATE_FAVORITE; + $url_state['params']['state'] = $this->state & ~FreshRSS_Entry::STATE_FAVORITE; $checked = 'true'; $class = 'active'; } else { - $url_state['params']['state'] = $this->state + FreshRSS_Entry::STATE_FAVORITE; + $url_state['params']['state'] = $this->state | FreshRSS_Entry::STATE_FAVORITE; $checked = 'false'; $class = ''; } @@ -64,11 +64,11 @@ </a> <?php if ($this->state & FreshRSS_Entry::STATE_NOT_FAVORITE) { - $url_state['params']['state'] = $this->state - FreshRSS_Entry::STATE_NOT_FAVORITE; + $url_state['params']['state'] = $this->state & ~FreshRSS_Entry::STATE_NOT_FAVORITE; $checked = 'true'; $class = 'active'; } else { - $url_state['params']['state'] = $this->state + FreshRSS_Entry::STATE_NOT_FAVORITE; + $url_state['params']['state'] = $this->state | FreshRSS_Entry::STATE_NOT_FAVORITE; $checked = 'false'; $class = ''; } |
