Last modified: 2010-05-15 15:42:50 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 T12113, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 10113 - Use of uninitialized variable $content_actions['edit'] in SkinTemplate.php
Use of uninitialized variable $content_actions['edit'] in SkinTemplate.php
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.8.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
: 6832 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-02 21:16 UTC by imslproject
Modified: 2010-05-15 15:42 UTC (History)
1 user (show)

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


Attachments

Description imslproject 2007-06-02 21:16:33 UTC
The relevant sections of code are as follows:

$content_actions['edit'] is set after this check in buildContentActionUrls():

if ( $this->mTitle->quickUserCan( 'edit' ) && ( $this->mTitle->exists() || $this->mTitle->quickUserCan( 'create' ) ) ) {

However, it is used in this fashion in outputPage():

// XXX: attach this from javascript, same with section editing
if($this->iseditable &&    $wgUser->getOption("editondblclick") )
{
    $tpl->set('body_ondblclick', 'document.location = "' .$content_actions['edit']['href'] .'";');
}

When a user has "editondblclick" enabled, but views a protected page, $content_actions['edit'] will be used before initialization.
Comment 1 Brion Vibber 2007-06-04 19:21:35 UTC
Fixed in r22713; using the direct URL generator func instead of trying to rip it out of the array. On protected page, the 'edit' link goes into a 'viewsource' tab instead, so wasn't getting picked up as expected.
Comment 2 Rob Church 2007-06-08 00:38:11 UTC
*** Bug 6832 has been marked as a duplicate of this bug. ***

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


Navigation
Links