var $updateRecentChanges = true;
function LogPage( $type ) {
- # Type is one of 'block', 'protect', 'rights', 'delete', 'upload'
+ # Type is one of 'block', 'protect', 'rights', 'delete', 'upload', 'move'
$this->type = $type;
}
* @static
*/
function validTypes() {
- static $types = array( '', 'block', 'protect', 'rights', 'delete', 'upload' );
+ static $types = array( '', 'block', 'protect', 'rights', 'delete', 'upload', 'move' );
return $types;
}
'protect' => array( 'protect', 'unprotect' ),
'rights' => array( 'rights' ),
'delete' => array( 'delete', 'restore' ),
- 'upload' => array( 'upload' )
+ 'upload' => array( 'upload' ),
+ 'move' => array( 'move' )
);
return $actions[$type];
}
'rights' => 'bureaucratlog',
'delete' => 'dellogpage',
'upload' => 'uploadlogpage',
+ 'move' => 'movelogpage'
);
return str_replace( '_', ' ', wfMsg( $typeText[$type] ) );
}
'protect' => 'protectlogtext',
'rights' => 'rightslogtext',
'delete' => 'dellogpagetext',
- 'upload' => 'uploadlogpagetext'
+ 'upload' => 'uploadlogpagetext',
+ 'move' => 'movelogpagetext'
);
return wfMsg( $headerText[$type] );
}
'delete/restore' => 'undeletedarticle',
'upload/upload' => 'uploadedimage',
'upload/revert' => 'uploadedimage',
+ 'move/move' => '1movedto2',
+ 'move/move_redir' => '1movedto2_redir'
);
$key = "$type/$action";
if( isset( $actions[$key] ) ) {
/**
* Add a log entry
* @param string $action one of 'block', 'protect', 'rights', 'delete', 'upload'
- * @param &$target
+ * @param object &$target A title object.
* @param string $comment Description associated
+ * @param array $params Parameters passed later to wfMsg.* functions
*/
function addEntry( $action, &$target, $comment, $params = array() ) {
global $wgLang, $wgUser;
# Variables beginning with 'o' for old article 'n' for new article
# Attempt to move the article
-
$ot = Title::newFromText( $this->oldTitle );
$nt = Title::newFromText( $this->newTitle );
$this->showForm( wfMsg( $error ) );
return;
}
-
+
# Update counters if the article got moved into or out of NS_MAIN namespace
$ons = $ot->getNamespace();
$nns = $nt->getNamespace();
# (1) the checkbox says to,
# (2) the namespaces are not themselves talk namespaces, and of course
# (3) it exists.
-
if ( ( $wgRequest->getVal('wpMovetalk') == 1 ) &&
( ! Namespace::isTalk( $ons ) ) &&
( ! Namespace::isTalk( $nns ) ) ) {
}
# Give back result to user.
-
$titleObj = Title::makeTitle( NS_SPECIAL, 'Movepage' );
$success = $titleObj->getFullURL(
'action=success&oldtitle=' . wfUrlencode( $ot->getPrefixedText() ) .
);
$newid = $dbw->insertId();
$wgLinkCache->clearLink( $this->getPrefixedDBkey() );
-
- RecentChange::notifyMoveOverRedirect( $now, $this, $nt, $wgUser, $comment );
+ # Record in RC
+ // Replaced by a log entry
+ // RecentChange::notifyMoveOverRedirect( $now, $this, $nt, $wgUser, $comment );
+
+ # Log the move
+ $log = new LogPage( 'move' );
+ $log->addEntry( 'move_redir', $this, '', array(1 => $nt->getText()) );
+
# Swap links
# Load titles and IDs
$wgLinkCache->clearLink( $this->getPrefixedDBkey() );
# Record in RC
- RecentChange::notifyMoveToNew( $now, $this, $nt, $wgUser, $comment );
+ // Replaced by a log entry
+ // RecentChange::notifyMoveToNew( $now, $this, $nt, $wgUser, $comment );
+
+ # Log the move
+ $log = new LogPage( 'move' );
+ $log->addEntry( 'move', $this, '', array(1 => $nt->getText()) );
# Purge squid and linkscc as per article creation
Article::onArticleCreate( $nt );
'savegroup' => 'Save Group',
# user groups editing
+#
'userlevels-editusergroup' => 'Edit user groups',
'saveusergroups' => 'Save User Groups',
'userlevels-groupsmember' => 'Member of:',
'userlevels-groupsavailable' => 'Available groups:',
'userlevels-groupshelp' => 'Select groups you want the user to be removed from or added to.
Unselected groups will not be changed. You can unselect a group by using CTRL + Left Click',
+
# Recent changes
#
'changes' => 'changes',
'talkpagenotmoved' => 'The corresponding talk page was <strong>not</strong> moved.',
'1movedto2' => "$1 moved to $2",
'1movedto2_redir' => '$1 moved to $2 over redirect',
+'movelogpage' => 'Move log',
+'movelogpagetext' => 'Below is a list of page moved.',
# Export