X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiWatch.php;h=80602606c8d2da7587d11a3a3992659ef94164d8;hb=24499fca789837c9d679328605088723c80568c0;hp=c5aa90ef2641c1eb79189db64c41c2d1a3158e1f;hpb=c4b064f83415ab5b4a5f9aedad20ffd16e599253;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiWatch.php b/includes/api/ApiWatch.php index c5aa90ef26..80602606c8 100644 --- a/includes/api/ApiWatch.php +++ b/includes/api/ApiWatch.php @@ -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"',