From 03220d42c986c27a269079bc64a5c38a3f40b7fc Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Thu, 7 Jul 2005 13:44:33 +0000 Subject: [PATCH] * Documented the constructor * Fixed a logic error in actionText(), extensions can now write to the log using an empty action string without warnings. * Formatting --- includes/LogPage.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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(); } -- 2.20.1