Index: trunk/extensions/SemanticForms/specials/SF_CreateForm.php |
— | — | @@ -32,8 +32,9 @@ |
33 | 33 | |
34 | 34 | # get the names of all templates on this site |
35 | 35 | $all_templates = array(); |
36 | | - $sql = "SELECT page_title FROM {$db->tableName( 'page' )} WHERE page_namespace=" . NS_TEMPLATE . " AND page_is_redirect = 0 ORDER BY page_title"; |
37 | | - $res = $db->query( $sql ); |
| 36 | + $res = $db->select( 'page', 'page_title', |
| 37 | + array( 'page_namespace' => NS_TEMPLATE, 'page_is_redirect' => 0 ), |
| 38 | + array( 'ORDER BY' => 'page_title' ) ); |
38 | 39 | if ($db->numRows( $res ) > 0) { |
39 | 40 | while ($row = $db->fetchRow($res)) { |
40 | 41 | $template_name = str_replace('_', ' ', $row[0]); |
— | — | @@ -128,7 +129,7 @@ |
129 | 130 | # redirect to wiki interface |
130 | 131 | $wgOut->setArticleBodyOnly(true); |
131 | 132 | $title = Title::makeTitleSafe(SF_NS_FORM, $form->form_name); |
132 | | - $full_text = str_replace('"', '"', $form->createMarkup()); |
| 133 | + $full_text = $form->createMarkup(); |
133 | 134 | $text = SFUtils::printRedirectForm($title, $full_text, "", $save_page, $preview_page, false, false, false, null, null); |
134 | 135 | $wgOut->addHTML($text); |
135 | 136 | return; |