$oldid = $this->oldTitle->getArticleID();
- if ( strlen( $this->newTitle->getDBkey() ) < 1 ) {
+ if ( $this->newTitle->getDBkey() === '' ) {
$status->fatal( 'articleexists' );
}
if (
[ 'cl_from' => $pageid ],
__METHOD__
);
- $type = MWNamespace::getCategoryLinkType( $this->newTitle->getNamespace() );
+ $type = MediaWikiServices::getInstance()->getNamespaceInfo()->
+ getCategoryLinkType( $this->newTitle->getNamespace() );
foreach ( $prefixes as $prefixRow ) {
$prefix = $prefixRow->cl_sortkey_prefix;
$catTo = $prefixRow->cl_to;
* Move a file associated with a page to a new location.
* Can also be used to revert after a DB failure.
*
- * @access private
- * @param Title Old location to move the file from.
- * @param Title New location to move the file to.
+ * @private
+ * @param Title $oldTitle Old location to move the file from.
+ * @param Title $newTitle New location to move the file to.
* @return Status
*/
private function moveFile( $oldTitle, $newTitle ) {
);
if ( !$status->isGood() ) {
- throw new MWException( 'Failed to delete page-move revision: ' . $status );
+ throw new MWException( 'Failed to delete page-move revision: '
+ . $status->getWikiText( false, false, 'en' ) );
}
$nt->resetArticleID( false );