Index: trunk/phase3/includes/parser/Parser.php |
— | — | @@ -3371,7 +3371,7 @@ |
3372 | 3372 | * @private |
3373 | 3373 | */ |
3374 | 3374 | function formatHeadings( $text, $isMain=true ) { |
3375 | | - global $wgMaxTocLevel, $wgContLang, $wgEnforceHtmlIds, $wgSectionContainers; |
| 3375 | + global $wgMaxTocLevel, $wgContLang, $wgEnforceHtmlIds; |
3376 | 3376 | |
3377 | 3377 | $doNumberHeadings = $this->mOptions->getNumberHeadings(); |
3378 | 3378 | $showEditLink = $this->mOptions->getEditSection(); |
— | — | @@ -3657,10 +3657,6 @@ |
3658 | 3658 | |
3659 | 3659 | $blocks = preg_split( '/<H[1-6].*?' . '>.*?<\/H[1-6]>/i', $text ); |
3660 | 3660 | $i = 0; |
3661 | | - |
3662 | | - if ( $wgSectionContainers ) { |
3663 | | - $openDivs = array(); |
3664 | | - } |
3665 | 3661 | |
3666 | 3662 | foreach( $blocks as $block ) { |
3667 | 3663 | if( $showEditLink && $headlineCount > 0 && $i == 0 && $block !== "\n" ) { |
— | — | @@ -3676,35 +3672,7 @@ |
3677 | 3673 | # Top anchor now in skin |
3678 | 3674 | $full = $full.$toc; |
3679 | 3675 | } |
3680 | | - |
3681 | | - # wrap each section in a div if $wgSectionContainers is set to true |
3682 | | - if ( $wgSectionContainers ) { |
3683 | | - if( !empty( $head[$i] ) ) { # if there's no next header, then don't try to close out any existing sections here |
3684 | | - # get the level of the next header section |
3685 | | - preg_match('/<H([0-6])/i', $head[$i], $hLevelMatches); |
3686 | | - |
3687 | | - if ( count($hLevelMatches) > 0 ) { |
3688 | | - $hLevel = $hLevelMatches[1]; |
3689 | | - if ( $i != 0 ) { # we don't have an open div for section 0, so don't try to close it |
3690 | | - # close any open divs for sections with headers that are <= to the next header level |
3691 | | - $this->closeSectionContainers( $hLevel, $currentHLevel, $full, $openDivs); |
3692 | | - } |
3693 | | - $currentHLevel = $hLevel; |
3694 | | - } |
3695 | | - } |
3696 | 3676 | |
3697 | | - # open the div for the next header, if there is one |
3698 | | - if ( isset($currentHLevel) && !empty( $head[$i] ) ) { |
3699 | | - $full .= '<div id="section_' . $i . '_container">'; |
3700 | | - array_push($openDivs, array($currentHLevel, $i)); |
3701 | | - } |
3702 | | - |
3703 | | - # if we've outputed the last section of the article, close any open divs that are remaining |
3704 | | - if ( $i == ( count($blocks) - 1) && isset($currentHLevel) ) { |
3705 | | - $this->closeSectionContainers( $hLevel, $currentHLevel, $full, $openDivs, true); |
3706 | | - } |
3707 | | - } |
3708 | | - |
3709 | 3677 | if( !empty( $head[$i] ) ) { |
3710 | 3678 | $full .= $head[$i]; |
3711 | 3679 | } |
— | — | @@ -3716,29 +3684,6 @@ |
3717 | 3685 | return $full; |
3718 | 3686 | } |
3719 | 3687 | } |
3720 | | - |
3721 | | - /** |
3722 | | - * Analyze the header level of the current and next section being parsed to |
3723 | | - * determine if any already parsed sections need to be closed |
3724 | | - * |
3725 | | - * @param string $hLevel the level of the next header to be parsed |
3726 | | - * @param string $currentHLevel the level of the last parsed header |
3727 | | - * @param string $full a reference to the string that stores the output of the parser |
3728 | | - * @param array $openDivs a reference to the array that stores a list of open section containers |
3729 | | - * @return true |
3730 | | - */ |
3731 | | - function closeSectionContainers( $hLevel, &$currentHLevel, &$full, &$openDivs, $lastCall=false) { |
3732 | | - while ( $hLevel <= $currentHLevel || $lastCall) { |
3733 | | - $full .= '</div>'; |
3734 | | - $popped = array_pop($openDivs); |
3735 | | - if ( count($openDivs) ) { |
3736 | | - $currentHLevel = $openDivs[count($openDivs) - 1][0]; |
3737 | | - } else { |
3738 | | - break; |
3739 | | - } |
3740 | | - } |
3741 | | - return true; |
3742 | | - } |
3743 | 3688 | |
3744 | 3689 | /** |
3745 | 3690 | * Transform wiki markup when saving a page by doing \r\n -> \n |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -3817,11 +3817,4 @@ |
3818 | 3818 | * $wgInvalidUsernameCharacters above, or you will not be able to |
3819 | 3819 | * modify the user rights of those users via Special:UserRights |
3820 | 3820 | */ |
3821 | | -$wgUserrightsInterwikiDelimiter = '@'; |
3822 | | - |
3823 | | -/** |
3824 | | - * The $wgSectionContainers variable is used by the parser to determine if it should |
3825 | | - * wrap each section of an article in a div. It is automatically enabled if the EditSectionHiliteLink |
3826 | | - * extension is installed. |
3827 | | - */ |
3828 | | -$wgSectionContainers = false; |
\ No newline at end of file |
| 3821 | +$wgUserrightsInterwikiDelimiter = '@'; |
\ No newline at end of file |