Big oops - merged to wrong branch.
[lhc/web/wiklou.git] / includes / Article.php
index a8df6c9..fdf0820 100644 (file)
@@ -25,7 +25,7 @@
  *
  * This maintains WikiPage functions for backwards compatibility.
  *
- * @TODO: move and rewrite code to an Action class
+ * @todo move and rewrite code to an Action class
  *
  * See design.txt for an overview.
  * Note: edit user interface and cache support functions have been
@@ -39,42 +39,69 @@ class Article extends Page {
         */
 
        /**
-        * @var IContextSource
+        * The context this Article is executed in
+        * @var IContextSource $mContext
         */
        protected $mContext;
 
        /**
-        * @var WikiPage
+        * The WikiPage object of this instance
+        * @var WikiPage $mPage
         */
        protected $mPage;
 
        /**
-        * @var ParserOptions: ParserOptions object for $wgUser articles
+        * ParserOptions object for $wgUser articles
+        * @var ParserOptions $mParserOptions
         */
        public $mParserOptions;
 
+       /**
+        * Content of the revision we are working on
+        * @var string $mContent
+        */
        var $mContent;                    // !<
+
+       /**
+        * Is the content ($mContent) already loaded?
+        * @var bool $mContentLoaded
+        */
        var $mContentLoaded = false;      // !<
+
+       /**
+        * The oldid of the article that is to be shown, 0 for the
+        * current revision
+        * @var int|null $mOldId
+        */
        var $mOldId;                      // !<
 
        /**
-        * @var Title
+        * Title from which we were redirected here
+        * @var Title $mRedirectedFrom
         */
        var $mRedirectedFrom = null;
 
        /**
-        * @var mixed: boolean false or URL string
+        * URL to redirect to or false if none
+        * @var string|false $mRedirectUrl
         */
        var $mRedirectUrl = false;        // !<
+
+       /**
+        * Revision ID of revision we are working on
+        * @var int $mRevIdFetched
+        */
        var $mRevIdFetched = 0;           // !<
 
        /**
-        * @var Revision
+        * Revision we are working on
+        * @var Revision $mRevision
         */
        var $mRevision = null;
 
        /**
-        * @var ParserOutput
+        * ParserOutput object
+        * @var ParserOutput $mParserOutput
         */
        var $mParserOutput;
 
@@ -809,7 +836,7 @@ class Article extends Page {
         * merging of several policies using array_merge().
         * @param $policy Mixed, returns empty array on null/false/'', transparent
         *            to already-converted arrays, converts String.
-        * @return Array: 'index' => <indexpolicy>, 'follow' => <followpolicy>
+        * @return Array: 'index' => \<indexpolicy\>, 'follow' => \<followpolicy\>
         */
        public static function formatRobotPolicy( $policy ) {
                if ( is_array( $policy ) ) {
@@ -1345,9 +1372,9 @@ class Article extends Page {
                        $this->doDelete( $reason, $suppress );
 
                        if ( $request->getCheck( 'wpWatch' ) && $user->isLoggedIn() ) {
-                               $this->doWatch();
+                               WatchAction::doWatch( $title, $user );
                        } elseif ( $title->userIsWatching() ) {
-                               $this->doUnwatch();
+                               WatchAction::doUnwatch( $title, $user );
                        }
 
                        return;
@@ -1656,6 +1683,7 @@ class Article extends Page {
        /**
         * Handle action=purge
         * @deprecated since 1.19
+        * @return Action|bool|null false if the action is disabled, null if it is not recognised
         */
        public function purge() {
                return Action::factory( 'purge', $this )->show();