Fix documentation of wfDebugLog()
[lhc/web/wiklou.git] / includes / EditPage.php
index 9a27d23..d4b06fe 100644 (file)
@@ -772,8 +772,7 @@ class EditPage {
                                $this->sectiontitle = $request->getVal( 'preloadtitle' );
                                // Once wpSummary isn't being use for setting section titles, we should delete this.
                                $this->summary = $request->getVal( 'preloadtitle' );
-                       }
-                       elseif ( $this->section != 'new' && $request->getVal( 'summary' ) ) {
+                       } elseif ( $this->section != 'new' && $request->getVal( 'summary' ) ) {
                                $this->summary = $request->getText( 'summary' );
                                if ( $this->summary !== '' ) {
                                        $this->hasPresetSummary = true;
@@ -2083,10 +2082,27 @@ class EditPage {
                }
                # Try to add a custom edit intro, or use the standard one if this is not possible.
                if ( !$this->showCustomIntro() && !$this->mTitle->exists() ) {
+                       $helpLink = Skin::makeInternalOrExternalUrl(
+                               wfMessage( 'helppage' )->inContentLanguage()->text()
+                       );
                        if ( $wgUser->isLoggedIn() ) {
-                               $wgOut->wrapWikiMsg( "<div class=\"mw-newarticletext\">\n$1\n</div>", 'newarticletext' );
+                               $wgOut->wrapWikiMsg(
+                                       // Suppress the external link icon, consider the help url an internal one
+                                       "<div class=\"mw-newarticletext plainlinks\">\n$1\n</div>",
+                                       array(
+                                               'newarticletext',
+                                               $helpLink
+                                       )
+                               );
                        } else {
-                               $wgOut->wrapWikiMsg( "<div class=\"mw-newarticletextanon\">\n$1\n</div>", 'newarticletextanon' );
+                               $wgOut->wrapWikiMsg(
+                                       // Suppress the external link icon, consider the help url an internal one
+                                       "<div class=\"mw-newarticletextanon plainlinks\">\n$1\n</div>",
+                                       array(
+                                               'newarticletextanon',
+                                               $helpLink
+                                       )
+                               );
                        }
                }
                # Give a notice if the user is editing a deleted/moved page...
@@ -3447,16 +3463,16 @@ HTML
                        }
 
                        $params = array(
-                               $image = $wgStylePath . '/common/images/' . $tool['image'],
+                               $wgStylePath . '/common/images/' . $tool['image'],
                                // Note that we use the tip both for the ALT tag and the TITLE tag of the image.
                                // Older browsers show a "speedtip" type message only for ALT.
                                // Ideally these should be different, realistically they
                                // probably don't need to be.
-                               $tip = $tool['tip'],
-                               $open = $tool['open'],
-                               $close = $tool['close'],
-                               $sample = $tool['sample'],
-                               $cssId = $tool['id'],
+                               $tool['tip'],
+                               $tool['open'],
+                               $tool['close'],
+                               $tool['sample'],
+                               $tool['id'],
                        );
 
                        $script .= Xml::encodeJsCall( 'mw.toolbar.addButton', $params );