Follow-up r92220: changed autoblock handling to use PerformRetroactiveAutoblock hook...
[lhc/web/wiklou.git] / includes / EditPage.php
index a62cbfe..16fd9fa 100644 (file)
@@ -1814,12 +1814,9 @@ HTML
                        'style' => '' // avoid php notices when appending preferences (appending allows customAttribs['style'] to still work
                );
 
-               global $wgBetterDirectionality;
-               if( $wgBetterDirectionality ) {
-                       $pageLang = $this->mTitle->getPageLanguage();
-                       $attribs['lang'] = $pageLang->getCode();
-                       $attribs['dir'] = $pageLang->getDir();
-               }
+               $pageLang = $this->mTitle->getPageLanguage();
+               $attribs['lang'] = $pageLang->getCode();
+               $attribs['dir'] = $pageLang->getDir();
 
                $wgOut->addHTML( Html::textarea( $name, $wikitext, $attribs ) );
        }
@@ -1927,12 +1924,14 @@ HTML
                $wgOut->addHTML( implode( $this->getEditButtons( $tabindex ), "\n" ) . "\n" );
 
                $cancel = $this->getCancelLink();
-               $separator = wfMsgExt( 'pipe-separator' , 'escapenoentities' );
+               if ( $cancel !== '' ) {
+                       $cancel .= wfMsgExt( 'pipe-separator' , 'escapenoentities' );
+               }
                $edithelpurl = Skin::makeInternalOrExternalUrl( wfMsgForContent( 'edithelppage' ) );
                $edithelp = '<a target="helpwindow" href="'.$edithelpurl.'">'.
                        htmlspecialchars( wfMsg( 'edithelp' ) ).'</a> '.
                        htmlspecialchars( wfMsg( 'newwindow' ) );
-               $wgOut->addHTML( "      <span class='editHelp'>{$cancel}{$separator}{$edithelp}</span>\n" );
+               $wgOut->addHTML( "      <span class='editHelp'>{$cancel}{$edithelp}</span>\n" );
                $wgOut->addHTML( "</div><!-- editButtons -->\n</div><!-- editOptions -->\n" );
        }
 
@@ -2095,13 +2094,11 @@ HTML
                        '<h2 id="mw-previewheader">' . htmlspecialchars( wfMsg( 'preview' ) ) . "</h2>" .
                        $wgOut->parse( $note ) . $conflict . "</div>\n";
 
-               global $wgBetterDirectionality;
-               if( $wgBetterDirectionality ) {
-                       $pageLang = $this->mTitle->getPageLanguage();
-                       $attribs = array( 'lang' => $pageLang->getCode(), 'dir' => $pageLang->getDir(),
-                               'class' => 'mw-content-'.$pageLang->getDir() );
-                       $previewHTML = Html::rawElement( 'div', $attribs, $previewHTML );
-               }
+               $pageLang = $this->mTitle->getPageLanguage();
+               $attribs = array( 'lang' => $pageLang->getCode(), 'dir' => $pageLang->getDir(),
+                       'class' => 'mw-content-'.$pageLang->getDir() );
+               $previewHTML = Html::rawElement( 'div', $attribs, $previewHTML );
+
                wfProfileOut( __METHOD__ );
                return $previewhead . $previewHTML . $this->previewTextAfterContent;
        }