Fixed a number of bug reports related to table/db names not being escaped or prefixed correctly.
diff --git a/system/database/DB_forge.php b/system/database/DB_forge.php
index 64f95d6..20f0a30 100644
--- a/system/database/DB_forge.php
+++ b/system/database/DB_forge.php
@@ -253,7 +253,7 @@
{
if ($table == '')
{
- show_error('A table name is required for that operation.');
+ show_error('A table name is required for that operation.');
}
// add field info into field array, but we can only do one at a time
@@ -286,12 +286,12 @@
if ($table == '')
{
- show_error('A table name is required for that operation.');
+ show_error('A table name is required for that operation.');
}
if ($column_name == '')
{
- show_error('A column name is required for that operation.');
+ show_error('A column name is required for that operation.');
}
$sql = $this->_alter_table('DROP', $this->db->dbprefix.$table, $column_name);
@@ -312,10 +312,9 @@
*/
function modify_column($table = '', $field = array())
{
-
if ($table == '')
{
- show_error('A table name is required for that operation.');
+ show_error('A table name is required for that operation.');
}
// add field info into field array, but we can only do one at a time