Skip to content

Commit

Permalink
Merge pull request #7832 from alikon/mssql-3dp-install
Browse files Browse the repository at this point in the history
MSSQL - install extensions
  • Loading branch information
Kubik-Rubik committed Sep 8, 2015
2 parents dd5e5aa + e2c35a1 commit f8ab55e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 5 deletions.
9 changes: 5 additions & 4 deletions libraries/joomla/table/asset.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ public function check()
{
$this->parent_id = (int) $this->parent_id;

if (empty($this->rules))
{
$this->rules = '{}';
}
// JTableNested does not allow parent_id = 0, override this.
if ($this->parent_id > 0)
{
Expand All @@ -118,10 +122,7 @@ public function check()
$this->setError('Invalid Parent ID');

return false;
}
if (empty($this->rules))
{
$this->rules = '{}';

}
}

Expand Down
2 changes: 1 addition & 1 deletion libraries/legacy/table/category.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ public function store($updateNulls = false)
// Verify that the alias is unique
$table = JTable::getInstance('Category', 'JTable', array('dbo' => $this->getDbo()));

if ($table->load(array('alias' => $this->alias, 'parent_id' => $this->parent_id, 'extension' => $this->extension))
if ($table->load(array('alias' => $this->alias, 'parent_id' => (int) $this->parent_id, 'extension' => $this->extension))
&& ($table->id != $this->id || $this->id == 0))
{
$this->setError(JText::_('JLIB_DATABASE_ERROR_CATEGORY_UNIQUE_ALIAS'));
Expand Down
16 changes: 16 additions & 0 deletions libraries/legacy/table/menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,22 @@ public function check()
$this->alias = $this->title;
}

// Check for a path.
if (trim($this->path) == '')
{
$this->path = $this->alias;
}
// Check for params.
if (trim($this->params) == '')
{
$this->params = '{}';
}
// Check for img.
if (trim($this->img) == '')
{
$this->img = ' ';
}

// Make the alias URL safe.
$this->alias = JApplication::stringURLSafe($this->alias);

Expand Down

0 comments on commit f8ab55e

Please sign in to comment.