Index: trunk/extensions/Ratings/Ratings.class.php |
— | — | @@ -96,6 +96,15 @@ |
97 | 97 | return self::getAndCalcPageRatings( $page ); |
98 | 98 | } |
99 | 99 | |
| 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 | + */ |
100 | 109 | protected static function getAndCalcPageRatings( Title $page ) { |
101 | 110 | $tags = array(); |
102 | 111 | |
— | — | @@ -128,10 +137,28 @@ |
129 | 138 | return $tags; |
130 | 139 | } |
131 | 140 | |
| 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 | + */ |
132 | 152 | protected static function getCachedPageRatings( Title $page ) { |
133 | 153 | return false; |
134 | 154 | } |
135 | 155 | |
| 156 | + /** |
| 157 | + * Gets a list of tag names from the database. |
| 158 | + * |
| 159 | + * @since 0.1 |
| 160 | + * |
| 161 | + * @return array |
| 162 | + */ |
136 | 163 | public static function getTagNames() { |
137 | 164 | $dbr = wfGetDb( DB_SLAVE ); |
138 | 165 | |