mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Use empty istead of isset
This commit is contained in:
parent
e844cda4e2
commit
1ef95b0bbc
|
|
@ -19,10 +19,10 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/admin/const.php
|
||||
\ingroup setup
|
||||
\brief Page d'administration/configuration des constantes autres
|
||||
\version $Id$
|
||||
* \file htdocs/admin/const.php
|
||||
* \ingroup setup
|
||||
* \brief Admin page to defined miscellaneous constants
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
|
|
@ -36,6 +36,10 @@ accessforbidden();
|
|||
|
||||
$typeconst=array('yesno','texte','chaine');
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
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"]));
|
||||
|
|
@ -53,6 +57,10 @@ if ($_GET["action"] == 'delete')
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader();
|
||||
|
||||
print_fiche_titre($langs->trans("OtherSetup"),'','setup');
|
||||
|
|
@ -113,7 +121,7 @@ $sql.= ", note";
|
|||
$sql.= ", entity";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."const";
|
||||
$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";
|
||||
|
||||
dol_syslog("Const::listConstant sql=".$sql);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user