r77192 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77191‎ | r77192 | r77193 >
Date:22:05, 23 November 2010
Author:btongminh
Status:ok
Tags:
Comment:
(bug 25174) Add equal sign to boolean parameters in examples, so that the examples work immediately when posted
Modified paths:
  • /trunk/phase3/includes/api/ApiBlock.php (modified) (history)
  • /trunk/phase3/includes/api/ApiEditPage.php (modified) (history)
  • /trunk/phase3/includes/api/ApiImport.php (modified) (history)
  • /trunk/phase3/includes/api/ApiMove.php (modified) (history)
  • /trunk/phase3/includes/api/ApiProtect.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryAllLinks.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryDeletedrevs.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryLangLinks.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQuerySiteinfo.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryWatchlist.php (modified) (history)
  • /trunk/phase3/includes/api/ApiWatch.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryAllLinks.php
@@ -224,7 +224,7 @@
225225
226226 protected function getExamples() {
227227 return array(
228 - 'api.php?action=query&list=alllinks&alunique&alfrom=B',
 228+ 'api.php?action=query&list=alllinks&alunique=&alfrom=B',
229229 );
230230 }
231231
Index: trunk/phase3/includes/api/ApiWatch.php
@@ -108,7 +108,7 @@
109109 protected function getExamples() {
110110 return array(
111111 'api.php?action=watch&title=Main_Page',
112 - 'api.php?action=watch&title=Main_Page&unwatch',
 112+ 'api.php?action=watch&title=Main_Page&unwatch=',
113113 );
114114 }
115115
Index: trunk/phase3/includes/api/ApiQuerySiteinfo.php
@@ -526,7 +526,7 @@
527527 return array(
528528 'api.php?action=query&meta=siteinfo&siprop=general|namespaces|namespacealiases|statistics',
529529 'api.php?action=query&meta=siteinfo&siprop=interwikimap&sifilteriw=local',
530 - 'api.php?action=query&meta=siteinfo&siprop=dbrepllag&sishowalldb',
 530+ 'api.php?action=query&meta=siteinfo&siprop=dbrepllag&sishowalldb=',
531531 );
532532 }
533533
Index: trunk/phase3/includes/api/ApiMove.php
@@ -243,7 +243,7 @@
244244
245245 protected function getExamples() {
246246 return array(
247 - 'api.php?action=move&from=Exampel&to=Example&token=123ABC&reason=Misspelled%20title&movetalk&noredirect'
 247+ 'api.php?action=move&from=Exampel&to=Example&token=123ABC&reason=Misspelled%20title&movetalk=&noredirect='
248248 );
249249 }
250250
Index: trunk/phase3/includes/api/ApiProtect.php
@@ -217,7 +217,7 @@
218218
219219 protected function getExamples() {
220220 return array(
221 - 'api.php?action=protect&title=Main%20Page&token=123ABC&protections=edit=sysop|move=sysop&cascade&expiry=20070901163000|never',
 221+ 'api.php?action=protect&title=Main%20Page&token=123ABC&protections=edit=sysop|move=sysop&cascade=&expiry=20070901163000|never',
222222 'api.php?action=protect&title=Main%20Page&token=123ABC&protections=edit=all|move=all&reason=Lifting%20restrictions'
223223 );
224224 }
Index: trunk/phase3/includes/api/ApiQueryDeletedrevs.php
@@ -367,7 +367,7 @@
368368 'List the first 50 deleted revisions in the main namespace (mode 3):',
369369 ' api.php?action=query&list=deletedrevs&drdir=newer&drlimit=50',
370370 'List the first 50 deleted pages in the Talk namespace (mode 3):',
371 - ' api.php?action=query&list=deletedrevs&drdir=newer&drlimit=50&drnamespace=1&drunique',
 371+ ' api.php?action=query&list=deletedrevs&drdir=newer&drlimit=50&drnamespace=1&drunique=',
372372 );
373373 }
374374
Index: trunk/phase3/includes/api/ApiImport.php
@@ -165,7 +165,7 @@
166166 protected function getExamples() {
167167 return array(
168168 'Import [[meta:Help:Parserfunctions]] to namespace 100 with full history:',
169 - ' api.php?action=import&interwikisource=meta&interwikipage=Help:ParserFunctions&namespace=100&fullhistory&token=123ABC',
 169+ ' api.php?action=import&interwikisource=meta&interwikipage=Help:ParserFunctions&namespace=100&fullhistory=&token=123ABC',
170170 );
171171 }
172172
Index: trunk/phase3/includes/api/ApiEditPage.php
@@ -514,7 +514,7 @@
515515 'Edit a page (anonymous user):',
516516 ' api.php?action=edit&title=Test&summary=test%20summary&text=article%20content&basetimestamp=20070824123454&token=%2B\\',
517517 'Prepend __NOTOC__ to a page (anonymous user):',
518 - ' api.php?action=edit&title=Test&summary=NOTOC&minor&prependtext=__NOTOC__%0A&basetimestamp=20070824123454&token=%2B\\',
 518+ ' api.php?action=edit&title=Test&summary=NOTOC&minor=&prependtext=__NOTOC__%0A&basetimestamp=20070824123454&token=%2B\\',
519519 'Undo r13579 through r13585 with autosummary (anonymous user):',
520520 ' api.php?action=edit&title=Test&undo=13585&undoafter=13579&basetimestamp=20070824123454&token=%2B\\',
521521 );
Index: trunk/phase3/includes/api/ApiQueryLangLinks.php
@@ -141,7 +141,7 @@
142142 protected function getExamples() {
143143 return array(
144144 'Get interlanguage links from the [[Main Page]]:',
145 - ' api.php?action=query&prop=langlinks&titles=Main%20Page&redirects',
 145+ ' api.php?action=query&prop=langlinks&titles=Main%20Page&redirects=',
146146 );
147147 }
148148
Index: trunk/phase3/includes/api/ApiQueryWatchlist.php
@@ -412,9 +412,9 @@
413413 return array(
414414 'api.php?action=query&list=watchlist',
415415 'api.php?action=query&list=watchlist&wlprop=ids|title|timestamp|user|comment',
416 - 'api.php?action=query&list=watchlist&wlallrev&wlprop=ids|title|timestamp|user|comment',
 416+ 'api.php?action=query&list=watchlist&wlallrev=&wlprop=ids|title|timestamp|user|comment',
417417 'api.php?action=query&generator=watchlist&prop=info',
418 - 'api.php?action=query&generator=watchlist&gwlallrev&prop=revisions&rvprop=timestamp|user',
 418+ 'api.php?action=query&generator=watchlist&gwlallrev=&prop=revisions&rvprop=timestamp|user',
419419 'api.php?action=query&list=watchlist&wlowner=Bob_Smith&wltoken=d8d562e9725ea1512894cdab28e5ceebc7f20237'
420420 );
421421 }
Index: trunk/phase3/includes/api/ApiBlock.php
@@ -194,7 +194,7 @@
195195 protected function getExamples() {
196196 return array(
197197 'api.php?action=block&user=123.5.5.12&expiry=3%20days&reason=First%20strike',
198 - 'api.php?action=block&user=Vandal&expiry=never&reason=Vandalism&nocreate&autoblock&noemail'
 198+ 'api.php?action=block&user=Vandal&expiry=never&reason=Vandalism&nocreate=&autoblock=&noemail='
199199 );
200200 }
201201

Status & tagging log