r106865 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106864‎ | r106865 | r106866 >
Date:21:26, 20 December 2011
Author:brion
Status:ok
Tags:
Comment:
Revert r106521: creates lots of long, unwrappable lines in help output
Modified paths:
  • /trunk/phase3/includes/api/ApiComparePages.php (modified) (history)
  • /trunk/phase3/includes/api/ApiDelete.php (modified) (history)
  • /trunk/phase3/includes/api/ApiEditPage.php (modified) (history)
  • /trunk/phase3/includes/api/ApiEmailUser.php (modified) (history)
  • /trunk/phase3/includes/api/ApiFileRevert.php (modified) (history)
  • /trunk/phase3/includes/api/ApiFormatBase.php (modified) (history)
  • /trunk/phase3/includes/api/ApiHelp.php (modified) (history)
  • /trunk/phase3/includes/api/ApiImport.php (modified) (history)
  • /trunk/phase3/includes/api/ApiLogout.php (modified) (history)
  • /trunk/phase3/includes/api/ApiPurge.php (modified) (history)
  • /trunk/phase3/includes/api/ApiUpload.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiComparePages.php
@@ -120,7 +120,7 @@
121121
122122 public function getExamples() {
123123 return array(
124 - 'api.php?action=compare&fromrev=1&torev=2' => 'Creates a diff between revision 1 and 2',
 124+ 'api.php?action=compare&fromrev=1&torev=2',
125125 );
126126 }
127127
Index: trunk/phase3/includes/api/ApiEditPage.php
@@ -502,14 +502,12 @@
503503
504504 public function getExamples() {
505505 return array(
506 -
507 - 'api.php?action=edit&title=Test&summary=test%20summary&text=article%20content&basetimestamp=20070824123454&token=%2B\\'
508 - => 'Edit a page (anonymous user)',
509 -
510 - 'api.php?action=edit&title=Test&summary=NOTOC&minor=&prependtext=__NOTOC__%0A&basetimestamp=20070824123454&token=%2B\\'
511 - => 'Prepend __NOTOC__ to a page (anonymous user)',
512 - 'api.php?action=edit&title=Test&undo=13585&undoafter=13579&basetimestamp=20070824123454&token=%2B\\'
513 - => 'Undo r13579 through r13585 with autosummary (anonymous user)',
 506+ 'Edit a page (anonymous user):',
 507+ ' api.php?action=edit&title=Test&summary=test%20summary&text=article%20content&basetimestamp=20070824123454&token=%2B\\',
 508+ 'Prepend __NOTOC__ to a page (anonymous user):',
 509+ ' api.php?action=edit&title=Test&summary=NOTOC&minor=&prependtext=__NOTOC__%0A&basetimestamp=20070824123454&token=%2B\\',
 510+ 'Undo r13579 through r13585 with autosummary (anonymous user):',
 511+ ' api.php?action=edit&title=Test&undo=13585&undoafter=13579&basetimestamp=20070824123454&token=%2B\\',
514512 );
515513 }
516514
Index: trunk/phase3/includes/api/ApiPurge.php
@@ -149,7 +149,7 @@
150150
151151 public function getExamples() {
152152 return array(
153 - 'api.php?action=purge&titles=Main_Page|API' => 'Purges the "Main Page" and the "API" page',
 153+ 'api.php?action=purge&titles=Main_Page|API'
154154 );
155155 }
156156
Index: trunk/phase3/includes/api/ApiUpload.php
@@ -646,10 +646,10 @@
647647
648648 public function getExamples() {
649649 return array(
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',
 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',
654654 );
655655 }
656656
Index: trunk/phase3/includes/api/ApiFileRevert.php
@@ -171,8 +171,8 @@
172172
173173 public function getExamples() {
174174 return array(
175 - 'api.php?action=filerevert&filename=Wiki.png&comment=Revert&archivename=20110305152740!Wiki.png&token=+\\'
176 - => 'Revert Wiki.png to the version of 20110305152740',
 175+ 'Revert Wiki.png to the version of 20110305152740:',
 176+ ' api.php?action=filerevert&filename=Wiki.png&comment=Revert&archivename=20110305152740!Wiki.png&token=+\\',
177177 );
178178 }
179179
Index: trunk/phase3/includes/api/ApiLogout.php
@@ -64,7 +64,7 @@
6565
6666 public function getExamples() {
6767 return array(
68 - 'api.php?action=logout' => 'Logs the current user out',
 68+ 'api.php?action=logout'
6969 );
7070 }
7171
Index: trunk/phase3/includes/api/ApiHelp.php
@@ -136,11 +136,16 @@
137137
138138 public function getExamples() {
139139 return array(
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',
 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',
145150 );
146151 }
147152
Index: trunk/phase3/includes/api/ApiDelete.php
@@ -268,8 +268,8 @@
269269
270270 public function getExamples() {
271271 return array(
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"',
 272+ 'api.php?action=delete&title=Main%20Page&token=123ABC',
 273+ 'api.php?action=delete&title=Main%20Page&token=123ABC&reason=Preparing%20for%20move'
274274 );
275275 }
276276
Index: trunk/phase3/includes/api/ApiImport.php
@@ -154,8 +154,8 @@
155155
156156 public function getExamples() {
157157 return array(
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',
 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',
160160 );
161161 }
162162
Index: trunk/phase3/includes/api/ApiFormatBase.php
@@ -286,10 +286,7 @@
287287 }
288288
289289 public function getExamples() {
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 - );
 290+ return 'api.php?action=query&meta=siteinfo&siprop=namespaces&format=' . $this->getModuleName();
294291 }
295292
296293 public function getHelpUrls() {
Index: trunk/phase3/includes/api/ApiEmailUser.php
@@ -133,7 +133,7 @@
134134
135135 public function getExamples() {
136136 return array(
137 - 'api.php?action=emailuser&target=WikiSysop&text=Content' => 'Sends an email to the User "WikiSysop" with the text "Content"',
 137+ 'api.php?action=emailuser&target=WikiSysop&text=Content'
138138 );
139139 }
140140

Follow-up revisions

RevisionCommit summaryAuthorDate
r106870For r106521/r106865, wrap long example description strings...reedy21:37, 20 December 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r106521More example conversions/additions...reedy19:10, 17 December 2011

Status & tagging log