From 98effc7bdf5e328a4e82430874e7b0d0530efbcc Mon Sep 17 00:00:00 2001 From: mMarinetti Date: Thu, 29 Dec 2011 11:10:59 +0000 Subject: [PATCH] [-] BO : Fixed #PSFV-281 : new created tab are now set active by default, thanks to Oleacorner for the help git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11883 b9a71923-0436-4b27-9f14-aed3839534dd --- classes/Tab.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/classes/Tab.php b/classes/Tab.php index c93f1af44..41be6a2a9 100644 --- a/classes/Tab.php +++ b/classes/Tab.php @@ -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