Merge "Remove wrong type from @param on ContentHandler::merge3"
[lhc/web/wiklou.git] / includes / api / ApiWatch.php
index c5aa90e..8060260 100644 (file)
@@ -84,6 +84,7 @@ class ApiWatch extends ApiBase {
                                );
                        }
 
+                       $this->logFeatureUsage( 'action=watch&title' );
                        $title = Title::newFromText( $params['title'] );
                        if ( !$title || !$title->isWatchable() ) {
                                $this->dieUsageMsg( array( 'invalidtitle', $params['title'] ) );
@@ -205,29 +206,10 @@ class ApiWatch extends ApiBase {
                );
        }
 
-       public function getResultProperties() {
-               return array(
-                       '' => array(
-                               'title' => 'string',
-                               'unwatched' => 'boolean',
-                               'watched' => 'boolean',
-                               'message' => 'string'
-                       )
-               );
-       }
-
        public function getDescription() {
                return 'Add or remove pages from/to the current user\'s watchlist.';
        }
 
-       public function getPossibleErrors() {
-               return array_merge( parent::getPossibleErrors(), array(
-                       array( 'code' => 'notloggedin', 'info' => 'You must be logged-in to have a watchlist' ),
-                       array( 'invalidtitle', 'title' ),
-                       array( 'hookaborted' ),
-               ) );
-       }
-
        public function getExamples() {
                return array(
                        'api.php?action=watch&titles=Main_Page' => 'Watch the page "Main Page"',