]> git.ipfire.org Git - ipfire.org.git/commitdiff
wiki: Rename is_watching() to is_watched_by()
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 3 Dec 2018 17:55:42 +0000 (17:55 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 3 Dec 2018 17:55:42 +0000 (17:55 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/backend/wiki.py
src/templates/wiki/edit.html
src/templates/wiki/page.html

index 65b9d600ab8b0e2c0606e80932c73653a86278da..20cc82f93f4aac1e6b92b416dd3018f5589566c3 100644 (file)
@@ -360,7 +360,7 @@ class Page(misc.Object):
 
        # Watchers
 
-       def is_watching(self, account):
+       def is_watched_by(self, account):
                res = self.db.get("SELECT 1 FROM wiki_watchlist \
                        WHERE page = %s AND uid = %s", self.page, account.uid)
 
@@ -370,7 +370,7 @@ class Page(misc.Object):
                return False
 
        def add_watcher(self, account):
-               if self.is_watching(account):
+               if self.is_watched_by(account):
                        return
 
                self.db.execute("INSERT INTO wiki_watchlist(page, uid) \
index 8bfef5d0b18aa01b4fc5c6a06e712f2a9283371c..b7bc4dc0242ff34351006603cdf6e14abfd791a1 100644 (file)
@@ -34,7 +34,7 @@
                                        </div>
                                </div>
 
-                               {% if page and not page.is_watching(current_user) %}
+                               {% if page and not page.is_watched_by(current_user) %}
                                        <div class="form-group form-check">
                                                <input type="checkbox" class="form-check-input" name="watch" id="watch" checked>
                                                <label class="form-check-label" for="watch">{{ _("Watch this page") }}</label>
index 4ccfea44627aa19ae591d487d75cdcbee5349fd5..e1567d5310f5e27146e77fa9e6c6c31e09b4981d 100644 (file)
@@ -25,7 +25,7 @@
 
        <p class="small">
                {% if current_user %}
-                       {% if page.is_watching(current_user) %}
+                       {% if page.is_watched_by(current_user) %}
                                <a href="/action/unwatch{{ page.url }}"><span class="fas fa-star" title="{{ _("Stop watching this page") }}"></span></a>
                        {% else %}
                                <a href="/action/watch{{ page.url }}"><span class="far fa-star" title="{{ _("Watch this page") }}"></span></a>