Index: trunk/extensions/SemanticForms/specials/SF_AddPage.php |
— | — | @@ -19,7 +19,7 @@ |
20 | 20 | wfLoadExtensionMessages('SemanticForms'); |
21 | 21 | } |
22 | 22 | |
23 | | - function execute($query = '') { |
| 23 | + function execute($query) { |
24 | 24 | $this->setHeaders(); |
25 | 25 | doSpecialAddPage($query); |
26 | 26 | } |
— | — | @@ -127,7 +127,7 @@ |
128 | 128 | $form_name = str_replace($forbidden_chars, "", $form_name); |
129 | 129 | |
130 | 130 | // get title of form |
131 | | - $form_title = Title::newFromText($form_name, SF_NS_FORM); |
| 131 | + $form_title = Title::makeTitleSafe(SF_NS_FORM, $form_name); |
132 | 132 | |
133 | 133 | // handle submission |
134 | 134 | $form_submitted = $wgRequest->getCheck('page_name'); |
Index: trunk/extensions/SemanticForms/specials/SF_Forms.php |
— | — | @@ -17,7 +17,7 @@ |
18 | 18 | wfLoadExtensionMessages('SemanticForms'); |
19 | 19 | } |
20 | 20 | |
21 | | - function execute() { |
| 21 | + function execute($query) { |
22 | 22 | $this->setHeaders(); |
23 | 23 | list( $limit, $offset ) = wfCheckLimits(); |
24 | 24 | $rep = new FormsPage(); |
Index: trunk/extensions/SemanticForms/specials/SF_CreateForm.php |
— | — | @@ -18,7 +18,7 @@ |
19 | 19 | wfLoadExtensionMessages('SemanticForms'); |
20 | 20 | } |
21 | 21 | |
22 | | - function execute() { |
| 22 | + function execute($query) { |
23 | 23 | $this->setHeaders(); |
24 | 24 | doSpecialCreateForm(); |
25 | 25 | } |
— | — | @@ -127,7 +127,7 @@ |
128 | 128 | } else { |
129 | 129 | # redirect to wiki interface |
130 | 130 | $wgOut->setArticleBodyOnly(true); |
131 | | - $title = Title::newFromText($form->form_name, SF_NS_FORM); |
| 131 | + $title = Title::makeTitleSafe(SF_NS_FORM, $form->form_name); |
132 | 132 | $full_text = str_replace('"', '"', $form->createMarkup()); |
133 | 133 | $text = SFUtils::printRedirectForm($title, $full_text, "", $save_page, $preview_page, false, false, false, null, null); |
134 | 134 | $wgOut->addHTML($text); |
Index: trunk/extensions/SemanticForms/specials/SF_CreateProperty.php |
— | — | @@ -1,7 +1,7 @@ |
2 | 2 | <?php |
3 | 3 | /** |
4 | 4 | * A special page holding a form that allows the user to create a semantic |
5 | | - * property (an attribute or relation). |
| 5 | + * property. |
6 | 6 | * |
7 | 7 | * @author Yaron Koren |
8 | 8 | */ |
— | — | @@ -18,7 +18,7 @@ |
19 | 19 | wfLoadExtensionMessages('SemanticForms'); |
20 | 20 | } |
21 | 21 | |
22 | | - function execute() { |
| 22 | + function execute($query) { |
23 | 23 | $this->setHeaders(); |
24 | 24 | doSpecialCreateProperty(); |
25 | 25 | } |
— | — | @@ -84,8 +84,7 @@ |
85 | 85 | } else { |
86 | 86 | # redirect to wiki interface |
87 | 87 | $wgOut->setArticleBodyOnly(true); |
88 | | - $namespace = SMW_NS_PROPERTY; |
89 | | - $title = Title::newFromText($property_name, $namespace); |
| 88 | + $title = Title::makeTitleSafe(SMW_NS_PROPERTY, $property_name); |
90 | 89 | $full_text = createPropertyText($property_type, $allowed_values); |
91 | 90 | // HTML-encode |
92 | 91 | $full_text = str_replace('"', '"', $full_text); |
Index: trunk/extensions/SemanticForms/specials/SF_UploadWindow.php |
— | — | @@ -24,7 +24,7 @@ |
25 | 25 | wfLoadExtensionMessages('SemanticForms'); |
26 | 26 | } |
27 | 27 | |
28 | | - function execute() { |
| 28 | + function execute($query) { |
29 | 29 | $this->setHeaders(); |
30 | 30 | doSpecialUploadWindow(); |
31 | 31 | } |
Index: trunk/extensions/SemanticForms/specials/SF_Templates.php |
— | — | @@ -17,7 +17,7 @@ |
18 | 18 | wfLoadExtensionMessages('SemanticForms'); |
19 | 19 | } |
20 | 20 | |
21 | | - function execute() { |
| 21 | + function execute($query) { |
22 | 22 | $this->setHeaders(); |
23 | 23 | list( $limit, $offset ) = wfCheckLimits(); |
24 | 24 | $rep = new TemplatesPage(); |
Index: trunk/extensions/SemanticForms/specials/SF_CreateTemplate.php |
— | — | @@ -22,7 +22,7 @@ |
23 | 23 | wfLoadExtensionMessages('SemanticForms'); |
24 | 24 | } |
25 | 25 | |
26 | | - function execute() { |
| 26 | + function execute($query) { |
27 | 27 | $this->setHeaders(); |
28 | 28 | doSpecialCreateTemplate(); |
29 | 29 | } |
— | — | @@ -105,7 +105,7 @@ |
106 | 106 | if ($wgRequest->getVal('del_' . $old_id) != '') { |
107 | 107 | # do nothing - this field won't get added to the new list |
108 | 108 | } else { |
109 | | - $field = SFTemplateField::newWithValues($val, $wgRequest->getVal('label_' . $old_id)); |
| 109 | + $field = SFTemplateField::create($val, $wgRequest->getVal('label_' . $old_id)); |
110 | 110 | $field->semantic_property = $wgRequest->getVal('semantic_property_' . $old_id); |
111 | 111 | $field->is_list = $wgRequest->getCheck('is_list_' . $old_id); |
112 | 112 | $fields[] = $field; |
— | — | @@ -129,7 +129,7 @@ |
130 | 130 | } else { |
131 | 131 | // redirect to wiki interface |
132 | 132 | $wgOut->setArticleBodyOnly(true); |
133 | | - $title = Title::newFromText($template_name, NS_TEMPLATE); |
| 133 | + $title = Title::makeTitleSafe(NS_TEMPLATE, $template_name); |
134 | 134 | $full_text = SFTemplateField::createTemplateText($template_name, $fields, $category, $aggregating_property, $aggregation_label, $template_format); |
135 | 135 | // HTML-encode |
136 | 136 | $full_text = str_replace('"', '"', $full_text); |