From 515443d40338c11d69cf0722b5166b5420604c27 Mon Sep 17 00:00:00 2001
From: Julien Muchembled <jm@nexedi.com>
Date: Fri, 8 Mar 2013 19:06:56 +0100
Subject: [PATCH] ZMySQLDA: really fix copy & paste of deferred connection

See commit 1472c7e9464fc959335116663e811d284bddd094

Also remove deprecated 'methods' Product attribute.
---
 product/ZMySQLDA/DA.py       |  7 -------
 product/ZMySQLDA/__init__.py | 13 +++++--------
 2 files changed, 5 insertions(+), 15 deletions(-)

diff --git a/product/ZMySQLDA/DA.py b/product/ZMySQLDA/DA.py
index f95b1110c4..2900a0223a 100644
--- a/product/ZMySQLDA/DA.py
+++ b/product/ZMySQLDA/DA.py
@@ -194,13 +194,6 @@ m.DeferredConnection = DeferredConnection
 del m
 
 
-folder_methods={
-    'manage_addZMySQLConnection':
-    manage_addZMySQLConnection,
-    'manage_addZMySQLConnectionForm':
-    manage_addZMySQLConnectionForm,
-    }
-
 __ac_permissions__=(
     ('Add Z MySQL Database Connections',
      ('manage_addZMySQLConnectionForm',
diff --git a/product/ZMySQLDA/__init__.py b/product/ZMySQLDA/__init__.py
index 46553450ee..3791aedeb4 100644
--- a/product/ZMySQLDA/__init__.py
+++ b/product/ZMySQLDA/__init__.py
@@ -89,20 +89,17 @@ __version__='$Revision: 1.4 $'[11:-2]
 
 from . import DA
 
-methods=DA.folder_methods
 misc_=DA.misc_
 
 def initialize(context):
 
-    permission = "Add Z MySQL Database Connections"
     context.registerClass(
         DA.Connection,
-        permission=permission,
+        permission="Add Z MySQL Database Connections",
         constructors=(DA.manage_addZMySQLConnectionForm,
                       DA.manage_addZMySQLConnection),
     )
-    context.registerClass(
-        DA.DeferredConnection,
-        permission=permission,
-        visibility=None,
-    )
+    import Products
+    Products.meta_types += dict(Products.meta_types[-1],
+        name=DA.DeferredConnection.meta_type,
+        action=None),
-- 
2.30.9