Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
fix(sql) fix default contact_autologin_key value
Browse files Browse the repository at this point in the history
  • Loading branch information
loiclau authored and callapa committed Nov 12, 2019
1 parent 78b9d30 commit 1d6676e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion www/include/Administration/myAccount/DB-Func.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ function updateContact($contact_id = null)
$rq .= "contact_js_effects = ";
isset($ret["contact_js_effects"]) ? $rq .= "'1', ": $rq .= "'0', ";
$rq .= "contact_autologin_key = ";
$rq .= isset($ret["contact_autologin_key"]) ? "'".$pearDB->escape($ret['contact_autologin_key'])."'" : "''";
$rq .= !empty($ret["contact_autologin_key"])
? "'" . $pearDB->escape($ret['contact_autologin_key']) . "'"
: "NULL ";
$rq .= "WHERE contact_id = '" . (int)$contact_id . "'";
$pearDB->query($rq);

Expand Down
3 changes: 3 additions & 0 deletions www/install/sql/centreon/Update-DB-2.8.29_to_2.8.30.sql
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
-- Change version of Centreon
UPDATE `informations` SET `value` = '2.8.30' WHERE CONVERT( `informations`.`key` USING utf8 ) = 'version' AND CONVERT ( `informations`.`value` USING utf8 ) = '2.8.29' LIMIT 1;

-- fix default contact_autologin_key
UPDATE `contact` SET `contact_autologin_key` = NULL WHERE `contact_autologin_key` =''

0 comments on commit 1d6676e

Please sign in to comment.