MW-Peachy / Peachy

The official MediaWiki PHP bot framework. Current Version: 2.0 alpha 8
GNU General Public License v3.0
26 stars 21 forks source link

Use MW >= 1.25 token handling #124

Open reedy opened 3 years ago

reedy commented 3 years ago

Closes https://github.com/MW-Peachy/Peachy/issues/120

Jarry1250 commented 3 years ago

Hi Sam. Thanks for doing this. Think there's a syntax error on line 2323 of Wiki.php though. Should read $tokens['query']['tokens'] (to reflect the usse of the new query API).

reedy commented 3 years ago

It's not a syntax error if it's syntactically valid ;).

reedy commented 3 years ago

Also, it would've worked fine. It just looked a bit odd

reedy commented 3 years ago

Actually, no.. It was right the first time

Jarry1250 commented 2 years ago

Are you sure? It doesn't work for me. I get "Notice: Undefined index: tokens in /data/project/jarry-common/public_html/peachy/Includes/Wiki.php on line 2323" followed by "Warning: Invalid argument supplied for foreach() in /data/project/jarry-common/public_html/peachy/Includes/Wiki.php on line 2323" followed by "Error retrieving userrights token...". Whereas if I make the change it works perfectly. This is on en.wp.

Edit: Or perhaps we are using different apiQuery functions