Index: trunk/extensions/SemanticForms/includes/SF_FormEditTab.php |
— | — | @@ -24,7 +24,7 @@ |
25 | 25 | $form_names = SFLinkUtils::getFormsForArticle($obj); |
26 | 26 | if (count($form_names) > 0) { |
27 | 27 | global $wgRequest, $wgUser; |
28 | | - global $sfgRenameEditTabs; |
| 28 | + global $sfgRenameEditTabs, $sfgRenameMainEditTab; |
29 | 29 | |
30 | 30 | wfLoadExtensionMessages('SemanticForms'); |
31 | 31 | |
— | — | @@ -37,10 +37,18 @@ |
38 | 38 | if (array_key_exists('edit', $content_actions)) { |
39 | 39 | $content_actions['edit']['text'] = $user_can_edit ? wfMsg('sf_editsource') : wfMsg('viewsource'); |
40 | 40 | } |
41 | | - } elseif ($user_can_edit) { |
42 | | - $form_edit_tab_text = $obj->mTitle->exists() ? wfMsg('sf_formedit') : wfMsg('sf_formcreate'); |
43 | 41 | } else { |
44 | | - $form_edit_tab_text = wfMsg('sf_viewform'); |
| 42 | + if ($user_can_edit) |
| 43 | + $form_edit_tab_text = $obj->mTitle->exists() ? wfMsg('sf_formedit') : wfMsg('sf_formcreate'); |
| 44 | + else |
| 45 | + $form_edit_tab_text = wfMsg('sf_viewform'); |
| 46 | + // check for renaming of main edit tab |
| 47 | + // only if $sfgRenameEditTabs is off |
| 48 | + if ($sfgRenameMainEditTab) { |
| 49 | + if (array_key_exists('edit', $content_actions)) { |
| 50 | + $content_actions['edit']['text'] = $user_can_edit ? wfMsg('sf_editsource') : wfMsg('viewsource'); |
| 51 | + } |
| 52 | + } |
45 | 53 | } |
46 | 54 | |
47 | 55 | $class_name = ($wgRequest->getVal('action') == 'formedit') ? 'selected' : ''; |