|
From: <txm...@us...> - 2014-06-03 23:17:17
|
Revision: 12562
http://sourceforge.net/p/xoops/svn/12562
Author: txmodxoops
Date: 2014-06-03 23:17:10 +0000 (Tue, 03 Jun 2014)
Log Message:
-----------
Fixed many bugs
Updated
Work in progress
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_about.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_footer.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_header.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_index.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_menu.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_pages.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_permissions.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_templates.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks_files.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks_templates.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/class_files.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/css_styles.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/docs_changelog.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/docs_files.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_comments.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_common.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_functions.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_install.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_jquery.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_notifications.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_search.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language_admin.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language_blocks.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language_help.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language_main.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language_modinfo.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/sql_files.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_footer.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_header.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_index.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_pages.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_footer.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_header.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_index.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_notification_update.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_pages.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_print.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_rss.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_submit.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_templates.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_xoopsversion.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/common.php
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_about.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_about.php 2014-06-02 20:02:11 UTC (rev 12561)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_about.php 2014-06-03 23:17:10 UTC (rev 12562)
@@ -29,28 +29,33 @@
/*
* @public function constructor
- * @param string $module
- * @param string $filename
+ * @param null
*/
- public function __construct($module, $filename) {
+ public function __construct() {
$this->tdmcfile = TDMCreateFile::getInstance();
- $this->setModule($module);
- $this->setFileName($filename);
}
/*
* @static function &getInstance
- * @param string $module
- * @param string $filename
+ * @param null
*/
- public static function &getInstance($module, $filename)
+ public static function &getInstance()
{
static $instance = false;
if (!$instance) {
- $instance = new self($module, $filename);
+ $instance = new self();
}
return $instance;
}
/*
+ * @public function write
+ * @param string $module
+ * @param string $filename
+ */
+ public function write($module, $filename) {
+ $this->setModule($module);
+ $this->setFileName($filename);
+ }
+ /*
* @public function render
* @param null
*/
@@ -63,7 +68,7 @@
$content .= <<<EOT
include 'header.php';
echo \$adminMenu->addNavigation('about.php');
-echo \$adminMenu->renderAbout('$module_donations', false);
+echo \$adminMenu->renderAbout('{$module_donations}', false);
include 'footer.php';
EOT;
$this->tdmcfile->create($module_name, 'admin', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_footer.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_footer.php 2014-06-02 20:02:11 UTC (rev 12561)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_footer.php 2014-06-03 23:17:10 UTC (rev 12562)
@@ -32,25 +32,32 @@
* @param string $modules
* @param string $filename
*/
- public function __construct($module, $filename) {
- $this->tdmcfile = TDMCreateFile::getInstance();
- $this->setModule($module);
- $this->setFileName($filename);
+ public function __construct() {
+ $this->tdmcfile = TDMCreateFile::getInstance();
}
/*
* @static function &getInstance
* @param string $module
* @param string $filename
*/
- public static function &getInstance($module, $filename)
+ public static function &getInstance()
{
static $instance = false;
if (!$instance) {
- $instance = new self($module, $filename);
+ $instance = new self();
}
return $instance;
}
/*
+ * @public function write
+ * @param string $module
+ * @param string $filename
+ */
+ public function write($module, $filename) {
+ $this->setModule($module);
+ $this->setFileName($filename);
+ }
+ /*
* @public function render
* @param null
*/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_header.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_header.php 2014-06-02 20:02:11 UTC (rev 12561)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_header.php 2014-06-03 23:17:10 UTC (rev 12562)
@@ -36,33 +36,36 @@
private $tables = null;
/*
* @public function constructor
- * @param string $module
- * @param mixed $table
- * @param string $filename
+ * @param null
*/
- public function __construct($module, $table, $tables, $filename) {
- $this->tdmcfile = TDMCreateFile::getInstance();
- $this->setModule($module);
- //$this->setTable($table);
- $this->setFileName($filename);
- $this->table = $table;
- $this->tables = $tables;
+ public function __construct() {
+ $this->tdmcfile = TDMCreateFile::getInstance();
}
/*
* @static function &getInstance
- * @param string $module
- * @param mixed $table
- * @param string $filename
+ * @param null
*/
- public static function &getInstance($module, $table, $tables, $filename)
+ public static function &getInstance()
{
static $instance = false;
if (!$instance) {
- $instance = new self($module, $table, $tables, $filename);
+ $instance = new self();
}
return $instance;
- }
+ }
/*
+ * @public function write
+ * @param string $module
+ * @param mixed $table
+ * @param string $filename
+ */
+ public function write($module, $table, $tables, $filename) {
+ $this->setModule($module);
+ $this->setFileName($filename);
+ $this->table = $table;
+ $this->tables = $tables;
+ }
+ /*
* @public function render
* @param null
*/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_index.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_index.php 2014-06-02 20:02:11 UTC (rev 12561)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_index.php 2014-06-03 23:17:10 UTC (rev 12562)
@@ -36,33 +36,36 @@
private $tables = null;
/*
* @public function constructor
- * @param string $module
- * @param mixed $table
- * @param string $filename
+ * @param null
*/
- public function __construct($module, $table, $tables, $filename) {
- $this->tdmcfile = TDMCreateFile::getInstance();
- $this->setModule($module);
- //$this->setTable($table);
- $this->setFileName($filename);
- $this->table = $table;
- $this->tables = $tables;
+ public function __construct() {
+ $this->tdmcfile = TDMCreateFile::getInstance();
}
/*
* @static function &getInstance
- * @param string $module
- * @param mixed $table
- * @param string $filename
+ * @param null
*/
- public static function &getInstance($module, $table, $tables, $filename)
+ public static function &getInstance()
{
static $instance = false;
if (!$instance) {
- $instance = new self($module, $table, $tables, $filename);
+ $instance = new self();
}
return $instance;
}
/*
+ * @public function write
+ * @param string $module
+ * @param mixed $table
+ * @param string $filename
+ */
+ public function write($module, $table, $tables, $filename) {
+ $this->setModule($module);
+ $this->setFileName($filename);
+ $this->table = $table;
+ $this->tables = $tables;
+ }
+ /*
* @public function render
* @param null
*/
@@ -87,14 +90,14 @@
}
$content .= <<<EOT
// InfoBox Statistics
-\$adminMenu->addInfoBox({$language}STATISTICS);\n
+\$adminMenu->addInfoBox({$language}STATISTICS);
+// InfoBox\n
EOT;
foreach (array_keys($this->tables) as $i)
{
$table_name = $this->tables[$i]->getVar('table_name');
$ta_stutable_name = $language_thereare.strtoupper($table_name);
$content .= <<<EOT
-// InfoBox {$table_name}
\$adminMenu->addInfoBoxLine({$language}STATISTICS, '<label>'.{$ta_stutable_name}.'</label>', \$count_{$table_name});\n
EOT;
}
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_menu.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_menu.php 2014-06-02 20:02:11 UTC (rev 12561)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_menu.php 2014-06-03 23:17:10 UTC (rev 12562)
@@ -36,32 +36,37 @@
private $tables = null;
/*
* @public function constructor
- * @param string $module
- * @param string $file_name
+ * @param null
*/
- public function __construct($module, $table, $tables, $filename) {
+ public function __construct() {
$this->tdmcfile = TDMCreateFile::getInstance();
- $this->setModule($module);
- //$this->setTable($table);
- $this->setFileName($filename);
- $this->table = $table;
- $this->tables = $tables;
}
/*
* @static function &getInstance
- * @param string $module
- * @param mixed $table
- * @param string $filename
+ * @param null
*/
- public static function &getInstance($module, $table, $tables, $filename)
+ public static function &getInstance()
{
static $instance = false;
if (!$instance) {
- $instance = new self($module, $table, $tables, $filename);
+ $instance = new self();
}
return $instance;
- }
+ }
/*
+ * @public function write
+ * @param string $module
+ * @param mixed $table
+ * @param mixed $tables
+ * @param string $filename
+ */
+ public function write($module, $table, $tables, $filename) {
+ $this->setModule($module);
+ $this->setFileName($filename);
+ $this->table = $table;
+ $this->tables = $tables;
+ }
+ /*
* @public function render
* @param null
*/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_pages.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_pages.php 2014-06-02 20:02:11 UTC (rev 12561)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_pages.php 2014-06-03 23:17:10 UTC (rev 12562)
@@ -40,37 +40,39 @@
private $fields = null;
/*
* @public function constructor
- * @param string $module
- * @param string $table_name
- * @param array $fields
- * @param string $filename
+ * @param null
*/
- public function __construct($module, $table_name, $fields) {
+ public function __construct() {
$this->adminobjects = AdminObjects::getInstance();
- $this->tdmcfile = TDMCreateFile::getInstance();
- $this->setModule($module);
- //$this->setTable($table);
- //$this->setFileName($filename);
- $this->table_name = $table_name;
- $this->fields = $fields;
+ $this->tdmcfile = TDMCreateFile::getInstance();
}
/*
* @static function &getInstance
- * @param string $module
- * @param string $table_name
- * @param array $fields
- * @param string $filename
+ * @param null
*/
- public static function &getInstance($module, $table_name, $fields)
+ public static function &getInstance()
{
static $instance = false;
if (!$instance) {
- $instance = new self($module, $table_name, $fields);
+ $instance = new self();
}
return $instance;
}
-
/*
+ * @public function write
+ * @param string $module
+ * @param string $table_name
+ * @param array $fields
+ * @param string $filename
+ */
+ public function write($module, $table_name, $fields) {
+ $this->setModule($module);
+ //$this->setTable($table);
+ //$this->setFileName($filename);
+ $this->table_name = $table_name;
+ $this->fields = $fields;
+ }
+ /*
* @public function getAdminPagesHeader
* @param string $mod_name
* @param string $table_name
@@ -173,8 +175,8 @@
* @param string $table_name
* @param string $language
*/
- public function getAdminPagesSave($module_name, $table_name, $language, $fpif, $fpmf) {
- $stu_table_name = strtoupper($table_name);
+ public function getAdminPagesSave($module_name, $table_name, $language, $fpif, $fpmf)
+ {
$ret = <<<EOT
case 'save':
if ( !\$GLOBALS['xoopsSecurity']->check() ) {
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_permissions.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_permissions.php 2014-06-02 20:02:11 UTC (rev 12561)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_permissions.php 2014-06-03 23:17:10 UTC (rev 12562)
@@ -36,32 +36,37 @@
private $fields = null;
/*
* @public function constructor
- * @param string $module
- * @param string $filename
+ * @param null
*/
- public function __construct($module, $tables, $fields, $filename) {
- $this->tdmcfile = TDMCreateFile::getInstance();
- $this->setModule($module);
- //$this->setTable($table);
- $this->setFileName($filename);
- $this->tables = $tables;
- $this->fields = $fields;
+ public function __construct() {
+ $this->tdmcfile = TDMCreateFile::getInstance();
}
/*
* @static function &getInstance
- * @param string $module
- * @param mixed $table
- * @param string $filename
+ * @param null
*/
- public static function &getInstance($module, $tables, $fields, $filename)
+ public static function &getInstance()
{
static $instance = false;
if (!$instance) {
- $instance = new self($module, $tables, $fields, $filename);
+ $instance = new self();
}
return $instance;
}
/*
+ * @public function write
+ * @param string $module
+ * @param mixed $table
+ * @param mixed $tables
+ * @param string $filename
+ */
+ public function write($module, $tables, $fields, $filename) {
+ $this->setModule($module);
+ $this->setFileName($filename);
+ $this->tables = $tables;
+ $this->fields = $fields;
+ }
+ /*
* @public function render
* @param string $module_name
* @param string $language
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_templates.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_templates.php 2014-06-02 20:02:11 UTC (rev 12561)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_templates.php 2014-06-03 23:17:10 UTC (rev 12562)
@@ -28,30 +28,34 @@
private $tdmcfile = null;
/*
* @public function constructor
- * @param string $module
- * @param mixed $table
- * @param string $filename
+ * @param null
*/
- public function __construct($module, $table) {
- $this->tdmcfile = TDMCreateFile::getInstance();
- $this->setModule($module);
- $this->setTable($table);
- //$this->setFileName($filename);
+ public function __construct() {
+ $this->tdmcfile = TDMCreateFile::getInstance();
}
/*
* @static function &getInstance
- * @param string $module
- * @param mixed $table
- * @param string $filename
+ * @param null
*/
- public static function &getInstance($module, $table)
+ public static function &getInstance()
{
static $instance = false;
if (!$instance) {
- $instance = new self($module, $table);
+ $instance = new self();
}
return $instance;
- }
+ }
+ /*
+ * @public function write
+ * @param string $module
+ * @param mixed $table
+ */
+ public function write($module, $table) {
+ $this->setModule($module);
+ $this->setFileName($filename);
+ $this->tables = $tables;
+ $this->fields = $fields;
+ }
/*
* @public function render
* @param null
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-02 20:02:11 UTC (rev 12561)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php 2014-06-03 23:17:10 UTC (rev 12562)
@@ -94,7 +94,7 @@
$table_name = $tables[$t]->getVar('table_name');
$table_admin = $tables[$t]->getVar('table_admin');
$table_user = $tables[$t]->getVar('table_user');
- $table_block = $tables[$t]->getVar('table_block');
+ $table_block = $tables[$t]->getVar('table_blocks');
}
//
$indexFile = $this->path.'/index.html';
@@ -191,6 +191,7 @@
$criteria_tables->add(new Criteria('table_mid', $mod_id));
$tables = $this->tdmcreate->getHandler('tables')->getObjects($criteria_tables);
unset($criteria_tables);
+ $ret = array();
//
foreach (array_keys($tables) as $t)
{
@@ -199,7 +200,7 @@
$table_name = $tables[$t]->getVar('table_name');
$table_admin = $tables[$t]->getVar('table_admin');
$table_user = $tables[$t]->getVar('table_user');
- $table_block = $tables[$t]->getVar('table_block');
+ $table_block = $tables[$t]->getVar('table_blocks');
$table_search = $tables[$t]->getVar('table_search');
$table_comments = $tables[$t]->getVar('table_comments');
$table_notifications = $tables[$t]->getVar('table_notifications');
@@ -211,171 +212,218 @@
unset($criteria_fields);
$table = $this->tdmcreate->getHandler('tables')->get($table_id);
-
- $ret = array();
+
// Creation of admin files
if ( $table_admin == 1) {
// Admin Aboutr File
- $adminAbout = AdminAbout::getInstance($module, 'about.php');
+ $adminAbout = AdminAbout::getInstance();
+ $adminAbout->write($module, 'about.php');
$ret[] = $adminAbout->render();
// Admin Footer File
- $adminFooter = AdminFooter::getInstance($module, 'footer.php');
+ $adminFooter = AdminFooter::getInstance();
+ $adminFooter->write($module, 'footer.php');
$ret[] = $adminFooter->render();
// Admin Header File
- $adminHeader = AdminHeader::getInstance($module, $table, $tables, 'header.php');
+ $adminHeader = AdminHeader::getInstance();
+ $adminHeader->write($module, $table, $tables, 'header.php');
$ret[] = $adminHeader->render();
// Admin Index File
- $adminIndex = AdminIndex::getInstance($module, $table, $tables, 'index.php');
+ $adminIndex = AdminIndex::getInstance();
+ $adminIndex->write($module, $table, $tables, 'index.php');
$ret[] = $adminIndex->render();
// Admin Menu File
- $adminMenu = AdminMenu::getInstance($module, $table, $tables, 'menu.php');
+ $adminMenu = AdminMenu::getInstance();
+ $adminMenu->write($module, $table, $tables, 'menu.php');
$ret[] = $adminMenu->render();
}
// Creation of admin permission file
if (( $table_permissions == 1) && ( $table_admin == 1 )) {
// Admin Permissions File
- $adminPermissions = AdminPermissions::getInstance($module, $tables, $fields, 'permissions.php');
+ $adminPermissions = AdminPermissions::getInstance();
+ $adminPermissions->write($module, $tables, $fields, 'permissions.php');
$ret[] = $adminPermissions->render();
}
// Css Styles File
$cssStyles = CssStyles::getInstance($module, 'style.css');
+ $cssStyles->write($module, 'style.css');
$ret[] = $cssStyles->render();
// Include Common File
- $includeCommon = IncludeCommon::getInstance($module, 'common.php');
+ $includeCommon = IncludeCommon::getInstance();
+ $includeCommon->write($module, 'common.php');
$ret[] = $includeCommon->render();
// Include Functions File
- $includeFunctions = IncludeFunctions::getInstance($module, 'functions.php');
+ $includeFunctions = IncludeFunctions::getInstance();
+ $includeFunctions->write($module, 'functions.php');
$ret[] = $includeFunctions->render();
// Include Install File
- $includeInstall = IncludeInstall::getInstance($module, $tables, $fields, 'install.php');
+ $includeInstall = IncludeInstall::getInstance();
+ $includeInstall->write($module, $tables, $fields, 'install.php');
$ret[] = $includeInstall->render();
// Include Jquery File
- $includeJquery = IncludeJquery::getInstance($module, 'functions.js');
+ $includeJquery = IncludeJquery::getInstance();
+ $includeJquery->write($module, 'functions.js');
$ret[] = $includeJquery->render();
// Creation of search file
if ( $table_search == 1) {
// Include Search File
- $includeSearch = IncludeSearch::getInstance($module, $table, $fields, 'search.php');
+ $includeSearch = IncludeSearch::getInstance();
+ $includeSearch->write($module, $table, $fields, 'search.php');
$ret[] = $includeSearch->render();
}
// Creation of comments files
if ( $table_comments == 1) {
// Include Comments File
- $includeComments = IncludeComments::getInstance($module, $table, $fields);
+ $includeComments = IncludeComments::getInstance();
+ $includeComments->write($module, $table, $fields);
$ret[] = $includeComments->getCommentsIncludes($module, 'comment_edit');
// Include Comments File
- $includeComments = IncludeComments::getInstance($module, $table, $fields);
+ $includeComments = IncludeComments::getInstance();
+ $includeComments->write($module, $table, $fields);
$ret[] = $includeComments->getCommentsIncludes($module, 'comment_delete');
// Include Comments File
- $includeComments = IncludeComments::getInstance($module, $table, $fields);
+ $includeComments = IncludeComments::getInstance();
+ $includeComments->write($module, $table, $fields);
$ret[] = $includeComments->getCommentsIncludes($module, 'comment_post');
// Include Comments File
- $includeComments = IncludeComments::getInstance($module, $table, $fields);
+ $includeComments = IncludeComments::getInstance();
+ $includeComments->write($module, $table, $fields);
$ret[] = $includeComments->getCommentsIncludes($module, 'comment_reply');
// Include Comments File
- $includeComments = IncludeComments::getInstance($module, $table, $fields);
+ $includeComments = IncludeComments::getInstance();
+ $includeComments->write($module, $table, $fields);
$ret[] = $includeComments->getCommentsNew($module, 'comment_new');
}
// Creation of notifications files
if ( $table_notifications == 1 ) {
// Include Notifications File
- $includeNotifications = IncludeNotifications::getInstance($module, $table, $fields, 'notifications.php');
+ $includeNotifications = IncludeNotifications::getInstance();
+ $includeNotifications->write($module, $table, $fields, 'notifications.php');
$ret[] = $includeNotifications->render();
}
// Creation of sql file
if ( $table_name != null) {
// Sql File
- $sqlFile = SqlFile::getInstance($module, $tables, $fields, 'mysql.sql');
+ $sqlFile = SqlFile::getInstance();
+ $sqlFile->write($module, $tables, $fields, 'mysql.sql');
$ret[] = $sqlFile->render();
}
// Creation of admin files
if ( $table_admin == 1) {
// Admin Pages File
- $adminPages = AdminPages::getInstance($module, $table_name, $fields);
- $ret[] = $adminPages->renderFile($table_name.'.php');
+ $adminPages = AdminPages::getInstance();
+ $adminPages->write($module, $table_name, $fields);
+ //$ret[] = $adminPages->renderFile($table_name.'.php');
+ $ret_admin_page = $adminPages->renderFile($table_name.'.php');
+ $ret[] = $ret_admin_page;
+ var_dump($ret_admin_page);
// Admin Templates File
- $adminTemplates = AdminTemplates::getInstance($module, $tables);
+ $adminTemplates = AdminTemplates::getInstance();
+ $adminTemplates->write($module, $tables);
$ret[] = $adminTemplates->renderFile($table_name.'.tpl');
}
// Creation of blocks
if ( $table_block == 1) {
// Blocks Files
- $blocksFiles = BlocksFiles::getInstance($module, $table, $fields);
+ $blocksFiles = BlocksFiles::getInstance();
+ $blocksFiles->write($module, $table, $fields);
$ret[] = $blocksFiles->renderFile($table_name.'.php');
}
// Blocks Templates File
- $blocksTemplates = BlocksTemplates::getInstance($module, $table, $fields);
+ $blocksTemplates = BlocksTemplates::getInstance();
+ $blocksTemplates->write($module, $table, $fields);
$ret[] = $blocksTemplates->renderFile($table_name.'.tpl');
// Creation of classes
if ( $table_admin == 1 || $table_user == 1) {
// Class Files
- $classFiles = ClassFiles::getInstance($module, $table, $tables, $fields);
+ $classFiles = ClassFiles::getInstance();
+ $classFiles->write($module, $table, $tables, $fields);
$ret[] = $classFiles->renderFile($table_name.'.php');
}
// Creation of user files
if ( $table_user == 1) {
// User Pages File
- $userPages = UserPages::getInstance($module, $table, $fields);
- $ret[] = $userPages->renderFile($table_name.'.php');
+ $userPages = UserPages::getInstance();
+ $userPages->write($module, $table, $fields);
+ $ret_user_page = $userPages->renderFile($table_name.'.php');
+ $ret[] = $ret_user_page;
+ var_dump($ret_user_page);
// User Templates File
- $userTemplates = UserTemplates::getInstance($module, $tables, $fields);
+ $userTemplates = UserTemplates::getInstance();
+ $userTemplates->write($module, $tables, $fields);
$ret[] = $userTemplates->renderFile($table_name.'.tpl');
}
var_dump($table_name);
// Creation of admin language file
if ( $table_admin == 1) {
// Language Admin File
- $languageAdmin = LanguageAdmin::getInstance($module, $table, $tables, 'admin.php');
+ $languageAdmin = LanguageAdmin::getInstance();
+ $languageAdmin->write($module, $table, $tables, 'admin.php');
$ret[] = $languageAdmin->render();
}
// Creation of blocks language file
if ( $table_block == 1) {
// Language Blocks File
- $languageBlocks = LanguageBlocks::getInstance($module, $table, $tables, $fields, 'blocks.php');
+ $languageBlocks = LanguageBlocks::getInstance();
+ $languageBlocks->write($module, $table, $tables, $fields, 'blocks.php');
$ret[] = $languageBlocks->render();
}
// Creation of user language file
if ( $table_user == 1) {
// Language Main File
- $languageMain = LanguageMain::getInstance($module, $table, $tables, $fields, 'main.php');
+ $languageMain = LanguageMain::getInstance();
+ $languageMain->write($module, $table, $tables, $fields, 'main.php');
$ret[] = $languageMain->render();
}
// Language Modinfo File
- $languageModinfo = LanguageModinfo::getInstance($module, $table, $tables, $fields, 'modinfo.php');
+ $languageModinfo = LanguageModinfo::getInstance();
+ $languageModinfo->write($module, $table, $tables, $fields, 'modinfo.php');
$ret[] = $languageModinfo->render();
// Language Help File
- $languageHelp = LanguageHelp::getInstance($module, 'help.html');
+ $languageHelp = LanguageHelp::getInstance();
+ $languageHelp->write($module, 'help.html');
$ret[] = $languageHelp->render();
// Creation of user files
if ( $table_user == 1) {
// Templates Footer File
- $templatesFooter = TemplatesFooter::getInstance($module, $table, 'footer.tpl');
+ $templatesFooter = TemplatesFooter::getInstance();
+ $templatesFooter->write($module, $table, 'footer.tpl');
$ret[] = $templatesFooter->render();
// Templates Header File
- $templatesHeader = TemplatesHeader::getInstance($module, $tables, 'header.tpl');
+ $templatesHeader = TemplatesHeader::getInstance();
+ $templatesHeader->write($module, $tables, 'header.tpl');
$ret[] = $templatesHeader->render();
// Templates Index File
- $templatesIndex = TemplatesIndex::getInstance($module, $table, 'index.tpl');
+ $templatesIndex = TemplatesIndex::getInstance();
+ $templatesIndex->write($module, 'index.tpl');
$ret[] = $templatesIndex->render();
// User Footer File
- $userFooter = UserFooter::getInstance($module, 'footer.php');
+ $userFooter = UserFooter::getInstance();
+ $userFooter->write($module, 'footer.php');
$ret[] = $userFooter->render();
// User Header File
- $userHeader = UserHeader::getInstance($module, 'header.php');
+ $userHeader = UserHeader::getInstance();
+ $userHeader->write($module, 'header.php');
$ret[] = $userHeader->render();
// User Index File
- $userIndex = UserIndex::getInstance($module, $table, 'index.php');
+ $userIndex = UserIndex::getInstance();
+ $userIndex->write($module, $table, 'index.php');
$ret[] = $userIndex->render();
}
if ( ($table_user == 1) && ($table_notifications == 1)){
// User Notification Update File
- $userNotificationUpdate = UserNotificationUpdate::getInstance($module, 'notification_update.php');
+ $userNotificationUpdate = UserNotificationUpdate::getInstance();
+ $userNotificationUpdate->write($module, 'notification_update.php');
$ret[] = $userNotificationUpdate->render();
}
// User Xoops Version File
- $userXoopsVersion = UserXoopsVersion::getInstance($module, $table, $tables, 'xoops_version.php');
- $ret[] = $userXoopsVersion->render();
- }
+ $userXoopsVersion = UserXoopsVersion::getInstance();
+ $userXoopsVersion->write($module, $table, $tables, 'xoops_version.php');
+ $ret[] = $userXoopsVersion->render();
+ }
+ // Docs Changelog File
+ $docsChangelog = DocsChangelog::getInstance();
+ $docsChangelog->write($module, 'changelog.txt');
+ $ret[] = $docsChangelog->render();
return $ret;
}
}
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks_files.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks_files.php 2014-06-02 20:02:11 UTC (rev 12561)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks_files.php 2014-06-03 23:17:10 UTC (rev 12562)
@@ -36,23 +36,14 @@
private $fields = null;
/*
* @public function constructor
- * @param string $module
- * @param mixed $table
- * @param string $filename
+ * @param null
*/
- public function __construct($module, $table, $fields) {
- $this->tdmcfile = TDMCreateFile::getInstance();
- $this->setModule($module);
- //$this->setTable($table);
- //$this->setFileName($filename);
- $this->table = $table;
- $this->fields = $fields;
+ public function __construct() {
+ $this->tdmcfile = TDMCreateFile::getInstance();
}
/*
* @static function &getInstance
- * @param string $module
- * @param mixed $table
- * @param string $filename
+ * @param null
*/
public static function &getInstance($module, $table, $fields)
{
@@ -63,6 +54,17 @@
return $instance;
}
/*
+ * @public function write
+ * @param string $module
+ * @param mixed $table
+ * @param mixed $fields
+ */
+ public function write($module, $table, $fields) {
+ $this->setModule($module);
+ $this->table = $table;
+ $this->fields = $fields;
+ }
+ /*
* @public function getBlocksShow
* @param null
*/
@@ -72,7 +74,7 @@
$table_name = $this->table->getVar('table_name');
$table_fieldname = $this->table->getVar('table_fieldname');
$ret = <<<EOT
-\ninclude_once XOOPS_ROOT_PATH.'/modules/{$mod_name}/include/functions.php';
+include_once XOOPS_ROOT_PATH.'/modules/{$mod_name}/include/functions.php';
function b_{$mod_name_lowercase}_{$table_name}_show(\$options)
{
include_once XOOPS_ROOT_PATH.'/modules/{$mod_name}/class/{$table_name}.php';
@@ -121,7 +123,7 @@
$ret .= <<<EOT
}
return \${$table_fieldname};
-}
+}\n\n
EOT;
return $ret;
}
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks_templates.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks_templates.php 2014-06-02 20:02:11 UTC (rev 12561)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks_templates.php 2014-06-03 23:17:10 UTC (rev 12562)
@@ -29,44 +29,42 @@
/*
* @var string
*/
- private $table = null;
+ private $table = null;
/*
* @var string
*/
- private $tables = null;
- /*
- * @var string
- */
private $fields = null;
/*
* @public function constructor
- * @param string $module
- * @param mixed $table
- * @param string $filename
+ * @param null
*/
- public function __construct($module, $table, $fields) {
- $this->tdmcfile = TDMCreateFile::getInstance();
- $this->setModule($module);
- //$this->setTable($table);
- //$this->setFileName($filename);
- $this->table = $table;
- $this->fields = $fields;
+ public function __construct() {
+ $this->tdmcfile = TDMCreateFile::getInstance();
}
/*
* @static function &getInstance
- * @param string $module
- * @param mixed $table
- * @param string $filename
+ * @param null
*/
- public static function &getInstance($module, $table, $fields)
+ public static function &getInstance()
{
static $instance = false;
if (!$instance) {
- $instance = new self($module, $table, $fields);
+ $instance = new self();
}
return $instance;
}
/*
+ * @public function write
+ * @param string $module
+ * @param mixed $table
+ * @param mixed $fields
+ */
+ public function write($module, $table, $fields) {
+ $this->setModule($module);
+ $this->table = $table;
+ $this->fields = $fields;
+ }
+ /*
* @public function render
* @param null
*/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/class_files.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/class_files.php 2014-06-02 20:02:11 UTC (rev 12561)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/class_files.php 2014-06-03 23:17:10 UTC (rev 12562)
@@ -44,35 +44,38 @@
private $fields = null;
/*
* @public function constructor
- * @param string $module
- * @param mixed $table
- * @param string $filename
+ * @param null
*/
- public function __construct($module, $table, $tables, $fields) {
+ public function __construct() {
$this->tdmcfile = TDMCreateFile::getInstance();
- $this->formelements = TDMCreateFormElements::getInstance();
- $this->setModule($module);
- //$this->setTable($table);
- //$this->setFileName($filename);
- $this->table = $table;
- $this->tables = $tables;
- $this->fields = $fields;
+ $this->formelements = TDMCreateFormElements::getInstance();
}
/*
* @static function &getInstance
- * @param string $module
- * @param mixed $table
- * @param string $filename
+ * @param null
*/
- public static function &getInstance($module, $table, $tables, $fields)
+ public static function &getInstance()
{
static $instance = false;
if (!$instance) {
- $instance = new self($module, $table, $tables, $fields);
+ $instance = new self();
}
return $instance;
}
/*
+ * @public function write
+ * @param string $module
+ * @param mixed $table
+ * @param mixed $tables
+ * @param mixed $fields
+ */
+ public function write($module, $table, $tables, $fields) {
+ $this->setModule($module);
+ $this->table = $table;
+ $this->tables = $tables;
+ $this->fields = $fields;
+ }
+ /*
* @public function getInitVar
* @param string $field_name
* @param string $type
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/css_styles.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/css_styles.php 2014-06-02 20:02:11 UTC (rev 12561)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/css_styles.php 2014-06-03 23:17:10 UTC (rev 12562)
@@ -28,29 +28,34 @@
private $tdmcfile = null;
/*
* @public function constructor
- * @param string $module
- * @param string $filename
+ * @param null
*/
- public function __construct($module, $filename) {
- $this->tdmcfile = TDMCreateFile::getInstance();
- $this->setModule($module);
- $this->setFileName($filename);
+ public function __construct() {
+ $this->tdmcfile = TDMCreateFile::getInstance();
}
/*
* @static function &getInstance
* @param null
*/
- public static function &getInstance($module, $filename)
+ public static function &getInstance()
{
static $instance = false;
if (!$instance) {
- $instance = new self($module, $filename);
+ $instance = new self();
}
return $instance;
}
-
/*
+ * @public function write
+ * @param string $module
+ * @param string $filename
+ */
+ public function write($module, $filename) {
+ $this->setModule($module);
+ $this->setFileName($filename);
+ }
+ /*
* @public function render
* @param null
*/
@@ -58,14 +63,13 @@
$module = $this->getModule();
$filename = $this->getFileName();
$module_name = strtolower($module->getVar('mod_name'));
- $content = $this->getHeaderFilesComments($module, $filename);
- $content .= <<<EOT
+ //$content = $this->getHeaderFilesComments($module, $filename);
+ $content = <<<EOT
table {
margin: 0;
}
-table.{$module_name} {
-
+table.{$module_name} {
padding: 2px;
border: 1px solid #ccc;
}
@@ -77,7 +81,7 @@
}
div.outer {
- color: \#555;
+ color: #555;
background-color: #eee;
border: 1px solid #ccc;
}
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/docs_changelog.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/docs_changelog.php 2014-06-02 20:02:11 UTC (rev 12561)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/docs_changelog.php 2014-06-03 23:17:10 UTC (rev 12562)
@@ -22,39 +22,57 @@
die('XOOPS root path not defined');
}
-class DocsChangelog extends HeaderFile
+class DocsChangelog extends TDMCreateFile
{
/*
* @var string
*/
- public $_module = '';
+ private $tdmcfile = null;
/*
- * @var string
+ * @public function constructor
+ * @param null
*/
- public $file_name = null;
+ public function __construct() {
+ $this->tdmcfile = TDMCreateFile::getInstance();
+ }
+
/*
- * @public function constructor
+ * @static function &getInstance
+ * @param null
+ */
+ public static function &getInstance()
+ {
+ static $instance = false;
+ if (!$instance) {
+ $instance = new self();
+ }
+ return $instance;
+ }
+ /*
+ * @public function write
* @param string $module
- * @param string $file_name
+ * @param string $filename
*/
- public function __construct($module, $file_name) {
- $this->_module = $module;
- $this->file_name = $file_name;
+ public function write($module, $filename) {
+ $this->setModule($module);
+ $this->setFileName($filename);
}
/*
* @public function render
* @param null
*/
public function render() {
- $module_name = $this->getModuleName();
- //$language = $this->getLanguage('_MB_', '_');
+ $module = $this->getModule();
+ $filename = $this->getFileName();
+ $module_name = strtolower($module->getVar('mod_name'));
$date = date('Y/m/d G:i:s');
- $ret <<<EOT
+ $content = <<<EOT
====================================
- {$date} Version {$this->_module->getVar('mod_version')}
+ {$date} Version {$module->getVar('mod_version')}
====================================
- - Original release {$module_name} ({$this->_module->getVar('mod_author')})
+ - Original release {$module_name} ({$module->getVar('mod_author')})
EOT;
- return $ret;
+ $this->tdmcfile->create($module_name, 'docs', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
+ return $this->tdmcfile->renderFile();
}
}
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/docs_files.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/docs_files.php 2014-06-02 20:02:11 UTC (rev 12561)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/docs_files.php 2014-06-03 23:17:10 UTC (rev 12562)
@@ -28,26 +28,32 @@
private $tdmcfile = null;
/*
* @public function constructor
- * @param string $module
- * @param string $file_name
+ * @param null
*/
- public function __construct($module, $file_name) {
+ public function __construct() {
$this->tdmcfile = TDMCreateFile::getInstance();
- $this->setModule($module);
- $this->setFileName($file_name);
}
/*
* @static function &getInstance
* @param null
*/
- public static function &getInstance($module, $filename)
+ public static function &getInstance()
{
static $instance = false;
if (!$instance) {
- $instance = new self($module, $filename);
+ $instance = new self();
}
return $instance;
- }
+ }
+ /*
+ * @public function write
+ * @param string $module
+ * @param string $filename
+ */
+ public function write($module, $filename) {
+ $this->setModule($module);
+ $this->setFileName($filename);
+ }
/*
* @public function getChangeLogFile
* @param string $module_name
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_comments.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_comments.php 2014-06-02 20:02:11 UTC (rev 12561)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_comments.php 2014-06-03 23:17:10 UTC (rev 12562)
@@ -36,31 +36,34 @@
private $fields = null;
/*
* @public function constructor
- * @param string $module
- * @param string $filename
+ * @param null
*/
- public function __construct($module, $table, $fields) {
- $this->tdmcfile = TDMCreateFile::getInstance();
- $this->setModule($module);
- //$this->setTable($table);
- //$this->setFileName($filename);
- $this->table = $table;
- $this->fields = $fields;
+ public function __construct() {
+ $this->tdmcfile = TDMCreateFile::getInstance();
}
/*
* @static function &getInstance
- * @param string $module
- * @param mixed $table
- * @param string $filename
+ * @param null
*/
- public static function &getInstance($module, $table, $fields)
+ public static function &getInstance()
{
static $instance = false;
if (!$instance) {
- $instance = new self($module, $table, $fields);
+ $instance = new self();
}
return $instance;
- }
+ }
+ /*
+ * @public function write
+ * @param string $module
+ * @param mixed $table
+ * @param string $fields
+ */
+ public function write($module, $table, $fields) {
+ $this->setModule($module);
+ $this->table = $table;
+ $this->fields = $fields;
+ }
/*
* @public function getCommentsIncludes
* @param string $filename
@@ -70,7 +73,7 @@
$module_name = strtolower($module->getVar('mod_name'));
$content = $this->getHeaderFilesComments($module, $filename.'.php');
$content .= <<<EOT
-\ninclude_once '../../mainfile.php';
+include_once '../../mainfile.php';
include_once XOOPS_ROOT_PATH.'/include/{$filename}.php';
EOT;
$this->tdmcfile->create($module_name, 'include', $filename.'.php', $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_common.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_common.php 2014-06-02 20:02:11 UTC (rev 12561)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_common.php 2014-06-03 23:17:10 UTC (rev 12562)
@@ -28,31 +28,35 @@
private $tdmcfile = null;
/*
* @public function constructor
- * @param string $module
- * @param string $filename
+ * @param null
*/
- public function __construct($module, $filename) {
+ public function __construct() {
$this->tdmcfile = TDMCreateFile::getInstance();
- $this->setModule($module);
- $this->setFileName($filename);
}
/*
* @static function &getInstance
- * @param string $module
- * @param mixed $table
- * @param string $filename
+ * @param null
*/
- public static function &getInstance($module, $filename)
+ public static function &getInstance()
{
static $instance = false;
if (!$instance) {
- $instance = new self($module, $filename);
+ $instance = new self();
}
return $instance;
- }
+ }
+ /*
+ * @public function write
+ * @param string $module
+ * @param string $filename
+ */
+ public function write($module, $filename) {
+ $this->setModule($module);
+ $this->setFileName($filename);
+ }
/*
* @public function getCommonCode
- * @param string $module_name
+ * @param object $module
*/
public function getCommonCode($module) {
$module_name = $module->getVar('mod_name');
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_functions.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_functions.php 2014-06-02 20:02:11 UTC (rev 12561)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_functions.php 2014-06-03 23:17:10 UTC (rev 12562)
@@ -28,29 +28,34 @@
private $tdmcfile = null;
/*
* @public function constructor
- * @param string $module
- * @param string $filename
+ * @param null
*/
- public function __construct($module, $filename) {
- $this->tdmcfile = TDMCreateFile::getInstance();
- $this->setModule($module);
- $this->setFileName($filename);
+ public function __construct() {
+ $this->tdmcfile = TDMCreateFile::getInstance();
}
/*
* @static function &getInstance
* @param null
*/
- public static function &getInstance($module, $filename)
+ public static function &getInstance()
{
static $instance = false;
if (!$instance) {
- $instance = new self($module, $filename);
+ $instance = new self();
}
return $instance;
}
-
/*
+ * @public function write
+ * @param string $module
+ * @param string $filename
+ */
+ public function write($module, $filename) {
+ $this->setModule($module);
+ $this->setFileName($filename);
+ }
+ /*
* @public function getFunctionBlock
* @param string $module_name
*/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_install.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_install.php 2014-06-02 20:02:11 UTC (rev 12561)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_install.php 2014-06-03 23:17:10 UTC (rev 12562)
@@ -36,32 +36,37 @@
private $fields = null;
/*
* @public function constructor
- * @param string $module
- * @param string $file_name
+ * @param null
*/
- public function __construct($module, $tables, $fields, $filename) {
- $this->tdmcfile = TDMCreateFile::getInstance();
- $this->setModule($module);
- //$this->setTable($table);
- $this->setFileName($filename);
- $this->tables = $tables;
- $this->fields = $fields;
+ public function __construct() {
+ $this->tdmcfile = TDMCreateFile::getInstance();
}
/*
* @static function &getInstance
- * @param string $module
- * @param mixed $table
- * @param string $filename
+ * @param null
*/
- public static function &getInstance($module, $tables, $fields, $filename)
+ public static function &getInstance()
{
static $instance = false;
if (!$instance) {
- $instance = new self($module, $tables, $fields, $filename);
+ $instance = new self();
}
return $instance;
}
/*
+ * @public function write
+ * @param string $module
+ * @param mixed $tables
+ * @param string $fields
+ * @param string $filename
+ */
+ public function write($module, $tables, $fields, $filename) {
+ $this->setModule($module);
+ $this->setFileName($filename);
+ $this->tables = $tables;
+ $this->fields = $fields;
+ }
+ /*
* @public function render
* @param null
*/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_jquery.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_jquery.php 2014-06-02 20:02:11 UTC (rev 12561)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_jquery.php 2014-06-03 23:17:10 UTC (rev 12562)
@@ -28,30 +28,34 @@
private $tdmcfile = null;
/*
* @public function constructor
- * @param string $module
- * @param string $filename
+ * @param null
*/
- public function __construct($module, $filename) {
+ public function __construct() {
$this->tdmcfile = TDMCreateFile::getInstance();
- $this->setModule($module);
- $this->setFileName($filename);
}
/*
* @static function &getInstance
- * @param string $module
- * @param string $filename
+ * @param null
*/
- public static function &getInstance($module, $filename)
+ public static function &getInstance()
{
static $instance = false;
if (!$instance) {
- $instance = new self($module, $filename);
+ $instance = new self();
}
return $instance;
}
-
/*
+ * @public function write
+ * @param string $module
+ * @param string $filename
+ */
+ public function write($module, $filename) {
+ $this->setModule($module);
+ $this->setFileName($filename);
+ }
+ /*
* @public function render
* @param null
*/
@@ -59,8 +63,8 @@
$module = $this->getModule();
$filename = $this->getFileName();
$module_name = $module->getVar('mod_name');
- $content = $this->getHeaderFilesComments($module, $filename);
- $content .= <<<EOT
+ //$content = $this->getHeaderFilesComments($module, $filename);
+ $content = <<<EOT
$(document).ready(function(){
$( "button, input:button, input:submit, input:file, input:reset" ).css("color","inherit").button();
$( ".check" ).css("color","#fff").button();
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_notifications.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_notifications.php 2014-06-02 20:02:11 UTC (rev 12561)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_notifications.php 2014-06-03 23:17:10 UTC (rev 12562)
@@ -36,35 +36,38 @@
private $fields = null;
/*
* @public function constructor
- * @param string $module
- * @param mixed $table
- * @param string $filename
+ * @param null
*/
- public function __construct($module, $table, $fields, $filename) {
+ public function __construct() {
$this->tdmcfile = TDMCreateFile::getInstance();
- $this->setModule($module);
- //$this->setTable($table);
- $this->setFileName($filename);
- $this->table = $table;
- $this->fields = $fields;
}
/*
* @static function &getInstance
- * @param string $module
- * @param mixed $table
- * @param string $filename
+ * @param null
*/
- public static function &getInstance($module, $table, $fields, $filename)
+ public static function &getInstance()
{
static $instance = false;
if (!$instance) {
- $instance = new self($module, $table, $fields, $filename);
+ $instance = new self();
}
return $instance;
}
-
/*
+ * @public function write
+ * @param string $module
+ * @param mixed $table
+ * @param string $fields
+ * @param string $filename
+ */
+ public function write($module, $table, $fields, $filename) {
+ $this->setModule($module);
+ $this->setFileName($filename);
+ $this->table = $table;
+ $this->fields = $fields;
+ }
+ /*
* @static function getNotificationsFunction
* @param string $module_name
*/
@@ -75,7 +78,7 @@
$fpif = null; $fpmf = null;
foreach(array_keys($this->fields) as $i) {
$field_name = $this->fields[$i]->getVar('field_name');
- if(($i > 1) && ($this->table->getVar('table_autoincrement') == 1)) {
+ if(($i == 1) && ($this->table->getVar('table_autoincrement') == 1)) {
$fpif = $field_name;
}
if($this->fields[$i]->getVar('field_main') == 1) {
@@ -145,7 +148,7 @@
//$table = $this->getTable();
//$fields = $this->getFields();
$filename = $this->getFileName();
- $module_name = $module->getVar('mod_name');
+ $module_name = strtolower($module->getVar('mod_name'));
$content = $this->getHeaderFilesComments($module, $filename);
$content .= $this->getNotificationsFunction($module_name);
//
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_search.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_search.php 2014-06-02 20:02:11 UTC (rev 12561)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_search.php 2014-06-03 23:17:10 UTC (rev 12562)
@@ -36,34 +36,38 @@
private $fields = null;
/*
* @public function constructor
- * @param string $module
- * @param mixed $table
- * @param string $filename
+ * @param null
*/
- public function __construct($module, $table, $fields, $filename) {
- $this->tdmcfile = TDMCreateFile::getInstance();
- $this->setModule($module);
- //$this->setTable($table);
- $this->setFileName($filename);
- $this->table = $table;
- $this->fields = $fields;
+ public function __construct() {
+ $this->tdmcfile = TDMCreateFile::getInstance();
}
/*
* @static function &getInstance
- * @param string $module
- * @param mixed $table
- * @param string $filename
+ * @param null
*/
- public static function &getInstance($module, $table, $fields, $filename)
+ public static function &getInstance()
{
static $instance = false;
if (!$instance) {
- $instance = new self($module, $table, $fields, $filename);
+ $instance = new self();
}
return $instance;
}
/*
+ * @public function write
+ * @param string $module
+ * @param mixed $table
+ * @param string $fields
+ * @param string $filename
+ */
+ public function write($module, $table, $fields, $filename) {
+ $this->setModule($module);
+ $this->setFileName($filename);
+ $this->table = $table;
+ $this->fields = $fields;
+ }
+ /*
* @static function getSearchField
* @param string $fpsf
* @param string $options
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language_admin.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language_admin.php 2014-06-02 20:02:11 UTC (rev 12561)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language_admin.php 2014-06-03 23:17:10 UTC (rev 12562)
@@ -36,33 +36,37 @@
private $tables = null;
/*
* @public function constructor
- * @param string $module
- * @param mixed $table
- * @param string $filename
+ * @param null
*/
- public function __construct($module, $table, $tables, $filename) {
- $this->tdmcfile = TDMCreateFile::getInstance();
- $this->setModule($module);
- //$this->setTable($table);
- $this->setFileName($filename);
- $this->table = $table;
- $this->tables = $tables;
+ public function __construct() {
+ $this->tdmcfile = TDMCreateFile::getInstance();
}
/*
* @static function &getInstance
- * @param string $module
- * @param mixed $table
- * @param string $filename
+ * @param null
*/
- public static function &getInstance($module, $table, $tables, $filename)
+ public static function &getInstance()
{
static $instance = false;
if (!$instance) {
- $instance = new self($module, $table, $tables, $filename);
+ $instance = new self();
}
return $instance;
- }
+ }
/*
+ * @public function write
+ * @param string $module
+ * @param mixed $table
+ * @param string $fields
+ * @param string $filename
+ */
+ public function write($module, $table, $tables, $filename) {
+ $this->setModule($module);
+ $this->setFileName($filename);
+ $this->table = $table;
+ $this->tables = $tables;
+ }
+ /*
* @public function render
* @para...
[truncated message content] |