This shows you the differences between two versions of the page.
— |
bug_mini_failure_saving_config [2016/12/05 08:46] (current) admin created |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== Bugfix: Failure Saving Config ===== | ||
+ | \\ | ||
+ | **Affected versions:** \\ | ||
+ | All the FoxBox MINI delivered before the 2nd December 2016. | ||
+ | |||
+ | **Description:** \\ | ||
+ | A failure can occour while trying to save the machine configuration. | ||
+ | |||
+ | **Solution:** \\ | ||
+ | **1)** Connect via SSH.\\ | ||
+ | **2)** Edit the file: \\ | ||
+ | <code> | ||
+ | /var/www/html/playsms/plugin/core/registry/fn.php | ||
+ | </code> | ||
+ | **3)** On line 30 remove the ** %%//%% ** comment symbols from the code: \\ | ||
+ | <code> | ||
+ | $ret[$key] = dba_update($db_table, $values, $conditions); | ||
+ | </code> | ||
+ | **3)** Save the file. | ||
+ | |||
+ | As a result, the function's code should appear as: \\ | ||
+ | <code> | ||
+ | function registry_update($uid, $registry_group, $registry_family, $items) { | ||
+ | |||
+ | $ret = false; | ||
+ | |||
+ | $db_table = _DB_PREF_.'_tblRegistry'; | ||
+ | |||
+ | if (is_array($items)) { | ||
+ | |||
+ | foreach ($items as $key => $val) { | ||
+ | |||
+ | $conditions = array('uid' => $uid, 'registry_group' => $registry_group, 'registry_family' => $registry_family, 'registry_key' => $key); | ||
+ | |||
+ | $values = array('c_timestamp' => strtotime(core_get_datetime()), 'registry_value' => $val); | ||
+ | |||
+ | if (dba_count($db_table, $conditions)) { | ||
+ | |||
+ | $ret[$key] = dba_update($db_table, $values, $conditions); | ||
+ | |||
+ | //non fare uniente continua a scrivere | ||
+ | |||
+ | } else { | ||
+ | |||
+ | $ret[$key] = dba_add($db_table, array_merge($conditions, $values)); | ||
+ | } | ||
+ | |||
+ | unset($conditions); | ||
+ | unset($values); | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | </code> | ||
+ | |||