From: Ævar Arnfjörð Bjarmason Date: Thu, 7 Jul 2005 13:44:33 +0000 (+0000) Subject: * Documented the constructor X-Git-Tag: 1.5.0beta4~210 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=03220d42c986c27a269079bc64a5c38a3f40b7fc;p=lhc%2Fweb%2Fwiklou.git * Documented the constructor * Fixed a logic error in actionText(), extensions can now write to the log using an empty action string without warnings. * Formatting --- diff --git a/includes/LogPage.php b/includes/LogPage.php index 54ab1b6735..c4cb772961 100644 --- a/includes/LogPage.php +++ b/includes/LogPage.php @@ -35,8 +35,13 @@ class LogPage { /* private */ var $type, $action, $comment, $params, $target; var $updateRecentChanges = true; + /** + * Constructor + * + * @param string $type One of 'block', 'protect', 'rights', 'delete', + * 'upload', 'move' + */ function LogPage( $type ) { - # Type is one of 'block', 'protect', 'rights', 'delete', 'upload', 'move' $this->type = $type; } @@ -185,7 +190,7 @@ class LogPage { } } else { wfDebug( "LogPage::actionText - unknown action $key\n" ); - $rv = "$action $titleLink"; + $rv = "$action"; } if( $filterWikilinks ) { $rv = str_replace( "[[", "", $rv ); @@ -211,8 +216,7 @@ class LogPage { $this->comment = $comment; $this->params = LogPage::makeParamBlob( $params ); - $this->actionText = LogPage::actionText( $this->type, $action, - $target, NULL, $params ); + $this->actionText = LogPage::actionText( $this->type, $action, $target, NULL, $params ); return $this->saveContent(); }