Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2018-11-10 15:51:49 +01:00
commit ad7ae76cd3
2 changed files with 3 additions and 2 deletions

View File

@ -1004,7 +1004,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."'";
@ -1024,6 +1024,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++;
}
}

View File

@ -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');