Expose the log_id of the deletion log entry in the action=delete API
[lhc/web/wiklou.git] / includes / Title.php
index 2748651..6e3f16c 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 /**
+ * Representation a title within %MediaWiki.
+ *
  * See title.txt
  *
  * This program is free software; you can redistribute it and/or modify
@@ -181,13 +183,12 @@ class Title {
         * @return Title the new object, or NULL on an error
         */
        public static function newFromURL( $url ) {
-               global $wgLegalTitleChars;
                $t = new Title();
 
                # For compatibility with old buggy URLs. "+" is usually not valid in titles,
                # but some URLs used it as a space replacement and they still come
                # from some external search tools.
-               if ( strpos( $wgLegalTitleChars, '+' ) === false ) {
+               if ( strpos( self::legalChars(), '+' ) === false ) {
                        $url = str_replace( '+', ' ', $url );
                }
 
@@ -2865,7 +2866,7 @@ class Title {
         *
         * - This is called from WikiPage::doEdit() and WikiPage::insertOn() to allow
         * loading of the new page_id. It's also called from
-        * WikiPage::doDeleteArticle()
+        * WikiPage::doDeleteArticleReal()
         *
         * @param $newid Int the new Article ID
         */
@@ -4330,9 +4331,10 @@ class Title {
                $dbr = wfGetDB( DB_SLAVE );
                $this->mNotificationTimestamp[$uid] = $dbr->selectField( 'watchlist',
                        'wl_notificationtimestamp',
-                       array( 'wl_namespace' => $this->getNamespace(),
+                       array(
+                               'wl_user' => $user->getId(),
+                               'wl_namespace' => $this->getNamespace(),
                                'wl_title' => $this->getDBkey(),
-                               'wl_user' => $user->getId()
                        ),
                        __METHOD__
                );