Hello,
I was looking at hooks, in particular ArticleDeleteComplete, and noticed that they are called from a function that is quite in the front end 'doDelete'. When an article is deleted via the API, it calls the backend function 'doDeleteArticle'. This means that the hooks related to article deletion are never called. Is this intended?
Bryan
On Sat, Feb 9, 2008 at 7:50 PM, Bryan Tong Minh bryan.tongminh@gmail.com wrote:
Hello,
I was looking at hooks, in particular ArticleDeleteComplete, and noticed that they are called from a function that is quite in the front end 'doDelete'. When an article is deleted via the API, it calls the backend function 'doDeleteArticle'. This means that the hooks related to article deletion are never called. Is this intended?
Bryan
I looked a little bit further into this, and it appears to me that actions in ApiEdit are basically implemented in two ways: using FauxRequest or by directly calling the backend functions. In the latter case certain hooks may be skipped. Thoughts on this?
Bryan
Bryan Tong Minh schreef:
I looked a little bit further into this, and it appears to me that actions in ApiEdit are basically implemented in two ways: using FauxRequest or by directly calling the backend functions. In the latter case certain hooks may be skipped. Thoughts on this?
I gotta look at this and will reply more detailedly tomorrow, but I'll note right now that some Article/EditPage hooks rely on being able to manipulate output, which is not gonna happen in API mode of course.
Roan Kattouw (Catrope)
On Sun, Feb 10, 2008 at 9:26 PM, Roan Kattouw roan.kattouw@home.nl wrote:
Bryan Tong Minh schreef:
I looked a little bit further into this, and it appears to me that actions in ApiEdit are basically implemented in two ways: using FauxRequest or by directly calling the backend functions. In the latter case certain hooks may be skipped. Thoughts on this?
I gotta look at this and will reply more detailedly tomorrow, but I'll note right now that some Article/EditPage hooks rely on being able to manipulate output, which is not gonna happen in API mode of course.
Roan Kattouw (Catrope)
Nope, but some extensions are manipulating database data, etc. and need to have the hooks called.
Bryan
mediawiki-api@lists.wikimedia.org