From: Aaron Schulz Date: Sun, 21 Dec 2008 09:33:04 +0000 (+0000) Subject: Add isNewPage() method X-Git-Tag: 1.31.0-rc.0~43851 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/password.php?a=commitdiff_plain;h=8beabce505ce77bde0acabb36002c494c5246640;p=lhc%2Fweb%2Fwiklou.git Add isNewPage() method --- diff --git a/includes/Title.php b/includes/Title.php index a49b725488..4f82e95105 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -3026,6 +3026,16 @@ class Title { array( 'ORDER BY' => 'rev_id' ) ); } + + /** + * Check if this is a new page + * + * @return bool + */ + public function isNewPage() { + $dbr = wfGetDB( DB_SLAVE ); + return (bool)$dbr->selectField( 'page', 'page_is_new', $this->pageCond(), __METHOD__ ); + } /** * Get the oldest revision timestamp of this page