Index: trunk/phase3/includes/LogPage.php |
— | — | @@ -45,10 +45,10 @@ |
46 | 46 | /** |
47 | 47 | * Constructor |
48 | 48 | * |
49 | | - * @param string $type One of '', 'block', 'protect', 'rights', 'delete', |
| 49 | + * @param $type String: one of '', 'block', 'protect', 'rights', 'delete', |
50 | 50 | * 'upload', 'move' |
51 | | - * @param bool $rc Whether to update recent changes as well as the logging table |
52 | | - * @param bool $udp Whether to send to the UDP feed if NOT sent to RC |
| 51 | + * @param $rc Boolean: whether to update recent changes as well as the logging table |
| 52 | + * @param $udp String: pass 'UDP' to send to the UDP feed if NOT sent to RC |
53 | 53 | */ |
54 | 54 | public function __construct( $type, $rc = true, $udp = 'skipUDP' ) { |
55 | 55 | $this->type = $type; |
— | — | @@ -121,7 +121,9 @@ |
122 | 122 | } |
123 | 123 | |
124 | 124 | /** |
125 | | - * @static |
| 125 | + * Get the list of valid log types |
| 126 | + * |
| 127 | + * @return Array of strings |
126 | 128 | */ |
127 | 129 | public static function validTypes() { |
128 | 130 | global $wgLogTypes; |
— | — | @@ -129,15 +131,20 @@ |
130 | 132 | } |
131 | 133 | |
132 | 134 | /** |
133 | | - * @static |
| 135 | + * Is $type a valid log type |
| 136 | + * |
| 137 | + * @param $type String: log type to check |
| 138 | + * @return Boolean |
134 | 139 | */ |
135 | 140 | public static function isLogType( $type ) { |
136 | 141 | return in_array( $type, LogPage::validTypes() ); |
137 | 142 | } |
138 | 143 | |
139 | 144 | /** |
140 | | - * @static |
141 | | - * @param string $type logtype |
| 145 | + * Get the name for the given log type |
| 146 | + * |
| 147 | + * @param $type String: logtype |
| 148 | + * @return String: log name |
142 | 149 | */ |
143 | 150 | public static function logName( $type ) { |
144 | 151 | global $wgLogNames, $wgMessageCache; |
— | — | @@ -152,9 +159,11 @@ |
153 | 160 | } |
154 | 161 | |
155 | 162 | /** |
| 163 | + * Get the log header for the given log type |
| 164 | + * |
156 | 165 | * @todo handle missing log types |
157 | | - * @param string $type logtype |
158 | | - * @return string Headertext of this logtype |
| 166 | + * @param $type String: logtype |
| 167 | + * @return String: headertext of this logtype |
159 | 168 | */ |
160 | 169 | public static function logHeader( $type ) { |
161 | 170 | global $wgLogHeaders, $wgMessageCache; |
— | — | @@ -163,12 +172,18 @@ |
164 | 173 | } |
165 | 174 | |
166 | 175 | /** |
167 | | - * @static |
168 | | - * Note that if $skin is null, we want to use the wiki content language, since that |
169 | | - * will go to the irc feed. |
| 176 | + * Generate text for a log entry |
| 177 | + * |
| 178 | + * @param $type String: log type |
| 179 | + * @param $action String: log action |
| 180 | + * @param $title Mixed: Title object or null |
| 181 | + * @param $skin Mixed: Skin object or null. If null, we want to use the wiki |
| 182 | + * content language, since that will go to the irc feed. |
| 183 | + * @param $params Array: parameters |
| 184 | + * @param $filterWikilinks Boolean: whether to filter wiki links |
170 | 185 | * @return HTML string |
171 | 186 | */ |
172 | | - public static function actionText( $type, $action, $title = null, $skin = null, |
| 187 | + public static function actionText( $type, $action, $title = null, $skin = null, |
173 | 188 | $params = array(), $filterWikilinks = false ) |
174 | 189 | { |
175 | 190 | global $wgLang, $wgContLang, $wgLogActions, $wgMessageCache; |
— | — | @@ -374,11 +389,12 @@ |
375 | 390 | |
376 | 391 | /** |
377 | 392 | * Add a log entry |
378 | | - * @param string $action one of '', 'block', 'protect', 'rights', 'delete', 'upload', 'move', 'move_redir' |
379 | | - * @param object &$target A title object. |
380 | | - * @param string $comment Description associated |
381 | | - * @param array $params Parameters passed later to wfMsg.* functions |
382 | | - * @param User $doer The user doing the action |
| 393 | + * |
| 394 | + * @param $action String: one of '', 'block', 'protect', 'rights', 'delete', 'upload', 'move', 'move_redir' |
| 395 | + * @param $target Title object |
| 396 | + * @param $comment String: description associated |
| 397 | + * @param $params Array: parameters passed later to wfMsg.* functions |
| 398 | + * @param $doer User object: the user doing the action |
383 | 399 | */ |
384 | 400 | public function addEntry( $action, $target, $comment, $params = array(), $doer = null ) { |
385 | 401 | if ( !is_array( $params ) ) { |
— | — | @@ -408,7 +424,11 @@ |
409 | 425 | |
410 | 426 | /** |
411 | 427 | * Add relations to log_search table |
412 | | - * @static |
| 428 | + * |
| 429 | + * @param $field String |
| 430 | + * @param $values Array |
| 431 | + * @param $logid Integer |
| 432 | + * @return Boolean |
413 | 433 | */ |
414 | 434 | public function addRelations( $field, $values, $logid ) { |
415 | 435 | if( !strlen($field) || empty($values) ) |
— | — | @@ -424,7 +444,9 @@ |
425 | 445 | |
426 | 446 | /** |
427 | 447 | * Create a blob from a parameter array |
428 | | - * @static |
| 448 | + * |
| 449 | + * @param $params Array |
| 450 | + * @return String |
429 | 451 | */ |
430 | 452 | public static function makeParamBlob( $params ) { |
431 | 453 | return implode( "\n", $params ); |
— | — | @@ -432,7 +454,9 @@ |
433 | 455 | |
434 | 456 | /** |
435 | 457 | * Extract a parameter array from a blob |
436 | | - * @static |
| 458 | + * |
| 459 | + * @param $blob String |
| 460 | + * @return Array |
437 | 461 | */ |
438 | 462 | public static function extractParams( $blob ) { |
439 | 463 | if ( $blob === '' ) { |
— | — | @@ -449,7 +473,7 @@ |
450 | 474 | * @param $flags Flags to format |
451 | 475 | * @param $forContent Whether to localize the message depending of the user |
452 | 476 | * language |
453 | | - * @return string |
| 477 | + * @return String |
454 | 478 | */ |
455 | 479 | public static function formatBlockFlags( $flags, $forContent = false ) { |
456 | 480 | global $wgLang; |
— | — | @@ -470,7 +494,7 @@ |
471 | 495 | * @param $flag Flag to translate |
472 | 496 | * @param $forContent Whether to localize the message depending of the user |
473 | 497 | * language |
474 | | - * @return string |
| 498 | + * @return String |
475 | 499 | */ |
476 | 500 | public static function formatBlockFlag( $flag, $forContent = false ) { |
477 | 501 | static $messages = array(); |