|
From: <txm...@us...> - 2014-07-07 14:07:08
|
Revision: 12682
http://sourceforge.net/p/xoops/svn/12682
Author: txmodxoops
Date: 2014-07-07 14:07:04 +0000 (Mon, 07 Jul 2014)
Log Message:
-----------
- Renamed directory name from TDMCreate to tdmcreate
- Fix bug
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include/update.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/install.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/update.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/english/admin.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/xoops_version.php
Added Paths:
-----------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/assets/images/icons/16/fields.png
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/assets/images/xoops_logo.gif
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/autoloader.php
Removed Paths:
-------------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/assets/images/icons/16/nb_fields.png
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/assets/images/xoopsdevelopmentteam_logo.gif
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php 2014-07-07 09:44:50 UTC (rev 12681)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php 2014-07-07 14:07:04 UTC (rev 12682)
@@ -87,8 +87,8 @@
$adminMenu->addItemButton(_AM_TDMCREATE_MODULES_LIST, 'modules.php', 'list');
$GLOBALS['xoopsTpl']->assign('buttons', $adminMenu->renderButton());
- $obj =& $tdmcreate->getHandler('modules')->create();
- $form = $obj->getForm();
+ $modulesObj =& $tdmcreate->getHandler('modules')->create();
+ $form = $modulesObj->getForm();
$GLOBALS['xoopsTpl']->assign('form', $form->render());
break;
@@ -97,14 +97,14 @@
redirect_header('modules.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
}
if (isset($mod_id)) {
- $obj =& $tdmcreate->getHandler('modules')->get($mod_id);
+ $modulesObj =& $tdmcreate->getHandler('modules')->get($mod_id);
} else {
- $obj =& $tdmcreate->getHandler('modules')->create();
+ $modulesObj =& $tdmcreate->getHandler('modules')->create();
}
- $mod_dirname = preg_replace('/[^a-zA-Z0-9]\s+/', '', strtolower($_POST['mod_dirname']));
+ $moduleDirname = preg_replace('/[^a-zA-Z0-9]\s+/', '', strtolower($_POST['mod_dirname']));
//Form module save
- $obj->setVars(array('mod_name' => $_POST['mod_name'],
- 'mod_dirname' => $mod_dirname,
+ $modulesObj->setVars(array('mod_name' => $_POST['mod_name'],
+ 'mod_dirname' => $moduleDirname,
'mod_version' => $_POST['mod_version'],
'mod_since' => $_POST['mod_since'],
'mod_min_php' => $_POST['mod_min_php'],
@@ -128,20 +128,20 @@
$tdmcreate->getConfig('maxsize'), null, null);
if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {
/*$extension = preg_replace( '/.*\.([^.]+)$/', '\\1', $_FILES['attachedfile']['name']);
- $logo_image = $mod_dirname.'_slogo.'.$extension;
+ $logo_image = $moduleDirname.'_slogo.'.$extension;
$uploader->setPrefix($logo_image);*/
$uploader->fetchMedia($_POST['xoops_upload_file'][0]);
if (!$uploader->upload()) {
$errors = $uploader->getErrors();
redirect_header('javascript:history.go(-1)',3, $errors);
} else {
- $obj->setVar('mod_image', $uploader->getSavedFileName());
+ $modulesObj->setVar('mod_image', $uploader->getSavedFileName());
}
} else {
- $obj->setVar('mod_image', $_POST['mod_image']);
+ $modulesObj->setVar('mod_image', $_POST['mod_image']);
}
//Form module save
- $obj->setVars(array('mod_demo_site_url' => $_POST['mod_demo_site_url'],
+ $modulesObj->setVars(array('mod_demo_site_url' => $_POST['mod_demo_site_url'],
'mod_demo_site_name' => $_POST['mod_demo_site_name'],
'mod_support_url' => $_POST['mod_support_url'],
'mod_support_name' => $_POST['mod_support_name'],
@@ -150,7 +150,8 @@
'mod_release' => $_POST['mod_release'],
'mod_status' => $_POST['mod_status'],
'mod_admin' => (($_REQUEST['mod_admin'] == 1) ? '1' : '0'),
- 'mod_user' => (($_REQUEST['mod_user'] == 1) ? '1' : '0'),
+ 'mod_user' => (($_REQUEST['mod_user'] == 1) ? '1' : '0'),
+ 'mod_blocks' => (($_REQUEST['mod_blocks'] == 1) ? '1' : '0'),
'mod_search' => (($_REQUEST['mod_search'] == 1) ? '1' : '0'),
'mod_comments' => (($_REQUEST['mod_comments'] == 1) ? '1' : '0'),
'mod_notifications' => (($_REQUEST['mod_notifications'] == 1) ? '1' : '0'),
@@ -160,12 +161,16 @@
'mod_subversion' => $_POST['mod_subversion'])
);
- if ($tdmcreate->getHandler('modules')->insert($obj)) {
- redirect_header('modules.php', 2, _AM_TDMCREATE_FORMOK);
+ if ($tdmcreate->getHandler('modules')->insert($modulesObj)) {
+ if( $modulesObj->isNew() ) {
+ redirect_header('modules.php', 5, sprintf(_AM_TDMCREATE_MODULE_FORM_CREATED_OK, $_POST['mod_name']));
+ } else {
+ redirect_header('modules.php', 5, sprintf(_AM_TDMCREATE_MODULE_FORM_UPDATED_OK, $_POST['mod_name']));
+ }
}
- $GLOBALS['xoopsTpl']->assign('error', $obj->getHtmlErrors());
- $form =& $obj->getForm();
+ $GLOBALS['xoopsTpl']->assign('error', $modulesObj->getHtmlErrors());
+ $form =& $modulesObj->getForm();
$GLOBALS['xoopsTpl']->assign('form', $form->render());
break;
@@ -178,24 +183,24 @@
$adminMenu->addItemButton(_AM_TDMCREATE_MODULES_LIST, 'modules.php', 'list');
$GLOBALS['xoopsTpl']->assign('buttons', $adminMenu->renderButton());
- $obj = $tdmcreate->getHandler('modules')->get($mod_id);
- $form = $obj->getForm();
+ $modulesObj = $tdmcreate->getHandler('modules')->get($mod_id);
+ $form = $modulesObj->getForm();
$GLOBALS['xoopsTpl']->assign('form', $form->render());
break;
case 'delete':
- $obj =& $tdmcreate->getHandler('modules')->get($mod_id);
+ $modulesObj =& $tdmcreate->getHandler('modules')->get($mod_id);
if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1) {
if ( !$GLOBALS['xoopsSecurity']->check() ) {
redirect_header('modules.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
}
- if ($tdmcreate->getHandler('modules')->delete($obj)) {
+ if ($tdmcreate->getHandler('modules')->delete($modulesObj)) {
redirect_header('modules.php', 3, _AM_TDMCREATE_FORMDELOK);
} else {
- $GLOBALS['xoopsTpl']->assign('error', $obj->getHtmlErrors());
+ $GLOBALS['xoopsTpl']->assign('error', $modulesObj->getHtmlErrors());
}
} else {
- xoops_confirm(array('ok' => 1, 'mod_id' => $mod_id, 'op' => 'delete'), $_SERVER['REQUEST_URI'], sprintf(_AM_TDMCREATE_FORMSUREDEL, $obj->getVar('mod_name')));
+ xoops_confirm(array('ok' => 1, 'mod_id' => $mod_id, 'op' => 'delete'), $_SERVER['REQUEST_URI'], sprintf(_AM_TDMCREATE_FORMSUREDEL, $modulesObj->getVar('mod_name')));
}
break;
@@ -208,21 +213,21 @@
$mod_permissions = XoopsRequest::getInt('mod_permissions');
if ( $mod_id > 0 ) {
- $obj =& $tdmcreate->getHandler('modules')->get($mod_id);
+ $modulesObj =& $tdmcreate->getHandler('modules')->get($mod_id);
if(isset($mod_adminm)) {
- $obj->setVar('mod_admin', $mod_admin);
+ $modulesObj->setVar('mod_admin', $mod_admin);
} elseif(isset($mod_user)) {
- $obj->setVar('mod_user', $mod_user);
+ $modulesObj->setVar('mod_user', $mod_user);
} elseif(isset($mod_search)) {
- $obj->setVar('mod_search', $mod_search);
+ $modulesObj->setVar('mod_search', $mod_search);
} elseif(isset($mod_comments)) {
- $obj->setVar('mod_comments', $mod_comments);
+ $modulesObj->setVar('mod_comments', $mod_comments);
} elseif(isset($mod_notifications)) {
- $obj->setVar('mod_notifications', $mod_notifications);
+ $modulesObj->setVar('mod_notifications', $mod_notifications);
} elseif(isset($mod_permissions)) {
- $obj->setVar('mod_permissions', $mod_permissions);
+ $modulesObj->setVar('mod_permissions', $mod_permissions);
}
- if ($tdmcreate->getHandler('modules')->insert($obj, true)) {
+ if ($tdmcreate->getHandler('modules')->insert($modulesObj, true)) {
redirect_header('modules.php', 1, _AM_TDMCREATE_TOGGLE_SUCCESS);
} else {
redirect_header('modules.php', 1, _AM_TDMCREATE_TOGGLE_FAILED);
Copied: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/assets/images/icons/16/fields.png (from rev 12681, XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/assets/images/icons/16/nb_fields.png)
===================================================================
(Binary files differ)
Deleted: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/assets/images/icons/16/nb_fields.png
===================================================================
(Binary files differ)
Copied: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/assets/images/xoops_logo.gif (from rev 12681, XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/assets/images/xoopsdevelopmentteam_logo.gif)
===================================================================
(Binary files differ)
Deleted: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/assets/images/xoopsdevelopmentteam_logo.gif
===================================================================
(Binary files differ)
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/autoloader.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/autoloader.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/autoloader.php 2014-07-07 14:07:04 UTC (rev 12682)
@@ -0,0 +1,55 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: autoloader.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+function autoLoader($className) {
+ // Directories
+ $directories = array(
+ '',
+ 'files/',
+ 'files/admin/',
+ 'files/blocks/',
+ 'files/classes/',
+ 'files/css/',
+ 'files/docs/',
+ 'files/include/',
+ 'files/language/',
+ 'files/sql/',
+ 'files/templates/user/',
+ 'files/templates/admin/',
+ 'files/templates/blocks/',
+ 'files/user/'
+ );
+
+ // File naming format
+ $fileNameFormats = array( '%s.php' );
+
+ foreach($directories as $directory) {
+ foreach($fileNameFormats as $fileNameFormat) {
+ $path = $directory.sprintf($fileNameFormat, $className);
+ if(file_exists($path)) {
+ include_once $path;
+ return true;
+ }
+ }
+ }
+ return false;
+}
+//
+spl_autoload_register('autoLoader');
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include/update.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include/update.php 2014-07-07 09:44:50 UTC (rev 12681)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include/update.php 2014-07-07 14:07:04 UTC (rev 12682)
@@ -45,7 +45,6 @@
/*
* @public function write
* @param string $module
- * @param mixed $table
* @param string $filename
*/
public function write($module, $filename) {
@@ -54,17 +53,122 @@
}
/*
+ * @private function getIncludeUpdateModule
+ * @param string $moduleDirname
+ * @param mixed $moduleVersion
+ */
+ private function getIncludeUpdateModule($moduleDirname, $moduleVersion)
+ {
+ $ret = <<<EOT
+/**
+ * @param \$module
+ * @param null \$prev_version
+ *
+ * @return bool|null
+ */
+function xoops_module_update_{$moduleDirname}(&\$module, \$prev_version = null)
+{
+ // irmtfan bug fix: solve templates duplicate issue
+ \$ret = null;
+ if (\$prev_version < {$moduleVersion}) {
+ \$ret = update_system_v{$moduleVersion}(\$module);
+ }
+ \$errors = \$module->getErrors();
+ if (!empty(\$errors)) {
+ print_r(\$errors);
+ }
+
+ return \$ret;
+ // irmtfan bug fix: solve templates duplicate issue
+}
+EOT;
+ return $ret;
+ }
+
+ /*
+ * @private function getIncludeUpdateVersion
+ * @param string $moduleDirname
+ * @param mixed $moduleVersion
+ */
+ private function getIncludeUpdateVersion($moduleDirname, $moduleVersion)
+ {
+ $ret = <<<EOT
+// irmtfan bug fix: solve templates duplicate issue
+/**
+ * @param \$module
+ *
+ * @return bool
+ */
+function update_{$moduleDirname}_v{$moduleVersion}(&\$module)
+{
+ global \$xoopsDB;
+ \$result = \$xoopsDB->query(
+ "SELECT t1.tpl_id FROM " . \$xoopsDB->prefix('tplfile') . " t1, " . \$xoopsDB->prefix('tplfile')
+ . " t2 WHERE t1.tpl_refid = t2.tpl_refid AND t1.tpl_module = t2.tpl_module AND t1.tpl_tplset=t2.tpl_tplset AND t1.tpl_file = t2.tpl_file AND t1.tpl_type = t2.tpl_type AND t1.tpl_id > t2.tpl_id"
+ );
+ \$tplids = array();
+ while (list(\$tplid) = \$xoopsDB->fetchRow(\$result)) {
+ \$tplids[] = \$tplid;
+ }
+ if (count(\$tplids) > 0) {
+ \$tplfile_handler =& xoops_gethandler('tplfile');
+ \$duplicate_files = \$tplfile_handler->getObjects(
+ new Criteria('tpl_id', "(" . implode(',', \$tplids) . ")", "IN")
+ );
+
+ if (count(\$duplicate_files) > 0) {
+ foreach (array_keys(\$duplicate_files) as \$i) {
+ \$tplfile_handler->delete(\$duplicate_files[\$i]);
+ }
+ }
+ }
+ \$sql = "SHOW INDEX FROM " . \$xoopsDB->prefix('tplfile') . " WHERE KEY_NAME = 'tpl_refid_module_set_file_type'";
+ if (!\$result = \$xoopsDB->queryF(\$sql)) {
+ xoops_error(\$this->db->error() . '<br />' . \$sql);
+
+ return false;
+ }
+ \$ret = array();
+ while (\$myrow = \$xoopsDB->fetchArray(\$result)) {
+ \$ret[] = \$myrow;
+ }
+ if (!empty(\$ret)) {
+ \$module->setErrors(
+ "'tpl_refid_module_set_file_type' unique index is exist. Note: check 'tplfile' table to be sure this index is UNIQUE because XOOPS CORE need it."
+ );
+
+ return true;
+ }
+ \$sql = "ALTER TABLE " . \$xoopsDB->prefix('tplfile')
+ . " ADD UNIQUE tpl_refid_module_set_file_type ( tpl_refid, tpl_module, tpl_tplset, tpl_file, tpl_type )";
+ if (!\$result = \$xoopsDB->queryF(\$sql)) {
+ xoops_error(\$xoopsDB->error() . '<br />' . \$sql);
+ \$module->setErrors(
+ "'tpl_refid_module_set_file_type' unique index is not added to 'tplfile' table. Warning: do not use XOOPS until you add this unique index."
+ );
+
+ return false;
+ }
+
+ return true;
+}
+// irmtfan bug fix: solve templates duplicate issue
+EOT;
+ return $ret;
+ }
+
+ /*
* @public function renderFile
* @param null
*/
public function renderFile() {
$module = $this->getModule();
$filename = $this->getFileName();
- $moduleDirname = $module->getVar('mod_dirname');
+ $moduleDirname = $module->getVar('mod_dirname');
+ $moduleVersion = str_replace('.', '', $module->getVar('mod_version'));
$content = $this->getHeaderFilesComments($module, $filename);
- $content .= <<<EOT
-\n// ---------- Here your update code ---------- //
-EOT;
+ $content .= $this->getIncludeUpdateModule($moduleDirname, $moduleVersion);
+ $content .= $this->getIncludeUpdateVersion($moduleDirname, $moduleVersion);
//
$this->tdmcfile->create($moduleDirname, 'include', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
return $this->tdmcfile->renderFile();
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/install.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/install.php 2014-07-07 09:44:50 UTC (rev 12681)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/install.php 2014-07-07 14:07:04 UTC (rev 12682)
@@ -21,7 +21,7 @@
$indexFile = XOOPS_UPLOAD_PATH.'/index.html';
$blankFile = XOOPS_UPLOAD_PATH.'/blank.gif';
-$emptyFile = XOOPS_ROOT_PATH.'/modules/TDMCreate/assets/images/empty.png';
+$emptyFile = XOOPS_ROOT_PATH.'/modules/tdmcreate/assets/images/empty.png';
// Making of "uploads" folder
$tdmcreate = XOOPS_UPLOAD_PATH.'/tdmcreate';
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/update.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/update.php 2014-07-07 09:44:50 UTC (rev 12681)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/update.php 2014-07-07 14:07:04 UTC (rev 12682)
@@ -17,4 +17,87 @@
* @since 2.5.0
* @author Txmod Xoops http://www.txmodxoops.org
* @version $Id: update.php 12258 2014-01-02 09:33:29Z timgno $
-*/
\ No newline at end of file
+*/
+
+/**
+ * @param $module
+ * @param null $prev_version
+ *
+ * @return bool|null
+ */
+function xoops_module_update_tdmcreate(&$module, $prev_version = null)
+{
+ // irmtfan bug fix: solve templates duplicate issue
+ $ret = null;
+ if ($prev_version < 191) {
+ $ret = update_system_v191($module);
+ }
+ $errors = $module->getErrors();
+ if (!empty($errors)) {
+ print_r($errors);
+ }
+
+ return $ret;
+ // irmtfan bug fix: solve templates duplicate issue
+}
+
+// irmtfan bug fix: solve templates duplicate issue
+/**
+ * @param $module
+ *
+ * @return bool
+ */
+function update_tdmcreate_v191(&$module)
+{
+ global $xoopsDB;
+ $result = $xoopsDB->query(
+ "SELECT t1.tpl_id FROM " . $xoopsDB->prefix('tplfile') . " t1, " . $xoopsDB->prefix('tplfile')
+ . " t2 WHERE t1.tpl_refid = t2.tpl_refid AND t1.tpl_module = t2.tpl_module AND t1.tpl_tplset=t2.tpl_tplset AND t1.tpl_file = t2.tpl_file AND t1.tpl_type = t2.tpl_type AND t1.tpl_id > t2.tpl_id"
+ );
+ $tplids = array();
+ while (list($tplid) = $xoopsDB->fetchRow($result)) {
+ $tplids[] = $tplid;
+ }
+ if (count($tplids) > 0) {
+ $tplfile_handler =& xoops_gethandler('tplfile');
+ $duplicate_files = $tplfile_handler->getObjects(
+ new Criteria('tpl_id', "(" . implode(',', $tplids) . ")", "IN")
+ );
+
+ if (count($duplicate_files) > 0) {
+ foreach (array_keys($duplicate_files) as $i) {
+ $tplfile_handler->delete($duplicate_files[$i]);
+ }
+ }
+ }
+ $sql = "SHOW INDEX FROM " . $xoopsDB->prefix('tplfile') . " WHERE KEY_NAME = 'tpl_refid_module_set_file_type'";
+ if (!$result = $xoopsDB->queryF($sql)) {
+ xoops_error($this->db->error() . '<br />' . $sql);
+
+ return false;
+ }
+ $ret = array();
+ while ($myrow = $xoopsDB->fetchArray($result)) {
+ $ret[] = $myrow;
+ }
+ if (!empty($ret)) {
+ $module->setErrors(
+ "'tpl_refid_module_set_file_type' unique index is exist. Note: check 'tplfile' table to be sure this index is UNIQUE because XOOPS CORE need it."
+ );
+
+ return true;
+ }
+ $sql = "ALTER TABLE " . $xoopsDB->prefix('tplfile')
+ . " ADD UNIQUE tpl_refid_module_set_file_type ( tpl_refid, tpl_module, tpl_tplset, tpl_file, tpl_type )";
+ if (!$result = $xoopsDB->queryF($sql)) {
+ xoops_error($xoopsDB->error() . '<br />' . $sql);
+ $module->setErrors(
+ "'tpl_refid_module_set_file_type' unique index is not added to 'tplfile' table. Warning: do not use XOOPS until you add this unique index."
+ );
+
+ return false;
+ }
+
+ return true;
+}
+// irmtfan bug fix: solve templates duplicate issue
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/english/admin.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/english/admin.php 2014-07-07 09:44:50 UTC (rev 12681)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/english/admin.php 2014-07-07 14:07:04 UTC (rev 12682)
@@ -133,7 +133,10 @@
define('_AM_TDMCREATE_MODULE_MIN_XOOPS', "Minimum XOOPS");
define('_AM_TDMCREATE_MODULE_MIN_ADMIN', "Minimum Admin");
define('_AM_TDMCREATE_MODULE_MIN_MYSQL', "Minimum Database");
-
+// Added in version 1.91
+define('_AM_TDMCREATE_MODULE_FORM_CREATED_OK', "The module <b class='green'>%s</b> is successfully created");
+define('_AM_TDMCREATE_MODULE_FORM_UPDATED_OK', "The module <b class='green'>%s</b> is successfully updated");
+// ------------------- Tables --------------------------------- //
//Tables.php
// Buttons
define('_AM_TDMCREATE_ADD_TABLE', "Add new table");
@@ -170,7 +173,7 @@
define('_AM_TDMCREATE_TABLE_PERMISSIONS', "Permissions for this table");
// v1.38
define('_AM_TDMCREATE_TABLE_IMAGE_DESC', "<span class='red bold'>WARNING</span>: If you want to choose a new image, is best to name it with the module name before and follow with the name of the image so as not to overwrite any images with the same name, in the <span class='bold'>Frameworks/moduleclasses/moduleadmin/icons/32/</span>. Otherwise an other solution, would be to insert the images in the module, a new folder is created, with the creation of the same module - <span class='bold'>images/32</span>.");
-define('_AM_TDMCREATE_TABLE_FORM_SAVED_OK', "The table <b class='green'>%s</b> is successfully saved");
+define('_AM_TDMCREATE_TABLE_FORM_CREATED_OK', "The table <b class='green'>%s</b> is successfully created");
define('_AM_TDMCREATE_TABLE_FORM_UPDATED_OK', "The table <b class='green'>%s</b> is successfully updated");
// ------------------ Form Fields ------------------
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/xoops_version.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/xoops_version.php 2014-07-07 09:44:50 UTC (rev 12681)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/xoops_version.php 2014-07-07 14:07:04 UTC (rev 12682)
@@ -90,7 +90,7 @@
$modversion['tables'][9] = "tdmcreate_fieldelements";
// Scripts to run upon installation or update
$modversion['onInstall'] = "include/install.php";
-//$modversion['onUpdate'] = "include/update.php";
+$modversion['onUpdate'] = "include/update.php";
// Menu
$modversion['hasMain'] = 0;
// Config
|