Last modified: 2008-02-12 23:52:01 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T14902, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 12902 - add hook to EditPage.php in getEditButtons
add hook to EditPage.php in getEditButtons
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
1.12.x
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: easy
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-03 23:16 UTC by Ryan Schmidt
Modified: 2008-02-12 23:52 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Ryan Schmidt 2008-02-03 23:16:36 UTC
Can you add a hook to the function getEditButtons in /includes/EditPage.php (immediately before the return $buttons; line). Not sure what to call it, perhaps "modifyEditButtons" or something? It would allow for the modification of the array $buttons, which contains the edit buttons Save, Preview, Live, and Diff.

Anyway, the implementation of such a hook would allow for numerous extensions to add their own features to the row of buttons or even change appearances/functionality of existing ones (for example, forcing anonymous users to preview before saving).

I'm too lazy to write up a patch for the addition of a single line, so here's the change :P

/includes/EditPage.php line 1964-1965
currently
>
>return $buttons;
change to
>wfRunHooks('modifyEditButtons', array(&$buttons));
>return $buttons;
Comment 1 Tim Laqua 2008-02-12 23:51:10 UTC
Don't you have commit access now?
Comment 2 Ryan Schmidt 2008-02-12 23:52:01 UTC
Yeah, I do. I just wrote this bug before I got it. Anyway, implemented in r30888

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links