From 3295498e9e49b3f67d6bf5453ebc93ab335e76ff Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 16 Sep 2017 12:50:34 +0200 Subject: [PATCH 1/5] Remove code comment --- htdocs/product/index.php | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/product/index.php b/htdocs/product/index.php index cd1c9a4883b..3568cd4a492 100644 --- a/htdocs/product/index.php +++ b/htdocs/product/index.php @@ -367,7 +367,6 @@ function activitytrim($product_type) $result = $db->query($sql); if ($result) { - //$tmpyear=$beginyear; // FIXME $beginyear is not defined $tmpyear=0; $trim1=0; $trim2=0; From e61bcd03ed86879044e4631e15242602d7501128 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 16 Sep 2017 13:03:27 +0200 Subject: [PATCH 2/5] Fix travis --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7cb9db632ad..8ae2e95f0c8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -126,10 +126,10 @@ before_script: echo "Set timezone" echo 'date.timezone = "Europe/Paris"' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini if [ "$TRAVIS_PHP_VERSION" = '5.3' ] || [ "$TRAVIS_PHP_VERSION" = '5.4' ]; then - echo - echo "Enabling APC for PHP <= 5.4" + #echo + #echo "Enabling APC for PHP <= 5.4" # Documentation says it should be available for PHP <= 5.6 but it's not for 5.5 and 5.6! - echo 'extension = apc.so' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini + #echo 'extension = apc.so' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini echo echo "Enabling Memcached for PHP <= 5.4" # Documentation says it should be available for all PHP versions but it's not for 5.5 and 5.6, 7.0 and nightly! From 5d1d77a966dc26032d172450d772f8311a1bf70a Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 9 Nov 2018 10:25:00 +0100 Subject: [PATCH 3/5] FIX missing action "edit" for the hook --- htdocs/categories/edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/categories/edit.php b/htdocs/categories/edit.php index b420847f6fd..1cde5e62adc 100644 --- a/htdocs/categories/edit.php +++ b/htdocs/categories/edit.php @@ -35,7 +35,7 @@ $langs->load("categories"); $id=GETPOST('id','int'); $ref=GETPOST('ref'); $type=GETPOST('type'); -$action=GETPOST('action','aZ09'); +$action=(GETPOST('action','aZ09')?GETPOST('action','aZ09'):'edit'); $confirm=GETPOST('confirm'); $cancel=GETPOST('cancel','alpha'); From ee06f36f4c82f8b51624ceed78ef79a20dd7f61b Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 9 Nov 2018 11:36:20 +0100 Subject: [PATCH 4/5] FIX missing field "visible" --- htdocs/categories/class/categorie.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 70b2108dd4c..3de9bdfab0a 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -1043,7 +1043,7 @@ class Categorie extends CommonObject $current_lang = $langs->getDefaultLang(); // Init $this->cats array - $sql = "SELECT DISTINCT c.rowid, c.label, c.description, c.color, c.fk_parent"; // Distinct reduce pb with old tables with duplicates + $sql = "SELECT DISTINCT c.rowid, c.label, c.description, c.color, c.fk_parent, c.visible"; // Distinct reduce pb with old tables with duplicates if (! empty($conf->global->MAIN_MULTILANGS)) $sql.= ", t.label as label_trans, t.description as description_trans"; $sql.= " FROM ".MAIN_DB_PREFIX."categorie as c"; if (! empty($conf->global->MAIN_MULTILANGS)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_lang as t ON t.fk_category=c.rowid AND t.lang='".$current_lang."'"; @@ -1063,6 +1063,7 @@ class Categorie extends CommonObject $this->cats[$obj->rowid]['label'] = ! empty($obj->label_trans) ? $obj->label_trans : $obj->label; $this->cats[$obj->rowid]['description'] = ! empty($obj->description_trans) ? $obj->description_trans : $obj->description; $this->cats[$obj->rowid]['color'] = $obj->color; + $this->cats[$obj->rowid]['visible'] = $obj->visible; $i++; } } From 8893d8d59fcf08637e9465d5f3b0a4c3a0c6590d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 10 Nov 2018 11:56:23 +0100 Subject: [PATCH 5/5] Fix compatiblity with new version of PHP --- htdocs/exports/class/export.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/exports/class/export.class.php b/htdocs/exports/class/export.class.php index 7ab55fd4e53..8e3e3b04767 100644 --- a/htdocs/exports/class/export.class.php +++ b/htdocs/exports/class/export.class.php @@ -131,11 +131,11 @@ class Export //print_r("$perm[0]-$perm[1]-$perm[2]
"); if (! empty($perm[2])) { - $bool=$user->rights->$perm[0]->$perm[1]->$perm[2]; + $bool=$user->rights->{$perm[0]}->{$perm[1]}->{$perm[2]}; } else { - $bool=$user->rights->$perm[0]->$perm[1]; + $bool=$user->rights->{$perm[0]}->{$perm[1]}; } if ($perm[0]=='user' && $user->admin) $bool=true; if (! $bool) break;