Changeset 601 for trunk/lib/ACL.inc.php
- Timestamp:
- Apr 27, 2017 4:43:35 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/ACL.inc.php
r534 r601 162 162 163 163 // acl_tbl 164 $db->query( "164 $db->query(sprintf(" 165 165 CREATE TABLE IF NOT EXISTS acl_tbl ( 166 166 aro_id SMALLINT UNSIGNED NOT NULL DEFAULT '0', … … 168 168 axo_id SMALLINT UNSIGNED NOT NULL DEFAULT '0', 169 169 access ENUM('allow', 'deny') DEFAULT NULL, 170 added_datetime DATETIME NOT NULL DEFAULT ' 0000-00-0000:00:00',170 added_datetime DATETIME NOT NULL DEFAULT '%s 00:00:00', 171 171 UNIQUE KEY (aro_id, aco_id, axo_id), 172 172 KEY (access) 173 173 ) ENGINE=MyISAM 174 " );174 ", $db->getParam('zero_date'))); 175 175 if (!$db->columnExists('acl_tbl', array( 176 176 'aro_id', … … 192 192 // aro_tbl, aco_tbl, axo_tbl 193 193 foreach (array('aro', 'aco', 'axo') as $a_o) { 194 $db->query( "195 CREATE TABLE IF NOT EXISTS {$a_o}_tbl (196 {$a_o}_id SMALLINT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,197 name VARCHAR( " . $this->getParam('name_max_length') . ") NOT NULL DEFAULT '',194 $db->query(sprintf(" 195 CREATE TABLE IF NOT EXISTS %1\$s_tbl ( 196 %1\$s_id SMALLINT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, 197 name VARCHAR(%2\$s) NOT NULL DEFAULT '', 198 198 lft MEDIUMINT UNSIGNED NOT NULL DEFAULT '0', 199 199 rgt MEDIUMINT UNSIGNED NOT NULL DEFAULT '0', 200 added_datetime DATETIME NOT NULL DEFAULT ' 0000-00-0000:00:00',200 added_datetime DATETIME NOT NULL DEFAULT '%3\$s 00:00:00', 201 201 UNIQUE KEY name (name(15)), 202 202 KEY transversal (lft, rgt) 203 203 ) ENGINE=MyISAM; 204 " );204 ", $a_o, $this->getParam('name_max_length'), $db->getParam('zero_date'))); 205 205 206 206 if (!$db->columnExists("{$a_o}_tbl", array(
Note: See TracChangeset
for help on using the changeset viewer.