Commit graph

525 commits

Author SHA1 Message Date
Thiemo Mättig 1f1c72bb2c Use mExtensionData instead of undeclared class property
Change-Id: I155e37fda412cd467da7b34c52b34661c7c20224
2015-10-26 12:09:52 +01:00
Thiemo Mättig 23cf541f1b Add inline documentation and newlines for readability
Change-Id: I3a5a4ef67836cbfe0277f511f8b23030d248141c
2015-10-26 11:41:13 +01:00
Translation updater bot 00a663a893 Localisation updates from https://translatewiki.net.
Change-Id: I7aef32dd951c52468f64d9be0aa9e55d3b0343c1
2015-10-22 22:02:39 +02:00
Translation updater bot 7851ed8159 Localisation updates from https://translatewiki.net.
Change-Id: I2d02cb4e837400472a1d18252ab6b12e47b08447
2015-10-15 09:48:48 +02:00
Translation updater bot 4ac82d2836 Localisation updates from https://translatewiki.net.
Change-Id: I152f5aa28e847cccabf0062acf1e9723b7ac89a8
2015-10-13 22:12:24 +02:00
Translation updater bot e3488dd60b Localisation updates from https://translatewiki.net.
Change-Id: Ic594e7579032de698ff21b75a9e12f7eb9b073af
2015-10-12 21:05:25 +02:00
Kunal Mehta ca63a0c207 build: Updating development dependencies
* grunt-banana-checker: 0.2.2 → 0.4.0

Change-Id: I373da28af617774905140f8af53426a2935ae0d2
2015-10-11 11:54:23 -04:00
Translation updater bot 6c79e9833d Localisation updates from https://translatewiki.net.
Change-Id: I5b6a78f3d8bd320305a3c16f9aedc562063aef0e
2015-10-10 22:43:14 +02:00
Translation updater bot 4bf28a73d0 Localisation updates from https://translatewiki.net.
Change-Id: Ia30dc6ca5329d641dbd18c7fb56d187a3e253e8f
2015-10-09 22:32:51 +02:00
jenkins-bot 2d8fe5b5f7 Merge "Add example to ApiQueryPageImages via getExamplesMessages" 2015-10-09 13:47:52 +00:00
S Page cc9d7b143f Add example to ApiQueryPageImages via getExamplesMessages
Bug: T89035
Change-Id: Ia3410a35d7bfb1c234f2356b272c56a94cb11efb
2015-10-08 18:01:21 -07:00
Thiemo Mättig ccbee562f3 Add basic PHPUnit tests
This adds a few very basic tests to this component. I started doing this
while working on T112865 but later realized I do not need to touch this
extension. However, I started setting up tests and wanted to submit them.

Bug: T112865
Change-Id: I9d00b2baed8da97ffb6af94a6e3b8b63621b876a
2015-10-08 10:39:59 +02:00
Sam Smith 56243a6c65 Include foreign files in ApiQueryPageImages
Titles that correspond to foreign files aren't included in the set of
titles returned by ApiPageSet#getGoodTitles. However, since
ApiQueryPageImages#execute finds files with wfFindFile, these "missing"
titles can be included.

Add the ApiQueryPageImages#getTitles helper function, which returns the
set of "good" titles union the set of missing titles in the File
namespace.

Also, register the PHPUnit tests directory in the UnitTestsList hook
handler.

The original version of this patch was reverted due to a (stupid) bug
wherein a fatal error was triggered because there was no check for there
being no missing titles in the File namespace [0] and, consequently, an
invalid operand was being passed to the array union operator. This bug
is fixed as well as proven to work with a simple set of test cases.

[0] https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FPageImages.git/47137e7ee671c89667d620bc04ac7649b1d9af96/ApiQueryPageImages.php#L31

Bug: T98791
Bug: T114417
Change-Id: I923e88dde3a8ced4921b4192d90b4f3dc4b19e7b
2015-10-05 13:24:00 +01:00
Legoktm 1690d99e36 Revert "Include foreign files in ApiQueryPageImages"
Fatal error: Invalid operand type was used: cannot perform this operation with arrays

This reverts commit 47137e7ee6.

