Index: trunk/extensions/SemanticForms/specials/SF_CreateCategory.php |
— | — | @@ -15,7 +15,7 @@ |
16 | 16 | */ |
17 | 17 | function __construct() { |
18 | 18 | parent::__construct( 'CreateCategory' ); |
19 | | - wfLoadExtensionMessages( 'SemanticForms' ); |
| 19 | + SFUtils::loadMessages(); |
20 | 20 | } |
21 | 21 | |
22 | 22 | function execute( $query ) { |
— | — | @@ -24,7 +24,7 @@ |
25 | 25 | } |
26 | 26 | |
27 | 27 | static function createCategoryText( $default_form, $category_name, $parent_category ) { |
28 | | - wfLoadExtensionMessages( 'SemanticForms' ); |
| 28 | + SFUtils::loadMessages(); |
29 | 29 | |
30 | 30 | if ( $default_form == '' ) { |
31 | 31 | $text = wfMsgForContent( 'sf_category_desc', $category_name ); |
— | — | @@ -47,7 +47,7 @@ |
48 | 48 | function doSpecialCreateCategory() { |
49 | 49 | global $wgOut, $wgRequest, $wgUser, $sfgScriptPath; |
50 | 50 | |
51 | | - wfLoadExtensionMessages( 'SemanticForms' ); |
| 51 | + SFUtils::loadMessages(); |
52 | 52 | |
53 | 53 | # cycle through the query values, setting the appropriate local variables |
54 | 54 | $category_name = $wgRequest->getVal( 'category_name' ); |
Index: trunk/extensions/SemanticForms/specials/SF_FormStart.php |
— | — | @@ -15,7 +15,7 @@ |
16 | 16 | */ |
17 | 17 | function __construct() { |
18 | 18 | parent::__construct( 'FormStart' ); |
19 | | - wfLoadExtensionMessages( 'SemanticForms' ); |
| 19 | + SFUtils::loadMessages(); |
20 | 20 | } |
21 | 21 | |
22 | 22 | function execute( $query ) { |
— | — | @@ -23,7 +23,7 @@ |
24 | 24 | |
25 | 25 | $this->setHeaders(); |
26 | 26 | |
27 | | - wfLoadExtensionMessages( 'SemanticForms' ); |
| 27 | + SFUtils::loadMessages(); |
28 | 28 | $form_name = $wgRequest->getVal( 'form' ); |
29 | 29 | $target_namespace = $wgRequest->getVal( 'namespace' ); |
30 | 30 | $super_page = $wgRequest->getVal( 'super_page' ); |
Index: trunk/extensions/SemanticForms/specials/SF_Forms.php |
— | — | @@ -14,7 +14,7 @@ |
15 | 15 | */ |
16 | 16 | function __construct() { |
17 | 17 | parent::__construct( 'Forms' ); |
18 | | - wfLoadExtensionMessages( 'SemanticForms' ); |
| 18 | + SFUtils::loadMessages(); |
19 | 19 | } |
20 | 20 | |
21 | 21 | function execute( $query ) { |
— | — | @@ -37,7 +37,7 @@ |
38 | 38 | function getPageHeader() { |
39 | 39 | global $wgUser; |
40 | 40 | |
41 | | - wfLoadExtensionMessages( 'SemanticForms' ); |
| 41 | + SFUtils::loadMessages(); |
42 | 42 | |
43 | 43 | $sk = $wgUser->getSkin(); |
44 | 44 | $cf = SpecialPage::getPage( 'CreateForm' ); |
Index: trunk/extensions/SemanticForms/specials/SF_CreateForm.php |
— | — | @@ -15,7 +15,7 @@ |
16 | 16 | */ |
17 | 17 | function __construct() { |
18 | 18 | parent::__construct( 'CreateForm' ); |
19 | | - wfLoadExtensionMessages( 'SemanticForms' ); |
| 19 | + SFUtils::loadMessages(); |
20 | 20 | } |
21 | 21 | |
22 | 22 | function execute( $query ) { |
— | — | @@ -28,7 +28,7 @@ |
29 | 29 | global $wgOut, $wgRequest, $wgUser, $sfgScriptPath, $wgContLang; |
30 | 30 | $db = wfGetDB( DB_SLAVE ); |
31 | 31 | |
32 | | - wfLoadExtensionMessages( 'SemanticForms' ); |
| 32 | + SFUtils::loadMessages(); |
33 | 33 | |
34 | 34 | # get the names of all templates on this site |
35 | 35 | $all_templates = array(); |
Index: trunk/extensions/SemanticForms/specials/SF_CreateProperty.php |
— | — | @@ -15,7 +15,7 @@ |
16 | 16 | */ |
17 | 17 | function __construct() { |
18 | 18 | parent::__construct( 'CreateProperty' ); |
19 | | - wfLoadExtensionMessages( 'SemanticForms' ); |
| 19 | + SFUtils::loadMessages(); |
20 | 20 | } |
21 | 21 | |
22 | 22 | function execute( $query ) { |
— | — | @@ -62,7 +62,7 @@ |
63 | 63 | global $wgOut, $wgRequest, $sfgScriptPath; |
64 | 64 | global $smwgContLang; |
65 | 65 | |
66 | | - wfLoadExtensionMessages( 'SemanticForms' ); |
| 66 | + SFUtils::loadMessages(); |
67 | 67 | |
68 | 68 | # cycle through the query values, setting the appropriate local variables |
69 | 69 | $property_name = $wgRequest->getVal( 'property_name' ); |
Index: trunk/extensions/SemanticForms/specials/SF_CreateClass.php |
— | — | @@ -16,7 +16,7 @@ |
17 | 17 | */ |
18 | 18 | public function __construct() { |
19 | 19 | parent::__construct( 'CreateClass', 'createclass' ); |
20 | | - wfLoadExtensionMessages( 'SemanticForms' ); |
| 20 | + SFUtils::loadMessages(); |
21 | 21 | } |
22 | 22 | |
23 | 23 | function execute( $query ) { |
Index: trunk/extensions/SemanticForms/specials/SF_FormEdit.php |
— | — | @@ -14,7 +14,7 @@ |
15 | 15 | */ |
16 | 16 | function __construct() { |
17 | 17 | parent::__construct( 'FormEdit' ); |
18 | | - wfLoadExtensionMessages( 'SemanticForms' ); |
| 18 | + SFUtils::loadMessages(); |
19 | 19 | } |
20 | 20 | |
21 | 21 | function execute( $query ) { |
— | — | @@ -57,7 +57,7 @@ |
58 | 58 | static function printForm( $form_name, $target_name, $alt_forms = array() ) { |
59 | 59 | global $wgOut, $wgRequest, $wgScriptPath, $sfgScriptPath, $sfgFormPrinter; |
60 | 60 | |
61 | | - wfLoadExtensionMessages( 'SemanticForms' ); |
| 61 | + SFUtils::loadMessages(); |
62 | 62 | |
63 | 63 | // initialize some variables |
64 | 64 | $target_title = null; |
Index: trunk/extensions/SemanticForms/specials/SF_RunQuery.php |
— | — | @@ -14,7 +14,7 @@ |
15 | 15 | */ |
16 | 16 | function __construct() { |
17 | 17 | parent::__construct( 'RunQuery' ); |
18 | | - wfLoadExtensionMessages( 'SemanticForms' ); |
| 18 | + SFUtils::loadMessages(); |
19 | 19 | } |
20 | 20 | |
21 | 21 | function execute( $query ) { |
Index: trunk/extensions/SemanticForms/specials/SF_UploadWindow.php |
— | — | @@ -24,7 +24,7 @@ |
25 | 25 | */ |
26 | 26 | function __construct() { |
27 | 27 | parent::__construct( 'UploadWindow' ); |
28 | | - wfLoadExtensionMessages( 'SemanticForms' ); |
| 28 | + SFUtils::loadMessages(); |
29 | 29 | } |
30 | 30 | |
31 | 31 | function execute( $query ) { |
Index: trunk/extensions/SemanticForms/specials/SF_Templates.php |
— | — | @@ -14,7 +14,7 @@ |
15 | 15 | */ |
16 | 16 | function __construct() { |
17 | 17 | parent::__construct( 'Templates' ); |
18 | | - wfLoadExtensionMessages( 'SemanticForms' ); |
| 18 | + SFUtils::loadMessages(); |
19 | 19 | } |
20 | 20 | |
21 | 21 | function execute( $query ) { |
— | — | @@ -37,7 +37,7 @@ |
38 | 38 | function getPageHeader() { |
39 | 39 | global $wgUser; |
40 | 40 | |
41 | | - wfLoadExtensionMessages( 'SemanticForms' ); |
| 41 | + SFUtils::loadMessages(); |
42 | 42 | |
43 | 43 | $sk = $wgUser->getSkin(); |
44 | 44 | $ct = SpecialPage::getPage( 'CreateTemplate' ); |
— | — | @@ -83,7 +83,7 @@ |
84 | 84 | } |
85 | 85 | |
86 | 86 | function formatResult( $skin, $result ) { |
87 | | - wfLoadExtensionMessages( 'SemanticForms' ); |
| 87 | + SFUtils::loadMessages(); |
88 | 88 | $title = Title::makeTitle( NS_TEMPLATE, $result->value ); |
89 | 89 | $text = $skin->makeLinkObj( $title, $title->getText() ); |
90 | 90 | $category = $this->getCategoryDefinedByTemplate( new Article( $title ) ); |
Index: trunk/extensions/SemanticForms/specials/SF_CreateTemplate.php |
— | — | @@ -19,7 +19,7 @@ |
20 | 20 | */ |
21 | 21 | public function SFCreateTemplate() { |
22 | 22 | parent::__construct( 'CreateTemplate' ); |
23 | | - wfLoadExtensionMessages( 'SemanticForms' ); |
| 23 | + SFUtils::loadMessages(); |
24 | 24 | } |
25 | 25 | |
26 | 26 | public function execute( $query ) { |
— | — | @@ -66,7 +66,7 @@ |
67 | 67 | } |
68 | 68 | |
69 | 69 | public static function printFieldEntryBox( $id, $f, $all_properties ) { |
70 | | - wfLoadExtensionMessages( 'SemanticForms' ); |
| 70 | + SFUtils::loadMessages(); |
71 | 71 | $dropdown_html = SFCreateTemplate::printPropertiesDropdown( $all_properties, $id, $f->semantic_property ); |
72 | 72 | |
73 | 73 | $text = ' <div class="fieldBox">' . "\n"; |
— | — | @@ -93,7 +93,7 @@ |
94 | 94 | function doSpecialCreateTemplate() { |
95 | 95 | global $wgOut, $wgRequest, $wgUser, $sfgScriptPath, $wgContLang; |
96 | 96 | |
97 | | - wfLoadExtensionMessages( 'SemanticForms' ); |
| 97 | + SFUtils::loadMessages(); |
98 | 98 | |
99 | 99 | $all_properties = SFCreateTemplate::getAllPropertyNames(); |
100 | 100 | |
Index: trunk/extensions/SemanticForms/includes/SF_ParserFunctions.php |
— | — | @@ -324,7 +324,7 @@ |
325 | 325 | ) . "\n"; |
326 | 326 | } |
327 | 327 | } |
328 | | - wfLoadExtensionMessages( 'SemanticForms' ); |
| 328 | + SFUtils::loadMessages(); |
329 | 329 | $button_str = ( $inButtonStr != '' ) ? $inButtonStr : wfMsg( 'sf_formstart_createoredit' ); |
330 | 330 | $str .= <<<END |
331 | 331 | <input type="submit" value="$button_str" /></p> |
Index: trunk/extensions/SemanticForms/includes/SF_FormEditPage.php |
— | — | @@ -13,7 +13,7 @@ |
14 | 14 | function __construct( $article, $form_name = '' ) { |
15 | 15 | global $wgRequest; |
16 | 16 | parent::__construct( $article ); |
17 | | - wfLoadExtensionMessages( 'SemanticForms' ); |
| 17 | + SFUtils::loadMessages(); |
18 | 18 | $this->action = 'formedit'; |
19 | 19 | $form_name = $wgRequest->getText( 'form', $form_name ); |
20 | 20 | $this->form = Title::makeTitleSafe( SF_NS_FORM, $form_name ); |
Index: trunk/extensions/SemanticForms/includes/SF_LinkUtils.php |
— | — | @@ -232,7 +232,7 @@ |
233 | 233 | if ( '' === $namespace ) { |
234 | 234 | // if it's in the main (blank) namespace, check for the |
235 | 235 | // file named with the word for "Main" in this language |
236 | | - wfLoadExtensionMessages( 'SemanticForms' ); |
| 236 | + SFUtils::loadMessages(); |
237 | 237 | $namespace = wfMsgForContent( 'sf_blank_namespace' ); |
238 | 238 | } |
239 | 239 | if ( $form_edit_link = self::getFormEditLinkForPage( $title, $namespace, NS_PROJECT ) ) { |
— | — | @@ -301,7 +301,7 @@ |
302 | 302 | if ( NS_MAIN === $namespace ) { |
303 | 303 | // if it's in the main (blank) namespace, check for the |
304 | 304 | // file named with the word for "Main" in this language |
305 | | - wfLoadExtensionMessages( 'SemanticForms' ); |
| 305 | + SFUtils::loadMessages(); |
306 | 306 | $namespace_label = wfMsgForContent( 'sf_blank_namespace' ); |
307 | 307 | } else { |
308 | 308 | global $wgContLang; |
Index: trunk/extensions/SemanticForms/includes/SF_FormEditTab.php |
— | — | @@ -25,7 +25,7 @@ |
26 | 26 | global $wgRequest, $wgUser; |
27 | 27 | global $sfgRenameEditTabs, $sfgRenameMainEditTab; |
28 | 28 | |
29 | | - wfLoadExtensionMessages( 'SemanticForms' ); |
| 29 | + SFUtils::loadMessages(); |
30 | 30 | |
31 | 31 | $user_can_edit = $wgUser->isAllowed( 'edit' ) && $obj->mTitle->userCan( 'edit' ); |
32 | 32 | // create the form edit tab, and apply whatever |
— | — | @@ -131,7 +131,7 @@ |
132 | 132 | return true; |
133 | 133 | } |
134 | 134 | if ( count( $form_names ) > 1 ) { |
135 | | - wfLoadExtensionMessages( 'SemanticForms' ); |
| 135 | + SFUtils::loadMessages(); |
136 | 136 | $warning_text = ' <div class="warningMessage">' . wfMsg( 'sf_formedit_morethanoneform' ) . "</div>\n"; |
137 | 137 | global $wgOut; |
138 | 138 | $wgOut->addHTML( $warning_text ); |