]> git.andy128k.dev Git - ipf.git/commitdiff
since now explicit admin component creation only is allowed
authorAndrey Kutejko <andy128k@gmail.com>
Sun, 24 Aug 2014 19:27:07 +0000 (22:27 +0300)
committerAndrey Kutejko <andy128k@gmail.com>
Sun, 24 Aug 2014 19:27:07 +0000 (22:27 +0300)
ipf/admin/app.php
ipf/admin/legacymodel.php
ipf/legacy_orm/orm/import/builder.php

index 30a6365a3ba6237111fb9e8c458c590ee78d9390..0a52074135c66ece2ad74d10d460497ad6748e0e 100644 (file)
@@ -54,16 +54,6 @@ class IPF_Admin_App extends IPF_Application
                 }
             }
 
-            // legacy ORM
-            foreach (IPF_Legacy_ORM_App::appModelList($app) as $m) {
-                new $m; // autoload
-                $ma = IPF_Admin_Model::getModelAdmin($m);
-                if ($ma) {
-                    $ma->app = $app;
-                    $components[] = $ma;
-                }
-            }
-
             self::$appComponents[$app->slug()] = $components;
         }
         return self::$appComponents[$app->slug()];
index aaad49f7d8e7f084cd1b9c48eeb88238d5a9a0cc..bd66841465335bbae1e78376441bf650275ecfc1 100644 (file)
@@ -2,21 +2,6 @@
 
 class IPF_Admin_Model extends IPF_Admin_Component
 {
-    static $models = array();
-
-    public static function register($classModel, $classAdmin)
-    {
-        self::$models[$classModel] = new $classAdmin($classModel);
-    }
-
-    public static function getModelAdmin($classModel)
-    {
-        if (array_key_exists($classModel, self::$models)) {
-            return self::$models[$classModel];
-        }
-        return null;
-    }
-
     public $modelName;
 
     public function __construct($modelName)
index 7a398adbbcf41fa06b3f57c2c41129addd4d7379..9aaae7092c53218a9a49ecee159a8cef00756594 100644 (file)
@@ -374,7 +374,8 @@ class IPF_ORM_Import_Builder
             '{',
             '}',
             '',
-            'IPF_Admin_Model::register(\''.$className.'\', \''.$adminClassName.'\');',
+            '// Add following line to your admin.php to enable admin interface for this model',
+            "new $adminClassName('$className'),",
             '*/',
             '',
         );