Skip to content
Snippets Groups Projects
Commit 1ef95b0b authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Use empty istead of isset

parent e844cda4
Branches
Tags
No related merge requests found
...@@ -19,10 +19,10 @@ ...@@ -19,10 +19,10 @@
*/ */
/** /**
\file htdocs/admin/const.php * \file htdocs/admin/const.php
\ingroup setup * \ingroup setup
\brief Page d'administration/configuration des constantes autres * \brief Admin page to defined miscellaneous constants
\version $Id$ * \version $Id$
*/ */
require("./pre.inc.php"); require("./pre.inc.php");
...@@ -36,6 +36,10 @@ accessforbidden(); ...@@ -36,6 +36,10 @@ accessforbidden();
$typeconst=array('yesno','texte','chaine'); $typeconst=array('yesno','texte','chaine');
/*
* Actions
*/
if ($_POST["action"] == 'update' || $_POST["action"] == 'add') if ($_POST["action"] == 'update' || $_POST["action"] == 'add')
{ {
if (! dolibarr_set_const($db, $_POST["constname"],$_POST["constvalue"],$typeconst[$_POST["consttype"]],1,isset($_POST["constnote"])?$_POST["constnote"]:'',$_POST["entity"])); if (! dolibarr_set_const($db, $_POST["constname"],$_POST["constvalue"],$typeconst[$_POST["consttype"]],1,isset($_POST["constnote"])?$_POST["constnote"]:'',$_POST["entity"]));
...@@ -53,6 +57,10 @@ if ($_GET["action"] == 'delete') ...@@ -53,6 +57,10 @@ if ($_GET["action"] == 'delete')
} }
/*
* View
*/
llxHeader(); llxHeader();
print_fiche_titre($langs->trans("OtherSetup"),'','setup'); print_fiche_titre($langs->trans("OtherSetup"),'','setup');
...@@ -113,7 +121,7 @@ $sql.= ", note"; ...@@ -113,7 +121,7 @@ $sql.= ", note";
$sql.= ", entity"; $sql.= ", entity";
$sql.= " FROM ".MAIN_DB_PREFIX."const"; $sql.= " FROM ".MAIN_DB_PREFIX."const";
$sql.= " WHERE entity IN (0,".$conf->entity.")"; $sql.= " WHERE entity IN (0,".$conf->entity.")";
if (!isset($all)) $sql.= " AND visible = 1"; if (!empty($all)) $sql.= " AND visible = 1";
$sql.= " ORDER BY name ASC"; $sql.= " ORDER BY name ASC";
dol_syslog("Const::listConstant sql=".$sql); dol_syslog("Const::listConstant sql=".$sql);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment