diff --git a/apps/reader/views.py b/apps/reader/views.py index e8cd354536..f83da9f8e3 100644 --- a/apps/reader/views.py +++ b/apps/reader/views.py @@ -530,8 +530,7 @@ def load_single_feed(request, feed_id): if user.profile.is_premium: user_search = MUserSearch.get_user(user.pk) user_search.touch_search_date() - blackout = not user.is_staff - stories = feed.find_stories(query, order=order, offset=offset, limit=limit, blackout=blackout) + stories = feed.find_stories(query, order=order, offset=offset, limit=limit) else: stories = [] message = "You must be a premium subscriber to search." diff --git a/apps/rss_feeds/models.py b/apps/rss_feeds/models.py index 7c569aacf5..9807a9efc6 100644 --- a/apps/rss_feeds/models.py +++ b/apps/rss_feeds/models.py @@ -1218,20 +1218,12 @@ def find_feed_stories(cls, feed_ids, query, order="newest", offset=0, limit=25): return stories - def find_stories(self, query, order="newest", offset=0, limit=25, blackout=True): - if blackout: - stories_db = MStory.objects( - Q(story_feed_id=self.pk) & - (Q(story_title__icontains=query) | - Q(story_author_name__icontains=query) | - Q(story_tags__icontains=query)) - ).order_by('-story_date' if order == "newest" else 'story_date')[offset:offset+limit] - else: - story_ids = SearchStory.query(feed_ids=[self.pk], query=query, order=order, - offset=offset, limit=limit) - stories_db = MStory.objects( - story_hash__in=story_ids - ).order_by('-story_date' if order == "newest" else 'story_date') + def find_stories(self, query, order="newest", offset=0, limit=25): + story_ids = SearchStory.query(feed_ids=[self.pk], query=query, order=order, + offset=offset, limit=limit) + stories_db = MStory.objects( + story_hash__in=story_ids + ).order_by('-story_date' if order == "newest" else 'story_date') stories = self.format_stories(stories_db, self.pk) diff --git a/apps/search/models.py b/apps/search/models.py index 370ae24a2a..78408affde 100644 --- a/apps/search/models.py +++ b/apps/search/models.py @@ -38,10 +38,9 @@ def get_user(cls, user_id): return user_search def touch_search_date(self): - # Blackout - # if not self.subscriptions_indexed and not self.subscriptions_indexing: - # self.schedule_index_subscriptions_for_search() - # self.subscriptions_indexing = True + if not self.subscriptions_indexed and not self.subscriptions_indexing: + self.schedule_index_subscriptions_for_search() + self.subscriptions_indexing = True self.last_search_date = datetime.datetime.now() self.save() diff --git a/media/js/newsblur/views/feed_search_view.js b/media/js/newsblur/views/feed_search_view.js index 9ec5004471..536bd1b799 100644 --- a/media/js/newsblur/views/feed_search_view.js +++ b/media/js/newsblur/views/feed_search_view.js @@ -18,7 +18,6 @@ NEWSBLUR.Views.FeedSearchView = Backbone.View.extend({ }, render: function() { - // if (!NEWSBLUR.Globals.is_staff) return this; if (NEWSBLUR.app.active_search) { NEWSBLUR.app.active_search.blur_search(); NEWSBLUR.app.active_search.remove(); diff --git a/media/js/newsblur/views/folder_view.js b/media/js/newsblur/views/folder_view.js index aa08649a9d..84219f7118 100644 --- a/media/js/newsblur/views/folder_view.js +++ b/media/js/newsblur/views/folder_view.js @@ -165,8 +165,6 @@ NEWSBLUR.Views.Folder = Backbone.View.extend({ if (this.options.feedbar) { this.show_collapsed_folder_count(); - } - if (this.options.feedbar && NEWSBLUR.Globals.is_staff) { this.search_view = new NEWSBLUR.Views.FeedSearchView({ feedbar_view: this }).render();