|
|
| $trusted_table = "cutrustedmaster" |
| |
|
| $trusted_default |
| |
Updates trusted master to include testers for DMI
Definition at line 13 of file 2019101800_updDMITrustedMaster.php.
◆ down()
| updDMITrustedMaster::down |
( |
| ) |
|
Assuming the previous state was properly added without testers, re-add it as such.
- Returns
- void
Definition at line 124 of file 2019101800_updDMITrustedMaster.php.
126 $def = $this->trusted_default;
127 unset ($def[
'trustedfields'][
'testers']);
129 $sql =
"update {$this->trusted_table} set trustedfields = E'" 130 . json_encode($def[
'trustedfields'])
131 .
"' where trustedid = '{$def['trustedid']}'";
133 echo
" reversing update {$def['trustedid']} trusted master\n";
◆ up()
| updDMITrustedMaster::up |
( |
| ) |
|
See if Dovenmuehle DMI exists, if so, update it to force the testers entry and updated default values for URLS
Since trustedid is unique key to table, counting on only one DMI entry
- Returns
- void
Definition at line 88 of file 2019101800_updDMITrustedMaster.php.
90 if ($this->hasTable($this->trusted_table)) {
92 $def = $this->trusted_default;
93 $sql =
"select * from {$this->trusted_table} where trustedid = '{$def['trustedid']}'";
95 # note appears that fetchRow always returns count of 1, even if no row is found. 96 # using fetchAll even though I expect max 1 record (trustedid is unique key) 98 $trusted_row = $this->fetchAll($sql);
100 if (count($trusted_row) > 0) {
101 $sql =
"update {$this->trusted_table} set trustedfields = E'" 102 . json_encode($def[
'trustedfields'])
103 .
"' where trustedid = '{$def['trustedid']}'";
105 echo
" updating {$def['trustedid']} trusted master\n";
110 $sql =
"insert into {$this->trusted_table} (trustedid, trustedvendor, trustedtype, hcuinterface, trustedfields)" 111 .
" values('{$def['trustedid']}', '{$def['trustedvendor']}', '{$def['trustedtype']}'," 112 .
" E'{$def['hcuinterface']}', E'" . json_encode($def[
'trustedfields']) .
"')";
114 echo
" inserting {$def['trustedid']} trusted master\n";
The documentation for this class was generated from the following file: