r44952 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44951‎ | r44952 | r44953 >
Date:16:29, 23 December 2008
Author:yaron
Status:deferred
Tags:
Comment:
Global functions moved to other classes
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_AutocompleteAPI.php (modified) (history)
  • /trunk/extensions/SemanticForms/includes/SF_FormClasses.inc (modified) (history)
  • /trunk/extensions/SemanticForms/includes/SF_FormEditPage.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_FormClasses.inc
@@ -29,7 +29,7 @@
3030 function createMarkup() {
3131 $title = Title::makeTitle( SF_NS_FORM, $this->form_name );
3232 $ad = SpecialPage::getPage('AddPage');
33 - $add_data_url = sffTitleURLString($ad->getTitle()) . "/" . $title->getPartialURL();
 33+ $add_data_url = SFLinkUtils::titleURLString($ad->getTitle()) . "/" . $title->getPartialURL();
3434 $form_description = wfMsgForContent('sf_form_docu', $this->form_name, $add_data_url);
3535 $form_input = "{{#forminput:" . $this->form_name . "}}\n";
3636 $text =<<<END
@@ -363,7 +363,7 @@
364364 $field_form_text = $template_num . "_" . $this->num;
365365 $template_field = $this->template_field;
366366 $text = '<h3>' . wfMsg('sf_createform_field') . " '" . $template_field->field_name . "'</h3>\n";
367 - $prop_link_text = sffLinkText(SMW_NS_PROPERTY, $template_field->semantic_field);
 367+ $prop_link_text = SFUtils::linkText(SMW_NS_PROPERTY, $template_field->semantic_field);
368368 // TODO - remove this probably-unnecessary check?
369369 if ($template_field->semantic_field == "") {
370370 // print nothing if there's no semantic field
@@ -371,10 +371,10 @@
372372 $text .= '<p>' . wfMsg('sf_createform_fieldpropunknowntype', $prop_link_text) . "</p>\n";
373373 } elseif ($template_field->is_list) {
374374 $text .= '<p>' . wfMsg('sf_createform_fieldproplist', $prop_link_text,
375 - sffLinkText(SMW_NS_TYPE, $template_field->field_type)) . "</p>\n";
 375+ SFUtils::linkText(SMW_NS_TYPE, $template_field->field_type)) . "</p>\n";
376376 } else {
377377 $text .= '<p>' . wfMsg('sf_createform_fieldprop', $prop_link_text,
378 - sffLinkText(SMW_NS_TYPE, $template_field->field_type)) . "</p>\n";
 378+ SFUtils::linkText(SMW_NS_TYPE, $template_field->field_type)) . "</p>\n";
379379 }
380380 // if it's not a semantic field - don't add any text
381381 $form_label_text = wfMsg('sf_createform_formlabel');
Index: trunk/extensions/SemanticForms/includes/SF_FormEditPage.php
@@ -36,7 +36,7 @@
3737 }
3838 global $sfgIP;
3939 $target_title = $this->mArticle->getTitle();
40 - $target_name = sffTitleString($target_title);
 40+ $target_name = SFLinkUtils::titleString($target_title);
4141 if ($target_title->exists()) {
4242 require_once($sfgIP . '/specials/SF_EditData.php');
4343 printEditForm($this->form_name, $target_name);
Index: trunk/extensions/SemanticForms/includes/SF_AutocompleteAPI.php
@@ -39,20 +39,20 @@
4040 $this->dieUsage("The substring must be specified", 'param_substr');
4141 }
4242 if ($property != '') {
43 - $data = sffGetAllValuesForProperty_1_2($property, $substr);
 43+ $data = SFUtils::getAllValuesForProperty_1_2($property, $substr);
4444 } elseif ($relation != '') {
45 - $data = sffGetAllValuesForProperty_orig(true, $relation, $substr);
 45+ $data = SFUtils::getAllValuesForProperty_orig(true, $relation, $substr);
4646 } elseif ($attribute != '') {
47 - $data = sffGetAllValuesForProperty_orig(false, $attribute, $substr);
 47+ $data = SFUtils::getAllValuesForProperty_orig(false, $attribute, $substr);
4848 } elseif ($category != '') {
49 - $data = sffGetAllPagesForCategory($category, 3, $substr);
 49+ $data = SFUtils::getAllPagesForCategory($category, 3, $substr);
5050 } elseif ($concept != '') {
51 - $data = sffGetAllPagesForConcept($concept, $substr);
 51+ $data = SFUtils::getAllPagesForConcept($concept, $substr);
5252 } elseif ($namespace != '') {
5353 // special handling for main (blank) namespace
5454 if ($namespace == 'main')
5555 $namespace = '';
56 - $data = sffGetAllPagesForNamespace($namespace, $substr);
 56+ $data = SFUtils::getAllPagesForNamespace($namespace, $substr);
5757 } else {
5858 $date = array();
5959 }

Status & tagging log