allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jetm...@apache.org
Subject [13/43] git commit: [#4905] ticket:634 Make logic cleaner a bit
Date Thu, 18 Sep 2014 07:29:48 GMT
[#4905] ticket:634 Make logic cleaner a bit


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/6b9a52c1
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/6b9a52c1
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/6b9a52c1

Branch: refs/heads/je/42cc_7656
Commit: 6b9a52c10d0643ac7dda24ef35f6151360555f0e
Parents: 263b6d4
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Tue Aug 26 09:36:16 2014 +0000
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Tue Sep 16 15:33:36 2014 +0000

----------------------------------------------------------------------
 ForgeWiki/forgewiki/wiki_main.py | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/6b9a52c1/ForgeWiki/forgewiki/wiki_main.py
----------------------------------------------------------------------
diff --git a/ForgeWiki/forgewiki/wiki_main.py b/ForgeWiki/forgewiki/wiki_main.py
index 615af76..41f056e 100644
--- a/ForgeWiki/forgewiki/wiki_main.py
+++ b/ForgeWiki/forgewiki/wiki_main.py
@@ -513,16 +513,15 @@ class PageController(BaseController, FeedController):
             prev = None
         next = cur + 1
         hide_left_bar = not (c.app.show_left_bar)
-        tool_subscribed = M.Mailbox.subscribed()
-        if tool_subscribed:
-            subscribed = False
-        else:
-            subscribed = M.Mailbox.subscribed(artifact=self.page)
+        subscribed = M.Mailbox.subscribed()
+        subscribed_to_page = False
+        if not subscribed:
+            subscribed_to_page = M.Mailbox.subscribed(artifact=self.page)
         return dict(
             page=page,
             cur=cur, prev=prev, next=next,
-            page_subscribed=subscribed,
-            subscribed=M.Mailbox.subscribed(),
+            page_subscribed=subscribed_to_page,
+            subscribed=subscribed,
             hide_left_bar=hide_left_bar, show_meta=c.app.show_right_bar,
             pagenum=pagenum, limit=limit, count=post_count)
 


Mime
View raw message