|
From: <txm...@us...> - 2014-08-07 06:47:33
|
Revision: 12734
http://sourceforge.net/p/xoops/svn/12734
Author: txmodxoops
Date: 2014-08-07 06:47:28 +0000 (Thu, 07 Aug 2014)
Log Message:
-----------
- Fixed bugs (goffy/timgno)
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/admin/tables.php
XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/class/tables.php
XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/language/english/admin.php
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/admin/tables.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/admin/tables.php 2014-07-28 20:17:51 UTC (rev 12733)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/admin/tables.php 2014-08-07 06:47:28 UTC (rev 12734)
@@ -57,14 +57,14 @@
$numbModules = $tdmcreate->getHandler('modules')->getCount($criteria);
// Redirect if there aren't modules
if ( $numbModules == 0 ) {
- redirect_header('modules.php?op=new', 2, _AM_TDMCREATE_NOTMODULES );
+ redirect_header('modules.php?op=new', 10, _AM_TDMCREATE_NOTMODULES );
}
$mods_arr = $tdmcreate->getHandler('modules')->getAll($criteria);
unset($criteria);
$numbTables = $tdmcreate->getHandler('tables')->getObjects(null);
// Redirect if there aren't tables
if ($numbTables == 0) {
- redirect_header('tables.php?op=new', 2, _AM_TDMCREATE_NOTTABLES );
+ redirect_header('tables.php?op=new', 10, _AM_TDMCREATE_NOTTABLES );
}
unset($numbTables);
// Display modules list
@@ -147,6 +147,12 @@
if ( !$GLOBALS['xoopsSecurity']->check() ) {
redirect_header('tables.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
}
+ // By goffy/timgno
+ if( ($tableMid == 0) {
+ redirect_header('tables.php?op=new', 10, _AM_TDMCREATE_ERROR_NO_MODULE_SEL);
+ exit();
+ }
+ //
$tables =& $tdmcreate->getHandler('tables');
if (!isset($tableId)) {
// Checking if table name exist
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/class/tables.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/class/tables.php 2014-07-28 20:17:51 UTC (rev 12733)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/class/tables.php 2014-08-07 06:47:28 UTC (rev 12734)
@@ -106,7 +106,7 @@
//
$modules = $this->tdmcreate->getHandler('modules')->getObjects(null);
$mods_select = new XoopsFormSelect(_AM_TDMCREATE_TABLE_MODULES, 'table_mid', $table_mid);
- $mods_select->addOption($action, _AM_TDMCREATE_TABLE_MODSELOPT);
+ $mods_select->addOption(0, _AM_TDMCREATE_TABLE_MODSELOPT);
foreach ($modules as $mod) {//$mods_select->addOptionArray();
$mods_select->addOption($mod->getVar('mod_id'), $mod->getVar('mod_name'));
}
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-28 20:17:51 UTC (rev 12733)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/tdmcreate/language/english/admin.php 2014-08-07 06:47:28 UTC (rev 12734)
@@ -302,4 +302,6 @@
define('_AM_TDMCREATE_FILE_NOTCREATED', "Problems: Creating file <b class='red'>%s</b> in the <span class='red bold'>%s</span> folder");
//
define('_AM_TDMCREATE_BUILDING_DIRECTORY', "Files created in the directory <span class='bold'>uploads/tdmcreate/repository/</span> of the module <span class='bold green'>%s</span>");
-define('_AM_TDMCREATE_FIELD_PARAMETERS_LIST', "<b>Parameters List</b>");
\ No newline at end of file
+define('_AM_TDMCREATE_FIELD_PARAMETERS_LIST', "<b>Parameters List</b>");
+// By goffy/timgno
+define('_AM_TDMCREATE_ERROR_NO_MODULE_SEL', "ERROR: No module selected");
\ No newline at end of file
|