From 810b0e693fbb1e4b46dac56de831eb033c3bcdc5 Mon Sep 17 00:00:00 2001 From: Romain Neutron Date: Thu, 19 Dec 2013 20:15:09 +0100 Subject: [PATCH 1/2] Remove table sselnew --- lib/classes/User/Adapter.php | 5 ---- lib/conf.d/bases_structure.xml | 52 ---------------------------------- 2 files changed, 57 deletions(-) diff --git a/lib/classes/User/Adapter.php b/lib/classes/User/Adapter.php index 57df9f27a5..a6ba399d3b 100644 --- a/lib/classes/User/Adapter.php +++ b/lib/classes/User/Adapter.php @@ -1019,11 +1019,6 @@ class User_Adapter implements User_Interface, cache_cacheableInterface $stmt->execute(array(':usr_id' => $this->get_id())); $stmt->closeCursor(); - $sql = 'DELETE FROM sselnew WHERE usr_id = :usr_id'; - $stmt = $this->app['phraseanet.appbox']->get_connection()->prepare($sql); - $stmt->execute(array(':usr_id' => $this->get_id())); - $stmt->closeCursor(); - $sql = 'DELETE FROM tokens WHERE usr_id = :usr_id'; $stmt = $this->app['phraseanet.appbox']->get_connection()->prepare($sql); $stmt->execute(array(':usr_id' => $this->get_id())); diff --git a/lib/conf.d/bases_structure.xml b/lib/conf.d/bases_structure.xml index dc4759dbc2..5b9d16568e 100644 --- a/lib/conf.d/bases_structure.xml +++ b/lib/conf.d/bases_structure.xml @@ -3267,58 +3267,6 @@ InnoDB - - - - id - int(11) unsigned - - auto_increment - - - - - - - ssel_id - int(11) unsigned - - - - - 0 - - - - usr_id - int(11) unsigned - - - - - 0 - - - - - - PRIMARY - PRIMARY - - id - - - - couple - UNIQUE - - ssel_id - usr_id - - - - InnoDB -
From 2804aeaf8ede5289d112dc4f31cc3ba505d5b912 Mon Sep 17 00:00:00 2001 From: Romain Neutron Date: Thu, 19 Dec 2013 20:28:24 +0100 Subject: [PATCH 2/2] Fix 1634 : Template application bypass status bit restrictions --- lib/classes/ACL.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/classes/ACL.php b/lib/classes/ACL.php index 8ad38be97a..ab00af6cdf 100644 --- a/lib/classes/ACL.php +++ b/lib/classes/ACL.php @@ -355,20 +355,17 @@ class ACL implements cache_cacheableInterface $mask_and = $template_user->ACL()->get_mask_and($base_id); $mask_xor = $template_user->ACL()->get_mask_xor($base_id); - $mask_and = ctype_digit($mask_and) ? $mask_and : '0'; - $mask_xor = ctype_digit($mask_xor) ? $mask_xor : '0'; - /** * apply sb is substractive */ $mand = substr( str_repeat('0', 32) - . databox_status::dec2bin($this->app, $mask_and) + . decbin($mask_and) , -32 ); $mxor = substr( str_repeat('0', 32) - . databox_status::dec2bin($this->app, $mask_xor) + . decbin($mask_xor) , -32 ); $m = array('aa' => '', 'ao' => '', 'xa' => '', 'xo' => '');