Fix the debug option must works for admin user

This commit is contained in:
Laurent Destailleur 2015-03-16 18:25:26 +01:00
parent 2b7c95a86d
commit bc4ecf8619

View File

@ -229,7 +229,7 @@ $sql.= ", note";
$sql.= ", entity";
$sql.= " FROM ".MAIN_DB_PREFIX."const";
$sql.= " WHERE entity IN (".$user->entity.",".$conf->entity.")";
if (empty($user->entity) && $debug) {} // to force for superadmin
if ((empty($user->entity) || $user->admin) && $debug) {} // to force for superadmin
else $sql.= " AND visible = 1"; // We must always have this. Otherwise, array is too large and submitting data fails due to apache POST or GET limits
$sql.= " ORDER BY entity, name ASC";