Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions administrator/components/com_tags/tables/tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,52 @@ public function check()
$bad_characters = array("\"", "<", ">");
$this->metadesc = JString::str_ireplace($bad_characters, "", $this->metadesc);
}
// Not Null sanity check
$date = JFactory::getDate();
if (empty($this->params))
{
$this->params = '{}';
}
if (empty($this->metadesc))
{
$this->metadesc = ' ';
}
if (empty($this->metakey))
{
$this->metakey = ' ';
}
if (empty($this->metadata))
{
$this->metadata = '{}';
}
if (empty($this->urls))
{
$this->urls = '{}';
}
if (empty($this->images))
{
$this->images = '{}';
}
if (!(int) $this->checked_out_time)
{
$this->checked_out_time = $date->toSql();
}
if (!(int) $this->modified_time)
{
$this->modified_time = $date->toSql();
}
if (!(int) $this->modified_time)
{
$this->modified_time = $date->toSql();
}
if (!(int) $this->publish_up)
{
$this->publish_up = $date->toSql();
}
if (!(int) $this->publish_down)
{
$this->publish_down = $date->toSql();
}

return true;
}
Expand Down
8 changes: 8 additions & 0 deletions libraries/joomla/database/driver/postgresql.php
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,14 @@ public function getTableColumns($table, $typeOnly = true)
{
foreach ($fields as $field)
{
if (stristr(strtolower($field->type), "character varying"))
{
$field->Default = "";
}
if (stristr(strtolower($field->type), "text"))
{
$field->Default = "";
}
// Do some dirty translation to MySQL output.
// TODO: Come up with and implement a standard across databases.
$result[$field->column_name] = (object) array(
Expand Down
4 changes: 4 additions & 0 deletions libraries/joomla/database/driver/sqlsrv.php
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,10 @@ public function getTableColumns($table, $typeOnly = true)
{
foreach ($fields as $field)
{
if (stristr(strtolower($field->type), "nvarchar"))
{
$field->Default = "";
}
$result[$field->Field] = $field;
}
}
Expand Down