Feature to edit summaries

From Meta, a Wikimedia project coordination wiki

Possible Feature: Editing revision summaries and changing the Minor Edit flags of articles.

Upload History[edit]

This feature has not quite been loaded to the 1.5 alpha branch. NickP 04:06, 10 Dec 2004 (UTC)


Uploaded to the 1.5 alpha (head) branch on CVS. It may not be available for a few hours.
NickP 05:09, 10 Dec 2004 (UTC)


Reverted from the 1.5 branch. Investigating how to develop the feature as an extension. NickP 12:11, 10 Dec 2004 (UTC)

Description[edit]

  1. The feature is controlled by a flag, $wgAllowEditComments, in Default/LocalSettings. A timeout, $wgUserEditCommentTimeout, specifies the maximum age, in minutes, a revision may be before a user may no longer edit the revision's comments. See DefaultSettings.php for instructions.
  2. You may only edit the summaries of revisions you have made, except for SysOps, who may edit any summary. (Summaries are refered to in the PHP code as "comments".) You may be restricted as to how old a revision you can edit the comments of. Anonymous users, and hence users not logged in, may not edit summaries.
  3. In the History listing and Contributions listings there is small icon next to the summary on lines a user may edit the summary of.
  4. Clicking on the icon will bring up a page titled after the article being edited and subtitled "Editing summary of revision...". The page has an edit field and check box for adjusting the summary and/or changing the Minor Edit flag. A user my click Save or Cancel.
  5. A double check is done as part of making the database update, that the user is still logged in and that they are the author of the revision, if they are not a SysOp. This is done to thwart any evil robots spoofing a submit of the edit page.
  6. The page is refreshed with a confirmation or cancellation message and a link back into the History or Contributions page the user came from. After ten seconds the user is flipped back automatically in a way that is similar to Login/Logout.
  7. The edit page is implemented by a new file—EditComment.php. Internally the function OutputPage::returnToMain() now allows flipping back to exactly where you came from, rather than always to a main article page.
  8. Made the message on the error page, class="error".
  9. Checking is done throughtout to make sure a user has not exceed the optional timeout for editing a revision. Once a user starts editing a revision, they are given an extra 2 minutes to complete the edit.
  10. Editing a comment is logged in Recent Changes. The DB field: recentchange:rc_moved_to_title is usurped to save the old comment. The message in on the page appears as "(diff) (hist) . . Summary of article changed; time . . user (Talk) was (old comment) now (new comment)".

Possible Enhancements[edit]

  • The icon should come from a CSS Style rather than imbedded through PHP code.
  • This feature uses the 'protect' right as a test for "Sysop". It should really have its own rights, one to allow editing all comments, one for editing ones own comments.
  • There is the question of logging comment changes beyond what goes into Recent Changes, either in putting them in their own log or as part of the History of an article. If comments are to be changable. It is desirable that they be properly logged.