r63106 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63105‎ | r63106 | r63107 >
Date:23:39, 28 February 2010
Author:jeroendedauw
Status:ok
Tags:
Comment:
Added API class for actions on the story review special page
Modified paths:
  • /trunk/extensions/Storyboard/Storyboard.php (modified) (history)
  • /trunk/extensions/Storyboard/api/ApiStoryReview.php (added) (history)
  • /trunk/extensions/Storyboard/api/ApiStoryboardStoriesFeed.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Storyboard/api/ApiStoryReview.php
@@ -0,0 +1,77 @@
 2+<?php
 3+/**
 4+ * API extension for Storyboard.
 5+ *
 6+ * @file ApiStoryReview.php
 7+ * @ingroup Storyboard
 8+ *
 9+ * @author Jeroen De Dauw
 10+ *
 11+ * This program is free software; you can redistribute it and/or modify
 12+ * it under the terms of the GNU General Public License as published by
 13+ * the Free Software Foundation; either version 2 of the License, or
 14+ * (at your option) any later version.
 15+ *
 16+ * This program is distributed in the hope that it will be useful,
 17+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
 18+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 19+ * GNU General Public License for more details.
 20+ *
 21+ * You should have received a copy of the GNU General Public License along
 22+ * with this program; if not, write to the Free Software Foundation, Inc.,
 23+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 24+ * http://www.gnu.org/copyleft/gpl.html
 25+ */
 26+
 27+if ( !defined( 'MEDIAWIKI' ) ) {
 28+ // Eclipse helper - will be ignored in production
 29+ require_once ( "ApiBase.php" );
 30+}
 31+
 32+/**
 33+ * This action returns the html for Stories to be displayed in a storyboard.
 34+ *
 35+ * @ingroup Storyboard
 36+ */
 37+class ApiStoryReview extends ApiBase {
 38+
 39+ public function __construct( $main, $action ) {
 40+ parent::__construct( $main, $action );
 41+ }
 42+
 43+ public function execute() {
 44+ global $wgUser;
 45+
 46+ }
 47+
 48+ public function getAllowedParams() {
 49+ return array(
 50+ );
 51+ }
 52+
 53+ public function getParamDescription() {
 54+ return array(
 55+ );
 56+ }
 57+
 58+ public function getDescription() {
 59+ return array(
 60+ 'Story review actions'
 61+ );
 62+ }
 63+
 64+ public function getPossibleErrors() {
 65+ return array_merge( parent::getPossibleErrors(), array(
 66+ ) );
 67+ }
 68+
 69+ protected function getExamples() {
 70+ return array(
 71+ 'api.php?action=storyreview&...' // TODO
 72+ );
 73+ }
 74+
 75+ public function getVersion() {
 76+ return __CLASS__ . ': $Id: $';
 77+ }
 78+}
\ No newline at end of file
Property changes on: trunk/extensions/Storyboard/api/ApiStoryReview.php
___________________________________________________________________
Name: svn:eol-style
179 + native
Index: trunk/extensions/Storyboard/api/ApiStoryboardStoriesFeed.php
@@ -2,7 +2,7 @@
33 /**
44 * API extension for Storyboard.
55 *
6 - * @file ApiStories.php
 6+ * @file ApiStoryboardStoriesFeed.php
77 * @ingroup Storyboard
88 *
99 * @author Jeroen De Dauw
Index: trunk/extensions/Storyboard/Storyboard.php
@@ -49,6 +49,8 @@
5050 // API
5151 $wgAutoloadClasses['ApiStoryboardStoriesFeed'] = "{$egStoryboardDir}api/ApiStoryboardStoriesFeed.php";
5252 $wgAPIListModules['stories'] = 'ApiStoryboardStoriesFeed';
 53+$wgAutoloadClasses['ApiStoryReview'] = "{$egStoryboardDir}api/ApiStoryReview.php";
 54+$wgAPIModules['storyreview'] = 'ApiStoryReview';
5355
5456 // Hooks
5557 $wgHooks['ParserFirstCallInit'][] = 'efStoryboardParserFirstCallInit';

Status & tagging log