Index: trunk/extensions/uniwiki/GenericEditPage/GenericEditPage.php |
— | — | @@ -27,6 +27,7 @@ |
28 | 28 | $wgSuggestCategoryRecipient = $wgEmergencyContact; |
29 | 29 | $wgUseCategoryPage = false; |
30 | 30 | $wgRequireCategory = false; |
| 31 | +$wgAlwaysShowIntroSection = false; |
31 | 32 | $wgGenericEditPageWhiteList = array( NS_MAIN ); |
32 | 33 | $wgAllowSimilarTitles = true; |
33 | 34 | |
— | — | @@ -343,6 +344,7 @@ |
344 | 345 | function UW_GenericEditPage_displayEditPage ( $editor, $out ) { |
345 | 346 | global $wgHooks, $wgParser, $wgTitle, $wgRequest, $wgUser, $wgCategoryBox, $wgSectionBox, $wgRequireCategory; |
346 | 347 | global $wgGenericEditPageClass, $wgSwitchMode, $wgGenericEditPageWhiteList, $wgAllowSimilarTitles; |
| 348 | + global $wgAlwaysShowIntroSection; |
347 | 349 | |
348 | 350 | // disable this whole thing on conflict and comment pages |
349 | 351 | if ( $editor->section == "new" || $editor->isConflict ) |
— | — | @@ -441,9 +443,9 @@ |
442 | 444 | * but not in the page, copy it. otherwise, use the page text (even if empty) */ |
443 | 445 | $result[] = ( !empty($layout[0]) && $layout[0]['text'] && !$page[0]['text'] ) ? $layout[0] : $page[0]; |
444 | 446 | |
445 | | - /* only show the un-named section if it is being used. as |
446 | | - * default, do not encourage people to use it by showing it */ |
447 | | - $result[0]['in-use'] = ( $result[0]['text'] != "" ); |
| 447 | + /* decide whether or not to show the introduction section. |
| 448 | + * if configured to do so, it won't appear if there isn't any text in it already */ |
| 449 | + $result[0]['in-use'] = $wgAlwaysShowIntroSection ? true : ( $result[0]['text'] != '' ); |
448 | 450 | |
449 | 451 | // get sections that are in the layout |
450 | 452 | for ( $i = 2; $i < count ( $layout ); $i++ ) { |
Index: trunk/extensions/uniwiki/RELEASE-NOTES |
— | — | @@ -0,0 +1,5 @@ |
| 2 | += Uniwiki Release Notes = |
| 3 | + |
| 4 | +== GenericEditPage == |
| 5 | +* Added $wgAlwaysShowIntroSection to force the editor to always show the |
| 6 | + introduction section, even if there is no content inside of it already. |