Skip to content

Commit

Permalink
Actually fix category level issue
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonge committed Nov 4, 2014
1 parent d7c6e11 commit 1329dd5
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions installation/model/languages.php
Original file line number Diff line number Diff line change
Expand Up @@ -1030,13 +1030,12 @@ public function addCategory($itemLanguage)
'metadata' => '{"page_title":"","author":"","robots":""}',
'created_time' => JFactory::getDate()->toSql(),
'language' => $itemLanguage->language,
'rules' => array()
'rules' => array(),
'parent_id' => 1
);

// Using $category->setLocation(1, 'last-child'); would be ideal here but doesn't seem to work in postgres
// as we're in install and 'know' the structure we'll just manually set it to be a child of the root category.
$data['parent_id'] = 1;
$data['level'] = 1;
// Set the level of the category
$category->setLocation(1, 'last-child');

// Bind the data to the table
if (!$category->bind($data))
Expand Down

0 comments on commit 1329dd5

Please sign in to comment.