r82619 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82618‎ | r82619 | r82620 >
Date:18:22, 22 February 2011
Author:yaron
Status:deferred
Tags:
Comment:
Changed all calls to (deprecated) Linker::makeKnownLinkObj() method to use new SFUtils::linkForSpecialPage() method instead
Modified paths:
  • /trunk/extensions/SemanticForms/specials/SF_CreateCategory.php (modified) (history)
  • /trunk/extensions/SemanticForms/specials/SF_CreateClass.php (modified) (history)
  • /trunk/extensions/SemanticForms/specials/SF_CreateForm.php (modified) (history)
  • /trunk/extensions/SemanticForms/specials/SF_CreateTemplate.php (modified) (history)
  • /trunk/extensions/SemanticForms/specials/SF_Forms.php (modified) (history)
  • /trunk/extensions/SemanticForms/specials/SF_Templates.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/specials/SF_CreateCategory.php
@@ -99,8 +99,7 @@
100100 $subcategory_label = wfMsg( 'sf_createcategory_makesubcategory' );
101101 $categories = SFUtils::getCategoriesForPage();
102102 $sk = $wgUser->getSkin();
103 - $cf = SpecialPage::getPage( 'CreateForm' );
104 - $create_form_link = $sk->makeKnownLinkObj( $cf->getTitle(), $cf->getDescription() );
 103+ $create_form_link = SFUtils::linkForSpecialPage( $sk, 'CreateForm' );
105104 $text .= <<<END
106105 </select>
107106 <p>$subcategory_label
Index: trunk/extensions/SemanticForms/specials/SF_Forms.php
@@ -52,8 +52,7 @@
5353 SFUtils::loadMessages();
5454
5555 $sk = $wgUser->getSkin();
56 - $cf = SpecialPage::getPage( 'CreateForm' );
57 - $create_form_link = $sk->makeKnownLinkObj( $cf->getTitle(), $cf->getDescription() );
 56+ $create_form_link = SFUtils::linkForSpecialPage( $sk, 'CreateForm' );
5857 $header = "<p>" . $create_form_link . ".</p>\n";
5958 $header .= '<p>' . wfMsg( 'sf_forms_docu' ) . "</p><br />\n";
6059 return $header;
Index: trunk/extensions/SemanticForms/specials/SF_CreateForm.php
@@ -243,8 +243,7 @@
244244 $preview_button_text = wfMsg( 'preview' );
245245 $add_button_text = wfMsg( 'sf_createform_add' );
246246 $sk = $wgUser->getSkin();
247 - $ct = SpecialPage::getPage( 'CreateTemplate' );
248 - $create_template_link = $sk->makeKnownLinkObj( $ct->getTitle(), $ct->getDescription() );
 247+ $create_template_link = SFUtils::linkForSpecialPage( $sk, 'CreateTemplate' );
249248 $text .= <<<END
250249 <input type="submit" name="add_field" value="$add_button_text" /></p>
251250 <br />
Index: trunk/extensions/SemanticForms/specials/SF_CreateClass.php
@@ -119,14 +119,10 @@
120120 // link to them at the top of the page
121121 $sk = $wgUser->getSkin();
122122 $creation_links = array();
123 - $cp = SpecialPage::getPage( 'CreateProperty' );
124 - $creation_links[] = $sk->makeKnownLinkObj( $cp->getTitle(), $cp->getDescription() );
125 - $ct = SpecialPage::getPage( 'CreateTemplate' );
126 - $creation_links[] = $sk->makeKnownLinkObj( $ct->getTitle(), $ct->getDescription() );
127 - $cf = SpecialPage::getPage( 'CreateForm' );
128 - $creation_links[] = $sk->makeKnownLinkObj( $cf->getTitle(), $cf->getDescription() );
129 - $cc = SpecialPage::getPage( 'CreateCategory' );
130 - $creation_links[] = $sk->makeKnownLinkObj( $cc->getTitle(), $cc->getDescription() );
 123+ $creation_links[] = SFUtils::linkForSpecialPage( $sk, 'CreateProperty' );
 124+ $creation_links[] = SFUtils::linkForSpecialPage( $sk, 'CreateTemplate' );
 125+ $creation_links[] = SFUtils::linkForSpecialPage( $sk, 'CreateForm' );
 126+ $creation_links[] = SFUtils::linkForSpecialPage( $sk, 'CreateCategory' );
131127 $create_class_docu = wfMsg( 'sf_createclass_docu', $wgLang->listToText( $creation_links ) );
132128 $leave_field_blank = wfMsg( 'sf_createclass_leavefieldblank' );
133129 $form_name_label = wfMsg( 'sf_createform_nameinput' );
Index: trunk/extensions/SemanticForms/specials/SF_Templates.php
@@ -52,8 +52,7 @@
5353 SFUtils::loadMessages();
5454
5555 $sk = $wgUser->getSkin();
56 - $ct = SpecialPage::getPage( 'CreateTemplate' );
57 - $create_template_link = $sk->makeKnownLinkObj( $ct->getTitle(), $ct->getDescription() );
 56+ $create_template_link = SFUtils::linkForSpecialPage( $sk, 'CreateTemplate' );
5857 $header = "<p>" . $create_template_link . ".</p>\n";
5958 $header .= '<p>' . wfMsg( 'sf_templates_docu' ) . "</p><br />\n";
6059 return $header;
Index: trunk/extensions/SemanticForms/specials/SF_CreateTemplate.php
@@ -183,8 +183,7 @@
184184
185185 END;
186186 $sk = $wgUser->getSkin();
187 - $cp = SpecialPage::getPage( 'CreateProperty' );
188 - $create_property_link = $sk->makeKnownLinkObj( $cp->getTitle(), $cp->getDescription() );
 187+ $create_property_link = SFUtils::linkForSpecialPage( $sk, 'CreateProperty' );
189188 $text .= " <br /><hr /><br />\n";
190189 $text .= " " . Xml::tags( 'p', null, $create_property_link . '.' ) . "\n";
191190