debug + réglage rdc_store
This commit is contained in:
@ -275,7 +275,7 @@ function getDevicesValues($topic)
|
||||
|
||||
function changeValue(&$property, $value, &$parentDevice, $propertyTree, $key)
|
||||
{
|
||||
global $mohaDB, $properties2log;
|
||||
global $mohaDB, $properties2log, $hooks;
|
||||
//$changed[$fn]["key"] = $key;
|
||||
//$changed[$fn]["value"] = $value;
|
||||
|
||||
@ -293,13 +293,14 @@ function changeValue(&$property, $value, &$parentDevice, $propertyTree, $key)
|
||||
{
|
||||
try
|
||||
{
|
||||
logger(INFO, print_r($function, true), __FILE__ . ":" . __LINE__);
|
||||
if ( $function[0]->active === true )
|
||||
$active = $hooks[$function[0]->hookName]->active;
|
||||
logger(INFO, "active = " . bool2string($active), __FILE__ . ":" . __LINE__);
|
||||
if ( $active === true )
|
||||
{
|
||||
$function($parentDevice, $key, $value);
|
||||
}else
|
||||
{
|
||||
logger(INFO, $function . _(" is disabled"), __FILE__ . ":" . __LINE__ );
|
||||
logger(INFO, $function[0]->hookName . _(" is disabled"), __FILE__ . ":" . __LINE__ );
|
||||
}
|
||||
|
||||
}catch (Exception $e)
|
||||
|
Reference in New Issue
Block a user