Index: trunk/extensions/AssertEdit/ApiAssertEdit.php |
— | — | @@ -1,58 +0,0 @@ |
2 | | -<?php |
3 | | -if ( !defined( 'MEDIAWIKI' ) ) { |
4 | | - // Eclipse helper - will be ignored in production |
5 | | - require_once( 'ApiBase.php' ); |
6 | | -} |
7 | | - |
8 | | -class ApiAssertEdit extends ApiBase { |
9 | | - |
10 | | - public function __construct( $main, $action ) { |
11 | | - parent::__construct( $main, $action ); |
12 | | - } |
13 | | - |
14 | | - public function execute() { |
15 | | - $this->dieUsage( '', 'assertedit' ); |
16 | | - } |
17 | | - |
18 | | - public function getDescription() { |
19 | | - return 'Allows bots to make assertions. Can only be used during of editing'; |
20 | | - } |
21 | | - |
22 | | - public function isReadMode() { |
23 | | - return false; |
24 | | - } |
25 | | - |
26 | | - public function shouldCheckMaxlag() { |
27 | | - return false; |
28 | | - } |
29 | | - |
30 | | - public function getParamDescription() { |
31 | | - return array( |
32 | | - 'user' => 'Verify that bot is logged in, to prevent anonymous edits.', |
33 | | - 'bot' => 'Verify that bot is logged in and has a bot flag.', |
34 | | - 'true' => 'Always true; nassert=true will fail if the extension is installed.', |
35 | | - 'false' => 'Always false; assert=false will fail if the extension is installed.', |
36 | | - 'exists' => 'Verify that page exists. Could be useful from other extensions, i.e. adding nassert=exists to the inputbox extension.', |
37 | | - 'test' => 'Verify that this wiki allows random testing. Defaults to false, but can be overridden in LocalSettings.php.' |
38 | | - ); |
39 | | - } |
40 | | - |
41 | | - public function getPossibleErrors() { |
42 | | - return array(); |
43 | | - } |
44 | | - |
45 | | - public function getAllowedParams() { |
46 | | - return array( |
47 | | - 'user' => null, |
48 | | - 'bot' => null, |
49 | | - 'true' => null, |
50 | | - 'false' => null, |
51 | | - 'exists' => null, |
52 | | - 'test' => null |
53 | | - ); |
54 | | - } |
55 | | - |
56 | | - public function getVersion() { |
57 | | - return __CLASS__ . ': $Id$'; |
58 | | - } |
59 | | -} |
Index: trunk/extensions/AssertEdit/AssertEdit.php |
— | — | @@ -30,9 +30,6 @@ |
31 | 31 | $wgHooks['AlternateEdit'][] = 'efAssertEditHook'; |
32 | 32 | $wgHooks['APIEditBeforeSave'][] = 'efAssertApiEditHook'; |
33 | 33 | |
34 | | -$wgAutoloadClasses['ApiAssertEdit'] = $dir . "ApiAssertEdit.php"; |
35 | | -$wgAPIModules['assertedit'] = 'ApiAssertEdit'; |
36 | | - |
37 | 34 | function efAssertEditHook( $editpage ) { |
38 | 35 | global $wgOut, $wgRequest; |
39 | 36 | |