diff --git a/classes/TCreateConfigDataBase.class.php b/classes/TCreateConfigDataBase.class.php index 9ef3d8f..f4c1dca 100644 --- a/classes/TCreateConfigDataBase.class.php +++ b/classes/TCreateConfigDataBase.class.php @@ -11,7 +11,7 @@ class TCreateConfigDataBase extends TCreateFileContent{ public function __construct(){ $this->setFileName('config_conexao.php'); - $path = ROOT_PATH.$_SESSION[APLICATIVO]['GEN_SYSTEM_ACRONYM'].DS.'includes'.DS; + $path = TGeneratorHelper::getPathNewSystem().DS.'includes'.DS; $this->setFilePath($path); } //-------------------------------------------------------------------------------------- diff --git a/classes/TCreateConstants.class.php b/classes/TCreateConstants.class.php index 5d1f0f7..45351ce 100644 --- a/classes/TCreateConstants.class.php +++ b/classes/TCreateConstants.class.php @@ -11,7 +11,7 @@ class TCreateConstants extends TCreateFileContent{ public function __construct(){ $this->setFileName('constantes.php'); - $path = ROOT_PATH.$_SESSION[APLICATIVO]['GEN_SYSTEM_ACRONYM'].DS.'includes'.DS; + $path = TGeneratorHelper::getPathNewSystem().DS.'includes'.DS; $this->setFilePath($path); } //-------------------------------------------------------------------------------------- diff --git a/classes/TCreateDAO.class.php b/classes/TCreateDAO.class.php index 7de439b..e419499 100644 --- a/classes/TCreateDAO.class.php +++ b/classes/TCreateDAO.class.php @@ -42,7 +42,7 @@ if(!defined('EOL')){ define('EOL',"\n"); } if(!defined('TAB')){ define('TAB',chr(9)); } -class TDAOCreate { +class TCreateDAO { private $tableName; private $aColumns; private $lines; diff --git a/classes/TCreateForm.class.php b/classes/TCreateForm.class.php index dbf1134..fcbfd98 100644 --- a/classes/TCreateForm.class.php +++ b/classes/TCreateForm.class.php @@ -42,7 +42,7 @@ if(!defined('EOL')){ define('EOL',"\n"); } if(!defined('TAB')){ define('TAB',chr(9)); } if(!defined('DS')){ define('DS',DIRECTORY_SEPARATOR); } -class TFormCreate { +class TCreateForm { private $formTitle; private $formPath; private $formFileName; diff --git a/classes/TCreateIndex.class.php b/classes/TCreateIndex.class.php index 446c469..7f4f958 100644 --- a/classes/TCreateIndex.class.php +++ b/classes/TCreateIndex.class.php @@ -10,7 +10,7 @@ class TCreateIndex extends TCreateFileContent{ public function __construct(){ $this->setFileName('index.php'); - $path = ROOT_PATH.$_SESSION[APLICATIVO]['GEN_SYSTEM_ACRONYM'].DS; + $path = TGeneratorHelper::getPathNewSystem().DS; $this->setFilePath($path); } //-------------------------------------------------------------------------------------- diff --git a/classes/TCreateMenu.class.php b/classes/TCreateMenu.class.php index 3810b01..ad7c5a9 100644 --- a/classes/TCreateMenu.class.php +++ b/classes/TCreateMenu.class.php @@ -12,7 +12,7 @@ class TCreateMenu extends TCreateFileContent{ public function __construct($listTableNames){ $this->setFileName('menu.php'); - $path = ROOT_PATH.$_SESSION[APLICATIVO]['GEN_SYSTEM_ACRONYM'].DS.'includes'.DS; + $path = TGeneratorHelper::getPathNewSystem().DS.'includes'.DS; $this->setFilePath($path); $this->setListTableNames($listTableNames); } diff --git a/classes/TGeneratorHelper.class.php b/classes/TGeneratorHelper.class.php index 9c873e7..745291d 100644 --- a/classes/TGeneratorHelper.class.php +++ b/classes/TGeneratorHelper.class.php @@ -136,9 +136,12 @@ public static function mkDir($path){ mkdir($path, 0744, true); } } + public static function getPathNewSystem(){ + return ROOT_PATH.$_SESSION[APLICATIVO]['GEN_SYSTEM_ACRONYM']; + } public static function copySystemSkeletonToNewSystem(){ - $pathNewSystem = ROOT_PATH.$_SESSION[APLICATIVO]['GEN_SYSTEM_ACRONYM']; + $pathNewSystem = self::getPathNewSystem(); $pathSkeleton = 'system_skeleton'; $list = new RecursiveDirectoryIterator($pathSkeleton); diff --git a/modulos/gen00.php b/modulos/gen00.php index da71a42..83c854c 100644 --- a/modulos/gen00.php +++ b/modulos/gen00.php @@ -37,7 +37,7 @@ if ( $frm->validate() ) { try{ $GEN_SYSTEM_ACRONYM = strtolower($frm->get('GEN_SYSTEM_ACRONYM')); - FolderHelper::validateFolderName($GEN_SYSTEM_ACRONYM); + TGeneratorHelper::validateFolderName($GEN_SYSTEM_ACRONYM); $_SESSION[APLICATIVO]=null; $_SESSION[APLICATIVO]['DBMS']['TYPE']=$frm->get('DBMS'); $_SESSION[APLICATIVO]['GEN_SYSTEM_ACRONYM']=$GEN_SYSTEM_ACRONYM; diff --git a/modulos/gen02.php b/modulos/gen02.php index 7075039..5a82106 100644 --- a/modulos/gen02.php +++ b/modulos/gen02.php @@ -43,17 +43,17 @@ $listTables = TGeneratorHelper::loadTablesFromDatabase(); $path = ROOT_PATH.$_SESSION[APLICATIVO]['GEN_SYSTEM_ACRONYM']; - FolderHelper::mkDir($path); + TGeneratorHelper::mkDir($path); $html->add(TGeneratorHelper::showMsg(true, Message::GEN02_MKDIR_SYSTEM.$path)); - FolderHelper::copySystemSkeletonToNewSystem(); + TGeneratorHelper::copySystemSkeletonToNewSystem(); $html->add(TGeneratorHelper::showMsg(true, Message::GEN02_COPY_SYSTEM_SKELETON)); - FolderHelper::createFileConstants(); + TGeneratorHelper::createFileConstants(); $html->add(TGeneratorHelper::showMsg(true, Message::GEN02_CREATED_CONSTANTS)); - FolderHelper::createFileConfigDataBase(); + TGeneratorHelper::createFileConfigDataBase(); $html->add(TGeneratorHelper::showMsg(true, Message::GEN02_CREATED_CONFIG_DATABASE)); - FolderHelper::createFileMenu($listTables); + TGeneratorHelper::createFileMenu($listTables); $html->add(TGeneratorHelper::showMsg(true, Message::GEN02_CREATED_MENU)); - FolderHelper::createFileIndex(); + TGeneratorHelper::createFileIndex(); $html->add(TGeneratorHelper::showMsg(true, Message::GEN02_CREATED_INDEX)); $_SESSION[APLICATIVO]['STEP2']=true;