r44868 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44867‎ | r44868 | r44869 >
Date:09:33, 21 December 2008
Author:aaron
Status:ok
Tags:
Comment:
Add isNewPage() method
Modified paths:
  • /trunk/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Title.php
@@ -3026,6 +3026,16 @@
30273027 array( 'ORDER BY' => 'rev_id' )
30283028 );
30293029 }
 3030+
 3031+ /**
 3032+ * Check if this is a new page
 3033+ *
 3034+ * @return bool
 3035+ */
 3036+ public function isNewPage() {
 3037+ $dbr = wfGetDB( DB_SLAVE );
 3038+ return (bool)$dbr->selectField( 'page', 'page_is_new', $this->pageCond(), __METHOD__ );
 3039+ }
30303040
30313041 /**
30323042 * Get the oldest revision timestamp of this page

Status & tagging log