r48224 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48223‎ | r48224 | r48225 >
Date:13:22, 9 March 2009
Author:werdna
Status:ok
Tags:
Comment:
Appropriate handling of invalid titles and moves with suppressed redirects.
Modified paths:
  • /trunk/extensions/AbuseFilter/AbuseFilter.class.php (modified) (history)

Diff [purge]

Index: trunk/extensions/AbuseFilter/AbuseFilter.class.php
@@ -199,7 +199,7 @@
200200 $vars = new AbuseFilterVariableHolder;
201201
202202 if (!$title)
203 - return array();
 203+ return new AbuseFilterVariableHolder;
204204
205205 $vars->setVar( $prefix."_ARTICLEID", $title->getArticleId() );
206206 $vars->setVar( $prefix."_NAMESPACE", $title->getNamespace() );
@@ -1153,8 +1153,10 @@
11541154 $user->setName( $row->rc_user_text );
11551155 }
11561156
 1157+ $params = explode( "\n", trim($row->rc_params) );
 1158+
11571159 $oldTitle = Title::makeTitle( $row->rc_namespace, $row->rc_title );
1158 - $newTitle = Title::newFromText( trim($row->rc_params) );
 1160+ $newTitle = Title::newFromText( $params[0] );
11591161
11601162 $vars = AbuseFilterVariableHolder::merge(
11611163 $vars,

Status & tagging log