* (bug 10113) Fix double-click for view source on protected pages
authorBrion Vibber <brion@users.mediawiki.org>
Mon, 4 Jun 2007 19:20:49 +0000 (19:20 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Mon, 4 Jun 2007 19:20:49 +0000 (19:20 +0000)
RELEASE-NOTES
includes/SkinTemplate.php

index 2c20d30..3483903 100644 (file)
@@ -109,6 +109,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 10083) Fix for Special:Version breakage on PHP 5.2 with some hooks
 * (bug 3624) TeX: \ker, \hom, \arg, \dim treated like \sin & \cos
 * (bug 10132, 10134) Restore back-compatibility Image::imageUrl() function
+* (bug 10113) Fix double-click for view source on protected pages
 
 
 == MediaWiki API changes since 1.10 ==
index 2f61a0b..65370af 100644 (file)
@@ -440,7 +440,8 @@ class SkinTemplate extends Skin {
                // 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'] .'";');
+                       $encEditUrl = wfEscapeJsString( $this->mTitle->getLocalUrl( $this->editUrlOptions() ) );
+                       $tpl->set('body_ondblclick', 'document.location = "' . $encEditUrl . '";');
                } else {
                        $tpl->set('body_ondblclick', false);
                }