Author: tdraier
Date: Fri Sep 21 10:37:55 2007
New Revision: 18590

URL: https://svndev.jahia.net/websvn/listing.php?sc=3D1&rev=3D18590&repname=
=3Djahia
Log:
optimize deletion of old acls (JAHIA-2212) ( port 18406 )

Modified:
    trunk/core/src/webapp/WEB-INF/etc/patches/aclpatch_17886.groovy

Modified: trunk/core/src/webapp/WEB-INF/etc/patches/aclpatch_17886.groovy
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/trunk/core/src/webapp=
/WEB-INF/etc/patches/aclpatch_17886.groovy&rev=3D18590&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/core/src/webapp/WEB-INF/etc/patches/aclpatch_17886.groovy (origin=
al)
+++ trunk/core/src/webapp/WEB-INF/etc/patches/aclpatch_17886.groovy Fri Sep=
 21 10:37:55 2007
@@ -145,13 +145,16 @@
 =

 parseObjectForPickers(connection)
 =

-JahiaAclManager aclManager =3D (JahiaAclManager) SpringContextSingleton.ge=
tInstance().getContext().getBean(JahiaAclManager.class.getName());
+PreparedStatement delete =3D connection.prepareStatement("delete from jahi=
a_acl where id_jahia_acl=3D?")
+
 Iterator iterator =3D toDelete.iterator();
 while (iterator.hasNext()) {
+    Integer acl =3D (Integer) iterator.next();
     try {
-        Integer acl =3D (Integer) iterator.next();
-        aclManager.remove(""+acl);
+        delete.setInt(1, acl.intValue())
+        delete.execute();
     } catch (Exception e) {
+        println("Cannot delete acl "+acl+ ", "+e.getMessage())
     }
 }
 connection.close();

_______________________________________________
cvs_list mailing list
[email protected]
http://lists.jahia.org/cgi-bin/mailman/listinfo/cvs_list

Reply via email to