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

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
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