summaryrefslogtreecommitdiffstats
path: root/askbot/search
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2013-03-27 23:41:46 -0400
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2013-03-27 23:41:46 -0400
commit85db009cc8f28f98c277c3631f169b5d648a1155 (patch)
tree3225549f3a128bf4671079aa09d047fa02de70c4 /askbot/search
parenta4a2fcf214813d5c79908609b335cab3d2599a62 (diff)
parent86c38acf1038c23f0f4bd83a980cf5369834eaf5 (diff)
downloadaskbot-85db009cc8f28f98c277c3631f169b5d648a1155.tar.gz
askbot-85db009cc8f28f98c277c3631f169b5d648a1155.tar.bz2
askbot-85db009cc8f28f98c277c3631f169b5d648a1155.zip
merged the master branch
Diffstat (limited to 'askbot/search')
-rw-r--r--askbot/search/state_manager.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/askbot/search/state_manager.py b/askbot/search/state_manager.py
index 7b6b746c..efefbc40 100644
--- a/askbot/search/state_manager.py
+++ b/askbot/search/state_manager.py
@@ -9,6 +9,7 @@ from django.utils.encoding import smart_str
import askbot
import askbot.conf
+from askbot.conf import settings as askbot_settings
from askbot import const
from askbot.utils.functions import strip_plus
@@ -90,8 +91,11 @@ class SearchState(object):
def __init__(self, scope, sort, query, tags, author, page, user_logged_in):
# INFO: zip(*[('a', 1), ('b', 2)])[0] == ('a', 'b')
- if (scope not in zip(*const.POST_SCOPE_LIST)[0]) or (scope == 'favorite' and not user_logged_in):
- self.scope = const.DEFAULT_POST_SCOPE
+ if (scope not in zip(*const.POST_SCOPE_LIST)[0]) or (scope == 'followed' and not user_logged_in):
+ if user_logged_in:
+ self.scope = askbot_settings.DEFAULT_SCOPE_AUTHENTICATED
+ else:
+ self.scope = askbot_settings.DEFAULT_SCOPE_ANONYMOUS
else:
self.scope = scope