Bug: T114417
Change-Id: I89a2bfd69775a698f3000f48ea85465e193fb095
2015-10-01 21:23:23 +00:00
Sam Smith 47137e7ee6 Include foreign files in ApiQueryPageImages
Titles that correspond to foreign files aren't included in the set of
titles returned by ApiPageSet#getGoodTitles. However, since
ApiQueryPageImages#execute finds files with wfFindFile, these "missing"
titles can be included.

Add the ApiQueryPageImages#getTitles helper function, which returns the
set of "good" titles union the set of missing titles in the File
namespace.

Bug: T98791
Change-Id: I6ef9a925c749ed6c830c0ff9bb824753df65740a
2015-10-01 10:43:12 +01:00
Translation updater bot d99db98331 Localisation updates from https://translatewiki.net.
Change-Id: I671cd831985dc34b77051d616984b496a3219961
2015-08-14 22:11:29 +02:00
Translation updater bot a5a4e0c1cd Localisation updates from https://translatewiki.net.
Change-Id: Idb6318e82262e7468594b97e32e6168bbdd974fc
2015-07-24 21:08:38 +02:00
jenkins-bot 5129d6aef4 Merge "Ensure $id is an integer" 2015-07-15 20:35:31 +00:00
Translation updater bot 0f86040dab Localisation updates from https://translatewiki.net.
Change-Id: Id0f8883452642257275a43fea40fffe1f80ca218
2015-07-05 22:01:24 +02:00
Kunal Mehta 1376545f36 build: Configure banana-checker and jsonlint
Change-Id: Idd179a1ba7ad183e3ab39d77c3428ef5046465d2
2015-06-19 22:01:11 -07:00
Translation updater bot 65b424b533 Localisation updates from https://translatewiki.net.
Change-Id: I99794917ef047c0d29a3a67c120076be7971eacc
2015-06-13 22:30:55 +02:00
Translation updater bot 7e38ce1bf3 Localisation updates from https://translatewiki.net.
Change-Id: I48f4f9b38631e9f23bc2ef809754ec1af73261c5
2015-06-09 22:48:42 +02:00
Translation updater bot ce854c22e5 Localisation updates from https://translatewiki.net.
Change-Id: Ia06da66fa67003be080f6234864ea8bc3971f415
2015-06-08 21:58:11 +02:00
Translation updater bot 8f7971cce4 Localisation updates from https://translatewiki.net.
Change-Id: Ifbecc5f593abf3a57e7a4476c23a95e4caed514a
2015-06-06 22:21:03 +02:00
Translation updater bot 4866faa243 Localisation updates from https://translatewiki.net.
Change-Id: Ibfd964b3dd4b65d076d4aac2ef28ddd15fb305a3
2015-05-27 22:28:26 +02:00
Translation updater bot 72c7599b35 Localisation updates from https://translatewiki.net.
Change-Id: I7fdb9becded00402f0fde8dbc940b7c772f85b4d
2015-05-21 22:58:58 +02:00
Translation updater bot d1901a9bea Localisation updates from https://translatewiki.net.
Change-Id: Iff08d54f7706e9b18803a3e670dc83c1bcf112d6
2015-05-20 22:16:06 +02:00
Translation updater bot cdb7972f65 Localisation updates from https://translatewiki.net.
Change-Id: I3b28e79b056266025bc964e64a9a3762920ed439
2015-05-19 22:31:00 +02:00
Translation updater bot 7a0fe936db Localisation updates from https://translatewiki.net.
Change-Id: I9b7cf7a0868f4bd8cab7ea6f33e570b7813db96c
2015-04-29 22:34:28 +02:00
Translation updater bot 0b245f8c54 Localisation updates from https://translatewiki.net.
Change-Id: I23f7990b534eb27ef832808209b2f9a09777ba66
2015-04-23 23:37:20 +02:00
Translation updater bot e362ccaed0 Localisation updates from https://translatewiki.net.
Change-Id: I947fe7867f5859cb05748b485f825962c3e04ab7
2015-04-20 22:16:47 +02:00
Brad Jorsch a77426a8ff Further cleanup for core API change
PS25 and later changed things around a fair bit, meaning the previous update
needs some further updating. In some cases additional cleanup is also necessary
for future core API changes.

