r66625 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r66624‎ | r66625 | r66626 >
Date:20:59, 18 May 2010
Author:ialex
Status:ok
Tags:
Comment:
Fixed some doxygen warnings and documented a bit
Modified paths:
  • /trunk/phase3/includes/LogPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/LogPage.php
@@ -45,10 +45,10 @@
4646 /**
4747 * Constructor
4848 *
49 - * @param string $type One of '', 'block', 'protect', 'rights', 'delete',
 49+ * @param $type String: one of '', 'block', 'protect', 'rights', 'delete',
5050 * '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
5353 */
5454 public function __construct( $type, $rc = true, $udp = 'skipUDP' ) {
5555 $this->type = $type;
@@ -121,7 +121,9 @@
122122 }
123123
124124 /**
125 - * @static
 125+ * Get the list of valid log types
 126+ *
 127+ * @return Array of strings
126128 */
127129 public static function validTypes() {
128130 global $wgLogTypes;
@@ -129,15 +131,20 @@
130132 }
131133
132134 /**
133 - * @static
 135+ * Is $type a valid log type
 136+ *
 137+ * @param $type String: log type to check
 138+ * @return Boolean
134139 */
135140 public static function isLogType( $type ) {
136141 return in_array( $type, LogPage::validTypes() );
137142 }
138143
139144 /**
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
142149 */
143150 public static function logName( $type ) {
144151 global $wgLogNames, $wgMessageCache;
@@ -152,9 +159,11 @@
153160 }
154161
155162 /**
 163+ * Get the log header for the given log type
 164+ *
156165 * @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
159168 */
160169 public static function logHeader( $type ) {
161170 global $wgLogHeaders, $wgMessageCache;
@@ -163,12 +172,18 @@
164173 }
165174
166175 /**
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
170185 * @return HTML string
171186 */
172 - public static function actionText( $type, $action, $title = null, $skin = null,
 187+ public static function actionText( $type, $action, $title = null, $skin = null,
173188 $params = array(), $filterWikilinks = false )
174189 {
175190 global $wgLang, $wgContLang, $wgLogActions, $wgMessageCache;
@@ -374,11 +389,12 @@
375390
376391 /**
377392 * 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
383399 */
384400 public function addEntry( $action, $target, $comment, $params = array(), $doer = null ) {
385401 if ( !is_array( $params ) ) {
@@ -408,7 +424,11 @@
409425
410426 /**
411427 * Add relations to log_search table
412 - * @static
 428+ *
 429+ * @param $field String
 430+ * @param $values Array
 431+ * @param $logid Integer
 432+ * @return Boolean
413433 */
414434 public function addRelations( $field, $values, $logid ) {
415435 if( !strlen($field) || empty($values) )
@@ -424,7 +444,9 @@
425445
426446 /**
427447 * Create a blob from a parameter array
428 - * @static
 448+ *
 449+ * @param $params Array
 450+ * @return String
429451 */
430452 public static function makeParamBlob( $params ) {
431453 return implode( "\n", $params );
@@ -432,7 +454,9 @@
433455
434456 /**
435457 * Extract a parameter array from a blob
436 - * @static
 458+ *
 459+ * @param $blob String
 460+ * @return Array
437461 */
438462 public static function extractParams( $blob ) {
439463 if ( $blob === '' ) {
@@ -449,7 +473,7 @@
450474 * @param $flags Flags to format
451475 * @param $forContent Whether to localize the message depending of the user
452476 * language
453 - * @return string
 477+ * @return String
454478 */
455479 public static function formatBlockFlags( $flags, $forContent = false ) {
456480 global $wgLang;
@@ -470,7 +494,7 @@
471495 * @param $flag Flag to translate
472496 * @param $forContent Whether to localize the message depending of the user
473497 * language
474 - * @return string
 498+ * @return String
475499 */
476500 public static function formatBlockFlag( $flag, $forContent = false ) {
477501 static $messages = array();

Status & tagging log