Looks like it’s working! Thank you! That should get me started nicely! I’ll definitely be sure to check out the wikitech-l mailing list for any of my non-api questions.
Thanks again to everyone!
From: mediawiki-api-bounces@lists.wikimedia.org [mailto:mediawiki-api-bounces@lists.wikimedia.org] On Behalf Of Brad Jorsch (Anomie)
Sent: Monday, April 28, 2014 8:48 AM
To: MediaWiki API announcements & discussion
Subject: Re: [Mediawiki-api] Bad or Invalid Token in Extension
On Sun, Apr 27, 2014 at 1:20 PM, Liangent <liangent@gmail.com> wrote:
Well you can just use Title::moveTo() directly.
Yes, this. It's rarely necessary and often a mistake to use FauxRequest to call the local wiki's API. And using curl to hit the local wiki is likely even worse.
On Sun, Apr 27, 2014 at 2:49 PM, Justin Maldonado <info@keyappraising.com> wrote:
I figured there was something like that I could use, but wasn’t sure if I’d be able to figure it out. (remember, is noob)
I’m guessing it would be something along the lines of
Title::moveTo | ( | $param2, |
$auth = true, | ||
$reason = $param3, | ||
$createRedirect = true | ||
) | ; |
Title::moveTo isn't a static method. You'd do something like this:
$oldTitle = Title::newFromText( $param1 );
$newTitle = Title::newFromText( $param2 );
// Error checking here
$oldTitle->moveTo( $newTitle, true, $param3, true );
// More error checking here
If you need additional help, you might want to try the wikitech-l mailing list, or ask on IRC (#mediawiki on freenode).
--
Brad Jorsch (Anomie)
Software Engineer
Wikimedia Foundation