r23963 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23962‎ | r23963 | r23964 >
Date:14:53, 10 July 2007
Author:mkroetzsch
Status:old
Tags:
Comment:
-yet another use of a prefixed table name in a db function that prefixes it automatically
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore.php
@@ -876,8 +876,10 @@
877877 '( cat_name VARCHAR(255) NOT NULL )
878878 TYPE=MEMORY', 'SMW::getCategoryTable' );
879879 if (array_key_exists($catname, SMWSQLStore::$m_categorytables)) { // just copy known result
880 - $db->insertSelect($tablename, array(SMWSQLStore::$m_categorytables[$catname]),
881 - array('cat_name' => 'cat_name'),'*', 'SMW::getCategoryTable');
 880+ $db->query("INSERT INTO $tablename (cat_name) SELECT " .
 881+ SMWSQLStore::$m_categorytables[$catname] .
 882+ '.cat_name FROM ' . SMWSQLStore::$m_categorytables[$catname],
 883+ 'SMW::getCategoryTable');
882884 return $tablename;
883885 }
884886

Status & tagging log