Page MenuHomePhabricator

Introduce EndOfEditForm hook
Closed, ResolvedPublic

Description

Author: moctodliamg

Description:
I added a line to autosubmit forms on the editpage (part of my hack for
automated page creation). I called it 'EndOfEditForm' and put it 'around' line
1200 of EditPage.php between the closing brace and

$wgOut->addHTML( "</form>\n" );

to end up like this:

}

wfRunHooks('EndOfEditForm');

$wgOut->addHTML( "</form>\n" );

This is my first bug report, and first big coding project, so if there is any
more standard format I should follow (The essay was more about higher level
concerns, like not being dumb) don't hesitate to let me know.


Version: unspecified
Severity: enhancement

Details

Reference
bz8174

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:32 PM
bzimport set Reference to bz8174.
bzimport added a subscriber: Unknown Object (MLST).

robchur wrote:

I read "hack for automated page creation", and I'm wondering whether or not the
right approach was used in the first place. Nevertheless,

  1. Please submit patches as unified diffs against the latest code in Subversion,

attached to the relevant bug report

  1. There are some notes on coding conventions in docs/design.txt
  2. The hook would be more useful to other developers if it passed the edit form

object, or at least some extra information, to hook functions

rotemliss wrote:

*** Bug 8180 has been marked as a duplicate of this bug. ***

robchur wrote:

Point 3 was not addressed, so I'm closing this one for later - without extra
information, most hooks aren't useful.

Implemented with EditFormInitialText and friends now. If something else is needed, please open another feature request.