Roan Kattouw
4e573ef087
API: Query-continue prop=categoryinfo by cat_title rather than offset. Suggested by Brad Jorsch
2009-02-09 19:54:25 +00:00
Roan Kattouw
9024971911
Fix up r47037, which was itself a fix-up of r46845. Change suggested by Brad Jorsch
2009-02-09 19:24:28 +00:00
Roan Kattouw
40b6193c06
Remove a TODO from ApiMove and add a FIXME to SpecialMovepage
2009-02-09 15:15:49 +00:00
Roan Kattouw
81bf8d0a3a
* API: (bug 17357) Add subpage moving to the API
...
* Added Title::moveSubpages() as a backend function
** Didn't update SpecialMovepage to use this; left to braver souls
* Fix handling of errors on talk page move (will backport)
2009-02-09 14:16:51 +00:00
Roan Kattouw
5f0226fd8d
API: Fix up r46825:
...
* put the tables in the right order
* JOIN on user_text as well for better index usage
* Force the index on the recentchanges table as well
* Don't ORDER BY rev_user_text if it's constant
2009-02-09 14:07:18 +00:00
Roan Kattouw
4e67c4bdee
Fix some more regressions from r46845 reported by Brad Jorsch on the mediawiki-api list < http://lists.wikimedia.org/pipermail/mediawiki-api/2009-February/000924.html >
2009-02-09 13:28:12 +00:00
Aaron Schulz
48993f18f9
Hide title if DELETED_ACTION is on, but don't worry about type/action, which isn't what we're worried about
2009-02-06 14:42:50 +00:00
Roan Kattouw
c07397ee7f
Fix fatal error in r46885 (add templates parameter to action=import): add missing comma
2009-02-06 10:25:51 +00:00
Chad Horohoe
dc6c95a6f9
Add r46884 (Import templates via interwiki) to API as well.
2009-02-06 00:21:06 +00:00
Roan Kattouw
4018f00fb4
Fix regression from r46845 which broke ApiResult::cleanUpUTF8() and caused an E_NOTICE
2009-02-05 15:46:30 +00:00
Roan Kattouw
84624f39b5
Fix E_WARNING reported by siebrand
2009-02-05 15:31:06 +00:00
Roan Kattouw
2df33ff098
* API: BREAKING CHANGE: (bug 11430) Return fewer results than the limit in some cases to prevent running out of memory
...
* This means queries could possibly return fewer results than the limit and still set a query-continue
* Add iicontinue, rvcontinue, cicontinue, incontinue, amfrom to faciliate query-continue for these modules
* Implemented by blocking additions to the ApiResult object if they would make it too large
** Important things like query-continue values and warnings are exempt from this check
** RSS feeds and exported XML are also exempted (size-checking them would be too messy)
** Result size is checked against $wgAPIMaxResultSize, which defaults to 8 MB
For those who really care, per-file details follow:
ApiResult.php:
* Introduced ApiResult::$mSize which keeps track of the result size.
* Introduced ApiResult::size() which calculates an array's size
(which is the sum of the strlen()s of its elements).
* ApiResult::addValue() now checks that the result size stays below
$wgAPIMaxResultSize. If the item won't fit, it won't be added and addValue()
will return false. Callers should check the return value and set a
query-continue if it's false.
* Closed the back door that is ApiResult::getData(): callers can't manipulate
the data array directly anymore so they can't bypass the result size limit.
* Added ApiResult::setIndexedTagName_internal() which will call
setIndexedTagName() on an array already in the result. This is needed for the
'new' order of adding results, which means addValue()ing one result at a time
until you hit the limit or run out, then calling this function to set the tag
name.
* Added ApiResult::disableSizeCheck() and enableSizeCheck() which disable and
enable size checking in addValue(). This is used for stuff like query-continue
elements and warnings which shouldn't count towards the result size.
* Added ApiResult::unsetValue() which removes an element from the result and
decreases $mSize.
ApiBase.php:
* Like ApiResult::getData(), ApiBase::getResultData() no longer returns a
reference.
* Use ApiResult::disableSizeCheck() in ApiBase::setWarning()
ApiQueryBase.php:
* Added ApiQueryBase::addPageSubItem(), which adds page subitems one item
at a time.
* addPageSubItem() and addPageSubItems() now return whether the subitem
fit in the result.
* Use ApiResult::disableSizeCheck() in setContinueEnumParameter()
ApiMain.php:
* Use ApiResult::disableSizeCheck() in ApiMain::substituteResultWithError()
* Use getParameter() rather than $mRequest to obtain requestid
DefaultSettings.php:
* Added $wgAPIMaxResultSize, with a default value of 8 MB
ApiQuery*.php:
* Added results one at a time, and set a query-continue if the result is full.
ApiQueryLangLinks.php and friends:
* Migrated from addPageSubItems() to addPageSubItem(). This eliminates the
need for $lastId.
ApiQueryAllLinks.php, ApiQueryWatchlist.php, ApiQueryAllimages.php, ApiQuerySearch.php:
* Renamed $data to something more appropriate ($pageids, $ids or $titles)
ApiQuerySiteinfo.php:
* Abuse siprop as a query-continue parameter and set it to all props that
couldn't be processed.
ApiQueryRandom.php:
* Doesn't do continuations, because the result is supposed to be random.
* Be smart enough to not run the second query if the results of the first
didn't fit.
ApiQueryImageInfo.php, ApiQueryRevisions.php, ApiQueryCategoryInfo.php, ApiQueryInfo.php:
* Added continue parameter which basically skips the first so many items
ApiQueryBacklinks.php:
* Throw the result in a big array first and addValue() that one element at a time if necessary
** This is necessary because the results aren't retrieved in order
* Introduced $this->pageMap to map namespace and title to page ID
* Rewritten extractRowInfo() and extractRedirRowInfo() a little
* Declared all private member variables explicitly
ApiQueryDeletedrevs.php:
* Use a pagemap just like in Backlinks
* Introduce fake page IDs and keep track of them so we know where to add what
** This doesn't change the output format, because the fake page IDs start at 0 and are consecutive
ApiQueryAllmessages.php:
* Add amfrom to facilitate query-continue
ApiQueryUsers.php:
* Rewrite: put the getOtherUsersInfo() code in execute()
2009-02-05 14:30:59 +00:00
Roan Kattouw
167d11a8c3
* API: Listing (semi-)deleted revisions and log entries (with rev_/log_deleted != 0) as well in prop=revisions and list=logevents, with commenthidden/userhidden/actionhidden/texthidden flags where appropriate
...
* Still honors the paranoia checks added in r46807
* Use $index consistently in ApiQueryLogEvents
* Some whitespace consistency
2009-02-05 11:44:10 +00:00
Roan Kattouw
3a259992fb
API: Re-enable ucprop=patrolled and rcshow=patrolled|!patrolled using the timestamp index for the join (thanks to Tim for pointing this out) and a STRAIGHT_JOIN for the inner join case
2009-02-04 23:19:18 +00:00
Roan Kattouw
ff45244744
API: BREAKING CHANGE: Remove rctitles parameter from list=recentchanges for performance reasons (requests using it time out on enwiki)
2009-02-04 22:51:36 +00:00
Roan Kattouw
18eb32ec29
API: Tweak the format for &export to be more XML-friendly. Not a breaking change since &export hasn't gone live yet anyway
2009-02-04 22:12:25 +00:00
Roan Kattouw
bb3980dd8d
* API: (bug 17007) Add action=import
...
* Add intoken=import to prop=info
* Store message key and arguments in WikiErrorMsg
2009-02-04 20:11:27 +00:00
Roan Kattouw
b677d0191d
* API: (bug 17355) Added auwitheditsonly parameter to list=allusers
...
* Use consistent code style
2009-02-04 19:10:14 +00:00
Roan Kattouw
6f11c2331b
Nitpicking brigade: fix copyright year
2009-02-04 14:18:53 +00:00
Roan Kattouw
f68b0a79c1
API: Temporarily disable ucprop=patrolled and ucshow=patrolled|!patrolled because of performance concerns mentioned on bug 17215
2009-02-04 13:16:12 +00:00
Roan Kattouw
bb81750f27
* API: (bug 17326) BREAKING CHANGE: Changing output format for prop=imageinfo&iiprop=metadata to something based on name/value pairs. This means we don't use parts of the metadata in attributes anymore, something that caused invalid XML to be output. For more info on the exact format, see the mediawiki-api mailing list
...
* Removed the spaces-to-underscores hack in the XML formatter
2009-02-03 16:25:50 +00:00
Roan Kattouw
2b6314c9c4
(bug 17327) Normalize API help texts: remove quotes
2009-02-02 23:17:07 +00:00
Roan Kattouw
5e5684ec77
* API: (bug 17007) Add export functionality to the API
...
* Accessed through the export and exportnowrap parameters added to action=query
* To facilitate &exportnowrap, add ApiFormatRaw, a formatter that just spits out its input without any formatting (not accessible through &format= of course)
* Fix up the action=query description message to reflect the deprecation of query.php
2009-02-02 20:07:33 +00:00
Roan Kattouw
a2974f51f1
API: (bug 17317) Added watch parameter to action=protect
2009-02-02 16:38:40 +00:00
Roan Kattouw
20fec70243
Fix up r46646: instead of outputting displaytitle="" when {{DISPLAYTITLE}} isn't used (or isn't valid), output the 'normal' title instead
2009-01-31 16:35:23 +00:00
Roan Kattouw
82b34d1b03
API: (bug 17239) Added prop=displaytitle to action=parse
2009-01-31 16:29:15 +00:00
Roan Kattouw
06b5d0f9d5
API: (bug 17224) Add siprop=rightsinfo to meta=siteinfo. Modified patch by Brianna Laugher
2009-01-31 15:56:52 +00:00
Roan Kattouw
8e361227a2
Revert r46512 (Add "check" parameter to action=email) and its followups r46515 and r46517. This functionality is already present in list=users (as usprop=emailable), where it belongs
2009-01-31 13:20:36 +00:00
Roan Kattouw
2e6fb0623e
API: (bug 17182) Fix pretty printer so URLs with parentheses in them are autolinked correctly
2009-01-31 13:05:12 +00:00
Roan Kattouw
7babbd2fc5
Add the 'movenotallowedfile' message to the API message map. Turns out that's all I needed to do to support file moving through the API :D
2009-01-29 23:01:13 +00:00
Bryan Tong Minh
57d7e2bb88
Also return why the target user is not valid
2009-01-29 19:30:18 +00:00
Bryan Tong Minh
7058f802a2
Kill code duplication & other style tweaks
2009-01-29 19:27:44 +00:00
X!
73ba55efd6
Forgot to remove that
2009-01-29 04:13:50 +00:00
X!
38299137f7
Per 46512#c1554, moving check to before required params, returns a result rather than an error, and it must be posted.
2009-01-29 03:23:25 +00:00
X!
a9b78e1db9
Add "check" parameter to action=email
2009-01-29 01:25:17 +00:00
Andrew Garrett
0fcc017391
Fix broken calls to ArticleDelete hook.
2009-01-29 01:04:00 +00:00
Brion Vibber
79d0c8e34b
Pulling back r46341 and r46342 for now "API: (bug 17142) Add redirects parameter to action=opensearch to control redirect resolution. Changes to OpenSearchXML extension in next commit"
...
Mysteriously there's no way to get a boolean parameter to default to true, which leads to an incompatibility in the sensible behavior of the more detailed responses in the XML output -- eg you get a whole buttload of "#REDIRECT Blabla" in your results, which is absolutely hideous. This is very much not desireable. :)
If we could change the default, and allow it to be set on or off for specific requests if some person for some reason is doing highly customized suggestion searches and wants it configured differently (no idea why), that might be doable. But as written this doesn't make any sense.
2009-01-27 20:39:24 +00:00
Roan Kattouw
41cc3f6271
API: (bug 17142) Add redirects parameter to action=opensearch to control redirect resolution. Changes to OpenSearchXML extension in next commit
2009-01-27 14:43:06 +00:00
Roan Kattouw
383d826b0f
Revert r46138 (Get $wgLegalTitleChars through API) per comments on CodeReview and Bugzilla (bug 17024)
2009-01-27 13:10:16 +00:00
Roan Kattouw
6449867508
* API: (bug 15949) Add undo functionality to action=edit
...
* Move undo text generation from EditPage::getContent() to Article::getUndoText()
* Add some more examples for action=edit
* ApiEditPage.php: don't mix !is_null() and isset(), be consistent
2009-01-26 13:51:03 +00:00
Roan Kattouw
2e5e8808b4
API: (bug 17024) Added legaltitlechars field to meta=siteinfo&siprop=general output, which contains the value of $wgLegalTitleChars
2009-01-24 13:16:24 +00:00
Roan Kattouw
37ebf53907
Explain why this code doesn't use LinkBatch.
2009-01-24 13:10:30 +00:00
Roan Kattouw
32042c271f
API: (bug 16483) Kill filesort in ApiQueryBacklinks caused by missing parentheses. Building query properly now using makeList()
2009-01-24 13:00:43 +00:00
Roan Kattouw
cd910c6544
API: Fix profiling errors caused by calling wfProfileClose() from dieUsage()
2009-01-23 20:23:34 +00:00
Roan Kattouw
4b20f8cc75
API: ApiBase::dieUsage() is not a static function, fix static calls
2009-01-23 20:08:00 +00:00
Roan Kattouw
ad4a03c316
Fix up r45749: do is_string() check in the caller instead
2009-01-21 09:26:48 +00:00
Roan Kattouw
b9669c44fe
Followup to r45954: it helps to save before committing
2009-01-21 09:22:48 +00:00
Roan Kattouw
6f960e39e1
Fix indentation for r45944 and use consistent code style
2009-01-21 09:21:58 +00:00
Chad Horohoe
36a2416694
Code style tweak.
2009-01-20 23:58:18 +00:00
Alex Z
ff00dda0d0
Make API action=delete respect $wgDeleteRevisionsLimit
2009-01-20 23:37:39 +00:00
Brion Vibber
5b8a7db0c4
Revert r45810 "API: (bug 17027) Allow all configuration variables in $wgAPIReadableConfigVars to be read through meta=siteinfo&siprop=configvars. I tried my best to only make useful stuff readable and skip stuff that's sensitive (like $wgDBpassword), available already (like $wgExtraNamespaces) or useless (like $wgUpdateRowsPerJob)."
...
This is way too tightly coupled to internal implementation details. Any and all of those things could change dramatically; they're not appropriate for an external API.
2009-01-20 22:57:05 +00:00
Roan Kattouw
9100cdcd03
API: (bug 17069) Added ucshow=patrolled|!patrolled to list=usercontribs
2009-01-19 16:04:33 +00:00
Roan Kattouw
0635eeb4c4
API: (bug 17048) Show the 'new' flag in list=usercontribs for the revision that created the page, even if it's not the top revision
2009-01-19 15:23:12 +00:00
Roan Kattouw
a7c7a3fd33
Revert r45821, r45830, r45831 and r45835 all in order to revert r45819, per discussions on CR. Will redo part of r45819 momentarily.
2009-01-19 13:56:08 +00:00
Roan Kattouw
75eaf96468
API: Fixing paging in list=alllinks, which seems to have been broken for a long time. Also fix alunique, which simply didn't work. No RELEASE-NOTES entry since I'm gonna backport this to 1.14.
2009-01-17 19:52:37 +00:00
Roan Kattouw
9b3dd5122a
Another followup to r45819: update references to the renamed archive.usertext_timestamp index. The user_newtalk.user_id and user_newtalk.user_ip indices aren't used anywhere that I could find.
2009-01-17 10:11:42 +00:00
Roan Kattouw
b8d66efbb1
Followup to r45810: remove unused global declaration
2009-01-16 21:10:02 +00:00
Roan Kattouw
d161831223
API: (bug 17027) Allow all configuration variables in $wgAPIReadableConfigVars to be read through meta=siteinfo&siprop=configvars. I tried my best to only make useful stuff readable and skip stuff that's sensitive (like $wgDBpassword), available already (like $wgExtraNamespaces) or useless (like $wgUpdateRowsPerJob).
2009-01-16 21:03:13 +00:00
Roan Kattouw
ecf739b57a
* svn:eol-style native for r45755
...
* Replace spaces with tabs in ApiFormatJson_json.php, fix some crazy indentation
2009-01-15 10:18:44 +00:00
X!
97da594444
(bug 17025) Add "fileextension" parameter to meta=siteinfo&siprop=
2009-01-14 22:15:50 +00:00
Roan Kattouw
5559e3f2b9
API: Clean up invalid UTF-8 in the result before feeding it to the formatter. This should fix bug 15261 (trimmed multibyte chars) and bug 16262 (chars like \x0f)
2009-01-14 21:22:00 +00:00
Roan Kattouw
d70050053a
API: (bug 16844) Added clcategories parameter to prop=category to make checking whether a certain page is in a certain category more efficient
2009-01-14 17:04:46 +00:00
X!
d9b9a30bb3
Fix comment leftover from ApiLogout
2009-01-14 00:00:40 +00:00
Roan Kattouw
fde54a8395
API: (bug 16858) Revamped list=deletedrevs to make listing deleted contributions and all deleted pages possible. This reintroduces drnamespace (removed earlier because of performance concerns, now implemented efficiently) and introduces druser, drexcludeuser, drfrom, drcontinue and drunique
2009-01-12 16:39:04 +00:00
Roan Kattouw
c0cd843e63
API: (bug 16629) "edit=:move=" in page.page_restrictions was interpreted incorrectly. Also moved up the code checking for legacy protections to right after the code checking for 'new' protections.
2009-01-12 14:27:28 +00:00
Roan Kattouw
4268665fc1
API: (bug 16798) Fix for PHP bug 46944 (PHP's JSON formatter encodes certain UTF8 characters incorrectly) by falling back to our own formatter if PHP's is broken. Also fix up our own JSON formatter which also messed up these characters, albeit in a different way. Slightly modified patch by Brad Jorsch.
2009-01-12 14:11:20 +00:00
Bryan Tong Minh
24a930a13e
Force the use of the PRIMARY key rather than the name_title in the second query.
2009-01-08 22:02:16 +00:00
Aryeh Gregor
7091024181
s/existant/existent/
2009-01-01 02:02:03 +00:00
Alex Z
93164e1dc8
fix param description, rollback token comes from prop=revisions
2008-12-26 04:13:47 +00:00
Roan Kattouw
781597bdce
API: Fix weird ==/=== bug in API help: a possible value of zero is interpreted as "can be empty".
2008-12-21 00:21:01 +00:00
Roan Kattouw
6ddef7e30a
API: (bug 16730) Added apprfiltercascade parameter to list=allpages to filter cascade-protected pages
2008-12-20 23:54:04 +00:00
Roan Kattouw
2584890446
Fix up r44860, use $wgContLang instead.
2008-12-20 23:49:16 +00:00
Roan Kattouw
25bf90b363
API: (bug 16726) siprop=namespacealiases should also list localized aliases
2008-12-20 23:20:15 +00:00
Roan Kattouw
0dfff7a988
API: Fixing issue mentioned on bug 16129 comment #3 : for certain inputs, action=parse dies with an internal error whining about $wgTitle not being set in OutputPage::parse(). This commit works around this by setting $wgTitle, but the parser and its friends should really leave $wgTitle alone, because people might want to parse non-$wgTitle titles, which the Parser::parse() docs suggest is possible (and it should be), but apparently isn't.
2008-12-20 20:00:07 +00:00
Roan Kattouw
cc98ce259b
API: Fix up r44676: convert underscores to spaces in canonical names.
2008-12-18 15:00:07 +00:00
Roan Kattouw
8504bf43e2
API: Crusade against extract(). Left one extract() call alone in ApiQueryBacklinks.php because I don't have a better alternative for it.
2008-12-17 16:34:01 +00:00
Roan Kattouw
06a5efe4fa
Revert r44716 (added user,excludeuser to watchlist,recentchanges): can't commit this just yet because not all WMF servers have the user_text index just yet, see also bug 14200
2008-12-17 15:35:57 +00:00
Roan Kattouw
91b4dfb130
API: (bug 16527) Added user and excludeuser parameters to list=watchlist,recentchanges
2008-12-17 14:50:48 +00:00
Brion Vibber
2f1cee5b91
Cleanup r44683 -- fix E_NOTICE bug in MWNamespace::getCanonicalName() instead of replicating the function. :)
...
(Also note -- using MWNamespace instead of Namespace for PHP 5.3 compat.)
2008-12-16 23:57:21 +00:00
Alex Z
ddde44606b
Fix for r44676, fix E_NOTICE from having no canonical name associated with a namespace (ns 0), move RELEASE-NOTES entry to API section and clarify.
2008-12-16 19:59:37 +00:00
X!
5bf752ee6a
* (bug 16672) Add canonical parameter to meta=siteinfo&siprop=namespaces|namespacealiases.
2008-12-16 17:19:05 +00:00
Chad Horohoe
a8a6844e61
Support extension information in meta=siteinfo.
2008-12-14 22:06:32 +00:00
Roan Kattouw
38de20ffeb
API: (bug 16647) list=allcategories, prop=categories don't return "hidden" property for hidden categories. Patch by Brad Jorsch
2008-12-14 20:24:23 +00:00
Chad Horohoe
be374a912a
War on wfElement() and friends. Call the Xml members directly, rather than using old wrappers.
2008-12-14 19:14:21 +00:00
Roan Kattouw
4142713195
Follow-up to r44584: finishing comment.
2008-12-14 17:44:13 +00:00
Roan Kattouw
1c9d353390
API: (bug 15579) clshow considers all categories !hidden. Modified patch by Brad Jorsch
2008-12-14 17:39:50 +00:00
Roan Kattouw
684a4c3fb7
API: (bug 16549) Kill a filesort in list=allpages&apfilterlanglinks=withlanglinks by replacing DISTINCT with GROUP BY. Of course GROUP BY page_namespace, page_title would suffice on MySQL, but Postgres will reportedly whine about that being against the SQL standard. Using GROUP BY on all selected fields instead (should please pgsql) and taking care that page_namespace, page_title is on front, which shouldn't cause a filesort is MySQL is smart enough (5.0 is, let's just hope 4.1 is too)
2008-12-14 17:04:24 +00:00
Roan Kattouw
65a7f19470
API: Fix broken block expiry calculation in list=recentchanges
2008-12-14 15:50:40 +00:00
Alex Z
abba40eaad
* (bug 16626) action=delete now correctly handles empty "reason" param
2008-12-13 21:07:18 +00:00
Roan Kattouw
8e9a43114a
API: (bug 16594) Use strict comparison in list=allusers. This'll hopefully make [[User:]] on enwiki show up again; he's currently being dropped from the user list because false == ''
2008-12-11 21:51:01 +00:00
Alexandre Emsenhuber
fc4b2f597e
Fix encoding
2008-12-11 19:11:11 +00:00
Roan Kattouw
ada841ab2d
* API: (bug 16613) action=protect doesn't say when &cascade is set but cascading protection wasn't allowed
...
* Changed Article::updateRestrictions()'s $cascade parameter to a reference which is set to false if cascading protection isn't allowed
* Used this in ApiProtect
* Expand help message for &cascade a bit
2008-12-10 22:39:41 +00:00
Roan Kattouw
7c6e96a734
API: (bug 16581) Fix regression from r44015 ("Various minor cleanup") which changed Article::replaceSection() to treat $section=null as $section=0 rather than $section='' as it did before, causing a nasty API edit bug. When changing a function's behavior, please update the callers, and don't forget the API.
2008-12-10 14:12:54 +00:00
Alexandre Emsenhuber
b6f827b739
* fix doxygen warnings
...
* fix whitespaces
2008-12-08 17:29:24 +00:00
Roan Kattouw
8fc3724a4a
API: (bug 16541) Adding block expiry timestamp to list=logevents output (calculated from the block's timestamp and its duration)
2008-12-04 15:59:26 +00:00
Roan Kattouw
95c67c8df6
Revert part of r44232, accidentally committed too much
2008-12-04 15:55:47 +00:00
Roan Kattouw
7e35fc4b5a
API: (bug 16515) Added pst and onlypst parameters to action=parse, which do a pre-save transform on the input
2008-12-04 15:51:39 +00:00
Roan Kattouw
56d9fba12d
API: Recommit r44182 (Added usprop=canemail to list=users) and rename canemail to emailable
2008-12-04 14:42:30 +00:00
Brion Vibber
77f1ee20d2
Pull back r44182 for now "* API: (bug 16526) Added usprop=canemail to list=users, which tells whether a user can (and wants to be) e-mailed through [[Special:Emailuser]]."
...
"canemail" is ambiguously named, and on first blush indicates that the user "can email", which would mean that they can *send* email, which doesn't appear to be what it's used for.
2008-12-03 23:37:27 +00:00
Roan Kattouw
16755e7fd3
API: (bug 16548) list=search threw invalid errors under certain circumstances
2008-12-03 19:33:57 +00:00
Roan Kattouw
1040ce28e4
* API: (bug 16526) Added usprop=canemail to list=users, which tells whether a user can (and wants to be) e-mailed through [[Special:Emailuser]].
...
* Refactored some code to use a User object
2008-12-03 19:07:16 +00:00
Roan Kattouw
d522ff9263
API: (bug 16516) Made rvsection=T-2 work rather than being interpreted as rvsection=0
2008-12-03 19:01:30 +00:00
Ilmari Karonen
34fb6297cd
Step 2 in NS_IMAGE -> NS_FILE transition (bug 44) (WARNING: huge commit).
...
This is a global search and replace of NS_IMAGE and NS_IMAGE_TALK with NS_FILE and NS_FILE_TALK respectively in all core files, excluding those already updated in step 1 (r44004).
2008-12-01 17:14:30 +00:00
Bryan Tong Minh
0e5ad9bbde
Allow easier debugging of this module by distinguishing between the two queries
2008-11-28 11:36:04 +00:00
Roan Kattouw
70e0646bf0
API: (bug 16421) Actually do user name normalization in list=logevents. Also fix up User::idFromName so it doesn't think "Talk:Catrope" isn't the same user as "Catrope"
2008-11-22 15:46:36 +00:00
Roan Kattouw
c8acd86afc
API: (bug 16408) Added DOM tree generation (rvgeneratexml) to prop=revisions. Looks kind of ugly in XML, but bots don't care about that, and people should use less crappy-looking formats anyway.
2008-11-21 13:55:27 +00:00
Roan Kattouw
a6e101025d
Fix up r43673: reindex the rights array after removing duplicates
2008-11-20 15:15:00 +00:00
Roan Kattouw
c3be8a3034
API: (bug 16398) meta=userinfo&uiprop=rights lists a right twice if it's granted to two groups the user is in
2008-11-20 14:46:10 +00:00
Roan Kattouw
7aff9997f2
API: (bug 12760) meta=userinfo&uiprop=ratelimits doesn't list group-specific rate limits
2008-11-18 16:05:24 +00:00
Roan Kattouw
e250759491
API: Make reblocking (introduced in r42843) possible through the API
...
* Add reblock parameter to action=block
* Tweak the description for allowusertalk for consistency
2008-11-18 15:21:04 +00:00
Roan Kattouw
a7223d80bc
API: (bug 16367) Add allowusertalk attribute to list=blocks output
2008-11-18 15:11:11 +00:00
Brion Vibber
4c54e4016f
* API siteinfo query no longer throws an exception for empty sifilter parameter.
...
The parameter is defined as being one of two values ('local' or '!local'), but comes back as array() if it was specified but empty... which then got overly-strictly checked against 'false', which was used internally for the case where it's unspecified, and an exception thrown internally.
Now the filter parameter is nicely ignored whether it's unspecified or specified as empty, which is good clear behavior.
As before, other values return a standard API error about invalid values being passed.
2008-11-17 18:13:11 +00:00
Brion Vibber
18d5de14ba
$oldName parameter to UserLogoutComplete hook call was missing.
...
Caused this warning (harmless in practice):
PHP Warning: Missing argument 3 for CentralAuthHooks::onUserLogoutComplete() in /usr/local/apache/common-local/php-1.5/extensions/CentralAuth/CentralAuthHooks.php on line 217
2008-11-15 01:23:39 +00:00
Tim Starling
4daa2dbb6a
Don't use getParameter() inside substituteResultWithError(), since it will try to call dieUsage() again if the format parameter is invalid. This fixes the error message for invalid formats, which was broken.
2008-11-14 00:30:34 +00:00
Siebrand Mazeland
c426e6b9d7
Consistent casing for wfGetDB(), getDB(), and getDBKey()
2008-11-06 22:38:42 +00:00
Siebrand Mazeland
9bc9c1d161
Consistent casing for wfGetDB()
2008-11-06 22:30:55 +00:00
Roan Kattouw
d5a1e9cf4b
API: (bug 16225) apfrom=Talk:Foo behaved like apfrom=Foo because Talk: was interpreted as a namespace prefix. This caused bugs when trying to query-continue with a title like Talk:Talk:Foo. Other XXfrom and XXprefix parameters probably had this bug as well.
2008-11-03 10:13:00 +00:00
Aaron Schulz
3337669b0c
* Fix comment
...
* Rename HexToIP -> HexToQuad
2008-11-02 18:35:58 +00:00
Roan Kattouw
db6d1ed1dc
API: Move ApiQueryBlocks::convertHexIP() to IP::hexToIP() per Werdna's comment on r43040
2008-11-02 16:50:59 +00:00
Roan Kattouw
0ea1d6ea9c
API: Followup on r43014: clean up some more
2008-11-01 22:19:39 +00:00
Roan Kattouw
36174d19cb
API: Clean up ApiQueryBlocks, which was a stylistic mess. I can't believe I actually wrote that code (I was young and foolish, I guess :P )
2008-11-01 19:23:14 +00:00
Alex Z
1b580a65d2
(bug 16207) - Fix title protection in the API. $expiry is cast to an array near the start and doesn't have the correct timestamp format here anyway.
2008-11-01 00:00:25 +00:00
Roan Kattouw
ec6060e5c9
API: Fix r42813, committed some stuff that shouldn't be committed just yet
2008-10-30 17:24:40 +00:00
Roan Kattouw
095803abf5
API: Tweak r42794 (add docs for ApiBase class constants) a little
2008-10-30 14:51:57 +00:00
Roan Kattouw
d5ed68afaa
API: Self-revert r42811 (BREAKING CHANGE: Putting meta=siteinfo output in <siteinfo> element for consistency with every other API module.). On second thought, it's not really necessary.
2008-10-30 14:43:41 +00:00
Roan Kattouw
20dd6fdb02
API: BREAKING CHANGE: Putting meta=siteinfo output in <siteinfo> element for consistency with every other API module. Previously, it was just put in the <query> element, where it doesn't belong.
2008-10-30 14:36:05 +00:00
Chad Horohoe
072649ebe8
Add some docs on these class constants
2008-10-30 00:39:21 +00:00
Aaron Schulz
eef0d25777
Don't show orphaned revisions (will matter for bug 11402 later)
2008-10-29 04:17:31 +00:00
Domas Mituzas
22f8f4ca17
usertext, not user :)
2008-10-28 18:49:00 +00:00
Alexandre Emsenhuber
1cf75c3fb4
Fixes for r42735:
...
* option's name is USE INDEX
* use the index is user_timestamp (per domas)
* force it on the 'revision' table, not 'page'
2008-10-28 18:42:49 +00:00
Chad Horohoe
efad3a8b76
Use FORCE INDEX here, because Domas said we should :) All hail Domas.
2008-10-28 17:51:38 +00:00
Roan Kattouw
2c4eae4b92
API: (bug 16158) Generators choke on pagelinks entries with negative pl_namespace. Throw a warning instead of an error for the time being
2008-10-28 14:35:48 +00:00
Roan Kattouw
5a18b6aa4e
API: * (bug 16159) Add wlshow=patrolled|!patrolled to list=watchlist
...
* Followup of r42077: fix bug 15945 (use User::useRCPatrol() and useNPPatrol() rather than isAllowed('patrol')) for list=watchlist as well
2008-10-28 14:20:29 +00:00
Roan Kattouw
969761e440
API: Also throw a warning when tokens for missing pages are denied
2008-10-27 12:16:47 +00:00
Roan Kattouw
40152f0aea
API: Per IRC conversation with Splarka, add a few words about token availability from prop=info in the help text for action=block and action=unblock
2008-10-27 12:06:49 +00:00
Roan Kattouw
ced78b9748
API: (bug 16126) Added siprop=magicwords to meta=siteinfo
2008-10-26 13:57:19 +00:00
Roan Kattouw
f6363295b4
API: Fixing r42583: true isn't even allowed as a default value
2008-10-26 10:47:13 +00:00
Roan Kattouw
e7c507a57a
API: (bug 16115) API action=block dies with an exception when $wgBlockAllowsUTEdit is not a boolean (e.g. set to 1). While this shouldn't be done, of course, we can at least handle it more gracefully.
2008-10-25 22:22:22 +00:00
Alexandre Emsenhuber
925846c7d5
Do a last check before creating the object to not throw a fatal error when calling api.php?format=
2008-10-25 16:23:09 +00:00
Roan Kattouw
f8dc72921f
API: (bug 16105) Image metadata attributes with spaces produce invalid XML. Just replace spaces with underscores in the XML formatter and be done with it.
2008-10-25 15:53:58 +00:00
Tim Starling
f48c6070df
Removed all instances of empty() where error suppression was not intended. Replaced with conversion to boolean, count() or empty string check as appropriate. Fixes a number of bugs due to incorrect conversion to boolean: suppressed edit summaries containing '0', ignored titles called '0', searches for '0' ignored, etc.
2008-10-25 14:04:43 +00:00
Tim Starling
c5bd0fae09
Removed scary YAML parsing code, the function of which is to load from a user input string, except if the string has no line breaks in it, in which case an arbitrary local file/URL is loaded and handed to the attacker on a nicely encapsulated silver platter. Doesn't appear to be used either by core or extensions, but you never know when someone might try.
2008-10-25 14:01:35 +00:00
Tim Starling
c4dd73000a
* Fix r41814: totally broken use of empty(), ignores conditions that compare with numeric zero. I've told you before, don't use empty() to test for zero-length arrays.
...
* Fix r34767: wrong indexes used in ApiQueryLogEvents
2008-10-25 08:13:40 +00:00
Roan Kattouw
a901d184dd
API: * Fix up r42471 which hardcoded pl_from instead of using $this->bl_from
...
* Fix the second half of bug 16076 (using pl_from>=123 in combination with multiple values for pl_namespace and pl_title causes filesort)
* By pure accident this fixes a bug about list=backlinks&blredirect dropping results under obscure conditions
2008-10-24 22:22:40 +00:00
Roan Kattouw
31cf2fef2d
API: Partial fix of bug 16076: use pl_from instead of page_id in list=backlinks query. The two are equal because of the JOIN clause, but pl_from is indexed whereas page_id isn't (MySQL 5 automatically rewrites this, 4 doesn't)
2008-10-24 18:54:02 +00:00
Roan Kattouw
6ad1e45cd9
API: * BREAKING CHANGE: (bug 16074) Providing prop=revisions&rvprop=content with too many titles or revisions (typically through a generator) no longer causes an error, but a warning
...
* Added ApiBase::truncateArray() and used it in ApiBase::parseMultiValue()
2008-10-24 13:05:44 +00:00
Roan Kattouw
ee3e7075a5
API: Added redirect resolution to action=parse. Based on a patch by Robert Chin
2008-10-24 12:28:14 +00:00
Roan Kattouw
58ed5d34bf
API: (bug 16047) Added activeusers attribute to meta=siteinfo&siprop=statistics output
2008-10-22 12:16:24 +00:00
Alexandre Emsenhuber
018f7d9854
Per Catrope's request, commiting patch on bug 16018:
...
* (bug 16018) Added uccontinue parameter to list=usercontribs so paging works properly when multiple users are queried or a userprefix is used
2008-10-18 10:14:02 +00:00
Alexandre Emsenhuber
0d0d7b5559
Per Catrope's request, commiting patch on bug 16017:
...
* (bug 16017) list=categorymembers sets invalid continue parameters for sortkeys containing pipes
2008-10-18 10:09:19 +00:00
Roan Kattouw
1be7d14726
* API: (bug 15995) Added cmstartsortkey and cmendsortkey parameters to list=categorymembers, mirroring cmstart and cmend for timestamps
...
* Drop useless and possibly filesorting ORDER BY cl_to from list=categorymembers
* Handle ORDER BY cl_sortkey, cl_from (possibly with DESC appended to each of them) with addWhereRange() calls
2008-10-17 14:26:56 +00:00
Roan Kattouw
a3714f5f37
(bug 15985) Fix acfrom and aifrom breakage when sorting in descending order
2008-10-16 14:28:49 +00:00
Roan Kattouw
abd56027c8
(bug 15945) API: Use User::useRCPatrol() and useNPPatrol() rather than isAllowed('patrol') in list=recentchanges
2008-10-14 12:46:11 +00:00
Ilmari Karonen
d01d0edd98
Use getParameter() for the "maxage" and "smaxage" parameters rather than pulling them straight out of the request
...
so that they'll be properly validated (and in particular coerced to integers).
2008-10-10 17:09:53 +00:00
Roan Kattouw
798cc41a51
(bug 15881) API: Empty or invalid parameters cause database errors
2008-10-07 18:23:39 +00:00
Roan Kattouw
3ff1f89e0c
* (bug 15845) API: Added pageid/fromid parameter to action=delete/move, making manipulation of legacy pages with invalid titles possible
...
* Fix an E_STRICT while I'm at it
2008-10-07 14:57:59 +00:00
Roan Kattouw
c7f10c73d9
(bug 15767) API: apfilterlanglinks returns duplicate results
2008-10-05 09:35:47 +00:00
Roan Kattouw
059e2f8160
API: Add examples for list=duplicatefiles
2008-10-04 21:54:11 +00:00
Roan Kattouw
bb71d34114
Remove debugging code
2008-10-04 15:06:24 +00:00
Roan Kattouw
0828169b6b
API: Add allowsduplicates attribute to action=paraminfo output
2008-10-04 15:03:03 +00:00
Roan Kattouw
212720fa28
API: * (bug 15785) Allow for different expiry times for different protections, like the UI does
...
* BREAKING CHANGE: Alter action=protect output to display multiple expiry times
* BREAKING CHANGE: Error messages invalidexpiry and pastexpiry now state the expiry they're about
* Add ApiBase::PARAM_ALLOW_DUPLICATES and honor it in ApiBase::getParameterFromSettings()
2008-10-04 14:58:13 +00:00
Roan Kattouw
7bb4064436
Add a meaningful example for list=watchlistraw
2008-10-04 14:30:33 +00:00
Roan Kattouw
5896f16a44
(bug 15647) API edit with basetimestamp fails if the page has been deleted and undeleted since the last edit
2008-10-04 13:43:17 +00:00
Roan Kattouw
5c4efbf944
(bug 15768) Add list=watchlistraw to the API
2008-10-04 13:33:44 +00:00
Matt Johnston
fdc01ccef2
(bug 8440) Add API support for new blocking flag, also fix defaults so anywhere else we use an IPBlockForm it'll use a more sensible default.
2008-10-02 09:34:29 +00:00
Ilmari Karonen
69c1dd9e7e
Make the API maxlag check send the same "Retry-After" and "X-Database-Lag" headers as wfMaxlagError() does.
...
The HTTP status code is still different, I can see arguments for having it either way.
2008-10-01 21:38:13 +00:00
Matt Johnston
cd7aa10e89
(bug 15791) Typo in API docs, APIProtect has some remnants of help messages from deletion/restoration.
2008-09-30 21:03:38 +00:00
Rotem Liss
8b54f0f2b5
Fixing a function call.
2008-09-30 16:08:39 +00:00
Chad Horohoe
acf01dd7b8
Added setVal accessor to $wgRequest->data so we don't have to access it directly. Use this in ApiEditPage.
2008-09-30 15:13:13 +00:00
Roan Kattouw
f7748d570b
(bug 15653) Add prop=duplicatefiles to the API
2008-09-27 11:42:28 +00:00
Roan Kattouw
eea6c59c96
Kill undefined variable warnings.
2008-09-27 11:26:34 +00:00
Roan Kattouw
26c2b5264d
API: Add the name attribute back to list=allimages; it disappeared in r35085
2008-09-27 11:04:23 +00:00
Roan Kattouw
c2383bff2b
Forgot to commit a file in my TODO/FIXME crusade.
2008-09-25 22:41:03 +00:00
Roan Kattouw
a24da23922
We can at least *pretend* to be consistent here
2008-09-25 21:41:13 +00:00
Roan Kattouw
b62ddd3971
API:
...
* Title::moveTo() has been returning a getUserPermissionsErrors()-like array for ages now, let's use it correctly in ApiMove and skip the double-checks
* Remove some outdated TODO/FIXME comments
2008-09-25 21:39:36 +00:00
Roan Kattouw
008b4f7d0f
API: Add ApiDisabled and ApiQueryDisabled classes so individual modules can be disabled by putting $wgAPIModules['foo'] = 'ApiDisabled'; in LocalSettings.php
2008-09-25 20:50:50 +00:00
Roan Kattouw
3b86e96992
Do it right this time
2008-09-25 20:47:47 +00:00
Roan Kattouw
3ed4a18c6e
API: Fix adding over prop/list/meta modules, which seems to have been broken for a long time without anyone noticing.
2008-09-25 20:46:24 +00:00
Roan Kattouw
7dc62e75ed
(bug 15609) Add inprop=url (full URL to page and edit form) and inprop=readable (whether the current user can read the page) to prop=info
2008-09-25 15:55:09 +00:00
Roan Kattouw
4c7206a478
Followup to r41257: don't give out a token when we're in JSON callback mode
2008-09-25 15:27:04 +00:00
Roan Kattouw
09ccd3adbe
API: Added uiprop=preferencestoken to meta=userinfo, to retrieve the token for chaning one's preferences through Special:Preferences (and possibly through a future API module if and when the preferences system doesn't suck so much anymore).
2008-09-25 15:20:37 +00:00
Roan Kattouw
352d3f6dfb
(bug 15706) Empty values for apprtype and apprlevel are now silently ignored rather than causing an exception
2008-09-25 14:50:09 +00:00
Roan Kattouw
b3d5508c10
(bug 15673) Add indentation and newlines to format=wddxfm output:
...
* Like the JSON formatter, use our own WDDX formatter when PHP's is not available or the user asked for pretty output (PHP's doesn't do indentation)
* Don't prettify when our own formatter is used because PHP's is not avaiable
* Detect regular arrays (with sequential integer keys) and use <array> for them, rather than using <struct> for all arrays. PHP's formatter does this as well. This change should make our WDDX formatter's output identical to PHP's
2008-09-25 14:23:24 +00:00
Tim Starling
7410147d02
Fixes for r41154 and r41155:
...
* Boolean parameters are widely accepted to reduce readability. Replaced the new boolean parameters with class constant parameters instead.
* Re-added Revision::revText(), for backwards compatibility
* The getUser()/getUserText() changes near line 1223 of SpecialUndelete.php were incorrect, $file is an ArchivedFile not a Revision, and doesn't have any $isPublic parameters.
2008-09-24 09:44:45 +00:00
Aaron Schulz
804deee936
rev_deleted security improvements as well as fix for rawpages
2008-09-22 14:37:05 +00:00
Tim Starling
9f84a2fe83
Log exceptions encountered in api.php. Check for null $wgRequest.
2008-09-21 09:38:55 +00:00
Tim Starling
b47bb18aad
Fixed more wfGetDB() calls with no arguments.
2008-09-21 09:15:28 +00:00
Chad Horohoe
dc404545e0
Fix some doxygen stuff.
2008-09-19 00:21:03 +00:00
Alex Z
1f5da24b79
*Don't let the API action=protect set actions that aren't in $wgRestrictionTypes or levels not in $wgRestrictionLevels
...
*Pass an array to Article::updateRestrictions for the expiry. Though it should allow for separate expiry times, like the normal UI.
2008-09-18 21:30:51 +00:00
Roan Kattouw
353345d6ab
API: Adding APIAfterExecute, APIQueryAfterExecute and APIQueryGeneratorAfterExecute hooks to make extending core modules possible in a cleaner way
2008-09-17 18:49:22 +00:00
Thomas Bleher
4e9dacf069
Escape $1 in message (was PHP syntax error)
2008-09-14 14:24:54 +00:00
Aaron Schulz
13712ac86c
Revert r40792. Filesort is gone, but table scan is still there for time range.
2008-09-13 20:41:58 +00:00
Roan Kattouw
7237a1cecd
Reverting r40790 and fixing the filesort properly (by adding an extra ORDER BY clause).
2008-09-13 18:10:23 +00:00
Aaron Schulz
2f7dc78c07
I swear this table scan filesort was disabled before. Disabling again...thanks to Vyznev for pointing this out.
2008-09-13 17:56:07 +00:00
Chad Horohoe
15f016d1cb
Remove unused global declaration.
2008-09-11 02:03:34 +00:00
Roan Kattouw
6a2f8c1193
* (bug 15497) Removed encoding attribute from <?xml ?> tags
2008-09-10 13:39:24 +00:00
Roan Kattouw
35c661f308
Tweaks for r40686, r40687:
...
* Instead of type=boolean, just use false (that's the way it's done everywhere else)
* Remove bug number from RELEASE-NOTES entry; bug is in no way related to rnrandom
2008-09-10 13:30:42 +00:00
X!
3ddb14efa3
Add rnredirect parameter, to get a random redirect instead of a random page
2008-09-09 23:30:29 +00:00
Roan Kattouw
3256fbb3bf
(bug 15535) prop=info&inprop=protection doesn't list pre-1.10 protections if the page is also protected otherwise (1.10+ style or cascading)
2008-09-09 20:42:19 +00:00
X!
6540ad122f
Fix action=rollback to now revert IPs too. Patch submitted by ST47.
2008-09-08 23:33:42 +00:00
Roan Kattouw
b8e624d367
API: Uniformizing descriptions for write modules
2008-09-07 19:12:41 +00:00
Roan Kattouw
76635483de
(bug 15359) Add APIGetAllowedParams and APIGetParamDescription hooks
2008-09-07 19:04:51 +00:00
Victor Vasiliev
9e7fc0ae21
* (bug 15492) list=recentchanges&rctype=log does't list log action
...
Patch by Roan Kattouw
2008-09-06 12:18:36 +00:00
Roan Kattouw
244fa33d3d
(bug 15486) API action=block ignores autoblock parameter
2008-09-05 15:05:57 +00:00
Tim Starling
96d89329f3
* Don't force rendering in File::getThumbnail(). The old code (pre-filerepo) required rendering to be forced all the time, the new code is much smarter about when to render and doesn't need rendering to be forced. Forcing rendering causes non-scaler servers to be used for scaling.
...
* Use File::transform() in the core instead of the deprecated File::getThumbnail().
2008-09-05 04:23:24 +00:00
Alexandre Emsenhuber
78ca64e449
missing svn:keywords property
2008-09-04 22:20:32 +00:00
Roan Kattouw
b624df0d43
(bug 15466) Added action=purge to the API. Modified patch by ^demon
2008-09-04 21:53:43 +00:00
Roan Kattouw
def0843a31
(bug 15479) action=login no longer sets wait parameter when result="Throttled"; regression from r40054
2008-09-04 19:48:48 +00:00
Roan Kattouw
bd3bf5d2a7
* Split patrol code
...
** Backend code moved to RecentChange::reallyMarkPatrolled() and doMarkPatrolled()
** Adapted Article::markpatrolled()
* (bug 15466) Added action=patrol to the API. Modified patch by Soxred93
* Added rctoken=patrol to list=recentchanges
* Detect duplicate warnings in ApiBase::setWarning()
2008-09-04 15:17:51 +00:00
Roan Kattouw
0f639816ce
(bug 15471) Fix regression from r40088 which caused apprefix=Main_Page/ to fail because Main Page/. is not a valid title
2008-09-04 13:42:22 +00:00
Roan Kattouw
b294f9a437
(bug 15473) Correcting Doxygen comment for ApiEditPage
2008-09-04 13:40:33 +00:00
Roan Kattouw
1881098b81
(bug 15448) YAML output returns empty strings instead of 0. Surprisingly, this was not caused by PHP's "helpful" 0=='' ; research shows this was a regression from r32485 that no one ever noticed
2008-09-03 14:47:49 +00:00
Roan Kattouw
6cba51e734
(bug 15444) API: Throwing a regular 'unknownerror' rather than ('unknownerror', AS_END) when EditPage::AS_END is returned, for consistency with other write modules.
2008-09-03 14:26:41 +00:00
Tim Starling
fde6099061
header() replaces by default, there's no need to pass a second parameter
2008-09-01 04:32:36 +00:00
Bryan Tong Minh
35b2c4d391
* (bug 15392) ApiFormatBase::formatHTML now uses $wgUrlProtocols.
2008-08-31 17:11:22 +00:00
Bryan Tong Minh
a66bffaedf
Fix for my previous commit: Filter out null values
2008-08-29 21:49:36 +00:00
Bryan Tong Minh
145775132b
Add a function to require one and only one parameter of a list.
2008-08-29 21:09:18 +00:00
Bryan Tong Minh
6578dd7890
wfReadOnly now checked in ApiMain::requestWriteMode
2008-08-28 20:25:53 +00:00
Roan Kattouw
af6543ff56
(bug 15348) prop=categories returns timestamps that aren't in ISO 8601 format
2008-08-28 16:26:27 +00:00
Roan Kattouw
fb84c15c1e
API:
...
* Add titlePartToKey() and keyPartToTitle() which use the substr() hack to preserve trailing spaces
* Migrate function calls where needed. ??continue parameters still use titleToKey() because they're generated using keyToTitle() and therefore can't contain trailing spaces
2008-08-27 16:48:30 +00:00
Roan Kattouw
f35031994a
Fix fatal error caused by missing comma
2008-08-27 16:40:29 +00:00
Bryan Tong Minh
a9fd7beaef
* Fixup validation methods in UserEmailForm a bit so that they don't return arrays when it's not necessary.
...
* Add email errors to the API's message map
2008-08-27 13:36:39 +00:00
Roan Kattouw
880d5655cb
API: Remove the throttle from ApiLogin because
...
* it's been obsoleted by a similar throttle in core
* it uses time(), which causes problems when you have multiple servers with a significant clock skew between them
2008-08-26 22:18:24 +00:00
Roan Kattouw
34a22d81f5
API: Improvements to action=emailuser:
...
* Add two messages from ApiEmailUser to ApiBase::$messageMap
* Add email tokens to prop=info
2008-08-26 21:34:47 +00:00
Roan Kattouw
db6744da16
API: Fixed bug that caused all action=edit requests to return with the nochange flag set on wikis where DB_MASTER != DB_SLAVE
2008-08-26 20:49:52 +00:00
Roan Kattouw
1d3b95ab8d
API: Throwing a more specific error message when the client tries to create empty new sections, which isn't allowed. Unknown error: ``228'' isn't very user-friendly.
2008-08-26 20:40:44 +00:00
Aryeh Gregor
24d7986f49
Set svn:eol-style native on includes/api/ApiWatch.php.
...
Reported on IRC by rindolf.
2008-08-25 17:57:20 +00:00
Daniel Friesen
69e49e832e
ApiQueryBase::titleToKey and ApiQueryBase::keyToTitle;
...
Don't bother constructing a title object when the $title/$key is ''. (Why were we doing this check after creating the title object, there's no point in even creating a big object if we're just going to check the old string we already had to see if it's empty)
And as a bonus, use trim() so that user input such as ' ' does not dish out an error (There really isn't much difference between "&title=" and "&title= " if one shouldn't output an error, why should the other?).
2008-08-25 06:57:15 +00:00
Daniel Friesen
4fcb1312f2
Revert 39936 and 39935;
...
This 'fix' is merely a bad workaround and creates more issues rather than simply fixing.
A) Part of the Title class is being /duplicated/ meaning more bugs are going to show up when someone improves stuff inside Title and doesn't know stuff is duplicated here.
B) This change breaks cases as $wgCaptialLinks is now a per-namespace array, not a boolean.
C) This is the wrong way to 'fix' the issue, titleToKey and keyToTitle are meant to handle full titles, not prefixes, the issue is not that they break prefixes, it's that they are being misused and thus outputting something other than expected. The best way to fix this issue, would probably be to pad the title with something like '.' and then strip that single character off the db key.
D) Because whitespace is no longer being trimmed actual titles aren't being normalized properly in the other modules causing 'foobar ' to attempt to use the db key 'foobar_' which cannot exist.
2008-08-25 06:50:31 +00:00
Roan Kattouw
27cb2f9ab0
Follow-up for r39935: re-fix bug 14651 by making the first letter uppercase if needed in keyToTitle(). Code stolen from Yuri in r17039, who removed the functionality without explanation in r17096. So much for today's history lesson.
2008-08-25 05:51:46 +00:00
Roan Kattouw
511ae2aca2
API: Go back to using the good old str_replace() hacks rather than Title methods in ApiQueryBase::titleToKey() and keyToTitle(). Error handling was awkward and the Title methods over-normalize the input, causing bug 15275 (apprefix ignores spaces at the end)
2008-08-25 05:41:53 +00:00
Brion Vibber
be28c3980a
Revert r39793 "* (bug 13879) Special:EmailUser shows a form in case no user was specified" for the moment
...
* Recipient name seems to be output raw into HTML form; this is insecure
* We've lost the link to the target's user page in the primary use case (followed 'email this user' link)
* Behavior if you misspell a name doesn't look very nice; you can't just fix it and resubmit the form, you have to hit 'back' from an error page and hope your browser isn't one that deletes all your form data :D
2008-08-21 22:56:45 +00:00
Bryan Tong Minh
e751a22a2f
* (bug 13879) Special:EmailUser shows a form in case no user was specified
2008-08-21 22:15:34 +00:00
Roan Kattouw
44475e0314
Adding action=watch to the API
2008-08-21 15:44:13 +00:00
Bryan Tong Minh
f830c86e06
Provide some info on which case value was not handled in ApiLogin
2008-08-20 19:56:18 +00:00
Bryan Tong Minh
2776bbd98e
Fix up my name.
2008-08-19 15:08:14 +00:00
Roan Kattouw
309e57fd4a
API:
...
* BREAKING CHANGE: list={backlinks,embeddedin,imageusage} now return an array with keys 0, 1, 2, ... (list) rather than an array with pageIDs as keys (hash table/associative array) for consistency with other list= modules.
* Attempting to fix an error about "Invalid title ``''" (i.e. empty string as title) I encountered at Wikipedia.
2008-08-19 15:05:29 +00:00
Roan Kattouw
fe833aeddc
(bug 15228) Throw a warning instead of an error when revids= and redirects are combined. Also fixed a bug that caused warnings thrown in ApiPageSet.php to appear in an <ApiPageSet> tag rather than <query>
2008-08-18 20:48:45 +00:00
Roan Kattouw
f758f07e8d
(bug 15178) Added clshow to prop=categories to allow filtering for hidden/non-hidden categories
2008-08-16 21:21:12 +00:00
Roan Kattouw
6071d72917
(bug 15173) Make prop={links,templatelinks} not break in PostgreSQL
2008-08-16 21:02:31 +00:00
Roan Kattouw
2059e76f81
API: Let list=search throw away missing titles. Lucene will sometimes give us pages that have recently been deleted.
2008-08-16 21:00:19 +00:00
Roan Kattouw
8ca02215a8
API: Fixing an E_NOTICE reported by Wikia. Can't reproduce locally, but an extra @ can't hurt.
2008-08-16 20:52:56 +00:00
Fran Rogers
b63b22fc47
Patch from MaxSem re bug 15162 - handle throttling in the login API
2008-08-16 18:43:02 +00:00
Fran Rogers
851eaecd50
Wrapped certain tricky constructs in @cond/@endcond to prevent Doxygen
...
from choking on them and segfaulting.
2008-08-06 03:55:49 +00:00
Roan Kattouw
5331e82bd5
API:
...
* (bug 15048) Added limit field for multivalue parameters to action=paraminfo output.
* When the limit on multivalue parameters is exceeded, a warning is issued
2008-08-05 16:32:28 +00:00
Roan Kattouw
606d921911
* (bug 15044) Added requestid parameter to api.php to facilitate distinguishing between requests
...
* Clean up indentation from r38566
* Use $this->mRequest rather than $wgRequest in ApiMain
2008-08-05 16:12:52 +00:00
Chad Horohoe
dc91b3b12d
Badaccess-group1/2 no longer exist.
2008-08-05 14:44:00 +00:00
Roan Kattouw
25b6fa8d24
* Mention multivalue parameters in the message about apihighlimits
...
* Add Bryan Tongh Minh to the API credits. Half of all image-related code is his
* Add myself to CREDITS. Why do we sort that by first name, though? Kind of weird
2008-08-04 14:37:26 +00:00
Chad Horohoe
6959321d61
Display permissions specific to the API (such as writeapi and apihighlimits) on action=help. For apihighlimits, give the limits they're held to (bug 14713)
2008-08-04 14:26:20 +00:00
Chad Horohoe
4426ed9527
Tweak the version info for MW just a bit, bring it more in line with the module listings in terms of formatting.
2008-08-02 14:51:40 +00:00