Commit graph

218 commits

Author SHA1 Message Date
umherirrender
c802c5b1ab Remove unneeded parenthesis from warning text in prop=revisions
Change-Id: I8d2ca6a4b7199fa1f4fe3b3e63dbefb2cc273d7b
2013-06-09 12:07:41 +02:00
umherirrender
da39005596 Removed space after isset
While at it, added/removed some other spaces in the same files

Change-Id: Iabb23a448f6f53eb6020155f9c744f74f8b11786
2013-04-26 14:18:06 +02:00
umherirrender
15abcf71ca Added/Removed spaces around string concatenation
And added/removed spaces around some other tokens,
like +, -, *, /, <, >, =, !

Fixed windows newline style

Change-Id: I0b9c8c408f3f6bfc0d685a074d7ec468fb848fc8
2013-04-13 13:36:24 +02:00
Yuri Astrakhan
0aa24ae558 Fixed many small spelling mistakes and php docs, var decl.
Change-Id: I1508ed7eb77e5e4f700fb63955d626c4f5915840
2013-03-10 23:45:51 -04:00
umherirrender
d63121016d fix some spacing
Added/removed spaces around logical/arithmetic operator
Reduced multiple empty lines to one empty line
Removed wrong tabs before comments at end of line
Removed too many spaces in assigments

Change-Id: I2bba4e72f9b5f88c53324d7b70e6042f1aad8f6b
2013-03-07 17:53:21 +01:00
umherirrender
f97a3a4027 fix some spacing
Change-Id: I670a7baf3ba1e70d18346bb00938d518ba2063bd
2013-02-04 19:59:14 +00:00
Yuri Astrakhan
503cd2f4ae (bug 35885) remove api version string and parameter
API was using SVN's version keyword which GIT does not support.
All related methods were either removed, or for those that
could have been used from extensions, emptied out.
api.php?version now shows unrecognized param warning.

Change-Id: I910ca1448ed2ed697ac19b17c486d130aa1d7e03
2013-01-18 12:41:18 -05:00
Yuri Astrakhan
983545c362 API Cleanup: renamed '_badcontinue'->'badcontinue', one die()
* If a query module has 'continue' parameter, it will auto-report
that it has 'badcontinue' error.
* Added APIQueryBase::DieUsageContinueIf( $condition ) that shows
correct badcontinue error if $condition is true.

Change-Id: I9c48bda6de0cde3c117ad24460bddf6980279633
2013-01-14 21:19:16 -05:00
Brad Jorsch
9f3863c507 (bug 43820) Content also needed for prop=revisions&rvdiffto=
It was somehow overlooked that prop=revisions&rvdiffto= also requires
that the content for the current revision be fetched.

Change-Id: Ie1d718458da8cdb6ba63bd7ea512db3b299fc1e2
2013-01-10 09:24:39 -05:00
jenkins-bot
f741e3d95d Merge "(bug 42168) Nicely handle missing revisions in ApiQueryRevisions." 2012-12-20 14:59:28 +00:00
daniel
e0ca64fb6c (bug 42168) Nicely handle missing revisions in ApiQueryRevisions.
ApiQueryRevisions had fatal errors when the Content object of a revision was null.
Should be fixed now.

Change-Id: Ic41d03fc55413ba7ba1c96b4f06d71d79fb7c4eb
2012-12-20 15:22:58 +01:00
Alex Monk
9072a50845 (bug 43137) Don't return the sha1 of revisions through the API if the content is revdel'd
Change-Id: Ic2cad08cdae428d04dbdc31665c531d8a4759cbb
2012-12-17 17:08:35 +00:00
IAlex
8fe652709d Merge "Add 'contentmodel' to resultproperties in prop=revisions" 2012-11-15 10:10:00 +00:00
daniel
cef8005d3a When returning rev content, always include model.
query=revisions can be used with rvprop=content to retrieve the
content of revisions. The contentmodel should always be included
with the content (just like the contenformat is), so the client
is able to interpret the structure contained in the content blob.

Change-Id: I67cf48f905ff83a86992e1a54f7ad0feaf2b2c94
2012-11-14 14:53:34 +01:00
Kevin Israel
4f6234213f (bug 41899) Fix "Undefined index: start" notice
Unsetting the continue param rather than setting it to null
results in this PHP error message.

Patchset 2: added release note.

