Skip to content

Commit

Permalink
Merge pull request #21 from joomla-framework/importer-fix
Browse files Browse the repository at this point in the history
Use internal prefix replacing method
  • Loading branch information
mbabker committed Jul 7, 2015
2 parents ecd1bce + 7b4c4f4 commit 89d86ab
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/DatabaseImporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ protected function getRealTableName($table)
*/
protected function mergeStructure()
{
$prefix = $this->db->getPrefix();
$tables = $this->db->getTableList();

if ($this->from instanceof \SimpleXMLElement)
Expand All @@ -255,8 +254,7 @@ protected function mergeStructure()
foreach ($xmlTables as $table)
{
// Convert the magic prefix into the real table name.
$tableName = (string) $table['name'];
$tableName = preg_replace('|^#__|', $prefix, $tableName);
$tableName = $this->getRealTableName((string) $table['name']);

if (in_array($tableName, $tables))
{
Expand Down

0 comments on commit 89d86ab

Please sign in to comment.