[HOME PAGE] [STORES] [CLASSICISTRANIERI.COM] [FOTO] [YOUTUBE CHANNEL]


Bug 2550 – Adding special pages requires wasteful require()

Last modified: 2010-05-15 15:33:02 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 2550 - Adding special pages requires wasteful require()
Adding special pages requires wasteful require()
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
1.4.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-06-27 13:38 UTC by Dashiva
Modified: 2010-05-15 15:33 UTC (History)
0 users

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


Attachments

Description Dashiva 2005-06-27 13:38:07 UTC
To add a special page as an extension, instead of manually editing SpecialPage.php, 
you're supposed to use SpecialPage::addPage and new SpecialPage(). These functions 
are in SpecialPage.php, which is not included/required at the point where extension 
init functions are called. This means you have to require it in the extension 
function, which again means SpecialPage.php is included on every single page load, 
not just for special pages.

Suggestion: make a $wgSpecialPageFunctions array, similar to $wgExtensionFunctions, 
but used when including SpecialPage.php (instead of Setup.php).
Comment 1 Ævar Arnfjörð Bjarmason 2005-07-04 14:44:50 UTC
If you put the require_once() inside your $wgExtensionFunction it will only be
required when the function is called and not on every page hit, if there's a
problem with specific extensions putting the require_once() outside of a
function please open seperate bugs for that.

Marking this as INVALID.
Comment 2 Dashiva 2005-07-04 15:58:13 UTC
(In reply to comment #1)
> If you put the require_once() inside your $wgExtensionFunction it will only be
> required when the function is called and not on every page hit

Except the functions in $wgExtensionFunctions are called on every page hit, meaning 
SpecialPage.php gets included regardless of whether you do it inside or outside the function.
Comment 3 Dashiva 2006-01-18 07:52:10 UTC
If including SpecialPage.php on every single page hit is a problem (as I see it) then 
do something about this bug.

If it isn't a problem, make it included by default so we don't have to put 
require_once() in every single special page we add. It's pointless redundancy.

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


Contents Listing Alphabetical by Author:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z Unknown Other

Contents Listing Alphabetical by Title:
# A B C D E F G H I J K L M N O P Q R S T U V W Y Z Other

Medical Encyclopedia

Browse by first letter of topic:


A-Ag Ah-Ap Aq-Az B-Bk Bl-Bz C-Cg Ch-Co
Cp-Cz D-Di Dj-Dz E-Ep Eq-Ez F G
H-Hf Hg-Hz I-In Io-Iz J K L-Ln
Lo-Lz M-Mf Mg-Mz N O P-Pl Pm-Pz
Q R S-Sh Si-Sp Sq-Sz T-Tn To-Tz
U V W X Y Z 0-9

Biblioteca - SPANISH

Biblioteca Solidaria - SPANISH

Bugzilla

Ebooks Gratuits

Encyclopaedia Britannica 1911 - PDF

Project Gutenberg: DVD-ROM 2007

Project Gutenberg ENGLISH Selection

Project Gutenberg SPANISH Selection

Standard E-books

Wikipedia Articles Indexes

Wikipedia for Schools - ENGLISH

Wikipedia for Schools - FRENCH

Wikipedia for Schools - SPANISH

Wikipedia for Schools - PORTUGUESE

Wikipedia 2016 - FRENCH

Wikipedia HTML - CATALAN

Wikipedia Picture of the Year 2006

Wikipedia Picture of the Year 2007

Wikipedia Picture of the Year 2008

Wikipedia Picture of the Year 2009

Wikipedia Picture of the Year 2010

Wikipedia Picture of the Year 2011