// with the session correctly. Note that being able to load
// the user does not necessarily mean the session was loaded.
// Most likely cause by suhosin.session.encrypt = On.
- $this->setLastError( "Error associating with user session. Try setting suhosin.session.encrypt = Off" );
+ $this->setLastError( "Error associating with user session. " .
+ "Try setting suhosin.session.encrypt = Off" );
return false;
}
/**
* Insert jobs into the job queue to fix redirects to the given title
- * @param string $reason the reason for the fix, see message "double-redirect-fixed-<reason>"
- * @param $redirTitle Title: the title which has changed, redirects pointing to this title are fixed
+ * @param string $reason the reason for the fix, see message
+ * "double-redirect-fixed-<reason>"
+ * @param $redirTitle Title: the title which has changed, redirects
+ * pointing to this title are fixed
* @param bool $destTitle Not used
*/
public static function fixRedirects( $reason, $redirTitle, $destTitle = false ) {
// Find the current final destination
$newTitle = self::getFinalDestination( $this->redirTitle );
if ( !$newTitle ) {
- wfDebug( __METHOD__ . ": skipping: single redirect, circular redirect or invalid redirect destination\n" );
+ wfDebug( __METHOD__ .
+ ": skipping: single redirect, circular redirect or invalid redirect destination\n" );
return true;
}
# No redirect from here, chain terminates
break;
} else {
- $dest = $title = Title::makeTitle( $row->rd_namespace, $row->rd_title, '', $row->rd_interwiki );
+ $dest = $title = Title::makeTitle(
+ $row->rd_namespace,
+ $row->rd_title,
+ '',
+ $row->rd_interwiki
+ );
}
}
*/
function getUser() {
if ( !self::$user ) {
- self::$user = User::newFromName( wfMessage( 'double-redirect-fixer' )->inContentLanguage()->text() );
+ $username = wfMessage( 'double-redirect-fixer' )->inContentLanguage()->text();
+ self::$user = User::newFromName( $username );
# User::newFromName() can return false on a badly configured wiki.
if ( self::$user && !self::$user->isLoggedIn() ) {
self::$user->addToDatabase();
// with the session correctly. Note that being able to load
// the user does not necessarily mean the session was loaded.
// Most likely cause by suhosin.session.encrypt = On.
- $this->setLastError( "Error associating with user session. Try setting suhosin.session.encrypt = Off" );
+ $this->setLastError( "Error associating with user session. " .
+ "Try setting suhosin.session.encrypt = Off" );
return false;
}