|
From: <txm...@us...> - 2015-05-11 13:03:31
|
Revision: 13060
http://sourceforge.net/p/xoops/svn/13060
Author: txmodxoops
Date: 2015-05-11 13:03:29 +0000 (Mon, 11 May 2015)
Log Message:
-----------
Fixings and updates
Modified Paths:
--------------
XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/admin/menu.php
XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/class/helper.php
XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/sql/mysql.sql
XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/templates/admin/tdmcreate_locale.tpl
Added Paths:
-----------
XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/admin/locale.php
XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/class/form/locale.php
XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/class/locale.php
XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/sql/schema.yml
Removed Paths:
-------------
XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/admin/locales.php
XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/class/form/locales.php
XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/class/locales.php
Added: XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/admin/locale.php
===================================================================
--- XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/admin/locale.php (rev 0)
+++ XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/admin/locale.php 2015-05-11 13:03:29 UTC (rev 13060)
@@ -0,0 +1,128 @@
+<?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.6.0
+ * @author XOOPS Development Team
+ * @version $Id$
+ */
+include __DIR__ . '/header.php';
+// heaser
+$xoops->header('admin:tdmcreate/tdmcreate_locale.tpl');
+//
+//$localeId = Request::getInt('import_id', 0);
+//
+$adminMenu->renderNavigation('locale.php');
+//
+switch ($op)
+{
+ case 'list':
+ $adminMenu->addItemButton(TDMCreateLocale::ADD_LOCALE, 'locale.php?op=new', 'add');
+ $adminMenu->renderButton();
+ // Get modules list
+ $criteria = new CriteriaCompo();
+ $criteria->setSort('loc_id');
+ $criteria->setOrder('ASC');
+ $criteria->setStart($start);
+ $criteria->setLimit($limit);
+ $numLocale = $localeHandler->getCount($criteria);
+ $localeArr = $localeHandler->getAll($criteria);
+ // Assign Template variables
+ $xoops->tpl()->assign('locale_count', $numLocale);
+ unset($criteria);
+ if ($numLocale > 0) {
+ foreach (array_keys($localeArr) as $i) {
+ $locale['id'] = $localeArr[$i]->getVar('loc_id');
+ $locale['mid'] = $localeArr[$i]->getVar('loc_mid');
+ $locale['name'] = $localeArr[$i]->getVar('loc_file');
+ $locale['define'] = $localeArr[$i]->getVar('loc_define');
+ $locale['description'] = $localeArr[$i]->getVar('loc_description');
+ $xoops->tpl()->append_by_ref('locale', $locale);
+ unset($locale);
+ }
+ // Display Page Navigation
+ if ($numrows > $limit) {
+ $nav = new XoopsPageNav($numrows, $limit, $start, 'start');
+ $xoops->tpl()->assign('pagenav', $nav->renderNav(4));
+ }
+ } else {
+ $xoops->tpl()->assign('error_message', TDMCreateLocale::IMPORT_ERROR_NOLOCALE);
+ }
+ break;
+
+ case 'new':
+ $adminMenu->addItemButton(TDMCreateLocale::IMPORTED_LIST, 'locale.php', 'application-view-detail');
+ $adminMenu->renderButton();
+
+ $obj = $localeHandler->create();
+ $form = $xoops->getModuleForm($obj, 'locale');
+ $xoops->tpl()->assign('form', $form->render());
+ break;
+
+ case 'save':
+ if (!$xoops->security()->check()) {
+ $xoops->redirect('modules.php', 3, implode(',', $xoops->security()->getErrors()));
+ }
+
+ if ($localeId > 0) {
+ $obj = $localeHandler->get($localeId);
+ //Form imported edited save
+ $obj->setVar('loc_mid', Request::getInt('loc_mid'));
+ $obj->setVar('loc_file', Request::getString('loc_file'));
+ $obj->setVar('loc_define', Request::getString('loc_define'));
+ $obj->setVar('loc_description', Request::getString('loc_description'));
+ $xoops->redirect('locale.php', 3, TDMCreateLocale::E_DATABASE_SQL_FILE_NOT_IMPORTED);
+ }
+ if ($localeHandler->insert($obj)) {
+ $xoops->redirect('locale.php', 3, TDMCreateLocale::FORM_OK);
+ }
+
+ $xoops->error($obj->getHtmlErrors());
+ $form = $xoops->getModuleForm($obj, 'locale');
+ $xoops->tpl()->assign('form', $form->render());
+ break;
+
+ case 'edit':
+ $adminMenu->addItemButton(TDMCreateLocale::IMPORT_OLD_MODULE, 'locale.php?op=import', 'add');
+ $adminMenu->addItemButton(TDMCreateLocale::IMPORTED_LIST, 'locale.php', 'application-view-detail');
+ $adminMenu->renderButton();
+
+ $obj = $localeHandler->get($localeId);
+ $form = $xoops->getModuleForm($obj, 'locale');
+ $xoops->tpl()->assign('form', $form->render());
+ break;
+
+ case 'delete':
+ if ($localeId > 0) {
+ $obj = $localeHandler->get($localeId);
+ if (isset($_POST['ok']) && $_POST['ok'] == 1) {
+ if (!$xoops->security()->check()) {
+ $xoops->redirect('locale.php', 3, implode(',', $xoops->security()->getErrors()));
+ }
+ if ($localeHandler->delete($obj)) {
+ $xoops->redirect('locale.php', 2, sprintf(TDMCreateLocale::S_DELETED, TDMCreateLocale::IMPORT));
+ } else {
+ $xoops->error($obj->getHtmlErrors());
+ }
+ } else {
+ $xoops->confirm(array('ok' => 1, 'id' => $localeId, 'op' => 'delete'), 'locale.php', sprintf(TDMCreateLocale::QF_ARE_YOU_SURE_TO_DELETE, $obj->getVar('loc_file')) . '<br />');
+ }
+ } else {
+ $xoops->redirect('locale.php', 1, TDMCreateLocale::E_DATABASE_ERROR);
+ }
+ break;
+}
+
+include __DIR__ . '/footer.php';
\ No newline at end of file
Property changes on: XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/admin/locale.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Deleted: XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/admin/locales.php
===================================================================
--- XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/admin/locales.php 2015-05-08 09:59:39 UTC (rev 13059)
+++ XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/admin/locales.php 2015-05-11 13:03:29 UTC (rev 13060)
@@ -1,128 +0,0 @@
-<?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.6.0
- * @author XOOPS Development Team
- * @version $Id$
- */
-include __DIR__ . '/header.php';
-// heaser
-$xoops->header('admin:tdmcreate/tdmcreate_locale.tpl');
-//
-//$localeId = Request::getInt('import_id', 0);
-//
-$adminMenu->renderNavigation('locales.php');
-//
-switch ($op)
-{
- case 'list':
- $adminMenu->addItemButton(TDMCreateLocale::ADD_LOCALE, 'locales.php?op=new', 'add');
- $adminMenu->renderButton();
- // Get modules list
- $criteria = new CriteriaCompo();
- $criteria->setSort('loc_id');
- $criteria->setOrder('ASC');
- $criteria->setStart($start);
- $criteria->setLimit($limit);
- $numLocale = $localeHandler->getCount($criteria);
- $localeArr = $localeHandler->getAll($criteria);
- // Assign Template variables
- $xoops->tpl()->assign('locale_count', $numLocale);
- unset($criteria);
- if ($numLocale > 0) {
- foreach (array_keys($localeArr) as $i) {
- $locale['id'] = $localeArr[$i]->getVar('loc_id');
- $locale['mid'] = $localeArr[$i]->getVar('loc_mid');
- $locale['name'] = $localeArr[$i]->getVar('loc_file');
- $locale['define'] = $localeArr[$i]->getVar('loc_define');
- $locale['description'] = $localeArr[$i]->getVar('loc_description');
- $xoops->tpl()->append_by_ref('locales', $locale);
- unset($locale);
- }
- // Display Page Navigation
- if ($numrows > $limit) {
- $nav = new XoopsPageNav($numrows, $limit, $start, 'start');
- $xoops->tpl()->assign('pagenav', $nav->renderNav(4));
- }
- } else {
- $xoops->tpl()->assign('error_message', TDMCreateLocale::IMPORT_ERROR_NOLOCALE);
- }
- break;
-
- case 'new':
- $adminMenu->addItemButton(TDMCreateLocale::IMPORTED_LIST, 'locales.php', 'application-view-detail');
- $adminMenu->renderButton();
-
- $obj = $localeHandler->create();
- $form = $xoops->getModuleForm($obj, 'locales');
- $xoops->tpl()->assign('form', $form->render());
- break;
-
- case 'save':
- if (!$xoops->security()->check()) {
- $xoops->redirect('modules.php', 3, implode(',', $xoops->security()->getErrors()));
- }
-
- if ($localeId > 0) {
- $obj = $localeHandler->get($localeId);
- //Form imported edited save
- $obj->setVar('loc_mid', Request::getInt('loc_mid'));
- $obj->setVar('loc_file', Request::getString('loc_file'));
- $obj->setVar('loc_define', Request::getString('loc_define'));
- $obj->setVar('loc_description', Request::getString('loc_description'));
- $xoops->redirect('locales.php', 3, TDMCreateLocale::E_DATABASE_SQL_FILE_NOT_IMPORTED);
- }
- if ($localeHandler->insert($obj)) {
- $xoops->redirect('locales.php', 3, TDMCreateLocale::FORM_OK);
- }
-
- $xoops->error($obj->getHtmlErrors());
- $form = $xoops->getModuleForm($obj, 'locales');
- $xoops->tpl()->assign('form', $form->render());
- break;
-
- case 'edit':
- $adminMenu->addItemButton(TDMCreateLocale::IMPORT_OLD_MODULE, 'locales.php?op=import', 'add');
- $adminMenu->addItemButton(TDMCreateLocale::IMPORTED_LIST, 'locales.php', 'application-view-detail');
- $adminMenu->renderButton();
-
- $obj = $localeHandler->get($localeId);
- $form = $xoops->getModuleForm($obj, 'locales');
- $xoops->tpl()->assign('form', $form->render());
- break;
-
- case 'delete':
- if ($localeId > 0) {
- $obj = $localeHandler->get($localeId);
- if (isset($_POST['ok']) && $_POST['ok'] == 1) {
- if (!$xoops->security()->check()) {
- $xoops->redirect('locales.php', 3, implode(',', $xoops->security()->getErrors()));
- }
- if ($localeHandler->delete($obj)) {
- $xoops->redirect('locales.php', 2, sprintf(TDMCreateLocale::S_DELETED, TDMCreateLocale::IMPORT));
- } else {
- $xoops->error($obj->getHtmlErrors());
- }
- } else {
- $xoops->confirm(array('ok' => 1, 'id' => $localeId, 'op' => 'delete'), 'locales.php', sprintf(TDMCreateLocale::QF_ARE_YOU_SURE_TO_DELETE, $obj->getVar('loc_file')) . '<br />');
- }
- } else {
- $xoops->redirect('locales.php', 1, TDMCreateLocale::E_DATABASE_ERROR);
- }
- break;
-}
-
-include __DIR__ . '/footer.php';
\ No newline at end of file
Modified: XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/admin/menu.php
===================================================================
--- XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/admin/menu.php 2015-05-08 09:59:39 UTC (rev 13059)
+++ XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/admin/menu.php 2015-05-11 13:03:29 UTC (rev 13060)
@@ -37,7 +37,7 @@
$adminmenu[$i]['icon'] = 'editfields.png';
$i++;
$adminmenu[$i]['title'] = TDMCreateLocale::ADMIN_MENU5;
-$adminmenu[$i]['link'] = 'admin/locales.php';
+$adminmenu[$i]['link'] = 'admin/locale.php';
$adminmenu[$i]['icon'] = 'languages.png';
$i++;
$adminmenu[$i]['title'] = TDMCreateLocale::ADMIN_MENU6;
Added: XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/class/form/locale.php
===================================================================
--- XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/class/form/locale.php (rev 0)
+++ XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/class/form/locale.php 2015-05-11 13:03:29 UTC (rev 13060)
@@ -0,0 +1,41 @@
+<?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.6.0
+ * @author Timgno <txm...@gm...>
+ * @version $Id$
+ */
+
+class TDMCreateLocaleForm extends Xoops\Form\ThemeForm
+{
+ /**
+ * @param TDMCreateLocale|XoopsObject $obj
+ */
+ public function __construct(TDMCreateLocale &$obj)
+ {
+ $xoops = Xoops::getInstance();
+
+ $title = $obj->isNew() ? TDMCreateLocale::A_ADD_LOCALE : PageLocale::A_EDIT_LOCALE;
+ parent::__construct($title, 'form', 'locale.php', 'post', true);
+
+ $this->addElement(new XoopsFormText(XoopsLocale::LOCALE_FILE_NAME, 'loc_file', 50, 255, $obj->getVar('loc_file')), true);
+ $this->addElement(new XoopsFormText(XoopsLocale::LOCALE_DEFINE, 'loc_define', 50, 255, $obj->getVar('loc_define')), true);
+ $this->addElement(new XoopsFormText(XoopsLocale::LOCALE_DESCRIPTION, 'loc_description', 50, 255, $obj->getVar('loc_description')), true);
+
+ $this->addElement(new XoopsFormHidden('op', 'save' ) );
+ $this->addElement(new XoopsFormButton('', 'submit', XoopsLocale::A_SUBMIT, 'submit' ) );
+ }
+}
\ No newline at end of file
Property changes on: XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/class/form/locale.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Deleted: XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/class/form/locales.php
===================================================================
--- XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/class/form/locales.php 2015-05-08 09:59:39 UTC (rev 13059)
+++ XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/class/form/locales.php 2015-05-11 13:03:29 UTC (rev 13060)
@@ -1,41 +0,0 @@
-<?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.6.0
- * @author Timgno <txm...@gm...>
- * @version $Id$
- */
-
-class TDMCreateLocalesForm extends Xoops\Form\ThemeForm
-{
- /**
- * @param TDMCreateLocale|XoopsObject $obj
- */
- public function __construct(TDMCreateLocales &$obj)
- {
- $xoops = Xoops::getInstance();
-
- $title = $obj->isNew() ? TDMCreateLocale::A_ADD_LOCALE : PageLocale::A_EDIT_LOCALE;
- parent::__construct($title, 'form', 'locales.php', 'post', true);
-
- $this->addElement(new XoopsFormText(XoopsLocale::LOCALE_FILE_NAME, 'loc_file', 50, 255, $obj->getVar('loc_file')), true);
- $this->addElement(new XoopsFormText(XoopsLocale::LOCALE_DEFINE, 'loc_define', 50, 255, $obj->getVar('loc_define')), true);
- $this->addElement(new XoopsFormText(XoopsLocale::LOCALE_DESCRIPTION, 'loc_description', 50, 255, $obj->getVar('loc_description')), true);
-
- $this->addElement(new XoopsFormHidden('op', 'save' ) );
- $this->addElement(new XoopsFormButton('', 'submit', XoopsLocale::A_SUBMIT, 'submit' ) );
- }
-}
\ No newline at end of file
Modified: XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/class/helper.php
===================================================================
--- XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/class/helper.php 2015-05-08 09:59:39 UTC (rev 13059)
+++ XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/class/helper.php 2015-05-11 13:03:29 UTC (rev 13060)
@@ -64,11 +64,11 @@
}
/**
- * @return TDMCreateTDMCreate_localesHandler
+ * @return TDMCreateTDMCreate_localeHandler
*/
- public function getLocalesHandler()
+ public function getLocaleHandler()
{
- return $this->getHandler('locales');
+ return $this->getHandler('locale');
}
/**
Added: XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/class/locale.php
===================================================================
--- XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/class/locale.php (rev 0)
+++ XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/class/locale.php 2015-05-11 13:03:29 UTC (rev 13060)
@@ -0,0 +1,51 @@
+<?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.
+*/
+use Xoops\Core\Database\Connection;
+/**
+ * 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.6.0
+ * @author Timgno <txm...@gm...>
+ * @version $Id$
+ */
+/**
+ * Class TDMCreateLocale
+ */
+class TDMCreateLocale extends XoopsObject
+{
+ /**
+ * Constructor
+ */
+ public function __construct()
+ {
+ $this->initVar('loc_id',XOBJ_DTYPE_INT);
+ $this->initVar('loc_mid',XOBJ_DTYPE_INT);
+ $this->initVar('loc_file',XOBJ_DTYPE_TXTBOX);
+ $this->initVar('loc_define',XOBJ_DTYPE_TXTBOX);
+ $this->initVar('loc_description',XOBJ_DTYPE_TXTBOX);
+ }
+}
+/**
+ * Class TDMCreateLocaleHandler
+ */
+class TDMCreateLocaleHandler extends XoopsPersistableObjectHandler
+{
+ /**
+ * @param null|Connection $db
+ */
+ public function __construct(Connection $db = null)
+ {
+ parent::__construct($db, 'tdmcreate_locale', 'tdmcreatelocale', 'loc_id', 'loc_mid');
+ }
+}
Property changes on: XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/class/locale.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Deleted: XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/class/locales.php
===================================================================
--- XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/class/locales.php 2015-05-08 09:59:39 UTC (rev 13059)
+++ XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/class/locales.php 2015-05-11 13:03:29 UTC (rev 13060)
@@ -1,51 +0,0 @@
-<?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.
-*/
-use Xoops\Core\Database\Connection;
-/**
- * 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.6.0
- * @author Timgno <txm...@gm...>
- * @version $Id$
- */
-/**
- * Class TDMCreateLocales
- */
-class TDMCreateLocales extends XoopsObject
-{
- /**
- * Constructor
- */
- public function __construct()
- {
- $this->initVar('loc_id',XOBJ_DTYPE_INT);
- $this->initVar('loc_mid',XOBJ_DTYPE_INT);
- $this->initVar('loc_file',XOBJ_DTYPE_TXTBOX);
- $this->initVar('loc_define',XOBJ_DTYPE_TXTBOX);
- $this->initVar('loc_description',XOBJ_DTYPE_TXTBOX);
- }
-}
-/**
- * Class TDMCreateLocalesHandler
- */
-class TDMCreateLocalesHandler extends XoopsPersistableObjectHandler
-{
- /**
- * @param null|Connection $db
- */
- public function __construct(Connection $db = null)
- {
- parent::__construct($db, 'tdmcreate_locales', 'tdmcreatelocales', 'loc_id', 'loc_mid');
- }
-}
Modified: XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/sql/mysql.sql
===================================================================
--- XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/sql/mysql.sql 2015-05-08 09:59:39 UTC (rev 13059)
+++ XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/sql/mysql.sql 2015-05-11 13:03:29 UTC (rev 13060)
@@ -143,7 +143,7 @@
# Table structure for table `tdmcreate_languages` 5
#
-CREATE TABLE `tdmcreate_locales` (
+CREATE TABLE `tdmcreate_locale` (
`loc_id` INT(5) UNSIGNED NOT NULL AUTO_INCREMENT,
`loc_mid` INT(5) UNSIGNED NOT NULL DEFAULT '0',
`loc_file` VARCHAR(255) NOT NULL DEFAULT '',
Added: XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/sql/schema.yml
===================================================================
--- XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/sql/schema.yml (rev 0)
+++ XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/sql/schema.yml 2015-05-11 13:03:29 UTC (rev 13060)
@@ -0,0 +1,456 @@
+tables:
+ profile_category:
+ options: { }
+ columns:
+ cat_id:
+ name: cat_id
+ type: smallint
+ default: null
+ notnull: true
+ length: null
+ precision: 10
+ scale: 0
+ fixed: false
+ unsigned: true
+ autoincrement: true
+ columnDefinition: null
+ comment: ''
+ cat_title:
+ name: cat_title
+ type: string
+ default: ''
+ notnull: true
+ length: 255
+ precision: 10
+ scale: 0
+ fixed: false
+ unsigned: false
+ autoincrement: false
+ columnDefinition: null
+ comment: ''
+ cat_description:
+ name: cat_description
+ type: text
+ default: null
+ notnull: false
+ length: null
+ precision: 10
+ scale: 0
+ fixed: false
+ unsigned: false
+ autoincrement: false
+ columnDefinition: null
+ comment: ''
+ cat_weight:
+ name: cat_weight
+ type: smallint
+ default: '0'
+ notnull: true
+ length: null
+ precision: 10
+ scale: 0
+ fixed: false
+ unsigned: true
+ autoincrement: false
+ columnDefinition: null
+ comment: ''
+ indexes:
+ PRIMARY:
+ name: PRIMARY
+ columns: [cat_id]
+ unique: true
+ primary: true
+ profile_field:
+ options: { }
+ columns:
+ field_id:
+ name: field_id
+ type: integer
+ default: null
+ notnull: true
+ length: null
+ precision: 10
+ scale: 0
+ fixed: false
+ unsigned: true
+ autoincrement: true
+ columnDefinition: null
+ comment: ''
+ cat_id:
+ name: cat_id
+ type: smallint
+ default: '0'
+ notnull: true
+ length: null
+ precision: 10
+ scale: 0
+ fixed: false
+ unsigned: true
+ autoincrement: false
+ columnDefinition: null
+ comment: ''
+ field_type:
+ name: field_type
+ type: string
+ default: ''
+ notnull: true
+ length: 30
+ precision: 10
+ scale: 0
+ fixed: false
+ unsigned: false
+ autoincrement: false
+ columnDefinition: null
+ comment: ''
+ field_valuetype:
+ name: field_valuetype
+ type: boolean
+ default: '0'
+ notnull: true
+ length: null
+ precision: 10
+ scale: 0
+ fixed: false
+ unsigned: true
+ autoincrement: false
+ columnDefinition: null
+ comment: ''
+ field_name:
+ name: field_name
+ type: string
+ default: ''
+ notnull: true
+ length: 255
+ precision: 10
+ scale: 0
+ fixed: false
+ unsigned: false
+ autoincrement: false
+ columnDefinition: null
+ comment: ''
+ field_title:
+ name: field_title
+ type: string
+ default: ''
+ notnull: true
+ length: 255
+ precision: 10
+ scale: 0
+ fixed: false
+ unsigned: false
+ autoincrement: false
+ columnDefinition: null
+ comment: ''
+ field_description:
+ name: field_description
+ type: text
+ default: null
+ notnull: false
+ length: null
+ precision: 10
+ scale: 0
+ fixed: false
+ unsigned: false
+ autoincrement: false
+ columnDefinition: null
+ comment: ''
+ field_required:
+ name: field_required
+ type: boolean
+ default: '0'
+ notnull: true
+ length: null
+ precision: 10
+ scale: 0
+ fixed: false
+ unsigned: true
+ autoincrement: false
+ columnDefinition: null
+ comment: ''
+ field_maxlength:
+ name: field_maxlength
+ type: smallint
+ default: '0'
+ notnull: true
+ length: null
+ precision: 10
+ scale: 0
+ fixed: false
+ unsigned: true
+ autoincrement: false
+ columnDefinition: null
+ comment: ''
+ field_weight:
+ name: field_weight
+ type: smallint
+ default: '0'
+ notnull: true
+ length: null
+ precision: 10
+ scale: 0
+ fixed: false
+ unsigned: true
+ autoincrement: false
+ columnDefinition: null
+ comment: ''
+ field_default:
+ name: field_default
+ type: text
+ default: null
+ notnull: false
+ length: null
+ precision: 10
+ scale: 0
+ fixed: false
+ unsigned: false
+ autoincrement: false
+ columnDefinition: null
+ comment: ''
+ field_notnull:
+ name: field_notnull
+ type: boolean
+ default: '0'
+ notnull: true
+ length: null
+ precision: 10
+ scale: 0
+ fixed: false
+ unsigned: true
+ autoincrement: false
+ columnDefinition: null
+ comment: ''
+ field_edit:
+ name: field_edit
+ type: boolean
+ default: '0'
+ notnull: true
+ length: null
+ precision: 10
+ scale: 0
+ fixed: false
+ unsigned: true
+ autoincrement: false
+ columnDefinition: null
+ comment: ''
+ field_show:
+ name: field_show
+ type: boolean
+ default: '0'
+ notnull: true
+ length: null
+ precision: 10
+ scale: 0
+ fixed: false
+ unsigned: true
+ autoincrement: false
+ columnDefinition: null
+ comment: ''
+ field_config:
+ name: field_config
+ type: boolean
+ default: '0'
+ notnull: true
+ length: null
+ precision: 10
+ scale: 0
+ fixed: false
+ unsigned: true
+ autoincrement: false
+ columnDefinition: null
+ comment: ''
+ field_options:
+ name: field_options
+ type: text
+ default: null
+ notnull: false
+ length: null
+ precision: 10
+ scale: 0
+ fixed: false
+ unsigned: false
+ autoincrement: false
+ columnDefinition: null
+ comment: ''
+ step_id:
+ name: step_id
+ type: smallint
+ default: '0'
+ notnull: true
+ length: null
+ precision: 10
+ scale: 0
+ fixed: false
+ unsigned: true
+ autoincrement: false
+ columnDefinition: null
+ comment: ''
+ indexes:
+ PRIMARY:
+ name: PRIMARY
+ columns: [field_id]
+ unique: true
+ primary: true
+ field_name:
+ name: field_name
+ columns: [field_name]
+ unique: true
+ primary: false
+ step:
+ name: step
+ columns: [step_id, field_weight]
+ unique: false
+ primary: false
+ profile_profile:
+ options: { }
+ columns:
+ profile_id:
+ name: profile_id
+ type: integer
+ default: '0'
+ notnull: true
+ length: null
+ precision: 10
+ scale: 0
+ fixed: false
+ unsigned: true
+ autoincrement: false
+ columnDefinition: null
+ comment: ''
+ indexes:
+ PRIMARY:
+ name: PRIMARY
+ columns: [profile_id]
+ unique: true
+ primary: true
+ profile_regstep:
+ options: { }
+ columns:
+ step_id:
+ name: step_id
+ type: smallint
+ default: null
+ notnull: true
+ length: null
+ precision: 10
+ scale: 0
+ fixed: false
+ unsigned: true
+ autoincrement: true
+ columnDefinition: null
+ comment: ''
+ step_name:
+ name: step_name
+ type: string
+ default: ''
+ notnull: true
+ length: 255
+ precision: 10
+ scale: 0
+ fixed: false
+ unsigned: false
+ autoincrement: false
+ columnDefinition: null
+ comment: ''
+ step_desc:
+ name: step_desc
+ type: text
+ default: null
+ notnull: false
+ length: null
+ precision: 10
+ scale: 0
+ fixed: false
+ unsigned: false
+ autoincrement: false
+ columnDefinition: null
+ comment: ''
+ step_order:
+ name: step_order
+ type: smallint
+ default: '0'
+ notnull: true
+ length: null
+ precision: 10
+ scale: 0
+ fixed: false
+ unsigned: true
+ autoincrement: false
+ columnDefinition: null
+ comment: ''
+ step_save:
+ name: step_save
+ type: boolean
+ default: '0'
+ notnull: true
+ length: null
+ precision: 10
+ scale: 0
+ fixed: false
+ unsigned: true
+ autoincrement: false
+ columnDefinition: null
+ comment: ''
+ indexes:
+ PRIMARY:
+ name: PRIMARY
+ columns: [step_id]
+ unique: true
+ primary: true
+ sort:
+ name: sort
+ columns: [step_order, step_name]
+ unique: false
+ primary: false
+ profile_visibility:
+ options: { }
+ columns:
+ field_id:
+ name: field_id
+ type: integer
+ default: '0'
+ notnull: true
+ length: null
+ precision: 10
+ scale: 0
+ fixed: false
+ unsigned: true
+ autoincrement: false
+ columnDefinition: null
+ comment: ''
+ user_group:
+ name: user_group
+ type: smallint
+ default: '0'
+ notnull: true
+ length: null
+ precision: 10
+ scale: 0
+ fixed: false
+ unsigned: true
+ autoincrement: false
+ columnDefinition: null
+ comment: ''
+ profile_group:
+ name: profile_group
+ type: smallint
+ default: '0'
+ notnull: true
+ length: null
+ precision: 10
+ scale: 0
+ fixed: false
+ unsigned: true
+ autoincrement: false
+ columnDefinition: null
+ comment: ''
+ indexes:
+ PRIMARY:
+ name: PRIMARY
+ columns: [field_id, user_group, profile_group]
+ unique: true
+ primary: true
+ visible:
+ name: visible
+ columns: [user_group, profile_group]
+ unique: false
+ primary: false
Modified: XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/templates/admin/tdmcreate_locale.tpl
===================================================================
--- XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/templates/admin/tdmcreate_locale.tpl 2015-05-08 09:59:39 UTC (rev 13059)
+++ XoopsModules26/tdmcreate/branches/2.01/timgno/tdmcreate/templates/admin/tdmcreate_locale.tpl 2015-05-11 13:03:29 UTC (rev 13060)
@@ -14,17 +14,17 @@
</tr>
</thead>
<tbody>
- <{foreach item=locale from=$locales}>
+ <{foreach item=loc from=$locale}>
<tr class="<{cycle values='even,odd'}>">
- <td class='txtcenter'><{$locale.id}></td>
- <td class='txtcenter'><{$locale.mid}></td>
- <td class='txtcenter'><{$locale.file}></td>
- <td class='txtcenter'><{$locale.define}></td>
- <td class='txtcenter'><{$locale.description}></td>
+ <td class='txtcenter'><{$loc.id}></td>
+ <td class='txtcenter'><{$loc.mid}></td>
+ <td class='txtcenter'><{$loc.file}></td>
+ <td class='txtcenter'><{$loc.define}></td>
+ <td class='txtcenter'><{$loc.description}></td>
<td class='xo-actions txtcenter width6'>
- <a href='locale.php?op=edit&id=<{$locale.id}>' title='<{translate key="A_EDIT"}>'>
+ <a href='locale.php?op=edit&id=<{$loc.id}>' title='<{translate key="A_EDIT"}>'>
<img src="<{xoAdminIcons 'edit.png'}>" alt='<{translate key="A_EDIT"}>' /></a>
- <a href='locale.php?op=delete&id=<{$locale.id}>' title='<{translate key="A_DELETE"}>'>
+ <a href='locale.php?op=delete&id=<{$loc.id}>' title='<{translate key="A_DELETE"}>'>
<img src="<{xoAdminIcons 'delete.png'}>" alt='<{translate key="A_DELETE"}>' /></a>
</td>
</tr>
|