[-] BO : Fixed #PSFV-281 : new created tab are now set active by default, thanks to Oleacorner for the help

This commit is contained in:
mMarinetti
2011-12-29 11:10:59 +00:00
parent b5240ce83f
commit 647146c963
+4
View File
@@ -77,6 +77,10 @@ class TabCore extends ObjectModel
public function add($autodate = true, $null_values = false)
{
$this->position = self::getNewLastPosition($this->id_parent);
// if you don't precise active or not, automatically set it
if (is_null($this->active))
$this->active = 1;
if (parent::add($autodate, $null_values))
{
// refresh cache when adding new tab