From 92ac8fe89b3146dda2bbcce59023da9230c2d35c Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 4 Jun 2007 19:20:49 +0000 Subject: [PATCH] * (bug 10113) Fix double-click for view source on protected pages --- RELEASE-NOTES | 1 + includes/SkinTemplate.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 2c20d30375..34839035c1 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 == diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 2f61a0b49d..65370af7a9 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -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); } -- 2.20.1