diff --git a/htdocs/blockedlog/admin/blockedlog_list.php b/htdocs/blockedlog/admin/blockedlog_list.php index 27e643d217b..9284c58df00 100644 --- a/htdocs/blockedlog/admin/blockedlog_list.php +++ b/htdocs/blockedlog/admin/blockedlog_list.php @@ -297,7 +297,6 @@ if (GETPOST('downloadcsv', 'alpha')) { $block_static->object_version = $obj->object_version; // Not in signature $block_static->object_format = $obj->object_format; // Not in signature - $block_static->signature_line = $obj->signature_line; $block_static->certified = ($obj->certified == 1); $block_static->linktoref = $obj->linktoref; diff --git a/htdocs/blockedlog/class/blockedlog.class.php b/htdocs/blockedlog/class/blockedlog.class.php index f4b5f96d9a7..a56ef37df0b 100644 --- a/htdocs/blockedlog/class/blockedlog.class.php +++ b/htdocs/blockedlog/class/blockedlog.class.php @@ -66,12 +66,6 @@ class BlockedLog */ public $signature = ''; - /** - * Unique fingerprint of the line log content - * @var string - */ - public $signature_line = ''; - /** * @var float|string|null */ @@ -869,7 +863,7 @@ class BlockedLog return -1; } - $sql = "SELECT b.rowid, b.date_creation, b.signature, b.signature_line, b.amounts, b.action, b.element, b.fk_object, b.entity,"; + $sql = "SELECT b.rowid, b.date_creation, b.signature, b.amounts, b.action, b.element, b.fk_object, b.entity,"; $sql .= " b.certified, b.tms, b.fk_user, b.user_fullname, b.date_object, b.ref_object, b.object_data, b.object_version, b.object_format"; $sql .= " FROM ".MAIN_DB_PREFIX."blockedlog as b"; if ($id) { @@ -902,7 +896,6 @@ class BlockedLog $this->object_format = $obj->object_format; $this->signature = $obj->signature; - $this->signature_line = $obj->signature_line; $this->certified = ($obj->certified == 1); return 1; @@ -1040,20 +1033,17 @@ class BlockedLog // For debug: $this->debuginfo = $this->buildFirstPartOfKeyForSignature(); // Note used - // signature_line is useless. Abandoned. - //$this->signature_line = dol_hash($concatenatedata, '5'); // Not really useful if ($forcesignature) { $this->signature = $forcesignature; } - //var_dump($concatenatedata);var_dump($previoushash);var_dump($this->signature_line);var_dump($this->signature); + //var_dump($concatenatedata);var_dump($previoushash);var_dump($this->signature); $sql = "INSERT INTO ".MAIN_DB_PREFIX."blockedlog ("; $sql .= " date_creation,"; $sql .= " action,"; $sql .= " amounts,"; $sql .= " signature,"; - $sql .= " signature_line,"; $sql .= " element,"; $sql .= " fk_object,"; $sql .= " date_object,"; @@ -1071,7 +1061,6 @@ class BlockedLog $sql .= "'".$this->db->escape($this->action)."',"; $sql .= $this->amounts.","; $sql .= "'".$this->db->escape($this->signature)."',"; - $sql .= "'".$this->db->escape($this->signature_line)."',"; $sql .= "'".$this->db->escape($this->element)."',"; $sql .= (int) $this->fk_object.","; $sql .= "'".$this->db->idate($this->date_object)."',"; @@ -1138,7 +1127,6 @@ class BlockedLog // Build the string for the signature $concatenatedata = $this->buildKeyForSignature(); - //$signature_line = dol_hash($concatenatedata, '5'); // Not useful. Abandoned. $signature = $this->buildFinalSignatureHash($previoushash.$concatenatedata); } catch (Exception $e) { $res = ($signature === $this->signature); diff --git a/htdocs/install/mysql/migration/22.0.0-23.0.0.sql b/htdocs/install/mysql/migration/22.0.0-23.0.0.sql index 5f482ecb116..759d5870d84 100644 --- a/htdocs/install/mysql/migration/22.0.0-23.0.0.sql +++ b/htdocs/install/mysql/migration/22.0.0-23.0.0.sql @@ -339,4 +339,6 @@ INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'CDF' ALTER TABLE llx_societe MODIFY COLUMN mode_reglement integer; +ALTER TABLE llx_blockedlog DROP COLUMN signature_line; + -- end of migration diff --git a/htdocs/install/mysql/tables/llx_blockedlog.sql b/htdocs/install/mysql/tables/llx_blockedlog.sql index 71d349b6699..8501973dd63 100644 --- a/htdocs/install/mysql/tables/llx_blockedlog.sql +++ b/htdocs/install/mysql/tables/llx_blockedlog.sql @@ -37,7 +37,6 @@ CREATE TABLE llx_blockedlog element varchar(50), fk_user integer, fk_object integer, - signature_line varchar(100) NOT NULL, -- the hash of the key for signature for line only so without previous hash before (not used) object_version varchar(32) DEFAULT '', -- in which version did the line was recorded certified integer, tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,