Browse Source

fixed hierarchy of namespace in plugin namespace

zoghal 11 years ago
parent
commit
8028762344

+ 1 - 1
src/Template/Error/missing_action.ctp

@@ -18,7 +18,7 @@ use Cake\Core\Plugin;
 
 $namespace = Configure::read('App.namespace');
 if (!empty($plugin)) {
-    $namespace = $plugin;
+    $namespace = str_replace('/', '\\', $plugin);
 }
 $prefixNs = '';
 if (!empty($prefix)) {

+ 1 - 1
src/Template/Error/missing_behavior.ctp

@@ -17,7 +17,7 @@ use Cake\Core\Configure;
 
 $namespace = Configure::read('App.namespace');
 if (!empty($plugin)) {
-    $namespace = $plugin;
+    $namespace = str_replace('/', '\\', $plugin);
 }
 
 $pluginPath = Configure::read('App.paths.plugins.0');

+ 1 - 1
src/Template/Error/missing_component.ctp

@@ -17,7 +17,7 @@ use Cake\Core\Configure;
 
 $namespace = Configure::read('App.namespace');
 if (!empty($plugin)) {
-    $namespace = $plugin;
+    $namespace = str_replace('/', '\\', $plugin);
 }
 
 $pluginPath = Configure::read('App.paths.plugins.0');

+ 1 - 1
src/Template/Error/missing_controller.ctp

@@ -28,7 +28,7 @@ if (!empty($prefix)) {
 }
 
 if (!empty($plugin)) {
-    $namespace = $plugin;
+    $namespace = str_replace('/', '\\', $plugin);
 }
 if (empty($plugin)) {
     $path = APP_DIR . DS . 'Controller' . DS . $prefixPath . h($class) . 'Controller.php' ;

+ 1 - 1
src/Template/Error/missing_helper.ctp

@@ -17,7 +17,7 @@ use Cake\Core\Configure;
 
 $namespace = Configure::read('App.namespace');
 if (!empty($plugin)) {
-    $namespace = $plugin;
+    $namespace = str_replace('/', '\\', $plugin);
 }
 
 $pluginPath = Configure::read('App.paths.plugins.0');

+ 1 - 1
src/Template/Error/missing_view.ctp

@@ -21,7 +21,7 @@ $pluginDot = empty($plugin) ? null : $plugin . '.';
 
 if (empty($plugin)) {
     $filePath = APP_DIR . DS;
-    $namespace = $plugin;
+    $namespace = str_replace('/', '\\', $plugin);
 }
 if (!empty($plugin) && Plugin::loaded($plugin)) {
     $filePath = Plugin::classPath($plugin);