Page MenuHomePhabricator

Two hooks for edit page: after toolbar and after edit box
Closed, DeclinedPublic

Description

Enclosed is a patch that adds two hooks to includes/EditPage.php:

  • After the edit box
  • After the toolbar

Patch is against 1.15.3.


Version: 1.15.x
Severity: enhancement

Details

Reference
bz23278

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 11:11 PM
bzimport set Reference to bz23278.
bzimport added a subscriber: Unknown Object (MLST).

Created attachment 7318
Patch against 1.15.3

Attached:

A comment for this and bug 23276

It'd be useful if you could also update hooks.txt with the relevant information (as otherwise the developers still have to do the documentation update, in the file and onwiki).

Thanks for the patches though! I'll look at applying them later

Thanks Reedy. I did not update hooks.txt in case you decided to change the names of my hooks. I will upload a patch now.

Created attachment 7319
hooks.txt patch against 1.15.3

Attached:

Ok, thanks for that. Doing it against trunk yields some different results

For your

wfRunHooks( 'EditPageAfterToolbar', array(&$this, &$toolbar) );

At line 2248 of trunk EditPage.php

wfRunHooks( 'EditPageBeforeEditToolbar', array( &$toolbar ) );

Added in 1.16 - http://www.mediawiki.org/wiki/Manual:Hooks/EditPageBeforeEditToolbar

For the other hook, I'm not quite sure where you want it...

Line 1746 has a hook, but not passing the same paramters..

adding keywords. Moving from "Special pages" to "general/unknown"

sumanah wrote:

Dan, thank you for your work. It looks like Sam Reed (Reedy) had a few questions for you about your patch, so I'm marking this bug with the "reviewed" keyword. If you have time to check current functionality, see if a patch is still necessary, and update your patch against current trunk if so, we'd appreciate it. Thanks again.

All is well. You can close this ticket.

sumanah wrote:

Thanks, Dan! Sounds like things work now :-)