Change-Id: Ieb6be0ac047d6a4a46fb6522fbbdc058bb386411
2012-11-08 13:58:47 -05:00
umherirrender
7268330aa2 Add 'contentmodel' to resultproperties in prop=revisions
Change-Id: Ied3ad1b5088821fbb6c51fd91a5eac09e900fd96
2012-10-31 19:44:48 +01:00
umherirrender
185da8808e (bug 40574) hints for generatexml param in api modules
Change-Id: I782d64eed5faac6836a57463e195e64c4314199c
2012-10-30 10:16:04 +00:00
aude
8bac2d0e7c fix bug 41122, provide missing revId param in ApiQueryRevisions
Change-Id: I8e6b4f845f15bb230965e0e765fdc0f15f67c014
2012-10-18 23:33:34 +02:00
daniel
bb51a58e57 Cleanup of Wikidata branch.
This cleans up several issues raised in comments to I3b2dad3a,
mostly style and merge artifacts.

Change-Id: I99f5e300a671db1353db151cd187ffd2e4478d03
2012-10-08 17:34:47 +02:00
daniel
c546fae8ed merge latest master into Wikidata branch
Change-Id: Id4e0f40c03679c13d8934a6add99b5cd86d0437d
2012-10-08 13:58:54 +02:00
umherirrender
eb41fc9dc1 Add User to Title::userCan calls in api
Change-Id: I86ee1398abe4a790796d61aba1e1739bc55e565b
2012-09-22 13:33:33 +02:00
daniel
9994968774 merged master
Change-Id: Ib2b879c4daa17401eeeb50767c0e5a54254855c3
2012-08-29 15:20:15 +02:00
Daniel Kinzler
392af46809 Revert "merged master"
This reverts commit 67bfdc7a68
2012-08-29 13:14:49 +00:00
daniel
67bfdc7a68 merged master
Change-Id: Ib2b879c4daa17401eeeb50767c0e5a54254855c3
2012-08-29 12:06:38 +02:00
daniel
2bc191889a Fixing creation of DifferenceEninge
Creation of DifferenceEninge insteances was based on invalid assumptions
in several places.

Change-Id: Ib67ca893ea53a27d4ac7efd8a9ca0d3b2d93949f
2012-08-24 20:49:19 +02:00
Siebrand Mazeland
c848f486bc Replace deprecated wfMsg* calls with Message class calls.
Doing this in steps of roughly 100 changes per commit, so that it remains
reviewable. This should be the one but last change set with the "easy"
ones for core.

Change-Id: If894a92dd65b2f5f4f096b9133685eb3b067a1d8
2012-08-21 21:58:47 +02:00
daniel
0139923580 fixing long lines
Change-Id: Iebcd40a1a37a3a93cc571fa2c2b0a87f53dc97a4
2012-08-20 21:33:07 +02:00
daniel
29719f846b merging latest master
Change-Id: I36b7f2f63ab8c08f8412d521dc68ea45c8b67711
2012-08-20 16:55:28 +02:00
Brad Jorsch
7a657188a1 (bug 38904) prop=revisions&rvstart=... should not blow up when continuing
A query using prop=revisions in enum mode will return a query-continue
using rvstartid. If the original query included rvstart, the client will
therefore send both the rvstart from the original query and the
rvstartid from the query-continue. And the API will then return an error
that rvstart and rvstartid may not both be used in the same query.

Since there is no way for the API to instruct the client to ''not'' send
the rvstart when continuing, we'll just use rvcontinue instead. Then the
module can ignore both rvstart and rvstartid to get the intended
continuation.

