Просмотр исходного кода

[ZF-9729] Zend_Tool

- Fixed added config default module directory when create a module.

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@23418 44c647ce-9c0f-0410-b52a-842ac1e357ba
ramon 15 лет назад
Родитель
Сommit
4136bf47c4
1 измененных файлов с 8 добавлено и 3 удалено
  1. 8 3
      library/Zend/Tool/Project/Provider/Module.php

+ 8 - 3
library/Zend/Tool/Project/Provider/Module.php

@@ -154,14 +154,19 @@ class Zend_Tool_Project_Provider_Module
                 $response->appendContent($resource->getContext()->getPath());
                 $resource->create();
             }
-            
+
+            $response->appendContent('Added a key for path module directory to the application.ini file');
+            $appConfigFile = $this->_loadedProfile->search('ApplicationConfigFile');
+            $appConfigFile->removeStringItem('resources.frontController.moduleDirectory', 'production');
+            $appConfigFile->addStringItem('resources.frontController.moduleDirectory', 'APPLICATION_PATH "/modules"', 'production', false);
+
             if (strtolower($name) == 'default') {
                 $response->appendContent('Added a key for the default module to the application.ini file');
-                $appConfigFile = $this->_loadedProfile->search('ApplicationConfigFile');
                 $appConfigFile->addStringItem('resources.frontController.params.prefixDefaultModule', '1', 'production');
-                $appConfigFile->create();
             }
 
+            $appConfigFile->create();
+
             // store changes to the profile
             $this->_storeProfile();
         }