r86077 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86076‎ | r86077 | r86078 >
Date:19:58, 14 April 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
added docs
Modified paths:
  • /trunk/extensions/Ratings/Ratings.class.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Ratings/Ratings.class.php
@@ -96,6 +96,15 @@
9797 return self::getAndCalcPageRatings( $page );
9898 }
9999
 100+ /**
 101+ * Gets the summary data for all ratings on the specified page.
 102+ *
 103+ * @since 0.1
 104+ *
 105+ * @param Title $page
 106+ *
 107+ * @return array
 108+ */
100109 protected static function getAndCalcPageRatings( Title $page ) {
101110 $tags = array();
102111
@@ -128,10 +137,28 @@
129138 return $tags;
130139 }
131140
 141+ /**
 142+ * Gets the ratings summary data for the specified page
 143+ * by querying a table that contains the already calculated data.
 144+ * Returns false when this is not available.
 145+ *
 146+ * @since 0.1
 147+ *
 148+ * @param Title $page
 149+ *
 150+ * @return array or false
 151+ */
132152 protected static function getCachedPageRatings( Title $page ) {
133153 return false;
134154 }
135155
 156+ /**
 157+ * Gets a list of tag names from the database.
 158+ *
 159+ * @since 0.1
 160+ *
 161+ * @return array
 162+ */
136163 public static function getTagNames() {
137164 $dbr = wfGetDb( DB_SLAVE );
138165

Status & tagging log