From 8beabce505ce77bde0acabb36002c494c5246640 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Sun, 21 Dec 2008 09:33:04 +0000 Subject: [PATCH] Add isNewPage() method --- includes/Title.php | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 -- 2.20.1