Index: trunk/extensions/SemanticForms/includes/SF_FormEditTab.php |
— | — | @@ -33,6 +33,7 @@ |
34 | 34 | if ( count( $form_names ) == 0 ) { |
35 | 35 | return true; |
36 | 36 | } |
| 37 | + |
37 | 38 | global $wgRequest, $wgUser; |
38 | 39 | global $sfgRenameEditTabs, $sfgRenameMainEditTab; |
39 | 40 | |
— | — | @@ -108,8 +109,9 @@ |
109 | 110 | } |
110 | 111 | |
111 | 112 | /** |
112 | | - * Function currently called only for the 'Vector' skin - will |
113 | | - * possibly be called for additional skins later. |
| 113 | + * Like displayTab(), but called with a different hook - this one is |
| 114 | + * called for the 'Vector' skin in MW 1.16, as well as all skins |
| 115 | + * starting with MW 1.17 (?). |
114 | 116 | */ |
115 | 117 | static function displayTab2( $obj, &$links ) { |
116 | 118 | // the old '$content_actions' array is thankfully just a |
— | — | @@ -143,7 +145,7 @@ |
144 | 146 | } |
145 | 147 | if ( count( $form_names ) > 1 ) { |
146 | 148 | SFUtils::loadMessages(); |
147 | | - $warning_text = ' <div class="warningMessage">' . wfMsg( 'sf_formedit_morethanoneform' ) . "</div>\n"; |
| 149 | + $warning_text = "\t" . '<div class="warningMessage">' . wfMsg( 'sf_formedit_morethanoneform' ) . "</div>\n"; |
148 | 150 | $wgOut->addHTML( $warning_text ); |
149 | 151 | } |
150 | 152 | $form_name = $form_names[0]; |
— | — | @@ -161,15 +163,13 @@ |
162 | 164 | $msg = SFFormEdit::printForm( $form_name, $page_name ); |
163 | 165 | |
164 | 166 | if ( $msg ) { |
165 | | - // some error occurred |
166 | | - |
| 167 | + // Some error occurred - display it. |
167 | 168 | $msgdata = null; |
168 | | - |
169 | 169 | if ( is_array( $msg ) ) { |
170 | 170 | if ( count( $msg ) > 1 ) { |
171 | | - $msgdata = $msg[ 1 ]; |
| 171 | + $msgdata = $msg[1]; |
172 | 172 | } |
173 | | - $msg = $msg[ 0 ]; |
| 173 | + $msg = $msg[0]; |
174 | 174 | } |
175 | 175 | |
176 | 176 | $wgOut->addHTML( Xml::element( 'p', array( 'class' => 'error' ), wfMsg( $msg, $msgdata ) ) ); |