Max Semenik schreef: > > How about define( 'API' ); in api.php just before constructing > ApiMain? > Should also be done.
About this whole hooks in the API thing: the problem with the AlternateEdit hook is that it's used to provide an alternate edit form. It's a UI-oriented hook, which is exactly why it *shouldn't* be run from the API. IMO the best way to do all this is to create brand new hooks such as APIEditBeforeSave, which extensions can use to override the result (ConfirmEdit does this already). Hooks in lower-level codepaths (such as Title::moveTo()) preferably shouldn't be able to do anything UI-related. I'll investigate which hooks are currently run on write API requests, and post a proposal as to what to do about them at wikitech-l. Roan Kattouw (Catrope) _______________________________________________ Mediawiki-api mailing list Mediawiki-api@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-api