* @param string $key The database key, which has underscores
* instead of spaces, possibly including namespace and
* interwiki prefixes
- * @return Title|null Title, or NULL on an error
+ * @return Title|null Title, or null on an error
*/
public static function newFromDBkey( $key ) {
$t = new Title();
*
* @param int $id The page_id corresponding to the Title to create
* @param int $flags Use Title::GAID_FOR_UPDATE to use master
- * @return Title|null The new object, or NULL on an error
+ * @return Title|null The new object, or null on an error
*/
public static function newFromID( $id, $flags = 0 ) {
$db = ( $flags & self::GAID_FOR_UPDATE ) ? wfGetDB( DB_MASTER ) : wfGetDB( DB_SLAVE );
/**
* Make an array of titles from an array of IDs
*
- * @param array $ids Array of IDs
- * @return array Array of Titles
+ * @param int[] $ids Array of IDs
+ * @return Title[] Array of Titles
*/
public static function newFromIDs( $ids ) {
if ( !count( $ids ) ) {
* @param string $title Database key form
* @param string $fragment The link fragment (after the "#")
* @param string $interwiki Interwiki prefix
- * @return Title The new object, or NULL on an error
+ * @return Title The new object, or null on an error
*/
public static function makeTitleSafe( $ns, $title, $fragment = '', $interwiki = '' ) {
if ( !MWNamespace::exists( $ns ) ) {
* have been resolved (up to $wgMaxRedirects times)
*
* @param string $text Text with possible redirect
- * @return array Array of Titles, with the destination last
+ * @return Title[] Array of Titles, with the destination last
* @deprecated since 1.21, use Content::getRedirectChain instead.
*/
public static function newFromRedirectArray( $text ) {
* Get the prefixed DB key associated with an ID
*
* @param int $id The page_id of the article
- * @return Title|null An object representing the article, or NULL if no such article was found
+ * @return Title|null An object representing the article, or null if no such article was found
*/
public static function nameOf( $id ) {
$dbr = wfGetDB( DB_SLAVE );
* Determine whether the object refers to a page within
* this project and is transcludable.
*
- * @return bool TRUE if this is transcludable
+ * @return bool True if this is transcludable
*/
public function isTrans() {
if ( !$this->isExternal() ) {
* @param array $options May be FOR UPDATE
* @param string $table Table name
* @param string $prefix Fields prefix
- * @return array Array of Title objects linking here
+ * @return Title[] Array of Title objects linking here
*/
public function getLinksTo( $options = array(), $table = 'pagelinks', $prefix = 'pl' ) {
if ( count( $options ) > 0 ) {
* On heavily-used templates it will max out the memory.
*
* @param array $options May be FOR UPDATE
- * @return array Array of Title the Title objects linking here
+ * @return Title[] Array of Title the Title objects linking here
*/
public function getTemplateLinksTo( $options = array() ) {
return $this->getLinksTo( $options, 'templatelinks', 'tl' );
* On heavily-used templates it will max out the memory.
*
* @param array $options May be FOR UPDATE
- * @return array Array of Title the Title objects used here
+ * @return Title[] Array of Title the Title objects used here
*/
public function getTemplateLinksFrom( $options = array() ) {
return $this->getLinksFrom( $options, 'templatelinks', 'tl' );
* Get an array of Title objects referring to non-existent articles linked from this page
*
* @todo check if needed (used only in SpecialBrokenRedirects.php, and should use redirect table in this case)
- * @return array Array of Title the Title objects
+ * @return Title[] Array of Title the Title objects
*/
public function getBrokenLinksFrom() {
if ( $this->getArticleID() == 0 ) {
* Get a list of URLs to purge from the Squid cache when this
* page changes
*
- * @return array Array of String the URLs
+ * @return string[] Array of String the URLs
*/
public function getSquidURLs() {
$urls = array(
}
# Save a null revision in the page's history notifying of the move
- $nullRevision = Revision::newNullRevision( $dbw, $oldid, $comment, true );
+ $nullRevision = Revision::newNullRevision( $dbw, $oldid, $comment, true, $wgUser );
if ( !is_object( $nullRevision ) ) {
throw new MWException( 'No valid null revision produced in ' . __METHOD__ );
}
$redirectRevision = new Revision( array(
'title' => $this, // for determining the default content model
'page' => $newid,
+ 'user_text' => $wgUser->getName(),
+ 'user' => $wgUser->getId(),
'comment' => $comment,
'content' => $redirectContent ) );
$redirectRevision->insertOn( $dbw );
*
* @param int $revId Revision ID. Get the revision that was before this one.
* @param int $flags Title::GAID_FOR_UPDATE
- * @return int|bool Old revision ID, or FALSE if none exists
+ * @return int|bool Old revision ID, or false if none exists
*/
public function getPreviousRevisionID( $revId, $flags = 0 ) {
$db = ( $flags & self::GAID_FOR_UPDATE ) ? wfGetDB( DB_MASTER ) : wfGetDB( DB_SLAVE );
*
* @param int $revId Revision ID. Get the revision that was after this one.
* @param int $flags Title::GAID_FOR_UPDATE
- * @return int|bool Next revision ID, or FALSE if none exists
+ * @return int|bool Next revision ID, or false if none exists
*/
public function getNextRevisionID( $revId, $flags = 0 ) {
$db = ( $flags & self::GAID_FOR_UPDATE ) ? wfGetDB( DB_MASTER ) : wfGetDB( DB_SLAVE );
/**
* Get all extant redirects to this Title
*
- * @param int|null $ns Single namespace to consider; NULL to consider all namespaces
+ * @param int|null $ns Single namespace to consider; null to consider all namespaces
* @return Title[] Array of Title redirects to this title
*/
public function getRedirectsHere( $ns = null ) {