Changeset 1236
- Timestamp:
- 09/18/2008 01:01:22 AM (2 years ago)
- Files:
-
- 1 modified
-
branches/1.1.6.6/libs/Wakka.class.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/1.1.6.6/libs/Wakka.class.php
r1229 r1236 1670 1670 } 1671 1671 function SaveACL($tag, $privilege, $list) { 1672 // the $default will be put in the SET statement of the INSERT SQL for default values. It isn't used in UPDATE. 1673 $default = "read_acl = '', write_acl = '', comment_acl = '', "; 1674 // we strip the privilege_acl from default, to avoid redundancy 1675 $default = str_replace($privilege."_acl = '',", '', $default); 1672 1676 if ($this->LoadACL($tag, $privilege, 0)) $this->Query("UPDATE ".$this->config["table_prefix"]."acls SET ".mysql_real_escape_string($privilege)."_acl = '".mysql_real_escape_string(trim(str_replace("\r", "", $list)))."' WHERE page_tag = '".mysql_real_escape_string($tag)."' LIMIT 1"); 1673 else $this->Query("INSERT INTO ".$this->config["table_prefix"]."acls SET page_tag = '".mysql_real_escape_string($tag)."', ".mysql_real_escape_string($privilege)."_acl = '".mysql_real_escape_string(trim(str_replace("\r", "", $list)))."'");1677 else $this->Query("INSERT INTO ".$this->config["table_prefix"]."acls SET $default page_tag = '".mysql_real_escape_string($tag)."', ".mysql_real_escape_string($privilege)."_acl = '".mysql_real_escape_string(trim(str_replace("\r", "", $list)))."'"); 1674 1678 } 1675 1679 function TrimACLs($list) {