From: Shinjiman Date: Sat, 1 Aug 2009 08:19:53 +0000 (+0000) Subject: Show the preview tip for css/js when the page name is both valid or invalid (e.g... X-Git-Tag: 1.31.0-rc.0~40593 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/ajouter.php?a=commitdiff_plain;h=e2bc5beda51291607353ed8a98e3df6423cdb924;p=lhc%2Fweb%2Fwiklou.git Show the preview tip for css/js when the page name is both valid or invalid (e.g. skin not in the code), they could be included with other css/js in a valid page name, thanks Splarka. --- diff --git a/includes/EditPage.php b/includes/EditPage.php index 3bc10379ef..d3b7a82c15 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1245,16 +1245,15 @@ class EditPage { } else { if ( $this->isCssJsSubpage ) { # Check the skin exists - if ( $this->isValidCssJsSubpage ) { - if ( $this->formtype !== 'preview' ) { - if ( $this->isCssSubpage ) - $wgOut->addWikiMsg( 'usercssyoucanpreview' ); - if ( $this->isJsSubpage ) - $wgOut->addWikiMsg( 'userjsyoucanpreview' ); - } - } else { + if ( !$this->isValidCssJsSubpage ) { $wgOut->addWikiMsg( 'userinvalidcssjstitle', $wgTitle->getSkinFromCssJsSubpage() ); } + if ( $this->formtype !== 'preview' ) { + if ( $this->isCssSubpage ) + $wgOut->addWikiMsg( 'usercssyoucanpreview' ); + if ( $this->isJsSubpage ) + $wgOut->addWikiMsg( 'userjsyoucanpreview' ); + } } } diff --git a/languages/messages/MessagesQqq.php b/languages/messages/MessagesQqq.php index ca27449844..7d440fe6ac 100644 --- a/languages/messages/MessagesQqq.php +++ b/languages/messages/MessagesQqq.php @@ -741,7 +741,8 @@ Parameter $1 is the content of section parameter in the URL (for example 1234 in 'noarticletext' => 'This is the message that you get if you search for a term that has not yet got any entries on the wiki.', 'userpage-userdoesnotexist' => 'Error message displayed when trying to edit or create a page or a subpage that belongs to a user who is not registered on the wiki', 'clearyourcache' => 'Text displayed at the bottom in user preferences', -'usercssjsyoucanpreview' => "Text displayed on every css/js page. The 'Show preview' part should be the same as {{msg-mw|showpreview}} (or you can use {{int:showpreview}}).", +'usercssyoucanpreview' => "Text displayed on every css page. The 'Show preview' part should be the same as {{msg-mw|showpreview}} (or you can use {{int:showpreview}}).", +'userjsyoucanpreview' => "Text displayed on every js page. The 'Show preview' part should be the same as {{msg-mw|showpreview}} (or you can use {{int:showpreview}}).", 'updated' => '{{Identical|Updated}}', 'previewnote' => 'Note displayed when clicking on Show preview', 'editing' => "Shown as page title when editing a page. \$1 is the name of the page that is being edited. Example: \"''Editing Main Page''\".",