Show the preview tip for css/js when the page name is both valid or invalid (e.g...
authorShinjiman <shinjiman@users.mediawiki.org>
Sat, 1 Aug 2009 08:19:53 +0000 (08:19 +0000)
committerShinjiman <shinjiman@users.mediawiki.org>
Sat, 1 Aug 2009 08:19:53 +0000 (08:19 +0000)
includes/EditPage.php
languages/messages/MessagesQqq.php

index 3bc1037..d3b7a82 100644 (file)
@@ -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' );
+                               }
                        }
                }
 
index ca27449..7d440fe 100644 (file)
@@ -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 <nowiki>{{int:showpreview}}</nowiki>).",
+'usercssyoucanpreview'           => "Text displayed on every css page. The 'Show preview' part should be the same as {{msg-mw|showpreview}} (or you can use <nowiki>{{int:showpreview}}</nowiki>).",
+'userjsyoucanpreview'           => "Text displayed on every js page. The 'Show preview' part should be the same as {{msg-mw|showpreview}} (or you can use <nowiki>{{int:showpreview}}</nowiki>).",
 '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''\".",