Index: trunk/phase3/includes/LogPage.php |
— | — | @@ -155,7 +155,9 @@ |
156 | 156 | * @static |
157 | 157 | * @return HTML string |
158 | 158 | */ |
159 | | - static function actionText( $type, $action, $title = NULL, $skin = NULL, $params = array(), $filterWikilinks=false ) { |
| 159 | + static function actionText( $type, $action, $title = NULL, $skin = NULL, |
| 160 | + $params = array(), $filterWikilinks=false ) |
| 161 | + { |
160 | 162 | global $wgLang, $wgContLang, $wgLogActions, $wgMessageCache; |
161 | 163 | |
162 | 164 | $wgMessageCache->loadAllMessages(); |
— | — | @@ -172,8 +174,15 @@ |
173 | 175 | |
174 | 176 | switch( $type ) { |
175 | 177 | case 'move': |
176 | | - $titleLink = $skin->makeLinkObj( $title, htmlspecialchars( $title->getPrefixedText() ), 'redirect=no' ); |
177 | | - $params[0] = $skin->makeLinkObj( Title::newFromText( $params[0] ), htmlspecialchars( $params[0] ) ); |
| 178 | + $titleLink = $skin->makeLinkObj( $title, |
| 179 | + htmlspecialchars( $title->getPrefixedText() ), 'redirect=no' ); |
| 180 | + $targetTitle = Title::newFromText( $params[0] ); |
| 181 | + if ( !$targetTitle ) { |
| 182 | + # Workaround for broken database |
| 183 | + $params[0] = htmlspecialchars( $params[0] ); |
| 184 | + } else { |
| 185 | + $params[0] = $skin->makeLinkObj( $targetTitle, htmlspecialchars( $params[0] ) ); |
| 186 | + } |
178 | 187 | break; |
179 | 188 | case 'block': |
180 | 189 | if( substr( $title->getText(), 0, 1 ) == '#' ) { |