Bug: T96595
Change-Id: Iad2959862ea8a45ebddd0f076344f0f950d30c80
2015-04-20 14:41:29 -04:00
Translation updater bot 32005dd1a9 Localisation updates from https://translatewiki.net.
Change-Id: Id8b11e2063e396502060de3d378f0dc35a9f645e
2015-04-12 21:55:32 +02:00
Translation updater bot 3d118dbf62 Localisation updates from https://translatewiki.net.
Change-Id: I97ab36a4502427803ced61ed72889e867e2139f0
2015-04-06 21:47:33 +02:00
YuviPanda e1786ece26 Rename 'source' property to 'original'
There's already a 'source' that points to the thumbnail URL
source and thus two 'sources' are confusing. Call it 'original'
intead, and move it to inside the 'thumbnail' dict so it is
clear what it is an original of

Bug: T94928
Change-Id: I3298e9ab511226c17010dc018f6e7d5f0a0babe5
2015-04-03 19:13:55 +00:00
YuviPanda c4837a8eaf Add 'source' parameter to API for getting original url
Bug: T94928
Change-Id: I3bb8fb39385d8d6aec2504f121c684205ea82067
2015-04-03 18:53:21 +00:00
Translation updater bot ffac86d01e Localisation updates from https://translatewiki.net.
Change-Id: I4f38f4e0fd6cc7fb0f0c0584e126c4be422fca38
2015-03-30 21:48:53 +02:00
Translation updater bot 1dc00fabd2 Localisation updates from https://translatewiki.net.
Change-Id: I78cc8eb2b593961a8e2f572e47a45c6043e64f97
2015-03-24 22:26:19 +01:00
csteipp 7f9dfa7068 Ensure $id is an integer
In the spirit of escaping as close to the output as possible, cast $id
to an int before using it in the sql query where other types could lead
to sql injection.

Change-Id: I9e4ceaf67df4e0d2270302bd65ff0a022de03e6b
2015-03-24 12:59:01 -07:00
Translation updater bot cfd7e38c55 Localisation updates from https://translatewiki.net.
Change-Id: Id70e79d77ca8eea0e44688f687c5f7d50fb42ee4
2015-03-19 21:15:13 +01:00
Translation updater bot b493fad06d Localisation updates from https://translatewiki.net.
Change-Id: I41a5d555f0b21090b128068964a4e9cae12557b9
2015-03-18 16:05:55 +01:00
Translation updater bot 9cd5e86022 Localisation updates from https://translatewiki.net.
Change-Id: I31fd27dc8cb537a21119f9321600f78f6a82ddc7
2015-03-05 22:26:12 +01:00
Translation updater bot 70471cdb8f Localisation updates from https://translatewiki.net.
Change-Id: Ia1fec9062bee38c6e0534ee743471000999fd05f
2015-02-24 22:02:39 +01:00
jenkins-bot 61a27b045b Merge "Update ApiResult handling for mediawiki/core change I7b37295e" 2015-02-23 21:52:03 +00:00
Max Semenik eb4d48a1dc Kill profiling
Change-Id: I0de8e2e06f9bf6790dd9b8f9364e70ace1b7ac0a
2015-01-20 15:37:08 -08:00
Translation updater bot 9dce3e6d24 Localisation updates from https://translatewiki.net.
Change-Id: I00844447d07c13a137f7061823c549fd3724040c
2015-01-20 21:59:48 +01:00
jenkins-bot 11589cd9ca Merge "MWException -> Exception" 2015-01-10 06:53:17 +00:00
Ori Livneh 792d96b926 MWException -> Exception
Change-Id: If1022d60f2e6408de40e2f67f20710335892a281
2015-01-09 18:57:28 -08:00
Ori Livneh 972c0348cf MWException -> Exception
Change-Id: I897f33a014618467f7dbf0a11cd1bb4c7aee7520
2015-01-09 17:57:41 -08:00
Brad Jorsch 6a45ab8adb Update ApiResult handling for mediawiki/core change I7b37295e
Change I7b37295e for mediawiki/core deprecates several methods, and more
importantly changes the format of the data returned from
ApiResult::getData(). This change should handle these differences in a
backwards-compatible manner.

Change-Id: I7b37295e8862b188d1f3b0cd07f66ac34629678e
2015-01-08 12:30:00 -05:00