Expose the log_id of the deletion log entry in the action=delete API
authorCatrope <roan.kattouw@gmail.com>
Mon, 14 May 2012 01:20:05 +0000 (18:20 -0700)
committerCatrope <roan.kattouw@gmail.com>
Mon, 14 May 2012 01:20:05 +0000 (18:20 -0700)
commit3068742546e3d9912a24a8b474f1726e4b24fb23
treef62eead1fe83a4274c6919b8253877475d080e21
parent87e6aaf9bf98c1033ec52d9ce2d2f8302f6e8537
Expose the log_id of the deletion log entry in the action=delete API

This entails some refactoring to actually surface the log_id all the way
up:

* Made doDeleteArticleReal() return a Status object rather than a
  constant, and put the log_id in $status->value. This Status object is
  also passed to the ArticleDelete hook.
* Kept doDeleteArticle() the same for extension compatibility.
* Switched all core callers of doDeleteArticle() to
  doDeleteArticleReal() and surfaced the error message from the Status
  if appropriate, rather than hardcoding 'cannotdelete' all over the
  place.
* Exposed the log_id in ApiDelete
* Add 'delete-hook-aborted' message for when a hook aborts the deletion
  but does not provide an error message. Previously this just caused the
  'cannotdelete' message to appear.

Change-Id: Ia6415b390d5d4172ce96667f46ccdba2be02461f
docs/hooks.txt
includes/Article.php
includes/FileDeleteForm.php
includes/Title.php
includes/WikiPage.php
includes/api/ApiDelete.php
includes/specials/SpecialMovepage.php
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php
maintenance/language/messages.inc