array(
'rd_from' => $this->getID(),
'rd_namespace' => $retval->getNamespace(),
- 'rd_title' => $retval->getDBKey()
+ 'rd_title' => $retval->getDBkey()
),
__METHOD__
);
$dbw->delete( 'recentchanges',
array( 'rc_type != '.RC_LOG,
'rc_namespace' => $this->mTitle->getNamespace(),
- 'rc_title' => $this->mTitle->getDBKey() ),
+ 'rc_title' => $this->mTitle->getDBkey() ),
__METHOD__ );
$dbw->delete( 'recentchanges',
array( 'rc_type != '.RC_LOG, 'rc_cur_id' => $id ),
*/
protected function initialize() {
if ( $this->mName === null && $this->mTitle )
- $this->mName = $title->getDBKey();
+ $this->mName = $title->getDBkey();
if( $this->mName === null && $this->mID === null ) {
throw new MWException( __METHOD__.' has both names and IDs null' );
if ( $this->mTitle ) {
# If there is a title object but no record in the category table, treat this as an empty category
$this->mID = false;
- $this->mName = $this->mTitle->getDBKey();
+ $this->mName = $this->mTitle->getDBkey();
$this->mPages = 0;
$this->mSubcats = 0;
$this->mFiles = 0;
}
$cat->mTitle = $title;
- $cat->mName = $title->getDBKey();
+ $cat->mName = $title->getDBkey();
return $cat;
}
$cat = new self();
$cat->mTitle = $title;
- $cat->mName = $title->getDBKey();
+ $cat->mName = $title->getDBkey();
return $cat;
}
# but we can't know that here...
return false;
} else {
- $cat->mName = $title->getDBKey(); # if we have a title object, fetch the category name from there
+ $cat->mName = $title->getDBkey(); # if we have a title object, fetch the category name from there
}
$cat->mID = false;
break;
default:
if( $title->getNamespace() == NS_SPECIAL ) {
- list( $name, $par ) = SpecialPage::resolveAliasWithSubpage( $title->getDBKey() );
+ list( $name, $par ) = SpecialPage::resolveAliasWithSubpage( $title->getDBkey() );
# Use the language name for log titles, rather than Log/X
if( $name == 'Log' ) {
$titleLink = '('.$skin->link( $title, LogPage::logName( $par ) ).')';
if( $nt->getText() != wfStripIllegalFilenameChars( $nt->getText() ) ) {
$errors[] = array('imageinvalidfilename');
}
- if( !File::checkExtensionCompatibility( $file, $nt->getDBKey() ) ) {
+ if( !File::checkExtensionCompatibility( $file, $nt->getDBkey() ) ) {
$errors[] = array('imagetypemismatch');
}
}
// don't move it twice
continue;
$newPageName = preg_replace(
- '#^'.preg_quote( $this->getDBKey(), '#' ).'#',
- $nt->getDBKey(), $oldSubpage->getDBKey() );
+ '#^'.preg_quote( $this->getDBkey(), '#' ).'#',
+ $nt->getDBkey(), $oldSubpage->getDBkey() );
if( $oldSubpage->isTalkPage() ) {
$newNs = $nt->getTalkPage()->getNamespace();
} else {
case NS_FILE:
return wfFindFile( $this ); // file exists, possibly in a foreign repo
case NS_SPECIAL:
- return SpecialPage::exists( $this->getDBKey() ); // valid special page
+ return SpecialPage::exists( $this->getDBkey() ); // valid special page
case NS_MAIN:
return $this->mDbkeyform == ''; // selflink, possibly with fragment
case NS_MEDIAWIKI:
else
$this->addFields($resultPageSet->getPageTableFields());
$this->addFields('page_is_redirect');
- $this->addWhereFld($this->bl_title, $this->rootTitle->getDBKey());
+ $this->addWhereFld($this->bl_title, $this->rootTitle->getDBkey());
if($this->hasNS)
$this->addWhereFld($this->bl_ns, $this->rootTitle->getNamespace());
$this->addWhereFld('page_namespace', $this->params['namespace']);
// We can't use LinkBatch here because $this->hasNS may be false
$titleWhere = array();
foreach($this->redirTitles as $t)
- $titleWhere[] = "{$this->bl_title} = ".$db->addQuotes($t->getDBKey()).
+ $titleWhere[] = "{$this->bl_title} = ".$db->addQuotes($t->getDBkey()).
($this->hasNS ? " AND {$this->bl_ns} = '{$t->getNamespace()}'" : "");
$this->addWhere($db->makeList($titleWhere, LIST_OR));
$this->addWhereFld('page_namespace', $this->params['namespace']);
if(!is_null($this->redirID))
{
$first = $this->redirTitles[0];
- $title = $db->strencode($first->getDBKey());
+ $title = $db->strencode($first->getDBkey());
$ns = $first->getNamespace();
$from = $this->redirID;
if($this->hasNS)
foreach($categories as $c)
{
$t = $titles[$c];
- $cattitles[$c] = $t->getDBKey();
+ $cattitles[$c] = $t->getDBkey();
}
$this->addTables(array('category', 'page', 'page_props'));
$this->protections[$title->getNamespace()][$title->getDBkey()];
$this->getResult()->setIndexedTagName($pageInfo['protection'], 'pr');
}
- if($this->fld_talkid && isset($this->talkids[$title->getNamespace()][$title->getDBKey()]))
- $pageInfo['talkid'] = $this->talkids[$title->getNamespace()][$title->getDBKey()];
- if($this->fld_subjectid && isset($this->subjectids[$title->getNamespace()][$title->getDBKey()]))
- $pageInfo['subjectid'] = $this->subjectids[$title->getNamespace()][$title->getDBKey()];
+ if($this->fld_talkid && isset($this->talkids[$title->getNamespace()][$title->getDBkey()]))
+ $pageInfo['talkid'] = $this->talkids[$title->getNamespace()][$title->getDBkey()];
+ if($this->fld_subjectid && isset($this->subjectids[$title->getNamespace()][$title->getDBkey()]))
+ $pageInfo['subjectid'] = $this->subjectids[$title->getNamespace()][$title->getDBkey()];
if($this->fld_url) {
$pageInfo['fullurl'] = $title->getFullURL();
$pageInfo['editurl'] = $title->getFullURL('action=edit');
$images = $others = array();
foreach ($this->everything as $title)
if ($title->getNamespace() == NS_FILE)
- $images[] = $title->getDBKey();
+ $images[] = $title->getDBkey();
else
$others[] = $title;
$fields = OldLocalFile::selectFields();
$conds = $opts = $join_conds = array();
$eq = $inc ? "=" : "";
- $conds[] = "oi_name = " . $dbr->addQuotes( $this->title->getDBKey() );
+ $conds[] = "oi_name = " . $dbr->addQuotes( $this->title->getDBkey() );
if( $start ) {
$conds[] = "oi_timestamp <$eq " . $dbr->addQuotes( $dbr->timestamp( $start ) );
}
$this->file = $file;
$this->target = $target;
$this->oldHash = $this->file->repo->getHashPath( $this->file->getName() );
- $this->newHash = $this->file->repo->getHashPath( $this->target->getDBKey() );
+ $this->newHash = $this->file->repo->getHashPath( $this->target->getDBkey() );
$this->oldName = $this->file->getName();
$this->newName = $this->file->repo->getNameFromTitle( $this->target );
$this->oldRel = $this->oldHash . $this->oldName;
'page_id', //Field
array( //Conditions
'page_namespace' => $title->getNamespace(),
- 'page_title' => $title->getDBKey(),
+ 'page_title' => $title->getDBkey(),
),
__METHOD__ //Function name
);
if( !is_null( $title ) ) {
# Convert NS_MEDIA -> NS_FILE
if( $title->getNamespace() == NS_MEDIA ) {
- $title = Title::makeTitle( NS_FILE, $title->getDBKey() );
+ $title = Title::makeTitle( NS_FILE, $title->getDBkey() );
}
if( !is_null( $arg ) ) {
$text = $title->$func( $arg );
$from = Title::makeTitleSafe( $namespace, $from );
$to = Title::makeTitleSafe( $namespace, $to );
- $from = ( $from && $from->isLocal() ) ? $from->getDBKey() : null;
- $to = ( $to && $to->isLocal() ) ? $to->getDBKey() : null;
+ $from = ( $from && $from->isLocal() ) ? $from->getDBkey() : null;
+ $to = ( $to && $to->isLocal() ) ? $to->getDBkey() : null;
if( isset($from) )
$where[] = 'page_title >= '.$dbr->addQuotes( $from );
$delAction = LogPage::DELETED_ACTION | Revision::DELETED_RESTRICTED;
# Normalize user name
$userTitle = Title::makeTitleSafe( NS_USER, $name );
- $userDbKey = $userTitle->getDBKey();
+ $userDbKey = $userTitle->getDBkey();
# To suppress, we OR the current bitfields with Revision::DELETED_USER
# to put a 1 in the username *_deleted bit. To unsuppress we AND the
# current bitfields with the inverse of Revision::DELETED_USER. The
array_merge( $join,
array(
'page_namespace' => $title->getNamespace(),
- 'page_title' => $title->getDBKey() ) ),
+ 'page_title' => $title->getDBkey() ) ),
__METHOD__ );
foreach( $result as $row ) {
$template = Title::makeTitle( $row->namespace, $row->title );
if( $title && $title->getText() != '' ) {
$dbr = wfGetDB( DB_SLAVE );
$image = $dbr->tableName( 'image' );
- $encFilename = $dbr->addQuotes( htmlspecialchars( $title->getDBKey() ) );
+ $encFilename = $dbr->addQuotes( htmlspecialchars( $title->getDBkey() ) );
$sql = "SELECT img_sha1 from $image where img_name = $encFilename";
$res = $dbr->query( $sql );
$row = $dbr->fetchRow( $res );
$title = Title::newFromText( $page );
if( $title ) {
$conds['ur_page_namespace'] = $title->getNamespace();
- $conds['ur_page_title'] = $title->getDBKey();
+ $conds['ur_page_title'] = $title->getDBkey();
}
return $conds;
} elseif( $this->moveTalk ) {
$conds = array(
'page_namespace' => $ot->getTalkPage()->getNamespace(),
- 'page_title' => $ot->getDBKey()
+ 'page_title' => $ot->getDBkey()
);
} else {
# Skip the query
}
$newPageName = preg_replace(
- '#^'.preg_quote( $ot->getDBKey(), '#' ).'#',
- $nt->getDBKey(),
- $oldSubpage->getDBKey()
+ '#^'.preg_quote( $ot->getDBkey(), '#' ).'#',
+ $nt->getDBkey(),
+ $oldSubpage->getDBkey()
);
if( $oldSubpage->isTalkPage() ) {
$newNs = $nt->getTalkPage()->getNamespace();
return $this->tryShowFile( $this->file );
}
# Logs must have a type given
- if( $this->logids && !strpos($this->page->getDBKey(),'/') ) {
+ if( $this->logids && !strpos($this->page->getDBkey(),'/') ) {
return $wgOut->showErrorPage( 'revdelete-nologtype-title', 'revdelete-nologtype-text' );
}
# Give a link to the logs/hist for this page
$result = $dbr->select( 'archive', '*',
array(
'ar_namespace' => $this->page->getNamespace(),
- 'ar_title' => $this->page->getDBKey(),
+ 'ar_title' => $this->page->getDBkey(),
'ar_timestamp' => $where
),
__METHOD__
if( $this->deleteKey == 'oldimage' ) {
// Run through and pull all our data in one query
foreach( $this->ofiles as $timestamp ) {
- $where[] = $timestamp.'!'.$this->page->getDBKey();
+ $where[] = $timestamp.'!'.$this->page->getDBkey();
}
$result = $dbr->select( 'oldimage', '*',
array(
- 'oi_name' => $this->page->getDBKey(),
+ 'oi_name' => $this->page->getDBkey(),
'oi_archive_name' => $where
),
__METHOD__
}
// Check through our images
foreach( $this->ofiles as $timestamp ) {
- $archivename = $timestamp.'!'.$this->page->getDBKey();
+ $archivename = $timestamp.'!'.$this->page->getDBkey();
if( !isset($filesObjs[$archivename]) ) {
continue;
} else if( !$filesObjs[$archivename]->userCan(File::DELETED_RESTRICTED) ) {
}
$result = $dbr->select( 'filearchive', '*',
array(
- 'fa_name' => $this->page->getDBKey(),
+ 'fa_name' => $this->page->getDBkey(),
'fa_id' => $where
),
__METHOD__
foreach( $this->events as $logid ) {
$where[] = intval($logid);
}
- list($log,$logtype) = explode( '/',$this->page->getDBKey(), 2 );
+ list($log,$logtype) = explode( '/',$this->page->getDBkey(), 2 );
$result = $dbr->select( 'logging', '*',
array( 'log_type' => $logtype, 'log_id' => $where ),
__METHOD__
$result = $this->dbw->select( 'archive', '*',
array(
'ar_namespace' => $title->getNamespace(),
- 'ar_title' => $title->getDBKey(),
+ 'ar_title' => $title->getDBkey(),
'ar_timestamp' => $where
), __METHOD__
);
$set = array();
// Run through and pull all our data in one query
foreach( $items as $timestamp ) {
- $where[] = $timestamp.'!'.$title->getDBKey();
+ $where[] = $timestamp.'!'.$title->getDBkey();
}
$result = $this->dbw->select( 'oldimage', '*',
- array( 'oi_name' => $title->getDBKey(), 'oi_archive_name' => $where ),
+ array( 'oi_name' => $title->getDBkey(), 'oi_archive_name' => $where ),
__METHOD__
);
while( $row = $this->dbw->fetchObject( $result ) ) {
}
// To work!
foreach( $items as $timestamp ) {
- $archivename = $timestamp.'!'.$title->getDBKey();
+ $archivename = $timestamp.'!'.$title->getDBkey();
if( !isset($filesObjs[$archivename]) ) {
$success = false;
continue; // Must exist
$where[] = intval($id);
}
$result = $this->dbw->select( 'filearchive', '*',
- array( 'fa_name' => $title->getDBKey(),
+ array( 'fa_name' => $title->getDBkey(),
'fa_id' => $where ),
__METHOD__ );
while( $row = $this->dbw->fetchObject( $result ) ) {
foreach( $items as $logid ) {
$where[] = intval($logid);
}
- list($log,$logtype) = explode( '/',$title->getDBKey(), 2 );
+ list($log,$logtype) = explode( '/',$title->getDBkey(), 2 );
$result = $this->dbw->select( 'logging', '*',
array( 'log_type' => $logtype, 'log_id' => $where ),
__METHOD__
$this->dbw->update( 'archive',
array( 'ar_deleted' => $bitfield ),
array( 'ar_namespace' => $title->getNamespace(),
- 'ar_title' => $title->getDBKey(),
+ 'ar_title' => $title->getDBkey(),
// use timestamp for index
'ar_timestamp' => $this->dbw->timestamp( $rev->getTimestamp() ),
'ar_rev_id' => $rev->getId()