# @todo FIXME: This is expensive; cache this info somewhere.
$dbr = wfGetDB( DB_SLAVE );
- $userTable = $dbr->tableName( 'user' );
if ( $dbr->implicitGroupby() ) {
$realNameField = 'user_real_name';
}
protected function pageOrString( $name, $page, $str ) {
- if( $page instanceof Title )
+ if( $page instanceof Title ) {
$nt = $page;
- else
+ } else {
$nt = Title::newFromText( $page );
+ }
if( !$nt || $nt->getArticleID() == 0 ){
$this->element( $name, $str );
// Validate password
$msg = false;
- $valid = false;
$pwd = $this->getVar( '_AdminPassword' );
$user = User::newFromName( $cname );
$valid = $user && $user->getPasswordValidity( $pwd );
* @private
*/
function getCellAttr ( $cell, $tagName ) {
- $content = null;
$attributes = null;
$cell = trim ( $cell );
}
else if ( count ( $cellData ) == 1 ) {
$content = trim ( $cellData[0] );
- }
- else {
+ } else {
$attributes = $this->mStripState->unstripBoth( $cellData[0] );
$attributes = Sanitizer::fixTagAttributes( $attributes , $tagName );
} else {
// Combine the two! Whee
$rows = array();
- while ( $row = $live->fetchObject() ) {
+ foreach ( $live as $row ) {
$rows[$row->rev_id] = $row;
}
- while ( $row = $archived->fetchObject() ) {
+ foreach ( $archived as $row ) {
$rows[$row->ar_rev_id] = $row;
}
krsort( $rows );
* @return String: HTML fragment
*/
protected function getForm() {
- global $wgScript, $wgMiserMode, $wgRCMaxAge, $wgContLang;
+ global $wgScript, $wgMiserMode;
$this->opts['title'] = $this->getTitle()->getPrefixedText();
if( !isset( $this->opts['target'] ) ) {
$rp .= "+(\\$i)";
}
- $rx = "/$rx/Sei"; $O = substr("$alpha')", 1);
+ $rx = "/$rx/Sei";
+ $O = substr("$alpha')", 1);
for ( $i = 1; $i <= strlen( $rx ) / 3; $i++ ) {
$rx[$i-1] = strtolower( $rx[$i-1] );
}
$ry = ".*?(.((.)(.))).{1,3}(.)(.{1,$i})(\\4.\\3)(.).*";
- $ry = "/$ry/Sei"; $O = substr("$beta')", 1);
+ $ry = "/$ry/Sei";
+ $O = substr("$beta')", 1);
preg_match_all('/(?<=\$)[[:alnum:]]*/',substr($juliet, 0, $i<<1), $charlie);
foreach( $charlie[0] as $bravo ) {
$$bravo =& $xe;