|
From: <txm...@us...> - 2014-06-25 08:46:27
|
Revision: 12646
http://sourceforge.net/p/xoops/svn/12646
Author: txmodxoops
Date: 2014-06-25 08:46:21 +0000 (Wed, 25 Jun 2014)
Log Message:
-----------
- Fixed bugs
- Still work to do
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/modinfo.php
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php 2014-06-24 22:36:12 UTC (rev 12645)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php 2014-06-25 08:46:21 UTC (rev 12646)
@@ -122,12 +122,10 @@
if ( $table->getVar('table_blocks') == 1) {
// Creation of "blocks" folder and index.html file
$this->structure->makeDirAndCopyFile('blocks', $indexFile, 'index.html');
- }
- if ( $table->getVar('table_name') != null) {
- // Creation of "class" folder and index.html file
- $this->structure->makeDirAndCopyFile('class', $indexFile, 'index.html');
- }
+ }
}
+ // Creation of "class" folder and index.html file
+ $this->structure->makeDirAndCopyFile('class', $indexFile, 'index.html');
// Creation of "assets" folder and index.html file
$this->structure->makeDirAndCopyFile('assets', $indexFile, 'index.html');
// Creation of "css" folder and index.html file
@@ -265,7 +263,11 @@
$ret[] = $userTemplatesPages->renderFile($stl_mod_name.'_'.$table_name.'.tpl');
}
/*var_dump($table_name); */
- }
+ }
+ // Language Modinfo File
+ $languageModinfo = LanguageModinfo::getInstance();
+ $languageModinfo->write($module, $table, $tables, 'modinfo.php');
+ $ret[] = $languageModinfo->render();
// Creation of blocks language file
if (is_object($table)) {
if ( $table->getVar('table_blocks') == 1) {
@@ -274,10 +276,7 @@
$languageBlocks->write($module, $tables, 'blocks.php');
$ret[] = $languageBlocks->render();
}
- // Language Modinfo File
- $languageModinfo = LanguageModinfo::getInstance();
- $languageModinfo->write($module, $table, $tables, 'modinfo.php');
- $ret[] = $languageModinfo->render();
+
// Creation of admin files
if ( $table->getVar('table_admin') == 1) {
// Admin Header File
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/modinfo.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/modinfo.php 2014-06-24 22:36:12 UTC (rev 12645)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/modinfo.php 2014-06-25 08:46:21 UTC (rev 12646)
@@ -73,7 +73,7 @@
* @param string $language
* @param array $tables
*/
- public function getMenu($language, $tables) {
+ public function getMenu($language, $table, $tables) {
$menu = 1;
$ret = <<<EOT
// Admin Menu
@@ -89,7 +89,7 @@
define('{$language}ADMENU{$menu}', "{$ucf_table_name}");\n
EOT;
}
- if ( $table_permissions != 0 ) {
+ if ( $table->getVar('table_permissions') == 1 ) {
$menu++;
$ret .= <<<EOT
define('{$language}ADMENU{$menu}', "Permissions");\n
@@ -283,19 +283,21 @@
$content .= $this->getMain($language, $module);
$content .= $this->getAdmin($language);
$content .= $this->getUser($language);
- $content .= $this->getMenu($language, $tables);
- $content .= $this->getBlocks($language, $tables);
- if ( $table->getVar('table_submenu') == 1 ) {
- $content .= $this->getSubmenu($language, $tables);
+ if (is_object($table)) {
+ if ( $table->getVar('table_submenu') == 1 ) {
+ $content .= $this->getSubmenu($language, $tables);
+ }
+ $content .= $this->getMenu($language, $table, $tables);
+ $content .= $this->getBlocks($language, $tables);
+ $content .= $this->getConfig($language, $table);
+ if ( $table->getVar('table_notifications') == 1 )
+ {
+ $content .= $this->getNotifications($language);
+ }
+ if ( $table->getVar('table_permissions') == 1 ) {
+ $content .= $this->getPermissions($language);
+ }
}
- $content .= $this->getConfig($language, $table);
- if ( $table->getVar('table_notifications') == 1 )
- {
- $content .= $this->getNotifications($language);
- }
- if ( $table->getVar('table_permissions') != 0 ) {
- $content .= $this->getPermissions($language);
- }
//
$this->tdmcfile->create($module_name, 'language/'.$GLOBALS['xoopsConfig']['language'], $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
return $this->tdmcfile->renderFile();
|