r47137 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r47136‎ | r47137 | r47138 >
Date:10:48, 11 February 2009
Author:mkroetzsch
Status:deferred
Tags:
Comment:
two tiny post-release fixes
Modified paths:
  • /tags/extensions/SemanticMediaWiki/REL_1_4_2/includes/SMW_QP_List.php (modified) (history)
  • /tags/extensions/SemanticMediaWiki/REL_1_4_2/includes/storage/SMW_SQLStore2_Queries.php (modified) (history)

Diff [purge]

Index: tags/extensions/SemanticMediaWiki/REL_1_4_2/includes/SMW_QP_List.php
@@ -9,8 +9,8 @@
1010 /**
1111 * New implementation of SMW's printer for results in lists.
1212 *
13 - * Somewhat confusing code, since one has to iterate through lists, inserting texts
14 - * in between their elements depending on whether the element is the first that is
 13+ * Somewhat confusing code, since one has to iterate through lists, inserting texts
 14+ * in between their elements depending on whether the element is the first that is
1515 * printed, the first that is printed in parentheses, or the last that will be printed.
1616 * Maybe one could further simplify this.
1717 *
@@ -42,7 +42,7 @@
4343 if ( ('ul' == $this->mFormat) || ('ol' == $this->mFormat) ) {
4444 $header = '<' . $this->mFormat . '>';
4545 $footer = '</' . $this->mFormat . '>';
46 - $rowstart = "\n\t<li>";
 46+ $rowstart = '<li>';
4747 $rowend = '</li>';
4848 $plainlist = false;
4949 } else {
Index: tags/extensions/SemanticMediaWiki/REL_1_4_2/includes/storage/SMW_SQLStore2_Queries.php
@@ -769,7 +769,7 @@
770770 $this->m_dbs->query("INSERT " . (($wgDBtype=='postgres')?"":"IGNORE") . " INTO $tmpnew (id) VALUES $values", 'SMW::executeHierarchyQuery');
771771
772772 for ($i=0; $i<$depth; $i++) {
773 - $this->m_dbs->query("INSERT INTO $tmpres (id) SELECT s_id" . ($wgDBtype=='postgres'?'::integer':'') . " FROM $smw_subs2, $tmpnew WHERE o_id=id",
 773+ $this->m_dbs->query("INSERT " . (($wgDBtype=='postgres')?'':'IGNORE ') . "INTO $tmpres (id) SELECT s_id" . ($wgDBtype=='postgres'?'::integer':'') . " FROM $smw_subs2, $tmpnew WHERE o_id=id",
774774 'SMW::executeHierarchyQuery');
775775 if ($this->m_dbs->affectedRows() == 0) { // no change, exit loop
776776 break;

Status & tagging log