$newtitle = $nt->getDBkey();
$dbw = wfGetDB( DB_MASTER );
- $res = $dbw->select( 'watchlist', 'wl_user',
+ $res = $dbw->select( 'watchlist',
+ array( 'wl_user', 'wl_notificationtimestamp' ),
array( 'wl_namespace' => $oldnamespace, 'wl_title' => $oldtitle ),
__METHOD__, 'FOR UPDATE'
);
$values[] = array(
'wl_user' => $s->wl_user,
'wl_namespace' => $newnamespace,
- 'wl_title' => $newtitle
+ 'wl_title' => $newtitle,
+ 'wl_notificationtimestamp' => $s->wl_notificationtimestamp,
);
}
*/
class ApiQueryBlocks extends ApiQueryBase {
- /**
- * @var array
- */
- protected $usernames;
-
public function __construct( ApiQuery $query, $moduleName ) {
parent::__construct( $query, $moduleName, 'bk' );
}
$this->addWhereFld( 'ipb_id', $params['ids'] );
}
if ( isset( $params['users'] ) ) {
+ $usernames = array();
foreach ( (array)$params['users'] as $u ) {
- $this->prepareUsername( $u );
+ $usernames[] = $this->prepareUsername( $u );
}
- $this->addWhereFld( 'ipb_address', $this->usernames );
+ $this->addWhereFld( 'ipb_address', $usernames );
$this->addWhereFld( 'ipb_auto', 0 );
}
if ( isset( $params['ip'] ) ) {
if ( $name === false ) {
$this->dieUsage( "User name {$user} is not valid", 'param_user' );
}
- $this->usernames[] = $name;
+ return $name;
}
public function getAllowedParams() {
wfProfileIn( __METHOD__ );
if ( !$title || !$title instanceof Title ) {
global $wgTitle;
+ wfDebugLog( 'GlobalTitleFail', __METHOD__ . ' called by ' . wfGetAllCallers() . ' with no title set.' );
$title = $wgTitle;
}
// Sometimes $wgTitle isn't set either...
if ( $this->title === null ) {
global $wgTitle; # fallback to $wg till we can improve this
$this->title = $wgTitle;
- wfDebugLog( 'GlobalTitleFail', __METHOD__ . ' called by ' . wfGetCaller() . ' with no title set.' );
+ wfDebugLog( 'GlobalTitleFail', __METHOD__ . ' called by ' . wfGetAllCallers() . ' with no title set.' );
}
return $this->title;
* Replace <!--LINK--> link placeholders with actual links, in the buffer
*
* @param string $text
- * @return array Array of link CSS classes, indexed by PDBK.
*/
public function replace( &$text ) {
wfProfileIn( __METHOD__ );
- /** @todo FIXME: replaceInternal doesn't return a value */
- $colours = $this->replaceInternal( $text );
+ $this->replaceInternal( $text );
$this->replaceInterwiki( $text );
wfProfileOut( __METHOD__ );
- return $colours;
+
}
/**
*
* @param string $text
* @param int $options
- *
- * @return array Array of link CSS classes, indexed by PDBK.
*/
public function replaceLinkHolders( &$text, $options = 0 ) {
- return $this->mLinkHolders->replace( $text );
+ $this->mLinkHolders->replace( $text );
}
/**
"movepage-moved-redirect": "A redirect has been created.",
"movepage-moved-noredirect": "The creation of a redirect has been suppressed.",
"articleexists": "A page of that name already exists, or the name you have chosen is not valid.\nPlease choose another name.",
- "cantmove-titleprotected": "You cannot move a page to this location because the new title has been protected from creation",
+ "cantmove-titleprotected": "You cannot move a page to this location because the new title has been protected from creation.",
"movetalk": "Move associated talk page",
"move-subpages": "Move subpages (up to $1)",
"move-talk-subpages": "Move subpages of talk page (up to $1)",
"delete_and_move_confirm": "Yes, delete the page",
"delete_and_move_reason": "Deleted to make way for move from \"[[$1]]\"",
"selfmove": "Source and destination titles are the same;\ncannot move a page over itself.",
- "immobile-source-namespace": "Cannot move pages in namespace \"$1\"",
- "immobile-target-namespace": "Cannot move pages into namespace \"$1\"",
+ "immobile-source-namespace": "Cannot move pages in namespace \"$1\".",
+ "immobile-target-namespace": "Cannot move pages into namespace \"$1\".",
"immobile-target-namespace-iw": "Interwiki link is not a valid target for page move.",
"immobile-source-page": "This page is not movable.",
"immobile-target-page": "Cannot move to that destination title.",
"bad-target-model": "The desired destination uses a different content model. Cannot convert from $1 to $2.",
- "imagenocrossnamespace": "Cannot move file to non-file namespace",
- "nonfile-cannot-move-to-file": "Cannot move non-file to file namespace",
- "imagetypemismatch": "The new file extension does not match its type",
- "imageinvalidfilename": "The target filename is invalid",
+ "imagenocrossnamespace": "Cannot move file to non-file namespace.",
+ "nonfile-cannot-move-to-file": "Cannot move non-file to file namespace.",
+ "imagetypemismatch": "The new file extension does not match its type.",
+ "imageinvalidfilename": "The target filename is invalid.",
"fix-double-redirects": "Update any redirects that point to the original title",
"move-leave-redirect": "Leave a redirect behind",
"protectedpagemovewarning": "<strong>Warning:</strong> This page has been protected so that only users with administrator privileges can move it.\nThe latest log entry is provided below for reference:",