mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-09 11:08:34 +01:00
Fix verifCond must return false if string is '0'
Hide a not used property.
This commit is contained in:
@@ -8132,10 +8132,10 @@ function dol_getIdFromCode($db, $key, $tablename, $fieldkey = 'code', $fieldid =
|
||||
/**
|
||||
* Verify if condition in string is ok or not
|
||||
*
|
||||
* @param string $strRights String with condition to check
|
||||
* @return boolean True or False. Return True if strRights is ''
|
||||
* @param string $strToEvaluate String with condition to check
|
||||
* @return boolean True or False. Note: It returns True if $strToEvaluate is ''
|
||||
*/
|
||||
function verifCond($strRights)
|
||||
function verifCond($strToEvaluate)
|
||||
{
|
||||
global $user, $conf, $langs;
|
||||
global $leftmenu;
|
||||
@@ -8143,8 +8143,8 @@ function verifCond($strRights)
|
||||
|
||||
//print $strRights."<br>\n";
|
||||
$rights = true;
|
||||
if ($strRights != '') {
|
||||
$str = 'if(!('.$strRights.')) { $rights = false; }';
|
||||
if ($strToEvaluate !== '') {
|
||||
$str = 'if(!('.$strToEvaluate.')) { $rights = false; }';
|
||||
dol_eval($str); // The dol_eval must contains all the global $xxx used into a condition
|
||||
}
|
||||
return $rights;
|
||||
|
||||
@@ -101,8 +101,7 @@ class Inventory extends CommonObject
|
||||
'title' => array('type'=>'varchar(255)', 'label'=>'Label', 'visible'=>1, 'enabled'=>1, 'position'=>25, 'css'=>'minwidth300', 'csslist'=>'tdoverflowmax200'),
|
||||
'fk_warehouse' => array('type'=>'integer:Entrepot:product/stock/class/entrepot.class.php', 'label'=>'Warehouse', 'visible'=>1, 'enabled'=>1, 'position'=>30, 'index'=>1, 'help'=>'InventoryForASpecificWarehouse', 'picto'=>'stock', 'css'=>'minwidth300 maxwidth500 widthcentpercentminusx', 'csslist'=>'tdoverflowmax200'),
|
||||
'fk_product' => array('type'=>'integer:Product:product/class/product.class.php', 'label'=>'Product', 'visible'=>1, 'enabled'=>1, 'position'=>32, 'index'=>1, 'help'=>'InventoryForASpecificProduct', 'picto'=>'product', 'css'=>'minwidth300 maxwidth500 widthcentpercentminusx', 'csslist'=>'tdoverflowmax200'),
|
||||
'date_inventory' => array('type'=>'date', 'label'=>'DateValue', 'visible'=>1, 'enabled'=>1, 'position'=>35),
|
||||
|
||||
'date_inventory' => array('type'=>'date', 'label'=>'DateValue', 'visible'=>1, 'enabled'=>0, 'position'=>35), // This date is not used so disabled.
|
||||
'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>500),
|
||||
'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>501),
|
||||
'date_validation' => array('type'=>'datetime', 'label'=>'DateValidation', 'visible'=>-2, 'enabled'=>1, 'position'=>502),
|
||||
|
||||
Reference in New Issue
Block a user