server/serverconfig.py
changeset 2476 1294a6bdf3bf
parent 2107 6c4a4c514ac2
child 2489 37a747ad6fd4
--- a/server/serverconfig.py	Fri Jul 24 13:50:59 2009 +0200
+++ b/server/serverconfig.py	Fri Jul 24 14:33:37 2009 +0200
@@ -171,7 +171,7 @@
           'help': 'Pyro server port. If not set, it will be choosen randomly',
           'group': 'pyro-server', 'inputlevel': 2,
           }),
-        ('pyro-id', # XXX reuse pyro-application-id
+        ('pyro-id', # XXX reuse pyro-instance-id
          {'type' : 'string',
           'default': None,
           'help': 'identifier of the repository in the pyro name server',
@@ -180,7 +180,7 @@
         ) + CubicWebConfiguration.options)
 
     # read the schema from the database
-    read_application_schema = True
+    read_instance_schema = True
     bootstrap_schema = True
 
     # check user's state at login time
@@ -193,7 +193,7 @@
     schema_hooks = True
     notification_hooks = True
     security_hooks = True
-    application_hooks = True
+    instance_hooks = True
 
     # should some hooks be deactivated during [pre|post]create script execution
     free_wheel = False
@@ -208,7 +208,7 @@
 
     @classmethod
     def schemas_lib_dir(cls):
-        """application schema directory"""
+        """instance schema directory"""
         return env_path('CW_SCHEMA_LIB', cls.SCHEMAS_LIB_DIR, 'schemas')
 
     @classmethod
@@ -269,23 +269,6 @@
 
     def load_hooks(self, vreg):
         hooks = {}
-        for path in reversed([self.apphome] + self.cubes_path()):
-            hooksfile = join(path, 'application_hooks.py')
-            if exists(hooksfile):
-                self.warning('application_hooks.py is deprecated, use dynamic '
-                             'objects to register hooks (%s)', hooksfile)
-                context = {}
-                # Use execfile rather than `load_module_from_name` because
-                # the latter gets fooled by the `sys.modules` cache when
-                # loading different configurations one after the other
-                # (another fix would have been to do :
-                #    sys.modules.pop('applications_hooks')
-                #  or to modify load_module_from_name so that it provides
-                #  a use_cache optional parameter
-                execfile(hooksfile, context, context)
-                for event, hooksdef in context['HOOKS'].items():
-                    for ertype, hookcbs in hooksdef.items():
-                        hooks.setdefault(event, {}).setdefault(ertype, []).extend(hookcbs)
         try:
             apphookdefs = vreg.registry_objects('hooks')
         except RegistryNotFound: