0002-Strip-table_prefix-from-introspection-output.patch

Chris Bandy, 02/27/2009 04:15 pm

Download (1.9 kB)

 
system/libraries/Database.php
1147 1147
	 */
1148 1148
	public function table_exists($table_name)
1149 1149
	{
1150
		return in_array($this->config['table_prefix'].$table_name, $this->list_tables());
1150
		return in_array($table_name, $this->list_tables());
1151 1151
	}
1152 1152

  
1153 1153
	/**
system/libraries/drivers/Database/Mysql.php
286 286
		{
287 287
			foreach ($query->result(FALSE) as $row)
288 288
			{
289
				$tables[] = current($row);
289
				$tables[] = substr(current($row), strlen($this->db_config['table_prefix']));
290 290
			}
291 291
		}
292 292

  
system/libraries/drivers/Database/Pdosqlite.php
226 226
			$tables = array();
227 227
			foreach ($result as $row)
228 228
			{
229
				$tables[] = current($row);
229
				$tables[] = substr(current($row), strlen($this->db_config['table_prefix']));
230 230
			}
231 231
		}
232 232
		catch (PDOException $e)
system/libraries/drivers/Database/Pgsql.php
251 251
		{
252 252
			foreach ($result as $row)
253 253
			{
254
				$tables[] = $row->table_name;
254
				$tables[] = substr($row->table_name, strlen($this->db_config['table_prefix']));
255 255
			}
256 256
		}
257 257