Skip to content

Commit

Permalink
Joomla export fixes 2
Browse files Browse the repository at this point in the history
  • Loading branch information
mahagr committed Mar 29, 2022
1 parent 5318bfa commit 20f6249
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/platforms/joomla/classes/Gantry/Joomla/Category/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,16 @@ public function exportSql()
{
return $this->getCreateSql(['asset_id', 'checked_out', 'checked_out_time', 'created_user_id', 'modified_user_id', 'hits', 'version']) . ';';
}

protected function fixValue($table, $k, $v)
{
if ($k === '`created_time`' || $k === '`modified_time`') {
$v = 'NOW()';
} elseif (is_string($v)) {
$dbo = $table->getDbo();
$v = $dbo->quote($v);
}

return $v;
}
}
12 changes: 12 additions & 0 deletions src/platforms/joomla/classes/Gantry/Joomla/Content/Content.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,4 +261,16 @@ public function exportSql()
{
return $this->getCreateSql(['asset_id', 'created_by', 'modified_by', 'checked_out', 'checked_out_time', 'publish_up', 'publish_down', 'version', 'xreference']) . ';';
}

protected function fixValue($table, $k, $v)
{
if ($k === '`created`' || $k === '`modified`') {
$v = 'NOW()';
} elseif (is_string($v)) {
$dbo = $table->getDbo();
$v = $dbo->quote($v);
}

return $v;
}
}

0 comments on commit 20f6249

Please sign in to comment.