Change-Id: I145215996b8a7818196cdfb583a1fdacae973fee
2012-08-02 14:47:02 -07:00
daniel
d87135d706 merged master
Change-Id: Iad12ee382d6aeb1fab6fefb611d290b74865ea4b
2012-07-23 22:07:18 +02:00
Antoine Musso
4f5d2386f3 escape HTML elements in docblock with double quotes
Doxygen choke on text enclosed by '<' and '>' since it tries to
interpret them as HTML or XML elements. This patch adds double quotes
in includes/api/*.php files around the two following strings:

 <Firstname>.<Lastname>@gmail.com
 <Firstname><Lastname>@gmail.com

Which becomes:

 "<Firstname>.<Lastname>@gmail.com"
 "<Firstname><Lastname>@gmail.com"

Tested locally, it prevents doxygen 1.8.0 related warnings.

Change-Id: I36d82eb3fd4989ee3ffc65b0b527b83711d1ba69
2012-07-15 22:15:45 +02:00
daniel
906a1ba51f [bug 37746] string ids for content model and format.
The content model is stored as a varbinary(32), the format
as varbinary(64).

If the standard model resp. format is used, null is written
to the database instead of the actual id, saving space.

Change-Id: I32659b49a9ad3cb8ecae9019562cff7de42b65f9
2012-06-26 15:56:06 +02:00
daniel
4c812f8462 use 'contentformat' instead of 'textformat' in result
Change-Id: If2d392329bb1618dbacf489f96b53115281b8e97
2012-06-14 17:15:08 +02:00
daniel
a830943203 Merge branch 'master' of ssh://gerrit.wikimedia.org:29418/mediawiki/core into Wikidata 2012-06-14 12:43:43 +02:00
daniel
857daf4a5a make revision api aware of content models 2012-06-13 11:58:05 +02:00
Petr Onderka
80aa025528 Added result properties to action=paraminfo
Added information about the properties of the results of API calls
to action=paraminfo, including information about "property groups":
what should the prop parameter be set to to get that property.

Uses the same format for types as parameters already do.
The output format of some modules doesn't fit this, so the result
properties for them weren't added, or only partially.

Partially implemented modules:
* expandtemplates:
  parsetree is in its own tag
* protect, allusers, backlinks, deletedrevs, info, imageinfo,
  logevents, querypage, recentchanges, revisions, searchinfo,
  usercontribs, userinfo, users, watchlist, upload:
  response with partially complex structure

Not implemented modules:
* feedcontributions, feedwatchlist, opensearch, rds:
  non-standard reponse
* help:
  error is normal response; not very useful for automated tools anyway
* paraminfo, parse, pageprops, siteinfo, userrights:
  response with complex structure

Change-Id: Iff2a9bef79f994e73eef3062b4dd5461bff968ab
2012-06-06 19:24:59 +02:00
daniel
250da851d1 merged master 2012-05-29 17:01:13 +02:00
Aaron Schulz
fdb74872a8 Merge "multi dbms support in api" 2012-05-20 18:15:42 +00:00
umherirrender
278bb4414f multi dbms support in api
Add some calls to Database::timestamp
Change some calls from Database::strencode to
Database::addQuotes to avoid ' in raw sql
Remove ' from ints in raw sql
Rename some vars to avoid duplicate names

Change-Id: I63f5602fa968f969a42932902a3ccc45fc54b432
2012-05-16 19:22:36 +02:00
umherirrender
a5e50e8b2f prop=revisions: join user table to get user name
this avoid a lazy load of the user name for each row

Change-Id: I5d8983476e03cc2f6dad074577402f5255080838
2012-05-16 16:38:40 +02:00
daniel
01f36b721f merged latest master 2012-05-14 23:24:18 +02:00
umherirrender
81dd7fefa5 ORDER BY/GROUP BY accept arrays
renaming all variable which hold "' DESC'" to $sort
to keep it all the same

Change-Id: I75118f8cdd701f53949fe5cdd7155fb07f78ff65
2012-05-05 15:29:08 +02:00
daniel
02b78b2c15 renamed getDifferenceEngine to createDifferenceEngine 2012-04-17 21:02:03 +02:00
Daniel Kinzler
88f8ab8e90 use factory method to get difference engine everywhere 2012-04-04 19:59:46 +02:00
Daniel Kinzler
b701c1f0fa use content-based diff 2012-04-04 19:58:47 +02:00
Sam Reed
afe8d1cff9 * (bug 33117) prop=revisions allows deleted text to be exposed through cache pollution 2012-01-11 21:52:44 +00:00
Sam Reed
6115b93df8 Re-instate most of the revisions for bug 33147 "API examples should explain what they do"
Using this to sync up my working copies

Should have the little niggles tidied up though
2011-12-27 16:22:35 +00:00
Aaron Schulz
572d49addc FU r106514: Sanity check for empty sha1 values in the DB 2011-12-20 21:58:29 +00:00
Brion Vibber
47bafc76c9 grammar :) followup r106514 2011-12-20 21:29:24 +00:00
Aaron Schulz
3a0a647efb FU r106514: use base 16 SHA-1 to be consistent with image info 2011-12-18 16:35:45 +00:00