Index: trunk/phase3/includes/api/ApiComparePages.php |
— | — | @@ -120,7 +120,7 @@ |
121 | 121 | |
122 | 122 | public function getExamples() { |
123 | 123 | return array( |
124 | | - 'api.php?action=compare&fromrev=1&torev=2', |
| 124 | + 'api.php?action=compare&fromrev=1&torev=2' => 'Creates a diff between revision 1 and 2', |
125 | 125 | ); |
126 | 126 | } |
127 | 127 | |
Index: trunk/phase3/includes/api/ApiFileRevert.php |
— | — | @@ -171,8 +171,8 @@ |
172 | 172 | |
173 | 173 | public function getExamples() { |
174 | 174 | return array( |
175 | | - 'Revert Wiki.png to the version of 20110305152740:', |
176 | | - ' api.php?action=filerevert&filename=Wiki.png&comment=Revert&archivename=20110305152740!Wiki.png&token=+\\', |
| 175 | + 'api.php?action=filerevert&filename=Wiki.png&comment=Revert&archivename=20110305152740!Wiki.png&token=+\\' |
| 176 | + => 'Revert Wiki.png to the version of 20110305152740', |
177 | 177 | ); |
178 | 178 | } |
179 | 179 | |
Index: trunk/phase3/includes/api/ApiLogout.php |
— | — | @@ -64,7 +64,7 @@ |
65 | 65 | |
66 | 66 | public function getExamples() { |
67 | 67 | return array( |
68 | | - 'api.php?action=logout' |
| 68 | + 'api.php?action=logout' => 'Logs the current user out', |
69 | 69 | ); |
70 | 70 | } |
71 | 71 | |
Index: trunk/phase3/includes/api/ApiPurge.php |
— | — | @@ -149,7 +149,7 @@ |
150 | 150 | |
151 | 151 | public function getExamples() { |
152 | 152 | return array( |
153 | | - 'api.php?action=purge&titles=Main_Page|API' |
| 153 | + 'api.php?action=purge&titles=Main_Page|API' => 'Purges the "Main Page" and the "API" page', |
154 | 154 | ); |
155 | 155 | } |
156 | 156 | |
Index: trunk/phase3/includes/api/ApiDelete.php |
— | — | @@ -268,8 +268,8 @@ |
269 | 269 | |
270 | 270 | public function getExamples() { |
271 | 271 | return array( |
272 | | - 'api.php?action=delete&title=Main%20Page&token=123ABC', |
273 | | - 'api.php?action=delete&title=Main%20Page&token=123ABC&reason=Preparing%20for%20move' |
| 272 | + 'api.php?action=delete&title=Main%20Page&token=123ABC' => 'Deletes the Main Page', |
| 273 | + 'api.php?action=delete&title=Main%20Page&token=123ABC&reason=Preparing%20for%20move' => 'Deletes the Main Page with the reason "Preparing for move"', |
274 | 274 | ); |
275 | 275 | } |
276 | 276 | |
Index: trunk/phase3/includes/api/ApiImport.php |
— | — | @@ -154,8 +154,8 @@ |
155 | 155 | |
156 | 156 | public function getExamples() { |
157 | 157 | return array( |
158 | | - 'Import [[meta:Help:Parserfunctions]] to namespace 100 with full history:', |
159 | | - ' api.php?action=import&interwikisource=meta&interwikipage=Help:ParserFunctions&namespace=100&fullhistory=&token=123ABC', |
| 158 | + 'api.php?action=import&interwikisource=meta&interwikipage=Help:ParserFunctions&namespace=100&fullhistory=&token=123ABC' |
| 159 | + => 'Import [[meta:Help:Parserfunctions]] to namespace 100 with full history', |
160 | 160 | ); |
161 | 161 | } |
162 | 162 | |
Index: trunk/phase3/includes/api/ApiEditPage.php |
— | — | @@ -493,12 +493,14 @@ |
494 | 494 | |
495 | 495 | public function getExamples() { |
496 | 496 | return array( |
497 | | - 'Edit a page (anonymous user):', |
498 | | - ' api.php?action=edit&title=Test&summary=test%20summary&text=article%20content&basetimestamp=20070824123454&token=%2B\\', |
499 | | - 'Prepend __NOTOC__ to a page (anonymous user):', |
500 | | - ' api.php?action=edit&title=Test&summary=NOTOC&minor=&prependtext=__NOTOC__%0A&basetimestamp=20070824123454&token=%2B\\', |
501 | | - 'Undo r13579 through r13585 with autosummary (anonymous user):', |
502 | | - ' api.php?action=edit&title=Test&undo=13585&undoafter=13579&basetimestamp=20070824123454&token=%2B\\', |
| 497 | + |
| 498 | + 'api.php?action=edit&title=Test&summary=test%20summary&text=article%20content&basetimestamp=20070824123454&token=%2B\\' |
| 499 | + => 'Edit a page (anonymous user)', |
| 500 | + |
| 501 | + 'api.php?action=edit&title=Test&summary=NOTOC&minor=&prependtext=__NOTOC__%0A&basetimestamp=20070824123454&token=%2B\\' |
| 502 | + => 'Prepend __NOTOC__ to a page (anonymous user)', |
| 503 | + 'api.php?action=edit&title=Test&undo=13585&undoafter=13579&basetimestamp=20070824123454&token=%2B\\' |
| 504 | + => 'Undo r13579 through r13585 with autosummary (anonymous user)', |
503 | 505 | ); |
504 | 506 | } |
505 | 507 | |
Index: trunk/phase3/includes/api/ApiFormatBase.php |
— | — | @@ -286,7 +286,10 @@ |
287 | 287 | } |
288 | 288 | |
289 | 289 | public function getExamples() { |
290 | | - return 'api.php?action=query&meta=siteinfo&siprop=namespaces&format=' . $this->getModuleName(); |
| 290 | + return array( |
| 291 | + 'api.php?action=query&meta=siteinfo&siprop=namespaces&format=' . $this->getModuleName() |
| 292 | + => "Formats the query result in the {$this->getModuleName()} format", |
| 293 | + ); |
291 | 294 | } |
292 | 295 | |
293 | 296 | public function getHelpUrls() { |
Index: trunk/phase3/includes/api/ApiEmailUser.php |
— | — | @@ -133,7 +133,7 @@ |
134 | 134 | |
135 | 135 | public function getExamples() { |
136 | 136 | return array( |
137 | | - 'api.php?action=emailuser&target=WikiSysop&text=Content' |
| 137 | + 'api.php?action=emailuser&target=WikiSysop&text=Content' => 'Sends an email to the User "WikiSysop" with the text "Content"', |
138 | 138 | ); |
139 | 139 | } |
140 | 140 | |
Index: trunk/phase3/includes/api/ApiHelp.php |
— | — | @@ -136,16 +136,11 @@ |
137 | 137 | |
138 | 138 | public function getExamples() { |
139 | 139 | return array( |
140 | | - 'Whole help page:', |
141 | | - ' api.php?action=help', |
142 | | - 'Module (action) help page:', |
143 | | - ' api.php?action=help&modules=protect', |
144 | | - 'Query (list) modules help page:', |
145 | | - ' api.php?action=help&querymodules=categorymembers', |
146 | | - 'Query (prop) modules help page:', |
147 | | - ' api.php?action=help&querymodules=info', |
148 | | - 'Query (meta) modules help page:', |
149 | | - ' api.php?action=help&querymodules=siteinfo', |
| 140 | + 'api.php?action=help' => 'Whole help page', |
| 141 | + 'api.php?action=help&modules=protect' => 'Module (action) help page', |
| 142 | + 'api.php?action=help&querymodules=categorymembers' => 'Query (list) modules help page', |
| 143 | + 'api.php?action=help&querymodules=info' => 'Query (prop) modules help page', |
| 144 | + 'api.php?action=help&querymodules=siteinfo' => 'Query (meta) modules help page', |
150 | 145 | ); |
151 | 146 | } |
152 | 147 | |
Index: trunk/phase3/includes/api/ApiUpload.php |
— | — | @@ -646,10 +646,10 @@ |
647 | 647 | |
648 | 648 | public function getExamples() { |
649 | 649 | return array( |
650 | | - 'Upload from a URL:', |
651 | | - ' api.php?action=upload&filename=Wiki.png&url=http%3A//upload.wikimedia.org/wikipedia/en/b/bc/Wiki.png', |
652 | | - 'Complete an upload that failed due to warnings:', |
653 | | - ' api.php?action=upload&filename=Wiki.png&filekey=filekey&ignorewarnings=1', |
| 650 | + 'api.php?action=upload&filename=Wiki.png&url=http%3A//upload.wikimedia.org/wikipedia/en/b/bc/Wiki.png' |
| 651 | + => 'Upload from a URL', |
| 652 | + 'api.php?action=upload&filename=Wiki.png&filekey=filekey&ignorewarnings=1' |
| 653 | + => 'Complete an upload that failed due to warnings', |
654 | 654 | ); |
655 | 655 | } |
656 | 656 | |