Last modified: 2008-06-09 14:17:59 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 T13951, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 11951 - Make getEditToolbar() in includes/EditPage.php static
Make getEditToolbar() in includes/EditPage.php static
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.12.x
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on:
Blocks:
  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: ---


Attachments

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: http://spiele.j-crew.de/wiki/Spezial:Neues_Spiel)

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.


Navigation
Links