*/
function isDeleted() {
$fname = 'Title::isDeleted';
- $dbr =& wfGetDB( DB_SLAVE );
- $n = $dbr->selectField( 'archive', 'COUNT(*)', array( 'ar_namespace' => $this->getNamespace(),
- 'ar_title' => $this->getDBkey() ), $fname );
+ if ( $this->getNamespace() < 0 ) {
+ $n = 0;
+ } else {
+ $dbr =& wfGetDB( DB_SLAVE );
+ $n = $dbr->selectField( 'archive', 'COUNT(*)', array( 'ar_namespace' => $this->getNamespace(),
+ 'ar_title' => $this->getDBkey() ), $fname );
+ }
return (int)$n;
}
# Save a null revision in the page's history notifying of the move
$nullRevision = Revision::newNullRevision( $dbw, $oldid,
- wfMsg( '1movedto2', $this->getPrefixedText(), $nt->getPrefixedText() ),
+ wfMsgForContent( '1movedto2', $this->getPrefixedText(), $nt->getPrefixedText() ),
true );
$nullRevId = $nullRevision->insertOn( $dbw );
# Save a null revision in the page's history notifying of the move
$nullRevision = Revision::newNullRevision( $dbw, $oldid,
- wfMsg( '1movedto2', $this->getPrefixedText(), $nt->getPrefixedText() ),
+ wfMsgForContent( '1movedto2', $this->getPrefixedText(), $nt->getPrefixedText() ),
true );
$nullRevId = $nullRevision->insertOn( $dbw );
* this category. Special pages never exist in the database. Some images do not
* have description pages in the database, but the description page contains
* useful history information that the user may want to link to.
- *
*/
function isAlwaysKnown() {
- return $this->isExternal() || ( 0 == $this->mNamespace && "" == $this->mDbkeyform )
+ return $this->isExternal() || ( 0 == $this->mNamespace && "" == $this->mDbkeyform )
|| NS_SPECIAL == $this->mNamespace || NS_IMAGE == $this->mNamespace;
}