r63479 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63478‎ | r63479 | r63480 >
Date:18:21, 9 March 2010
Author:yaron
Status:deferred
Tags:
Comment:
Incorporated Nikerabbit's suggestions, including changing 'XML::tags' back to 'XML::element'
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_Utils.inc (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_Utils.inc
@@ -76,7 +76,7 @@
7777 <p style="position: absolute; left: 45%; top: 45%;"><img src="$sfgScriptPath/skins/loading.gif" /></p>
7878
7979 END;
80 - $form_body = ' ' . Xml::tags('input', array('type' => 'hidden', 'name' => 'wpTextbox1', 'id' => 'wpTextbox1', 'value' => $page_contents), null) . "\n";
 80+ $form_body = ' ' . Xml::element('input', array('type' => 'hidden', 'name' => 'wpTextbox1', 'id' => 'wpTextbox1', 'value' => $page_contents), null) . "\n";
8181 $form_body .= ' ' . Xml::element('input', array('type' => 'hidden', 'name' => 'wpSummary', 'value' => $edit_summary), null) . "\n";
8282 $form_body .= ' ' . Xml::element('input', array('type' => 'hidden', 'name' => 'wpStarttime', 'value' => $start_time), null) . "\n";
8383 $form_body .= ' ' . Xml::element('input', array('type' => 'hidden', 'name' => 'wpEdittime', 'value' => $edit_time), null) . "\n";
@@ -245,7 +245,6 @@
246246 global $sfgMaxAutocompleteValues;
247247
248248 $db = wfGetDB( DB_SLAVE );
249 - $fname = "SFUtils::getAllPagesForCategory";
250249 $top_category = str_replace(' ', '_', $top_category);
251250 $categories = array($top_category);
252251 $checkcategories = array($top_category);
@@ -265,7 +264,7 @@
266265 array('categorylinks', 'page'),
267266 array('page_title', 'page_namespace'),
268267 array('cl_from = page_id', $conditions),
269 - $fname,
 268+ __METHOD__,
270269 'SORT BY cl_sortkey');
271270 if ($res) {
272271 while ($res && $row = $db->fetchRow($res)) {
@@ -340,7 +339,6 @@
341340 global $wgContLang;
342341 $namespaces = $wgContLang->getNamespaces();
343342 $db = wfGetDB( DB_SLAVE );
344 - $fname = "SFUtils::getAllPagesForNamespace";
345343 $pages = array();
346344 foreach ($namespaces as $ns_code => $ns_name) {
347345 if ($ns_name == $namespace_name) {
@@ -354,7 +352,7 @@
355353 $sql_options['ORDER BY'] = 'page_title';
356354 $res = $db->select( $db->tableNames('page'),
357355 'page_title',
358 - $conditions, $fname, $sql_options);
 356+ $conditions, __METHOD__, $sql_options);
359357 while ($row = $db->fetchRow($res)) {
360358 $cur_value = str_replace('_', ' ', $row[0]);
361359 if ($substring == null) {

Status & tagging log