Last modified: 2008-06-09 14:17:59 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 11951 - Make getEditToolbar() in includes/EditPage.php static
Make getEditToolbar() in includes/EditPage.php static
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on:
  Show dependency treegraph
Reported: 2007-11-12 13:42 UTC by Thomas Bleher
Modified: 2008-06-09 14:17 UTC (History)
1 user (show)

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


Description Thomas Bleher 2007-11-12 13:42:46 UTC
Please make getEditToolbar() in EditPage.php static, so that it can be called from extensions wishing to create their own edit fields (example:

The patch is very simple:
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -1132,7 +1132,7 @@ class EditPage {

                if( $wgUser->getOption('showtoolbar') and !$this->isCssJsSubpage ) {
                        # prepare toolbar for edit buttons
-                       $toolbar = $this->getEditToolbar();
+                       $toolbar = EditPage::getEditToolbar();
                } else {
                        $toolbar = '';
@@ -1674,7 +1674,7 @@ END
         * It can be disabled in the user preferences.
         * The necessary JavaScript code can be found in style/wikibits.js.
-       function getEditToolbar() {
+       static function getEditToolbar() {
                global $wgStylePath, $wgContLang, $wgJsMimeType;

Comment 1 Chad H. 2008-06-09 14:17:59 UTC
Done as of r36081

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