Generally speaking, calling the action api externally is strongly
discouraged. Typically there is a backend function that is prefered instead.

Whether that is actually true in your case depends on what you are doing.
Whether or not your case would be an acceptable exception to the general
rule would depend on the specifics of what you are doing and if there
really is no other reasonable option.

--
Brian/bawolff

On Wednesday, 17 December 2025, יגאל חיטרון <[email protected]> wrote:

> Well, I started to think, after reading a lot of documentation and a lot
> of gerrit code, that my previous knowledge was wrong, and I have no choice
> but calling API from inside Mediawiki php, despite the words in Mediawiki
> developers guide "If you use an API call in Mediawiki php code, you're
> doing something wrong." Looks like I have no other choice. If nobody here
> says I can't do this, I'll start to write. Thank you.
> Igal
>
>
>
> <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
> Virus-free.www.avg.com
> <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
> <#m_1407805277756859967_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
> ‫בתאריך יום ד׳, 17 בדצמ׳ 2025 ב-19:21 מאת יגאל חיטרון <‪
> [email protected]‬‏>:‬
>
>> Thanks, but I'm not so sure. I already saw this line. The API returns
>> something with more than 10000 lines. https://www.mediawiki.
>> org/w/api.php?action=sitematrix&format=json&smsiteprop=url%7Cdbname%
>> 7Ccode%7Csitename%7Clang&formatversion=2. I wanted just to call the API
>> from PHP, until read in developers guide "If you call API you're doing
>> something wrong".
>> Igal
>>
>> בתאריך יום ד׳, 17 בדצמ׳ 2025, 19:16, מאת Brian Wolff ‏<[email protected]
>> >:
>>
>>> It should be defined at https://gerrit.wikimedia.
>>> org/g/operations/mediawiki-config/+/df0f99e231a682f63f82e4b4a00ecc
>>> e52bd22ed9/wmf-config/CommonSettings.php#1324 . As far as i can tell
>>> its not set dynamiclly so should have the same value at all wikimedia wikis.
>>>
>>> --
>>> Bawolff
>>>
>>> On Wednesday, 17 December 2025, יגאל חיטרון <[email protected]>
>>> wrote:
>>>
>>>> I've made a Gerrit change for a Phabricator task that uses the
>>>> $wgSiteMatrixSites variable, which is created at runtime. How can I view
>>>> its value on Meta?
>>>>
>>>> The issue is that this variable seems to have a different structure on
>>>> each site, depending on the available data. I’ve written traversal code
>>>> designed to handle any possible structure, but I can’t confirm if it works
>>>> correctly for Meta.
>>>>
>>>> If I could get the Meta value—or even just the first few pages—it would
>>>> be very helpful.
>>>>
>>>> Thank you in advance.
>>>> Igal (User:Ikhitron)
>>>>
>>> _______________________________________________
>>> Wikitech-l mailing list -- [email protected]
>>> To unsubscribe send an email to [email protected]
>>> https://lists.wikimedia.org/postorius/lists/wikitech-l.
>>> lists.wikimedia.org/
>>
>>
_______________________________________________
Wikitech-l mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/

Reply via email to