Closed GoogleCodeExporter closed 9 years ago
I created a patch (i.e. replaced step 3 with Create Patch) and applied is
succesfully
to the master
Original comment by swe...@xs4all.nl
on 11 Sep 2009 at 5:37
Thanks for the info!
Variable name conflict, change $rows variable name on lines 956, 964
Original comment by edo...@gmail.com
on 13 Sep 2009 at 6:14
Like this?
switch($action) {
case 'add':
list($table_ddl) = array_values($db->getTableCreate($table));
$table_ddl = preg_replace('/'.str_replace('#__', $db-
>_table_prefix, $table).'/', $table, $table_ddl, 1);
$master_db->setQuery($table_ddl);
$master_db->query();
$db->setQuery('select * from ' . $table);
$rs = $db->loadObjectList();
foreach($rs as $row)
$master_db->insertObject($table, $row);
break;
case 'update':
$master_db->setQuery('truncate table ' . $table);
$master_db->query();
$db->setQuery('select * from ' . $table);
$rs = $db->loadObjectList();
foreach($rs as $row)
$master_db->insertObject($table, $row);
break;
case 'delete':
$master_db->setQuery('drop table if exists ' . $table);
$master_db->query();
break;
}
The conflict was with the $rows variable online 976?
Original comment by swe...@xs4all.nl
on 13 Sep 2009 at 11:23
Correct, that will work.
Original comment by edo...@gmail.com
on 13 Sep 2009 at 4:35
Original comment by edo...@gmail.com
on 13 Sep 2009 at 8:33
Original issue reported on code.google.com by
swe...@xs4all.nl
on 11 Sep 2009 at 5:26Attachments: