r71535 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r71534‎ | r71535 | r71536 >
Date:00:36, 24 August 2010
Author:reedy
Status:deferred
Tags:
Comment:
Submit template api file for submitting article assessments
Modified paths:
  • /trunk/extensions/ArticleAssessmentPilot/ArticleAssessmentPilot.php (modified) (history)
  • /trunk/extensions/ArticleAssessmentPilot/api/ApiArticleAssessment.php (added) (history)

Diff [purge]

Index: trunk/extensions/ArticleAssessmentPilot/ArticleAssessmentPilot.php
@@ -8,6 +8,7 @@
99 //Auto-load files
1010 $dir = dirname( __FILE__ ) . '/';
1111 $wgAutoloadClasses['ApiListArticleAssessment'] = $dir . 'api/ApiListArticleAssessment.php';
 12+$wgAutoloadClasses['ApiArticleAssessment'] = $dir . 'api/ApiArticleAssessment.php';
1213 $wgAutoloadClasses['ArticleAssessmentPilotHooks'] = $dir . 'ArticleAssessmentPilot.hooks.php';
1314
1415 //Schema and tables
@@ -19,6 +20,7 @@
2021
2122 //API modules
2223 $wgAPIListModules['articleassessment'] = 'ApiListArticleAssessment';
 24+$wgAPIModules['articleassessment'] = 'ApiArticleAssessment';
2325
2426 //i18n and aliases
2527 // Adds Internationalized Messages
Index: trunk/extensions/ArticleAssessmentPilot/api/ApiArticleAssessment.php
@@ -0,0 +1,50 @@
 2+<?php
 3+/**
 4+ *
 5+ *
 6+ * @file
 7+ * @ingroup API
 8+ */
 9+class ApiArticleAssessment extends ApiBase {
 10+ public function __construct( $query, $moduleName ) {
 11+ parent::__construct( $query, $moduleName, 'aa' );
 12+ }
 13+
 14+ public function execute() {
 15+ }
 16+
 17+ public function getAllowedParams() {
 18+ return array(
 19+ 'pageid' => null,
 20+ 'revid' => null,
 21+ );
 22+ }
 23+
 24+ public function getParamDescription() {
 25+ return array(
 26+ 'pageid' => '',
 27+ 'revid' => '',
 28+ );
 29+ }
 30+
 31+ public function getDescription() {
 32+ return array(
 33+ 'Submit article assessments'
 34+ );
 35+ }
 36+
 37+ public function getPossibleErrors() {
 38+ return array_merge( parent::getPossibleErrors(), array(
 39+ ) );
 40+ }
 41+
 42+ protected function getExamples() {
 43+ return array(
 44+ 'api.php?action=articleassessment'
 45+ );
 46+ }
 47+
 48+ public function getVersion() {
 49+ return __CLASS__ . ': $Id$';
 50+ }
 51+}
\ No newline at end of file
Property changes on: trunk/extensions/ArticleAssessmentPilot/api/ApiArticleAssessment.php
___________________________________________________________________
Added: svn:eol-style
152 + native
Added: svn:keywords
253 + Id

Status & tagging log