From minahito @ users.sourceforge.jp Sat Jul 1 13:17:28 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Sat, 1 Jul 2006 13:17:28 +0900 Subject: [xoops-cvslog 3392] CVS update: xoops2jp/html/kernel Message-ID: <20060701041728.C46F72AC048@users.sourceforge.jp> Index: xoops2jp/html/kernel/block.php diff -u xoops2jp/html/kernel/block.php:1.2.8.7 xoops2jp/html/kernel/block.php:1.2.8.8 --- xoops2jp/html/kernel/block.php:1.2.8.7 Sun Apr 16 11:35:38 2006 +++ xoops2jp/html/kernel/block.php Sat Jul 1 13:17:28 2006 @@ -1,5 +1,5 @@ * Legal value for the type of content
@@ -115,36 +119,41 @@ **/ function &getContent($format = 'S', $c_type = 'T') { + $ret = null; + switch ( $format ) { case 'S': + // check the type of content // H : custom HTML block // P : custom PHP block // S : use text sanitizater (smilies enabled) // T : use text sanitizater (smilies disabled) if ( $c_type == 'H' ) { - return str_replace('{X_SITEURL}', XOOPS_URL.'/', $this->getVar('content', 'N')); + $ret = str_replace('{X_SITEURL}', XOOPS_URL.'/', $this->getVar('content', 'N')); } elseif ( $c_type == 'P' ) { ob_start(); echo eval($this->getVar('content', 'N')); $content = ob_get_contents(); ob_end_clean(); - return str_replace('{X_SITEURL}', XOOPS_URL.'/', $content); + $ret = str_replace('{X_SITEURL}', XOOPS_URL.'/', $content); } elseif ( $c_type == 'S' ) { $myts =& MyTextSanitizer::getInstance(); - return str_replace('{X_SITEURL}', XOOPS_URL.'/', $myts->displayTarea($this->getVar('content', 'N'), 1, 1)); + $ret = str_replace('{X_SITEURL}', XOOPS_URL.'/', $myts->displayTarea($this->getVar('content', 'N'), 1, 1)); } else { $myts =& MyTextSanitizer::getInstance(); - return str_replace('{X_SITEURL}', XOOPS_URL.'/', $myts->displayTarea($this->getVar('content', 'N'), 1, 0)); + $ret = str_replace('{X_SITEURL}', XOOPS_URL.'/', $myts->displayTarea($this->getVar('content', 'N'), 1, 0)); } break; case 'E': - return $this->getVar('content', 'E'); + $ret = $this->getVar('content', 'E'); break; default: - return $this->getVar('content', 'N'); + $ret = $this->getVar('content', 'N'); break; } + + return $ret; } function &buildBlock() From minahito @ users.sourceforge.jp Sat Jul 1 13:18:10 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Sat, 1 Jul 2006 13:18:10 +0900 Subject: [xoops-cvslog 3393] CVS update: xoops2jp/html/class/xoopsform Message-ID: <20060701041810.CF0C12AC048@users.sourceforge.jp> Index: xoops2jp/html/class/xoopsform/formdhtmltextarea.php diff -u xoops2jp/html/class/xoopsform/formdhtmltextarea.php:1.2.8.1 xoops2jp/html/class/xoopsform/formdhtmltextarea.php:1.2.8.2 --- xoops2jp/html/class/xoopsform/formdhtmltextarea.php:1.2.8.1 Wed Oct 19 02:18:33 2005 +++ xoops2jp/html/class/xoopsform/formdhtmltextarea.php Sat Jul 1 13:18:10 2006 @@ -1,5 +1,5 @@ url email imgsrc image code quote
\n"; + $ret = "url email imgsrc image code quote
\n"; $sizearray = array("xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large"); - $ret .= "\n"; $ret .= "\n"; foreach ( $sizearray as $size ) { $ret .= "\n"; } $ret .= "\n"; $fontarray = array("Arial", "Courier", "Georgia", "Helvetica", "Impact", "Verdana"); - $ret .= "\n"; $ret .= "\n"; foreach ( $fontarray as $font ) { $ret .= "\n"; } $ret .= "\n"; $colorarray = array("00", "33", "66", "99", "CC", "FF"); - $ret .= "\n"; $ret .= "\n"; foreach ( $colorarray as $color1 ) { foreach ( $colorarray as $color2 ) { @@ -113,7 +113,7 @@ } $ret .= ""._EXAMPLE."\n"; $ret .= "
\n"; - $ret .= "bold italic underline linethrough   


\n"; + $ret .= "bold italic underline linethrough   


\n"; $ret .= $this->_renderSmileys(); return $ret; } @@ -132,18 +132,18 @@ $db =& Database::getInstance(); if ($result = $db->query('SELECT * FROM '.$db->prefix('smiles').' WHERE display=1')) { while ($smiles = $db->fetchArray($result)) { - $ret .= ""; + $ret .= ""; } } } else { $count = count($smiles); for ($i = 0; $i < $count; $i++) { if ($smiles[$i]['display'] == 1) { - $ret .= ""; + $ret .= ""; } } } - $ret .= " ["._MORE."]"; + $ret .= " ["._MORE."]"; return $ret; } } From minahito @ users.sourceforge.jp Sat Jul 1 13:18:46 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Sat, 1 Jul 2006 13:18:46 +0900 Subject: [xoops-cvslog 3394] CVS update: xoops2jp/html/class/xoopsform Message-ID: <20060701041846.7E0042AC048@users.sourceforge.jp> Index: xoops2jp/html/class/xoopsform/formelement.php diff -u xoops2jp/html/class/xoopsform/formelement.php:1.2.8.1 xoops2jp/html/class/xoopsform/formelement.php:1.2.8.2 --- xoops2jp/html/class/xoopsform/formelement.php:1.2.8.1 Wed Oct 19 02:18:33 2005 +++ xoops2jp/html/class/xoopsform/formelement.php Sat Jul 1 13:18:46 2006 @@ -1,5 +1,5 @@ _id = $id; + } + + /** + * get the "id" attribute for the element. If ID is empty, return getName(). + */ + function getId() { + return $this->_id != null ? $this->_id : $this->getName(); + } + + /** * set the "accesskey" attribute for the element * * @param string $key "accesskey" attribute for the element From minahito @ users.sourceforge.jp Sat Jul 1 13:20:24 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Sat, 1 Jul 2006 13:20:24 +0900 Subject: [xoops-cvslog 3395] CVS update: xoops2jp/html/class/smarty/plugins Message-ID: <20060701042024.DDCB42AC048@users.sourceforge.jp> Index: xoops2jp/html/class/smarty/plugins/function.xoops_dhtmltarea.php diff -u xoops2jp/html/class/smarty/plugins/function.xoops_dhtmltarea.php:1.1.2.2 xoops2jp/html/class/smarty/plugins/function.xoops_dhtmltarea.php:1.1.2.3 --- xoops2jp/html/class/smarty/plugins/function.xoops_dhtmltarea.php:1.1.2.2 Fri Nov 25 00:28:43 2005 +++ xoops2jp/html/class/smarty/plugins/function.xoops_dhtmltarea.php Sat Jul 1 13:20:24 2006 @@ -1,4 +1,17 @@ setId($id); + if ($class != null) { + $form->setClass($class); + } + print $form->render(); } } Index: xoops2jp/html/class/smarty/plugins/function.xoops_textarea.php diff -u xoops2jp/html/class/smarty/plugins/function.xoops_textarea.php:1.1.2.3 xoops2jp/html/class/smarty/plugins/function.xoops_textarea.php:1.1.2.4 --- xoops2jp/html/class/smarty/plugins/function.xoops_textarea.php:1.1.2.3 Fri Nov 25 00:28:21 2005 +++ xoops2jp/html/class/smarty/plugins/function.xoops_textarea.php Sat Jul 1 13:20:24 2006 @@ -1,4 +1,14 @@ ".$value.""; + $string .= " />" . $value . ""; + // + // Output. + // print $string; } } Index: xoops2jp/html/class/smarty/plugins/function.xoops_input.php diff -u xoops2jp/html/class/smarty/plugins/function.xoops_input.php:1.1.2.7 xoops2jp/html/class/smarty/plugins/function.xoops_input.php:1.1.2.8 --- xoops2jp/html/class/smarty/plugins/function.xoops_input.php:1.1.2.7 Wed Mar 29 18:43:47 2006 +++ xoops2jp/html/class/smarty/plugins/function.xoops_input.php Sat Jul 1 13:20:24 2006 @@ -1,4 +1,15 @@ pattern. We may have to divide it. + * 3) Some users and developers want free elements at $params. For example, + * $params['script']... This function have not impletented that yet. At + * implementing, we will have to define the rule about sanitizing. + * + * @version $Id: function.xoops_input.php,v 1.1.2.8 2006/07/01 04:20:24 minahito Exp $ + */ /* * Smarty plugin @@ -13,55 +24,73 @@ * key = key of the name. If this parameter is array, set it. * type = "text" or other * value = preset value - * class = html class - * size = - * maxlength = - * default ~ + * class = form 'class'. + * id = form 'id'. If it's empty, ID is defined automatically by prefix & name. + * size = size element. + * maxlength = maxlength element. + * default = If it equals 'value', add "checked" element in the case of "select" or "radio". + * disabled = disabled element. * * Examples: {xoops_input name=text value=$message} * {xoops_input name=checkbox value=1 default=$value } * ------------------------------------------------------------- */ + +define ("XOOPS_INPUT_DEFID_PREFIX", "legacy_xoopsform_"); + function smarty_function_xoops_input($params, &$smarty) { - if(isset($params['name'])) { + if (isset($params['name'])) { + // + // Fetch major elements from $params. + // $name = trim($params['name']); $key = isset($params['key']) ? trim($params['key']) : null; $type = isset($params['type']) ? strtolower(trim($params['type'])) : "text"; + $value = isset($params['value']) ? htmlspecialchars($params['value'], ENT_QUOTES) : null; $class = isset($params['class']) ? trim($params['class']) : null; + $id = isset($params['id']) ? trim($params['id']) : XOOPS_INPUT_DEFID_PREFIX . $name; $size = isset($params['size']) ? intval($params['size']) : null; $maxlength = isset($params['maxlength']) ? intval($params['maxlength']) : null; - $value = isset($params['value']) ? htmlspecialchars($params['value'],ENT_QUOTES) : null; - $id = isset($params['id']) ? trim($params['id']) : null; $default = isset($params['default']) ? trim($params['default']) : null; $disabled = (isset($params['disabled']) && $params['disabled'] != false) ? true : false; - if ($key != null) - { - $string=" Index: xoops2jp/html/class/xoopsform/formtextdateselect.php diff -u xoops2jp/html/class/xoopsform/formtextdateselect.php:1.2.8.1 xoops2jp/html/class/xoopsform/formtextdateselect.php:1.2.8.2 --- xoops2jp/html/class/xoopsform/formtextdateselect.php:1.2.8.1 Wed Oct 19 02:18:33 2005 +++ xoops2jp/html/class/xoopsform/formtextdateselect.php Sat Jul 1 13:21:10 2006 @@ -1,5 +1,5 @@ getValue(), '"F j, Y H:i:s"'); include_once XOOPS_ROOT_PATH.'/include/calendarjs.php'; - return "getExtra()." />"; + return "getExtra()." />"; } } ?> \ No newline at end of file From minahito @ users.sourceforge.jp Sat Jul 1 13:22:31 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Sat, 1 Jul 2006 13:22:31 +0900 Subject: [xoops-cvslog 3397] CVS update: xoops2jp/html/modules/user/admin/actions Message-ID: <20060701042231.A4E352AC048@users.sourceforge.jp> Index: xoops2jp/html/modules/user/admin/actions/UserListAction.class.php diff -u xoops2jp/html/modules/user/admin/actions/UserListAction.class.php:1.1.2.2 xoops2jp/html/modules/user/admin/actions/UserListAction.class.php:1.1.2.3 --- xoops2jp/html/modules/user/admin/actions/UserListAction.class.php:1.1.2.2 Tue Mar 28 22:31:45 2006 +++ xoops2jp/html/modules/user/admin/actions/UserListAction.class.php Sat Jul 1 13:22:31 2006 @@ -22,7 +22,7 @@ function _getBaseUrl() { - return "./index.php?action=UsersList"; + return "./index.php?action=UserList"; } function executeViewIndex(&$controller, &$xoopsUser, &$render) From minahito @ users.sourceforge.jp Sat Jul 1 13:23:04 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Sat, 1 Jul 2006 13:23:04 +0900 Subject: [xoops-cvslog 3398] CVS update: xoops2jp/html Message-ID: <20060701042304.5C59F2AC048@users.sourceforge.jp> Index: xoops2jp/html/pda.php diff -u xoops2jp/html/pda.php:1.2.8.1 xoops2jp/html/pda.php:1.4 --- xoops2jp/html/pda.php:1.2.8.1 Wed Oct 19 02:13:32 2005 +++ xoops2jp/html/pda.php Wed Aug 3 21:39:11 2005 @@ -1,56 +1,56 @@ - // -// ------------------------------------------------------------------------ // -// This program is free software; you can redistribute it and/or modify // -// it under the terms of the GNU General Public License as published by // -// the Free Software Foundation; either version 2 of the License, or // -// (at your option) any later version. // -// // -// 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. See the // -// GNU General Public License for more details. // -// // -// You should have received a copy of the GNU General Public License // -// along with this program; if not, write to the Free Software // -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// ------------------------------------------------------------------------ // - -include "mainfile.php"; -header("Content-Type: text/html"); - -echo "". htmlspecialchars($xoopsConfig['sitename'])." - - - - "; - -$sql = "SELECT storyid, title FROM ".$xoopsDB->prefix("stories")." WHERE published>0 AND published<".time()." ORDER BY published DESC"; - -$result = $xoopsDB->query($sql,10,0); - -if (!$result) { - echo "An error occured"; -} else { - echo "".htmlspecialchars($xoopsConfig[
"; - echo "

".htmlspecialchars($xoopsConfig['slogan'])."

"; - echo "
"; - while (list($storyid, $title) = $xoopsDB->fetchRow($result)) { - echo "".htmlspecialchars($title)."
"; - - } - echo "
"; -} - -echo ""; - + // +// ------------------------------------------------------------------------ // +// This program is free software; you can redistribute it and/or modify // +// it under the terms of the GNU General Public License as published by // +// the Free Software Foundation; either version 2 of the License, or // +// (at your option) any later version. // +// // +// 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. See the // +// GNU General Public License for more details. // +// // +// You should have received a copy of the GNU General Public License // +// along with this program; if not, write to the Free Software // +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// ------------------------------------------------------------------------ // + +include "mainfile.php"; +header("Content-Type: text/html"); + +echo "". htmlspecialchars($xoopsConfig['sitename'])." + + + + "; + +$sql = "SELECT storyid, title FROM ".$xoopsDB->prefix("stories")." WHERE published>0 AND published<".time()." ORDER BY published DESC"; + +$result = $xoopsDB->query($sql,10,0); + +if (!$result) { + echo "An error occured"; +} else { + echo "".htmlspecialchars($xoopsConfig[
"; + echo "

".htmlspecialchars($xoopsConfig['slogan'])."

"; + echo "
"; + while (list($storyid, $title) = $xoopsDB->fetchRow($result)) { + echo "".htmlspecialchars($title)."
"; + + } + echo "
"; +} + +echo ""; + ?> \ No newline at end of file From minahito @ users.sourceforge.jp Sat Jul 1 16:24:17 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Sat, 1 Jul 2006 16:24:17 +0900 Subject: [xoops-cvslog 3399] CVS update: xoops2jp/html/modules/base/admin/class Message-ID: <20060701072417.89D5C2AC073@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/class/AbstractModuleInstaller.class.php diff -u xoops2jp/html/modules/base/admin/class/AbstractModuleInstaller.class.php:1.1.2.6 xoops2jp/html/modules/base/admin/class/AbstractModuleInstaller.class.php:1.1.2.7 --- xoops2jp/html/modules/base/admin/class/AbstractModuleInstaller.class.php:1.1.2.6 Tue Mar 28 22:28:56 2006 +++ xoops2jp/html/modules/base/admin/class/AbstractModuleInstaller.class.php Sat Jul 1 16:24:17 2006 @@ -32,40 +32,58 @@ function Legacy_AbstractModuleInstaller($dirname) { $this->mDirname = $dirname; - $this->mLog = new Legacy_ModuleUtilsSimpleLog(); + $this->mLog =& new Legacy_ModuleUtilsSimpleLog(); } /** + * Start callback to required member functions with module install + * framework. + * * @return bool */ function execute() { $this->mModule =& $this->loadModuleObject($this->mDirname); - if (!is_object($this->mModule)) + + if (!is_object($this->mModule)) { + $this->_processReport(); return false; + } $this->_installTable(); - if (!$this->mForceMode && $this->mLog->hasError()) + if (!$this->mForceMode && $this->mLog->hasError()) { + $this->_processReport(); return false; + } $this->_installModule(); - if (!$this->mForceMode && $this->mLog->hasError()) + if (!$this->mForceMode && $this->mLog->hasError()) { + $this->_processReport(); return false; + } $this->_installTemplate(); - if (!$this->mForceMode && $this->mLog->hasError()) + if (!$this->mForceMode && $this->mLog->hasError()) { + $this->_processReport(); return false; + } $this->_installBlock(); - if (!$this->mForceMode && $this->mLog->hasError()) + if (!$this->mForceMode && $this->mLog->hasError()) { + $this->_processReport(); return false; + } $this->_installPreference(); - if (!$this->mForceMode && $this->mLog->hasError()) + if (!$this->mForceMode && $this->mLog->hasError()) { + $this->_processReport(); return false; + } $this->_processScript(); - + + $this->_processReport(); + return true; } @@ -130,6 +148,14 @@ { $this->mForceMode = $flag; } + + /** + * This member function is called back at the last part of execute(). + * Report the conclusion to the log. + */ + function _processReport() + { + } /** * Return log instance. From minahito @ users.sourceforge.jp Sat Jul 1 16:24:42 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Sat, 1 Jul 2006 16:24:42 +0900 Subject: [xoops-cvslog 3400] CVS update: xoops2jp/html/modules/base/admin/class Message-ID: <20060701072442.6AD902AC073@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/class/ModuleInstaller.class.php diff -u xoops2jp/html/modules/base/admin/class/ModuleInstaller.class.php:1.1.2.12 xoops2jp/html/modules/base/admin/class/ModuleInstaller.class.php:1.1.2.13 --- xoops2jp/html/modules/base/admin/class/ModuleInstaller.class.php:1.1.2.12 Thu May 18 23:04:04 2006 +++ xoops2jp/html/modules/base/admin/class/ModuleInstaller.class.php Sat Jul 1 16:24:42 2006 @@ -61,7 +61,7 @@ $adminPerm->setVar('gperm_name', 'module_admin'); if (!$gpermHandler->insert($adminPerm)) { - $log->addError("Could not set admin permission " . $this->mModule->getVar('mid')); + $log->addError(_AD_BASE_ERROR_COULD_NOT_SET_ADMIN_PERMISSION); } } @@ -80,7 +80,7 @@ $adminPerm->setVar('gperm_itemid', $modversion['category']); $adminPerm->setVar('gperm_name', 'system_admin'); if (!$gpermHandler->insert($adminPerm)) { - $log->addError("Could not set system admin permission " . $this->mModule->getVar('mid')); + $log->addError(_AD_BASE_ERROR_COULD_NOT_SET_SYSTEM_PERMISSION); } unset($sysAdminPerm); } @@ -102,7 +102,7 @@ $readPerm->setVar('gperm_name', 'module_read'); if (!$gpermHandler->insert($readPerm)) { - $log->addError("Could not set read permission " . $this->mModule->getVar('mid')); + $log->addError(_AD_BASE_ERROR_COULD_NOT_SET_READ_PERMISSION); } } } else { @@ -116,7 +116,7 @@ $readPerm->setVar('gperm_name', 'module_read'); if (!$gpermHandler->insert($readPerm)) { - $log->addError("Could not set read permission " . $this->mModule->getVar('mid')); + $log->addError(_AD_BASE_ERROR_COULD_NOT_SET_READ_PERMISSION); } } } @@ -189,11 +189,26 @@ $funcName = 'xoops_module_install_' . $this->mModule->getVar('dirname'); if (function_exists($funcName)) { if (!call_user_func($funcName, $this->mModule)) { - $this->mLog->addError("Failed to execute " . $funcName); + $this->mLog->addError(XCUbe_Utils::formatMessage(_AD_BASE_ERROR_FAILED_TO_EXECUTE_CALLBACK, $funcName)); } } } } + + function _processReport() + { + if (!$this->mLog->hasError()) { + $this->mLog->add(XCube_Utils::formatMessage(_AD_BASE_MESSAGE_INSTALLATION_MODULE_SUCCESSFUL, $this->mModule->get('name'))); + } + else { + if (is_object($this->mModule)) { + $this->mModule->addError(XCube_Utils::formatMessage(_AD_BASE_ERROR_INSTALLATION_MODULE_FAILURE, $this->mModule->get('name'))); + } + else { + $this->mModule->addError(XCube_Utils::formatMessage(_AD_BASE_ERROR_INSTALLATION_MODULE_FAILURE, $this->mDirname)); + } + } + } function hasAgree() { From minahito @ users.sourceforge.jp Sat Jul 1 16:24:56 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Sat, 1 Jul 2006 16:24:56 +0900 Subject: [xoops-cvslog 3401] CVS update: xoops2jp/html/modules/base/admin/class Message-ID: <20060701072456.A0BDD2AC073@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/class/ModuleUninstaller.class.php diff -u xoops2jp/html/modules/base/admin/class/ModuleUninstaller.class.php:1.1.2.8 xoops2jp/html/modules/base/admin/class/ModuleUninstaller.class.php:1.1.2.9 --- xoops2jp/html/modules/base/admin/class/ModuleUninstaller.class.php:1.1.2.8 Tue Mar 28 22:28:56 2006 +++ xoops2jp/html/modules/base/admin/class/ModuleUninstaller.class.php Sat Jul 1 16:24:56 2006 @@ -21,12 +21,12 @@ $module =& $moduleHandler->getByDirname($dirname); if (!is_object($module)) { - $this->mLog->addError("*Module not found*"); + $this->mLog->addError(_AD_BASE_ERROR_MODULE_NOT_FOUND); return $error; } if ($module->getVar('isactive') != 0) { - $this->mLog->addError("*For uninstall, turn off the active-status of the module.*"); + $this->mLog->addError(_AD_BASE_ERROR_CASE_OF_ACTIVE_MODULE); return $error; } @@ -40,10 +40,10 @@ { $moduleHandler =& xoops_gethandler('module'); if (!$moduleHandler->delete($this->mModule)) { - $this->mLog->addError("*Could not delete module information from XOOPS database.*"); + $this->mLog->addError(_AD_BASE_ERROR_DELETE_MODULEINFO_FROM_DB); } else { - $this->mLog->addReport("*Delete module information from XOOPS database.*"); + $this->mLog->addReport(_AD_BASE_MESSAGE_DELETE_MODULEINFO_FROM_DB); } } @@ -63,10 +63,10 @@ $sql = "DROP TABLE " . $db->prefix($table); if ($db->query($sql)) { - $this->mLog->addReport("Drop table " . $db->prefix($table)); + $this->mLog->addReport(XCube_Utils::formatMessage(_AD_BASE_MESSAGE_DROP_TABLE, $db->prefix($table))); } else { - $this->mLog->addError("Could not drop table " . $db->prefix($table)); + $this->mLog->addError(XCube_Utils::formatMessage(_AD_BASE_ERROR_DROP_TABLE, $db->prefix($table))); } } } @@ -81,8 +81,10 @@ $deleteTemplates =& $tplHandler->find(null, 'module', $this->mModule->getVar('mid')); - foreach($deleteTemplates as $template) { - $tplHandler->delete($template); + foreach($deleteTemplates as $tpl) { + if (!$tplHandler->delete($tpl)) { + $this->mLog->addError(XCube_Utils::formatMessage(_AD_BASE_ERROR_TEMPLATE_UNINSTALLED, $tpl->getVar('tpl_file'))); + } } } @@ -99,7 +101,7 @@ $gpermHandler =& xoops_gethandler('groupperm'); foreach ($blocks as $block) { $blockHandler->delete($block); - $this->mLog->addReport("Uninstall block '".$block->getVar('name')); + $this->mLog->addReport(XCube_Utils::formatMessage(_AD_BASE_MESSAGE_BLOCK_HAS_BEEN_UNINSTALLED, $block->get('name'))); // // delete permission @@ -114,7 +116,7 @@ $tplHandler =& xoops_gethandler('tplfile'); $criteria =& new Criteria('tpl_module', $this->mModule->getVar('dirname')); if(!$tplHandler->deleteAll($criteria)) { - $this->mLog->addError("Could not delete block templates : " . $tplHandler->db->error()); + $this->mLog->addError(XCube_Utils::formatMessage(_AD_BASE_ERROR_COULD_NOT_DELETE_BLOCK_TEMPLATES, $tplHandler->db->error())); } } @@ -131,11 +133,26 @@ $funcName = 'xoops_module_uninstall_' . $this->mModule->getVar('dirname'); if (function_exists($funcName)) { if (!call_user_func($funcName, $this->mModule)) { - $this->mLog->addError("Failed to execute " . $funcName); + $this->mLog->addError(XCube_Utils::formatMessage(_AD_BASE_ERROR_FAILED_TO_EXECUTE_CALLBACK, $funcName)); } } } } + + function _processReport() + { + if (!$this->mLog->hasError()) { + $this->mLog->add(XCube_Utils::formatMessage(_AD_BASE_MESSAGE_UNINSTALLATION_MODULE_SUCCESSFUL, $this->mModule->get('name'))); + } + else { + if (is_object($this->mModule)) { + $this->mModule->addError(XCube_Utils::formatMessage(_AD_BASE_ERROR_UNINSTALLATION_MODULE_FAILURE, $this->mModule->get('name'))); + } + else { + $this->mModule->addError(XCube_Utils::formatMessage(_AD_BASE_ERROR_UNINSTALLATION_MODULE_FAILURE, $this->mDirname)); + } + } + } } ?> \ No newline at end of file Index: xoops2jp/html/modules/base/admin/class/ModuleUpdater.class.php diff -u xoops2jp/html/modules/base/admin/class/ModuleUpdater.class.php:1.1.2.7 xoops2jp/html/modules/base/admin/class/ModuleUpdater.class.php:1.1.2.8 --- xoops2jp/html/modules/base/admin/class/ModuleUpdater.class.php:1.1.2.7 Mon May 22 15:28:50 2006 +++ xoops2jp/html/modules/base/admin/class/ModuleUpdater.class.php Sat Jul 1 16:24:56 2006 @@ -13,7 +13,7 @@ */ function execute() { - $this->mLog->addReport("Update started"); + $this->mLog->addReport(_AD_BASE_MESSAGE_UPDATE_STARTED); parent::execute(); } @@ -63,7 +63,7 @@ foreach ($delTemplates as $tpl) { if (!$tplHandler->delete($tpl)) { - $this->mLog->addError(@sprintf(_MD_A_BASE_ERROR_DELETE_TEMPLATE, $tpl->getVar('tpl_file'))); + $this->mLog->addError(XCube_Utils::formatMessage(_AD_BASE_ERROR_TEMPLATE_UNINSTALLED, $tpl->getVar('tpl_file'))); } } } @@ -181,6 +181,21 @@ } } } + + function _processReport() + { + if (!$this->mLog->hasError()) { + $this->mLog->add(XCube_Utils::formatMessage(_AD_BASE_MESSAGE_UPDATING_MODULE_SUCCESSFUL, $this->mModule->get('name'))); + } + else { + if (is_object($this->mModule)) { + $this->mModule->addError(XCube_Utils::formatMessage(_AD_BASE_ERROR_UPDATING_MODULE_FAILURE, $this->mModule->get('name'))); + } + else { + $this->mModule->addError(XCube_Utils::formatMessage(_AD_BASE_ERROR_UPDATING_MODULE_FAILURE, $this->mDirname)); + } + } + } } ?> \ No newline at end of file From minahito @ users.sourceforge.jp Sat Jul 1 16:25:13 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Sat, 1 Jul 2006 16:25:13 +0900 Subject: [xoops-cvslog 3402] CVS update: xoops2jp/html/modules/base/admin/class Message-ID: <20060701072513.042652AC073@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php diff -u xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php:1.1.2.17 xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php:1.1.2.18 --- xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php:1.1.2.17 Mon May 22 15:28:50 2006 +++ xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php Sat Jul 1 16:25:12 2006 @@ -4,6 +4,10 @@ require_once XOOPS_ROOT_PATH."/class/template.php"; +define("MODINSTALL_LOGTYPE_REPORT", "report"); +define("MODINSTALL_LOGTYPE_WARNING", "warning"); +define("MODINSTALL_LOGTYPE_ERROR", "error"); + /** * A temporary log class. */ @@ -14,7 +18,7 @@ function add($msg) { - $this->mMessages[] = array('type' => 'report', 'message' => $msg); + $this->mMessages[] = array('type' => MODINSTALL_LOGTYPE_REPORT, 'message' => $msg); } function addReport($msg) @@ -24,12 +28,12 @@ function addWarning($msg) { - $this->mMessages[] = array('type' => 'warning', 'message' => $msg); + $this->mMessages[] = array('type' => MODINSTALL_LOGTYPE_WARNING, 'message' => $msg); } function addError($msg) { - $this->mMessages[] = array('type' => 'error', 'message' => $msg); + $this->mMessages[] = array('type' => MODINSTALL_LOGTYPE_ERROR, 'message' => $msg); $this->mFetalErrorFlag = true; } @@ -58,7 +62,7 @@ $sqlfile = $sqlfileInfo[XOOPS_DB_TYPE]; if (!file_exists(XOOPS_MODULE_PATH . "/" . $dirname . "/" . $sqlfile)) { - $log->addError("SQL file not found at $sqlfile"); + $log->addError(XCube_Utils::formatMessage(_AD_BASE_ERROR_SQL_FILE_NOT_FOUND, $sqlfile)); return false; } @@ -80,7 +84,7 @@ } } - $log->addReport("*Database table setup finished.*"); + $log->addReport(_AD_BASE_MESSAGE_DATABASE_SETUP_FINISHED); } /** @@ -127,10 +131,10 @@ $tplfile->setVar('tpl_desc', $description, true); if ($tplHandler->insert($tplfile)) { - $log->addReport(@sprintf("Template '${fileName}' has been installed.")); + $log->addReport(XCube_Utils::formatMessage(_AD_BASE_MESSAGE_TEMPLATE_INSTALLED, $fileName)); } else { - $log->addError(@sprintf(_MD_A_BASE_ERROR_INSERT_TEMPLATE, $fileName)); + $log->addError(XCube_Utils::formatMessage(_AD_BASE_ERROR_COULD_NOT_INSTALL_TEMPLATE, $fileName)); return false; } @@ -261,17 +265,17 @@ $autolink = true; } if (!$blockHandler->insert($blockObj, $autolink)) { - $log->addError("ERROR : Could not install block whose name is " . $blockObj->getVar('name')); + $log->addError(XCube_Utils::formatMessage(_AD_BASE_ERROR_COULD_NOT_INSTALL_BLOCK, $blockObj->getVar('name'))); return false; } else { - $log->addReport("block " . $blockObj->getVar('name') . " has been installed"); + $log->addReport(XCube_Utils::formatMessage(_AD_BASE_MESSAGE_BLOCK_INSTALLED, $blockObj->getVar('name'))); $tplHandler =& xoops_gethandler('tplfile'); if (!Legacy_ModuleUtils::installBlockTemplate($module, $blockObj)) { - $log->addError("Could not install block template " . $blockObj->getVar('name')); + $log->addError(XCube_Utils::formatMessage(_AD_BASE_ERROR_BLOCK_TEMPLATE_INSTALL, $blockObj->getVar('name'))); } // @@ -281,7 +285,7 @@ if (!empty($block['show_all_module'])) { $link_sql = "INSERT INTO " . $blockHandler->db->prefix('block_module_link') . " (block_id, module_id) VALUES (".$blockObj->getVar('bid').", 0)"; if (!$blockHandler->db->query($link_sql)) { - $log->addWarn("Could not set link with all module " . $blockObj->getVar('name')); + $log->addWarn(XCube_Utils::formatMessage(_AD_BASE_ERROR_COULD_NOT_SET_LINK, $blockObj->getVar('name'))); } } $gpermHandler =& xoops_gethandler('groupperm'); @@ -297,7 +301,7 @@ $bperm->setVar('gperm_groupid', $group->getVar('groupid')); $bperm->setNew(); if (!$gpermHandler->insert($bperm)) { - $log->addWarn("Could not set block permission " . $blockObj->getVar('name')); + $log->addWarn(XCube_Utils::formatMessage(_AD_BASE_ERROR_COULD_NOT_SET_BLOCK_PERMISSION, $blockObj->getVar('name'))); } } } else { @@ -307,7 +311,7 @@ $bperm->setVar('gperm_groupid', $mygroup); $bperm->setNew(); if (!$gpermHandler->insert($bperm)) { - $log->addWarn("Could not set block permission " . $blockObj->getVar('name')); + $log->addWarn(XCube_Utils::formatMessage(_AD_BASE_ERROR_COULD_NOT_SET_BLOCK_PERMISSION, $blockObj->getVar('name'))); } } } @@ -435,7 +439,7 @@ } if (!$configHandler->insertConfig($config)) { - $log->addError("ERROR: Could not insert config " . $configInfo['name']); + $log->addError(XCube_Utils::formatMessage(_AD_BASE_ERROR_COULD_NOT_INSERT_CONFIG, $configInfo['name'])); } unset($config); From minahito @ users.sourceforge.jp Sat Jul 1 16:25:19 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Sat, 1 Jul 2006 16:25:19 +0900 Subject: [xoops-cvslog 3403] CVS update: xoops2jp/html/modules/base/admin/templates Message-ID: <20060701072519.E16572AC073@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/templates/preference_edit.html diff -u xoops2jp/html/modules/base/admin/templates/preference_edit.html:1.1.2.10 xoops2jp/html/modules/base/admin/templates/preference_edit.html:1.1.2.11 --- xoops2jp/html/modules/base/admin/templates/preference_edit.html:1.1.2.10 Mon Jun 26 22:30:46 2006 +++ xoops2jp/html/modules/base/admin/templates/preference_edit.html Sat Jul 1 16:25:19 2006 @@ -40,7 +40,7 @@ <{$smarty.const._MI_BASE_MENU_PREFERENCE}> <{if $category != null}> - - <{$category->getVar('confcat_name')}> + - <{$category->getName()|escape}> <{/if}> @@ -69,11 +69,13 @@ <{elseif $config->get('conf_formtype') == 'select_multi'}> From minahito @ users.sourceforge.jp Sat Jul 1 16:26:04 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Sat, 1 Jul 2006 16:26:04 +0900 Subject: [xoops-cvslog 3404] CVS update: xoops2jp/html/modules/base/kernel Message-ID: <20060701072604.4DFE42AC07E@users.sourceforge.jp> Index: xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php diff -u xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.43 xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.44 --- xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.43 Wed Jun 28 14:46:18 2006 +++ xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php Sat Jul 1 16:26:04 2006 @@ -271,9 +271,21 @@ function _processModuleController() { - if(parent::_processModuleController()) { - $GLOBALS['xoopsModule']=&$this->mModuleController->mModuleObject; // TODO - $GLOBALS['xoopsModuleConfig']=$this->mModuleController->getConfig(); + $this->mModuleController->prepare(); + + if ($this->mModuleController->isModuleProcess()) { + if (!$this->mModuleController->isActive()) { + die('NOT ACTIVE'); ///< @todo + } + + if (!$this->mModuleController->hasPermission()) { + XCube_Utils::redirectHeader(XOOPS_URL,1,_NOPERM); // TODO Depens on const message catalog. + } + + $this->mModuleController->setupLanguage(); + + $GLOBALS['xoopsModule'] =& $this->mModuleController->mModuleObject; // TODO + $GLOBALS['xoopsModuleConfig'] = $this->mModuleController->getConfig(); } } @@ -799,7 +811,6 @@ { require_once XOOPS_BASE_PATH . "/kernel/Legacy_ModuleController.class.php"; $controller->mModuleController =& new Legacy_ModuleController($controller); - $controller->mModuleController->prepare(); } function setupRenderSystem(&$controller) @@ -861,7 +872,6 @@ { require_once XOOPS_BASE_PATH . "/class/Legacy_AdminModuleController.class.php"; $controller->mModuleController =& new Legacy_AdminModuleController($controller); - $controller->mModuleController->prepare(); } function setupRenderSystem(&$controller) From minahito @ users.sourceforge.jp Sat Jul 1 16:26:24 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Sat, 1 Jul 2006 16:26:24 +0900 Subject: [xoops-cvslog 3405] CVS update: xoops2jp/html/modules/base/language/japanese Message-ID: <20060701072624.560F82AC073@users.sourceforge.jp> Index: xoops2jp/html/modules/base/language/japanese/admin.php diff -u xoops2jp/html/modules/base/language/japanese/admin.php:1.1.2.39 xoops2jp/html/modules/base/language/japanese/admin.php:1.1.2.40 --- xoops2jp/html/modules/base/language/japanese/admin.php:1.1.2.39 Tue May 30 17:17:26 2006 +++ xoops2jp/html/modules/base/language/japanese/admin.php Sat Jul 1 16:26:24 2006 @@ -1,18 +1,38 @@ 新しいブロックをインストールして、サイトをカスタマイズしましょう。
モジュール付属のブロック以外にも、カスタムブロックを追加して、自由なメッセージをブロックカラムに追加できます。"); define('_AD_BASE_TIPS_BLOCK_UNINSTALL', "Q:ブロックをアンインストールすると?
A:すべての設定を記録したまま、表示やリストから消えます。設定を記録してますので、簡単に再インストールすることができます。"); define('_AD_BASE_TIPS_CUSTOM_BLOCK_UNINSTALL', "Q:カスタムブロックをアンインストールすると?
A:削除されずに、すべての設定を記録したまま、未インストールブロックリストへ移動します。未インストールリストから削除できるほか、再インストール操作で簡単に復活させることができます。"); From minahito @ users.sourceforge.jp Sat Jul 1 16:26:24 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Sat, 1 Jul 2006 16:26:24 +0900 Subject: [xoops-cvslog 3406] CVS update: xoops2jp/html/modules/base/language/english Message-ID: <20060701072624.7A10B2AC07E@users.sourceforge.jp> Index: xoops2jp/html/modules/base/language/english/admin.php diff -u xoops2jp/html/modules/base/language/english/admin.php:1.1.2.32 xoops2jp/html/modules/base/language/english/admin.php:1.1.2.33 --- xoops2jp/html/modules/base/language/english/admin.php:1.1.2.32 Tue May 30 17:17:26 2006 +++ xoops2jp/html/modules/base/language/english/admin.php Sat Jul 1 16:26:24 2006 @@ -1,18 +1,38 @@ Install new blocks, and set your site!
If you want to get a free block except modules' blocks, create cutom block and write your message to it."); define('_AD_BASE_TIPS_BLOCK_UNINSTALL', "Even if you uninstall the block, the configuration of the block isn't deleted. The block is removed only from display of your site. Therefore you can re-install the block easily because the installer recovers last configure."); define('_AD_BASE_TIPS_CUSTOM_BLOCK_UNINSTALL', "Even if you uninstall the custom block, the configuration of the block isn't deleted. The block is removed only from display of your site. You can re-install or delete it from database at 'install block' page."); From minahito @ users.sourceforge.jp Tue Jul 4 18:45:43 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 4 Jul 2006 18:45:43 +0900 Subject: [xoops-cvslog 3407] CVS update: xoops2jp/html/modules/pm/.xml Message-ID: <20060704094543.761A72AC056@users.sourceforge.jp> From minahito @ users.sourceforge.jp Tue Jul 4 18:45:45 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 4 Jul 2006 18:45:45 +0900 Subject: [xoops-cvslog 3408] CVS update: xoops2jp/html/modules/pm/.xml Message-ID: <20060704094545.867C72AC056@users.sourceforge.jp> Index: xoops2jp/html/modules/pm/.xml/pmlite_edit.xml diff -u /dev/null xoops2jp/html/modules/pm/.xml/pmlite_edit.xml:1.1.2.1 --- /dev/null Tue Jul 4 18:45:45 2006 +++ xoops2jp/html/modules/pm/.xml/pmlite_edit.xml Tue Jul 4 18:45:45 2006 @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + Index: xoops2jp/html/modules/pm/.xml/pm_delete.xml diff -u /dev/null xoops2jp/html/modules/pm/.xml/pm_delete.xml:1.1.2.1 --- /dev/null Tue Jul 4 18:45:45 2006 +++ xoops2jp/html/modules/pm/.xml/pm_delete.xml Tue Jul 4 18:45:45 2006 @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + From minahito @ users.sourceforge.jp Tue Jul 4 18:46:44 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 4 Jul 2006 18:46:44 +0900 Subject: [xoops-cvslog 3409] CVS update: xoops2jp/html/modules/pm/actions Message-ID: <20060704094644.DF6482AC059@users.sourceforge.jp> Index: xoops2jp/html/modules/pm/actions/DefaultAction.class.php diff -u /dev/null xoops2jp/html/modules/pm/actions/DefaultAction.class.php:1.1.2.1 --- /dev/null Tue Jul 4 18:46:44 2006 +++ xoops2jp/html/modules/pm/actions/DefaultAction.class.php Tue Jul 4 18:46:44 2006 @@ -0,0 +1,60 @@ +mActionForm =& new Pm_PmDeleteForm(); + $this->mActionForm->prepare(); + } + + function getDefaultView(&$controller, &$xoopsUser) + { + $pmHandler =& xoops_gethandler('privmessage'); + $total = $pmHandler->getCountByFromUid($xoopsUser->uid()); + + $this->mPageNavi =& new XCube_PageNavigator("./index.php", $total, XCUBE_PAGENAVI_START); + $this->mPageNavi->fetch(); + + $this->mPmObjects =& $pmHandler->getObjectsByFromUid($xoopsUser->uid(), $this->mPageNavi->getStart()); + + return PM_FRAME_VIEW_INDEX; + } + + function executeViewIndex(&$controller, &$xoopsUser, &$render) + { + $render->setTemplateName("viewpmsg.html"); + $render->setAttribute("pmObjects", $this->mPmObjects); + $render->setAttribute("total_messages", count($this->mPmObjects)); + $render->setAttribute("currentUser", $xoopsUser); + $render->setAttribute("anonymous", $controller->getConfig('anonymous')); + $render->setAttribute("pageNavi", $this->mPageNavi); + $render->setAttribute("actionForm", $this->mActionForm); + } +} + +?> \ No newline at end of file From minahito @ users.sourceforge.jp Tue Jul 4 18:46:50 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 4 Jul 2006 18:46:50 +0900 Subject: [xoops-cvslog 3410] CVS update: xoops2jp/html/modules/pm/actions Message-ID: <20060704094650.B04C12AC035@users.sourceforge.jp> Index: xoops2jp/html/modules/pm/actions/PmDefaultAction.class.php diff -u xoops2jp/html/modules/pm/actions/PmDefaultAction.class.php:1.1.2.5 xoops2jp/html/modules/pm/actions/PmDefaultAction.class.php:removed --- xoops2jp/html/modules/pm/actions/PmDefaultAction.class.php:1.1.2.5 Tue Mar 28 22:30:49 2006 +++ xoops2jp/html/modules/pm/actions/PmDefaultAction.class.php Tue Jul 4 18:46:50 2006 @@ -1,45 +0,0 @@ -getCountByFromUid($xoopsUser->uid()); - - $this->mPageNavi=new XCube_PageNavigator("./index.php",$total,XCUBE_PAGENAVI_START); - $this->mPageNavi->fetch(); - - $this->mPmObjects =& $pmHandler->getObjectsByFromUid($xoopsUser->uid(),$this->mPageNavi->getStart()); - - return PM_FRAME_VIEW_INDEX; - } - - function executeViewIndex(&$controller,&$xoopsUser,&$renderSystem) - { - $renderSystem->setTemplateName("viewpmsg.html"); - $renderSystem->setAttribute("pmObjects",$this->mPmObjects); - $renderSystem->setAttribute("total_messages",count($this->mPmObjects)); - $renderSystem->setAttribute("currentUser",$xoopsUser); - $renderSystem->setAttribute("anonymous",$controller->getConfig('anonymous')); - $renderSystem->setAttribute("pageNavi",$this->mPageNavi); - } -} - -?> \ No newline at end of file From minahito @ users.sourceforge.jp Tue Jul 4 18:47:23 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 4 Jul 2006 18:47:23 +0900 Subject: [xoops-cvslog 3411] CVS update: xoops2jp/html/modules/pm/actions Message-ID: <20060704094723.DB36D2AC035@users.sourceforge.jp> Index: xoops2jp/html/modules/pm/actions/DeleteAction.class.php diff -u /dev/null xoops2jp/html/modules/pm/actions/DeleteAction.class.php:1.1.2.1 --- /dev/null Tue Jul 4 18:47:23 2006 +++ xoops2jp/html/modules/pm/actions/DeleteAction.class.php Tue Jul 4 18:47:23 2006 @@ -0,0 +1,63 @@ +mActionForm =& new Pm_PmDeleteForm(); + $this->mActionForm->prepare(); + } + + function execute(&$controller, &$xoopsUser) + { + // + // Fetch request and validate. + // + $this->mActionForm->fetch(); + $this->mActionForm->validate(); + + // + // If error, go to re-input. + // + if($this->mActionForm->hasError()) { + return PM_FRAME_VIEW_ERROR; + } + + // + // Delete PM + // + $handler =& xoops_gethandler('privmessage'); + foreach ($this->mActionForm->getVar('msg_id') as $msg_id) { + $pm =& $handler->get($msg_id); + if (is_object($pm) && ($pm->get('to_userid') == $xoopsUser->get('uid'))) { + $handler->delete($pm); + } + unset($pm); + } + + return PM_FRAME_VIEW_SUCCESS; + } + + function executeViewSuccess(&$controller, &$xoopsUser, &$render) + { + XCube_Utils::redirectHeader("./index.php", 1, _PM_DELETED); + } + + function executeViewError(&$controller, &$xoopsUser, &$render) + { + XCube_Utils::redirectHeader("./index.php", 1, _MD_PM_ERROR_ACCESS); + } +} + +?> From minahito @ users.sourceforge.jp Tue Jul 4 18:47:30 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 4 Jul 2006 18:47:30 +0900 Subject: [xoops-cvslog 3412] CVS update: xoops2jp/html/modules/pm/actions Message-ID: <20060704094730.D9F552AC056@users.sourceforge.jp> Index: xoops2jp/html/modules/pm/actions/PmDeleteAction.class.php diff -u xoops2jp/html/modules/pm/actions/PmDeleteAction.class.php:1.1.2.3 xoops2jp/html/modules/pm/actions/PmDeleteAction.class.php:removed --- xoops2jp/html/modules/pm/actions/PmDeleteAction.class.php:1.1.2.3 Tue Mar 28 22:30:49 2006 +++ xoops2jp/html/modules/pm/actions/PmDeleteAction.class.php Tue Jul 4 18:47:30 2006 @@ -1,71 +0,0 @@ -_processActionForm(); - - // - // Fetch request and validate. - // - $this->mActionForm->fetch(); - $this->mActionForm->validate(); - - // - // If error, go to re-input. - // - if($this->mActionForm->hasError()) - return PM_FRAME_VIEW_ERROR; - - // - // Delete PM - // - $pmHandler=&xoops_gethandler('privmessage'); - foreach($this->mActionForm->getVar('msg_id') as $msg_id) { - $pm=&$pmHandler->get($msg_id); - if(is_object($pm)&&($pm->getVar('to_userid')==$xoopsUser->getVar('uid'))) - $pmHandler->delete($pm); - unset($pm); - } - - return PM_FRAME_VIEW_SUCCESS; - } - - function _processActionForm() - { - // - // Create action form object by reply mode? or not? - // - $this->mActionForm=new DeletePmsgForm(); - $this->mActionForm->prepare(); - } - - function executeViewSuccess(&$controller,&$xoopsUser,&$renderSystem) - { - XCube_Utils::redirectHeader("./index.php",1,_PM_DELETED); - } - - function executeViewError(&$controller,&$xoopsUser,&$renderSystem) - { - XCube_Utils::redirectHeader("./index.php",1,_MD_PM_ERROR_ACCESS); - } -} - -?> \ No newline at end of file From minahito @ users.sourceforge.jp Tue Jul 4 18:47:51 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 4 Jul 2006 18:47:51 +0900 Subject: [xoops-cvslog 3413] CVS update: xoops2jp/html/modules/pm/actions Message-ID: <20060704094751.78D132AC035@users.sourceforge.jp> Index: xoops2jp/html/modules/pm/actions/PmliteAction.class.php diff -u /dev/null xoops2jp/html/modules/pm/actions/PmliteAction.class.php:1.1.2.1 --- /dev/null Tue Jul 4 18:47:51 2006 +++ xoops2jp/html/modules/pm/actions/PmliteAction.class.php Tue Jul 4 18:47:51 2006 @@ -0,0 +1,93 @@ +_mSendType = $moduleConfig['send_type']; + parent::prepare($controller, $xoopsUser, $moduleConfig); + + if (is_object($xoopsUser)) { + $this->mObject->set('from_userid', $xoopsUser->get('uid')); + } + } + + function _getId() + { + return 0; + } + + function &_getHandler() + { + $handler =& xoops_gethandler('privmessage'); + return $handler; + } + + function _setupActionForm() + { + // + // Create action form object by reply mode? or not? + // + $this->mActionForm = $this->_mSendType == 0 ? new Pm_PmliteComboEditForm() : new Pm_PmliteDirectEditForm(); + if (isset($_GET['reply']) && $_GET['reply'] == 1) { + $this->mActionForm->changeStateReply(); + } + + $this->mActionForm->prepare(); + } + + function _setupObject() + { + $this->mObjectHandler =& $this->_getHandler(); + $this->mObject =& $this->mObjectHandler->create(); + } + + function getDefaultView(&$controller,&$xoopsUser) + { + // + // Fetch request only (no validate). + // + $this->mActionForm->fetch(); + + return PM_FRAME_VIEW_INPUT; + } + + function executeViewInput(&$controller, &$xoopsUser, &$render) + { + $render->setTemplateName("pmlite.html"); + $render->setAttribute("actionForm", $this->mActionForm); + $render->setAttribute("send_type", $this->_mSendType); + + // + // If the request doesn't have uid, list up users to template. + // + if ($this->_mSendType == 0 && $this->mActionForm->getVar('to_userid') == 0) { + $handler =& xoops_gethandler('user'); + $userObjectArr =& $handler->getObjectsByLevel(0); + $render->setAttribute("userList", $userObjectArr); + } + } + + function executeViewSuccess(&$controller, &$xoopsUser, &$render) + { + $render->setTemplateName("pm_pmlite_success.html"); + } + + function executeViewError(&$controller, &$xoopsUser, &$render) + { + XCube_Utils::redirectHeader("pmlite.php", 3, _MD_PM_ERROR_MESSAGE_SEND); + } +} + +?> From minahito @ users.sourceforge.jp Tue Jul 4 18:47:56 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 4 Jul 2006 18:47:56 +0900 Subject: [xoops-cvslog 3414] CVS update: xoops2jp/html/modules/pm/actions Message-ID: <20060704094756.C0DFF2AC035@users.sourceforge.jp> Index: xoops2jp/html/modules/pm/actions/PmPmliteAction.class.php diff -u xoops2jp/html/modules/pm/actions/PmPmliteAction.class.php:1.1.2.6 xoops2jp/html/modules/pm/actions/PmPmliteAction.class.php:removed --- xoops2jp/html/modules/pm/actions/PmPmliteAction.class.php:1.1.2.6 Tue Mar 28 22:30:49 2006 +++ xoops2jp/html/modules/pm/actions/PmPmliteAction.class.php Tue Jul 4 18:47:56 2006 @@ -1,100 +0,0 @@ -_processActionForm(); - - // - // Fetch request only (no validate). - // - $this->mActionForm->fetch(); - - return PM_FRAME_VIEW_INPUT; - } - - function execute(&$controller,&$xoopsUser) - { - $this->_processActionForm(); - - // - // Fetch request and validate. - // - $this->mActionForm->fetch(); - $this->mActionForm->validate(); - - // - // If error, go to re-input. - // - if($this->mActionForm->hasError()) - return PM_FRAME_VIEW_INPUT; - - // - // Send PM - // - $pmManager=new PrivateMessageManager(); //< TODO - $pm=&$pmManager->create(); - - $this->mActionForm->update($pm); - $pm->setFromUsers($xoopsUser); - if($pm->send()) { - return PM_FRAME_VIEW_SUCCESS; - } - else { - return PM_FRAME_VIEW_ERROR; - } - } - - function _processActionForm() - { - // - // Create action form object by reply mode? or not? - // - $this->mActionForm=($this->mConfig['send_type']==0) ? new PmliteComboEditForm() : new PmliteDirectEditForm(); - if(isset($_GET['reply'])&&$_GET['reply']==1) - $this->mActionForm->changeStateReply(); - - $this->mActionForm->prepare(); - } - - function executeViewSuccess(&$controller,&$xoopsUser,&$renderSystem) - { - $renderSystem->setTemplateName("pm_pmlite_success.html"); - } - - function executeViewError(&$controller,&$xoopsUser,&$renderSystem) - { - XCube_Utils::redirectHeader("pmlite.php",3,_MD_PM_ERROR_MESSAGE_SEND); - } - - function executeViewInput(&$controller,&$xoopsUser,&$renderSystem) - { - $renderSystem->setTemplateName("pmlite.html"); - $renderSystem->setAttribute("actionForm",$this->mActionForm); - $renderSystem->setAttribute("send_type",$this->mConfig['send_type']); - - // - // If the request doesn't have uid, list up users to template. - // - if($this->mConfig['send_type']==0 && $this->mActionForm->getVar('to_userid')==0) { - $userHandler=&xoops_gethandler('user'); - $userObjects=&$userHandler->getObjectsByLevel(0); - $renderSystem->setAttribute("userList",$userObjects); - } - } -} - -?> \ No newline at end of file From minahito @ users.sourceforge.jp Tue Jul 4 18:48:05 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 4 Jul 2006 18:48:05 +0900 Subject: [xoops-cvslog 3415] CVS update: xoops2jp/html/modules/pm/actions Message-ID: <20060704094805.976B22AC035@users.sourceforge.jp> Index: xoops2jp/html/modules/pm/actions/PmReadAction.class.php diff -u xoops2jp/html/modules/pm/actions/PmReadAction.class.php:1.1.2.4 xoops2jp/html/modules/pm/actions/PmReadAction.class.php:removed --- xoops2jp/html/modules/pm/actions/PmReadAction.class.php:1.1.2.4 Tue Mar 28 22:30:49 2006 +++ xoops2jp/html/modules/pm/actions/PmReadAction.class.php Tue Jul 4 18:48:05 2006 @@ -1,101 +0,0 @@ -mPrivMessage=&$pmHandler->get($msg_id); - - if(!is_object($this->mPrivMessage)) - return PM_FRAME_VIEW_ERROR; - - - // - // Check read permission and the sender. - // - if($this->mPrivMessage->getVar('to_userid')!=$xoopsUser->getVar('uid')) - return PM_FRAME_VIEW_ERROR; - - $this->mSendUser=&$this->mPrivMessage->getFromUser(); - if(!is_object($this->mSendUser)) - return PM_FRAME_VIEW_ERROR; - - - // - // Get previous and next message - // - $criteria=new CriteriaCompo(); - $criteria->add(new Criteria('msg_id',$this->mPrivMessage->getVar('msg_id'),"<")); - $criteria->setLimit(1); - $criteria->setSort('msg_time'); - $criteria->setOrder('DESC'); - $tm=&$pmHandler->getObjects($criteria); - if(count($tm)>0 && is_object($tm[0])) - $this->mPreviousMessage=&$tm[0]; - unset($tm); - unset($criteria); - - $criteria=new CriteriaCompo(); - $criteria->add(new Criteria('msg_id',$this->mPrivMessage->getVar('msg_id'),">")); - $criteria->setLimit(1); - $criteria->setSort('msg_time'); - $tm=&$pmHandler->getObjects($criteria); - if(count($tm)>0 && is_object($tm[0])) - $this->mNextMessage=&$tm[0]; - - - // - // If this message is unread, Raise read flag. - // - if(!$this->mPrivMessage->isRead()) - $pmHandler->setRead($this->mPrivMessage); - - - return PM_FRAME_VIEW_INDEX; - } - - function executeViewError(&$controller,&$xoopsUser,&$renderSystem) - { - XCube_Utils::redirectHeader("./index.php",1,_MD_PM_ERROR_ACCESS); - } - - function executeViewIndex(&$controller,&$xoopsUser,&$renderSystem) - { - $renderSystem->setTemplateName("readpmsg.html"); - $renderSystem->setAttribute("thisUser",$xoopsUser); - if($this->mSendUser->isActive()) { - $renderSystem->setAttribute("sendUser",$this->mSendUser); - } - $renderSystem->setAttribute("privMessage",$this->mPrivMessage); - $renderSystem->setAttribute("previousMessage",$this->mPreviousMessage); - $renderSystem->setAttribute("nextMessage",$this->mNextMessage); - $renderSystem->setAttribute("anonymous",$controller->getConfig('anonymous')); - } -} - -?> \ No newline at end of file Index: xoops2jp/html/modules/pm/actions/ReadAction.class.php diff -u /dev/null xoops2jp/html/modules/pm/actions/ReadAction.class.php:1.1.2.1 --- /dev/null Tue Jul 4 18:48:05 2006 +++ xoops2jp/html/modules/pm/actions/ReadAction.class.php Tue Jul 4 18:48:05 2006 @@ -0,0 +1,127 @@ +mPrivMessage =& $pmHandler->get($msg_id); + + if (!is_object($this->mPrivMessage)) { + return PM_FRAME_VIEW_ERROR; + } + + // + // Check read permission and the sender. + // + if ($this->mPrivMessage->getVar('to_userid') != $xoopsUser->getVar('uid')) { + return PM_FRAME_VIEW_ERROR; + } + + $this->mSendUser =& $this->mPrivMessage->getFromUser(); + if (!is_object($this->mSendUser)) { + return PM_FRAME_VIEW_ERROR; + } + + // + // Get previous and next message + // + $criteria =& new CriteriaCompo(); + $criteria->add(new Criteria('msg_id', $this->mPrivMessage->getVar('msg_id'), "<")); + $criteria->setLimit(1); + $criteria->setSort('msg_time'); + $criteria->setOrder('DESC'); + $t_objArr =& $pmHandler->getObjects($criteria); + if (count($t_objArr) > 0 && is_object($t_objArr[0])) { + $this->mPreviousMessage =& $t_objArr[0]; + } + unset($t_objArr); + unset($criteria); + + $criteria =& new CriteriaCompo(); + $criteria->add(new Criteria('msg_id', $this->mPrivMessage->getVar('msg_id'), ">")); + $criteria->setLimit(1); + $criteria->setSort('msg_time'); + $t_objArr =& $pmHandler->getObjects($criteria); + if (count($t_objArr) > 0 && is_object($t_objArr[0])) { + $this->mNextMessage =& $t_objArr[0]; + } + + // + // If this message is unread, Raise read flag. + // + if (!$this->mPrivMessage->isRead()) { + $pmHandler->setRead($this->mPrivMessage); + } + + return PM_FRAME_VIEW_INDEX; + } + + function executeViewError(&$controller, &$xoopsUser, &$render) + { + XCube_Utils::redirectHeader("./index.php", 1, _MD_PM_ERROR_ACCESS); + } + + function executeViewIndex(&$controller, &$xoopsUser, &$render) + { + $render->setTemplateName("readpmsg.html"); + $render->setAttribute("thisUser", $xoopsUser); + if ($this->mSendUser->isActive()) { + $render->setAttribute("sendUser", $this->mSendUser); + } + $render->setAttribute("privMessage", $this->mPrivMessage); + $render->setAttribute("previousMessage", $this->mPreviousMessage); + $render->setAttribute("nextMessage", $this->mNextMessage); + $render->setAttribute("anonymous", $controller->getConfig('anonymous')); + } +} + +?> \ No newline at end of file From minahito @ users.sourceforge.jp Tue Jul 4 18:48:35 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 4 Jul 2006 18:48:35 +0900 Subject: [xoops-cvslog 3416] CVS update: xoops2jp/html/modules/pm/class Message-ID: <20060704094835.0C0352AC02B@users.sourceforge.jp> Index: xoops2jp/html/modules/pm/class/AbstractEditAction.class.php diff -u /dev/null xoops2jp/html/modules/pm/class/AbstractEditAction.class.php:1.1.2.1 --- /dev/null Tue Jul 4 18:48:34 2006 +++ xoops2jp/html/modules/pm/class/AbstractEditAction.class.php Tue Jul 4 18:48:34 2006 @@ -0,0 +1,89 @@ +_getId(); + + $this->mObjectHandler =& $this->_getHandler(); + + $this->mObject =& $this->mObjectHandler->get($id); + + if ($this->mObject == null && $this->isEnableCreate()) { + $this->mObject =& $this->mObjectHandler->create(); + } + } + + function isEnableCreate() + { + return true; + } + + function prepare(&$controller, &$xoopsUser, &$moduleConfig) + { + $this->_setupObject(); + $this->_setupActionForm(); + } + + function getDefaultView(&$controller, &$xoopsUser) + { + if ($this->mObject == null) { + return PM_FRAME_VIEW_ERROR; + } + + $this->mActionForm->load($this->mObject); + + return PM_FRAME_VIEW_INPUT; + } + + function execute(&$controller, &$xoopsUser) + { + if ($this->mObject == null) { + return PM2_FRAME_VIEW_ERROR; + } + + $this->mActionForm->load($this->mObject); + + $this->mActionForm->fetch(); + $this->mActionForm->validate(); + + if($this->mActionForm->hasError()) { + return PM_FRAME_VIEW_INPUT; + } + + $this->mActionForm->update($this->mObject); + + return $this->_doExecute($this->mObject) ? PM_FRAME_VIEW_SUCCESS + : PM_FRAME_VIEW_ERROR; + } + + function _doExecute() + { + return $this->mObjectHandler->insert($this->mObject); + } +} + +?> Index: xoops2jp/html/modules/pm/class/ActionFrame.class.php diff -u /dev/null xoops2jp/html/modules/pm/class/ActionFrame.class.php:1.1.2.1 --- /dev/null Tue Jul 4 18:48:34 2006 +++ xoops2jp/html/modules/pm/class/ActionFrame.class.php Tue Jul 4 18:48:34 2006 @@ -0,0 +1,165 @@ +mAdminFlag = $admin; + } + + function setActionName($name) + { + $this->mActionName = $name; + } + + function &execute(&$controller) + { + if (!preg_match("/^\w+$/", $this->mActionName)) { + die(); + } + + // + // Create action object by mActionName + // + $className = "Pm_" . ucfirst($this->mActionName) . "Action"; + $fileName = ucfirst($this->mActionName) . "Action"; + if ($this->mAdminFlag) { + $fileName = XOOPS_MODULE_PATH . "/pm/admin/actions/${fileName}.class.php"; + } + else { + $fileName = XOOPS_MODULE_PATH . "/pm/actions/${fileName}.class.php"; + } + + if (!file_exists($fileName)) { + die(); + } + + require_once $fileName; + + if (class_exists($className)) { + $this->mAction =& new $className(); + } + + if (!is_object($this->mAction)) { + $this->doActionNotFoundError($controller); + return; + } + + $handler =& xoops_gethandler('config'); + $moduleConfig =& $handler->getConfigsByDirname('pm'); + + $this->mAction->prepare($controller, $controller->getXoopsUser(), $moduleConfig); + + if (!$this->mAction->hasPermission($controller, $controller->getXoopsUser(), $moduleConfig)) { + $this->doPermissionError(); + return; + } + + if (xoops_getenv("REQUEST_METHOD") == "POST") { + $viewStatus = $this->mAction->execute($controller, $controller->getXoopsUser()); + } + else { + $viewStatus = $this->mAction->getDefaultView($controller, $controller->getXoopsUser()); + } + + switch($viewStatus) { + case PM_FRAME_VIEW_SUCCESS: + $this->mAction->executeViewSuccess($controller, $controller->getXoopsUser(), $controller->mRenderSystem); + break; + + case PM_FRAME_VIEW_ERROR: + $this->mAction->executeViewError($controller, $controller->getXoopsUser(), $controller->mRenderSystem); + break; + + case PM_FRAME_VIEW_INDEX: + $this->mAction->executeViewIndex($controller, $controller->getXoopsUser(), $controller->mRenderSystem); + break; + + case PM_FRAME_VIEW_INPUT: + $this->mAction->executeViewInput($controller, $controller->getXoopsUser(), $controller->mRenderSystem); + break; + } + } + + function doPermissionError() + { + $errorMessages = array(_PM_SORRY, _PM_PLZREG); + XCube_Utils::redirectHeader(XOOPS_URL, 2, $errorMessages); + } + + function doActionNotFoundError($controller) + { + $controller->executeForward(XOOPS_URL); + return; + } + + function checkPermission($name, $itemIds) + { + } +} + +class Pm_AbstractAction +{ + function Pm_AbstractAction() + { + } + + function prepare(&$controller, &$xoopsUser) + { + } + + function hasPermission(&$controller, &$xoopsUser, &$moduleConfig) + { + return is_object($xoopsUser); + } + + function getDefaultView(&$controller, &$xoopsUser) + { + return PM_FRAME_VIEW_NONE; + } + + function execute(&$controller, &$xoopsUser) + { + return PM_FRAME_VIEW_NONE; + } + + function executeViewSuccess(&$controller, &$xoopsUser, &$render) + { + } + + function executeViewError(&$controller, &$xoopsUser, &$render) + { + } + + function executeViewIndex(&$controller, &$xoopsUser, &$render) + { + } + + function executeViewInput(&$controller, &$xoopsUser, &$render) + { + } +} + +?> Index: xoops2jp/html/modules/pm/class/AbstractDeleteAction.class.php diff -u /dev/null xoops2jp/html/modules/pm/class/AbstractDeleteAction.class.php:1.1.2.1 --- /dev/null Tue Jul 4 18:48:34 2006 +++ xoops2jp/html/modules/pm/class/AbstractDeleteAction.class.php Tue Jul 4 18:48:34 2006 @@ -0,0 +1,24 @@ +mObjectHandler->delete($this->mObject); + } +} + +?> From minahito @ users.sourceforge.jp Tue Jul 4 18:49:00 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 4 Jul 2006 18:49:00 +0900 Subject: [xoops-cvslog 3417] CVS update: xoops2jp/html/modules/pm Message-ID: <20060704094900.E28E12AC02B@users.sourceforge.jp> Index: xoops2jp/html/modules/pm/pmlite.php diff -u xoops2jp/html/modules/pm/pmlite.php:1.1.2.3 xoops2jp/html/modules/pm/pmlite.php:1.1.2.4 --- xoops2jp/html/modules/pm/pmlite.php:1.1.2.3 Mon Dec 26 21:25:51 2005 +++ xoops2jp/html/modules/pm/pmlite.php Tue Jul 4 18:49:00 2006 @@ -1,54 +1,24 @@ // -// ------------------------------------------------------------------------ // -// This program is free software; you can redistribute it and/or modify // -// it under the terms of the GNU General Public License as published by // -// the Free Software Foundation; either version 2 of the License, or // -// (at your option) any later version. // -// // -// 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. See the // -// GNU General Public License for more details. // -// // -// You should have received a copy of the GNU General Public License // -// along with this program; if not, write to the Free Software // -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// ------------------------------------------------------------------------ // +/** + * @package Pm + * @version $Id: pmlite.php,v 1.1.2.4 2006/07/04 09:49:00 minahito Exp $ + */ require_once "../../mainfile.php"; require_once XOOPS_ROOT_PATH . "/header.php"; +require_once XOOPS_MODULE_PATH . "/pm/class/ActionFrame.class.php"; $root =& XCube_Root::getSingleton(); -$renderSystem =& $root->mController->getRenderSystem(); -require_once "./class/PmActionFrame.class.php"; - -$moduleRunner =& new PmActionFrame(); +$moduleRunner =& new Pm_ActionFrame(false); $moduleRunner->setActionName("pmlite"); $root->mController->setDialogMode(true); -// -// Regist the module level easy framework to virtual controller. -// $root->mController->setActionStrategy($moduleRunner); -// -// Execute framework. -// $root->mController->executeAction(); +require_once XOOPS_ROOT_PATH . "/footer.php"; -require_once XOOPS_ROOT_PATH."/footer.php"; - -?> \ No newline at end of file +?> Index: xoops2jp/html/modules/pm/index.php diff -u xoops2jp/html/modules/pm/index.php:1.1.2.2 xoops2jp/html/modules/pm/index.php:1.1.2.3 --- xoops2jp/html/modules/pm/index.php:1.1.2.2 Sun Nov 13 13:34:12 2005 +++ xoops2jp/html/modules/pm/index.php Tue Jul 4 18:49:00 2006 @@ -1,56 +1,24 @@ // -// ------------------------------------------------------------------------ // -// This program is free software; you can redistribute it and/or modify // -// it under the terms of the GNU General Public License as published by // -// the Free Software Foundation; either version 2 of the License, or // -// (at your option) any later version. // -// // -// 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. See the // -// GNU General Public License for more details. // -// // -// You should have received a copy of the GNU General Public License // -// along with this program; if not, write to the Free Software // -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// ------------------------------------------------------------------------ // +/** + * @package Pm + * @version $Id: index.php,v 1.1.2.3 2006/07/04 09:49:00 minahito Exp $ + */ require_once "../../mainfile.php"; -require_once XOOPS_ROOT_PATH."/header.php"; +require_once XOOPS_ROOT_PATH . "/header.php"; +require_once XOOPS_MODULE_PATH . "/pm/class/ActionFrame.class.php"; -$root=&XCube_Root::getSingleton(); -$renderSystem=&$root->mController->getRenderSystem(); +$root =& XCube_Root::getSingleton(); -require_once "./class/PmActionFrame.class.php"; +$actionName = isset($_GET['action']) ? trim($_GET['action']) : "default"; -$actionName=strtolower(isset($_GET['action']) ? trim($_GET['action']) : "default"); -if($actionName=="pmlite") - $actionName="default"; - -$moduleRunner=new PmActionFrame(); +$moduleRunner =& new Pm_ActionFrame(false); $moduleRunner->setActionName($actionName); -// -// Regist the module level easy framework to virtual controller. -// $root->mController->setActionStrategy($moduleRunner); -// -// Execute framework. -// $root->mController->executeAction(); +require_once XOOPS_ROOT_PATH . "/footer.php"; -require_once XOOPS_ROOT_PATH."/footer.php"; - -?> \ No newline at end of file +?> From minahito @ users.sourceforge.jp Tue Jul 4 18:49:32 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 4 Jul 2006 18:49:32 +0900 Subject: [xoops-cvslog 3418] CVS update: xoops2jp/html/modules/pm/forms Message-ID: <20060704094932.2054A2AC02B@users.sourceforge.jp> Index: xoops2jp/html/modules/pm/forms/PmDeleteForm.class.php diff -u /dev/null xoops2jp/html/modules/pm/forms/PmDeleteForm.class.php:1.1.2.1 --- /dev/null Tue Jul 4 18:49:32 2006 +++ xoops2jp/html/modules/pm/forms/PmDeleteForm.class.php Tue Jul 4 18:49:31 2006 @@ -0,0 +1,33 @@ +mFormProperties['msg_id'] =& new XCube_IntArrayProperty('msg_id'); + + // + // Set field properties + // + $this->mFieldProperties['msg_id'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['msg_id']->setDependsByArray(array('required','objectExist')); + $this->mFieldProperties['msg_id']->addMessage('required', _MD_PM_ERROR_REQUIRED, _MD_PM_LANG_MSG_ID); + $this->mFieldProperties['msg_id']->addMessage('objectExist', _MD_PM_ERROR_OBJECTEXIST, _MD_PM_LANG_MSG_ID); + $this->mFieldProperties['msg_id']->addVar('handler', 'privmessage'); + } +} + +?> From minahito @ users.sourceforge.jp Tue Jul 4 18:49:44 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 4 Jul 2006 18:49:44 +0900 Subject: [xoops-cvslog 3419] CVS update: xoops2jp/html/modules/pm/forms Message-ID: <20060704094944.167452AC02B@users.sourceforge.jp> Index: xoops2jp/html/modules/pm/forms/PmliteEditForm.class.php diff -u xoops2jp/html/modules/pm/forms/PmliteEditForm.class.php:1.1.2.6 xoops2jp/html/modules/pm/forms/PmliteEditForm.class.php:1.1.2.7 --- xoops2jp/html/modules/pm/forms/PmliteEditForm.class.php:1.1.2.6 Tue Mar 28 22:30:48 2006 +++ xoops2jp/html/modules/pm/forms/PmliteEditForm.class.php Tue Jul 4 18:49:43 2006 @@ -12,61 +12,61 @@ * @auchor makeActionForm * @abstract */ -class PmliteEditForm extends XCube_ActionForm +class Pm_PmliteEditForm extends XCube_ActionForm { - var $mState=null; + var $mState = null; function getTokenName() { - return "module.user.PmliteEditForm.TOKEN"; + return "module.pm.PmliteEditForm.TOKEN"; } function prepare() { - $this->mFormProperties['subject']=new XCube_StringProperty('subject'); - $this->mFormProperties['message']=new XCube_TextProperty('message'); + $this->mFormProperties['subject'] = new XCube_StringProperty('subject'); + $this->mFormProperties['message'] = new XCube_TextProperty('message'); // set fields - $this->mFieldProperties['subject']=new XCube_FieldProperty($this); - $this->mFieldProperties['subject']->setDependsByArray(array('required')); - $this->mFieldProperties['subject']->addMessage("required",_MD_PM_ERROR_REQUIRED,_PM_SUBJECT); + $this->mFieldProperties['subject'] = new XCube_FieldProperty($this); + $this->mFieldProperties['subject']->setDependsByArray(array('required', 'maxlength')); + $this->mFieldProperties['subject']->addMessage("required", _MD_PM_ERROR_REQUIRED, _PM_SUBJECT); + $this->mFieldProperties['subject']->addMessage('maxlength', _MD_PM_ERROR_MAXLENGTH, _PM_SUBJECT, '255'); + $this->mFieldProperties['subject']->addVar('maxlength', '255'); - $this->mFieldProperties['message']=new XCube_FieldProperty($this); + $this->mFieldProperties['message'] = new XCube_FieldProperty($this); $this->mFieldProperties['message']->setDependsByArray(array('required')); - $this->mFieldProperties['message']->addMessage("required",_MD_PM_ERROR_REQUIRED,_MD_PM_LANG_MESSAGE); + $this->mFieldProperties['message']->addMessage("required", _MD_PM_ERROR_REQUIRED, _MD_PM_LANG_MESSAGE); - if(is_object($this->mState)) + if (is_object($this->mState)) { $this->mState->prepare($this); + } } function fetch() { parent::fetch(); - if(is_object($this->mState)) + if (is_object($this->mState)) { $this->mState->fetch($this); + } } function changeStateReply() { - $this->mState=new PmliteEditFormReplyState(); - } - - function setToUser(&$user) - { + $this->mState =& new Pm_PmliteEditFormReplyState(); } - + function resetToUser() { } } -class PmliteComboEditForm extends PmliteEditForm +class Pm_PmliteComboEditForm extends PmliteEditForm { function prepare() { parent::prepare(); - $this->mFormProperties['to_userid']=new XCube_IntProperty('to_userid'); + $this->mFormProperties['to_userid'] = new XCube_IntProperty('to_userid'); } /** @@ -74,48 +74,38 @@ */ function validateTo_userid() { - if($this->get('to_userid')) { - $userHandler=&xoops_gethandler('user'); - $user=&$userHandler->get($this->get('to_userid')); + if ($this->get('to_userid')) { + $handler =& xoops_gethandler('user'); + $user =& $handler->get($this->get('to_userid')); - if(!(is_object($user)&&$user->isActive())) { - $this->set('to_userid',0); + if (!(is_object($user) && $user->isActive())) { + $this->set('to_userid', 0); $this->addErrorMessage(_PM_USERNOEXIST); } } } - /** - * @param $pm PrivateMessage - */ - function update(&$pm) - { - $userHandler=&xoops_gethandler('user'); - $toUser=&$userHandler->get($this->get('to_userid')); - $pm->setToUsers($toUser); - $pm->setSubject($this->get("subject")); - $pm->setMessage($this->get("message")); - } - - function setToUser(&$user) + function update(&$obj) { - $this->set('to_userid',$user->get('uid')); + $obj->setVar('to_userid', $this->get('to_userid')); + $obj->setVar('subject', $this->get('subject')); + $obj->setVar('msg_text', $this->get('message')); } function resetToUser() { - $this->set('to_userid',0); + $this->set('to_userid', 0); } } -class PmliteDirectEditForm extends PmliteEditForm +class Pm_PmliteDirectEditForm extends PmliteEditForm { - var $mToUser; + var $_mUid; function prepare() { parent::prepare(); - $this->mFormProperties['to_uname']=new XCube_StringProperty('to_uname'); + $this->mFormProperties['to_uname'] = new XCube_StringProperty('to_uname'); } /** @@ -123,51 +113,43 @@ */ function validateTo_uname() { - if($this->get('to_uname')) { - $userHandler=&xoops_gethandler('user'); - $criteria=new Criteria("uname",$this->get("to_uname")); - $users=&$userHandler->getObjects($criteria); + if ($this->get('to_uname')) { + $handler =& xoops_gethandler('user'); + $criteria =& new Criteria("uname", $this->get("to_uname")); + $userArr =& $userHandler->getObjects($criteria); - if(!(count($users)>0 && is_object($users[0]) && $users[0]->isActive())) { + if (!(count($userArr) > 0 && is_object($userArr[0]) && $userArr[0]->isActive())) { $this->addErrorMessage(_PM_USERNOEXIST); } - $this->mToUser=&$users[0]; + $this->_mId = $userArr[0]->get('uid'); } } - /** - * @param $pm PrivateMessage - */ - function update(&$pm) - { - $pm->setToUsers($this->mToUser); - $pm->setSubject($this->get("subject")); - $pm->setMessage($this->get("message")); - } - - function setToUser(&$user) + function update(&$obj) { - $this->set('to_uname',$user->get('uname')); + $obj->setVar('to_userid', $this->_mUid); + $obj->setVar('subject', $this->get('subject')); + $obj->setVar('msg_text', $this->get('message')); } - + function resetToUser() { - $this->set('to_uname',""); + $this->_mUid = 0; } } /** * This shows reply-mode for ActionForm of pmlite. */ -class PmliteEditFormReplyState +class Pm_PmliteEditFormReplyState { /** * @param $form PmliteEditForm */ function prepare(&$form) { - $form->mFormProperties['msg_id']=new XCube_IntProperty('msg_id'); + $form->mFormProperties['msg_id'] = new XCube_IntProperty('msg_id'); } /** @@ -175,27 +157,34 @@ */ function fetch(&$form) { - if($form->get('msg_id')) { - $pmHandler=&xoops_gethandler('privmessage'); - $pm=&$pmHandler->get($form->get('msg_id')); - if(is_object($pm)) { - $root=XCube_Root::getSingleton(); - $currentUser=&$root->mController->getXoopsUser(); - if($pm->get('to_userid')==$currentUser->get('uid')) { - if(!preg_match("/^Re:/",$pm->get('subject'))) - $form->set('subject',"Re: ".$pm->get('subject')); + if ($form->get('msg_id')) { + $handler =& xoops_gethandler('privmessage'); + $pm =& $handler->get($form->get('msg_id')); + if (is_object($pm)) { + $root =& XCube_Root::getSingleton(); + $currentUser =& $root->mController->getXoopsUser(); + if ($pm->get('to_userid') == $currentUser->get('uid')) { + // + // Create subject + // + if (!preg_match("/^Re:/", $pm->get('subject'))) { + $form->set('subject', "Re: " . $pm->get('subject')); + } // TODO Use Active Check - $userHandler=&xoops_gethandler('user'); - $user=&$userHandler->get($pm->get('from_userid')); - - $form->setToUser($user); - $message="[quote]\n"; - $message.=sprintf(_PM_USERWROTE,$user->get('uname')) . "\n"; - $message.=$pm->getProperty("msg_text") . "\n"; - $message.="[/quote]\n"; - $form->set("message",$message); + $handler =& xoops_gethandler('user'); + $user =& $handler->get($pm->get('from_userid')); + if (!(is_object($user) && $user->isActive())) { + $this->addErrorMessage(_PM_USERNOEXIST); + } + else { + $message = "[quote]\n"; + $message .= sprintf(_PM_USERWROTE, $user->get('uname')) . "\n"; + $message .= $pm->get("msg_text") . "\n"; + $message .= "[/quote]\n"; + $form->set('message', $message); + } return; } } @@ -204,7 +193,7 @@ // // Reset // - $form->set('msg_id',0); + $form->set('msg_id', 0); $form->resetToUser(); } } From minahito @ users.sourceforge.jp Tue Jul 4 18:49:53 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 4 Jul 2006 18:49:53 +0900 Subject: [xoops-cvslog 3420] CVS update: xoops2jp/html/modules/pm/language/english Message-ID: <20060704094953.A55882AC02B@users.sourceforge.jp> Index: xoops2jp/html/modules/pm/language/english/main.php diff -u xoops2jp/html/modules/pm/language/english/main.php:1.1.2.3 xoops2jp/html/modules/pm/language/english/main.php:1.1.2.4 --- xoops2jp/html/modules/pm/language/english/main.php:1.1.2.3 Sat Feb 4 12:38:04 2006 +++ xoops2jp/html/modules/pm/language/english/main.php Tue Jul 4 18:49:53 2006 @@ -1,10 +1,13 @@ Index: xoops2jp/html/modules/pm/language/japanese/main.php diff -u xoops2jp/html/modules/pm/language/japanese/main.php:1.1.2.7 xoops2jp/html/modules/pm/language/japanese/main.php:1.1.2.8 --- xoops2jp/html/modules/pm/language/japanese/main.php:1.1.2.7 Sat Feb 4 12:38:11 2006 +++ xoops2jp/html/modules/pm/language/japanese/main.php Tue Jul 4 18:49:53 2006 @@ -1,10 +1,13 @@ Index: xoops2jp/html/modules/pm/templates/viewpmsg.html diff -u xoops2jp/html/modules/pm/templates/viewpmsg.html:1.1.2.9 xoops2jp/html/modules/pm/templates/viewpmsg.html:1.1.2.10 --- xoops2jp/html/modules/pm/templates/viewpmsg.html:1.1.2.9 Thu Apr 13 00:11:20 2006 +++ xoops2jp/html/modules/pm/templates/viewpmsg.html Tue Jul 4 18:50:07 2006 @@ -5,6 +5,7 @@ »» <{$smarty.const._PM_INBOX}>

+<{xoops_token form=$actionForm}> From minahito @ users.sourceforge.jp Mon Jul 10 13:49:05 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 13:49:05 +0900 Subject: [xoops-cvslog 3451] CVS update: xoops2jp/html/modules/base/kernel Message-ID: <20060710044905.1A7A92AC04D@users.sourceforge.jp> Index: xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php diff -u xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.45 xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.46 --- xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.45 Fri Jul 7 11:54:05 2006 +++ xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php Mon Jul 10 13:49:04 2006 @@ -801,6 +801,95 @@ return $count; } + + /** + * This member function works to redirect as well as redirect_header(). + * But, this member function handles raw values which hasn't been converted + * by htmlspecialchars(). Therefore, if user calls this function with the + * wrong value, some problems may be raised. If you can't understand the + * difference, use not this function but redirect_header(). + * + * @param string $url redirect URL. Don't use user's variables or request. + * @param int $time waiting time (sec) + * @param string $message This string doesn't include tags. + * + * @todo We'll change this function to delegate. + */ + function executeRedirect($url, $time = 1, $message = null) + { + global $xoopsConfig, $xoopsRequestUri; + + // + // Check the following by way of caution. + // + if (preg_match("/(javascript|vbscript):/si", $url)) { + $url = XOOPS_URL; + } + + $displayMessage = ""; + if (is_array($message)) { + foreach (array_keys($message) as $id) { + $message[$id] = htmlspecialchars($message, ENT_QUOTES); + } + $displayMessage = implode("
", $message); + } + else { + $displayMessage = $message; + } + + $url = htmlspecialchars($url, ENT_QUOTES); + if (defined('SID') && (! isset($_COOKIE[session_name()]) || ($xoopsConfig['use_mysession'] && $xoopsConfig['session_name'] != '' && !isset($_COOKIE[$xoopsConfig['session_name']])))) { + if (!strstr($url, '?')) { + $url .= '?' . SID; + } + else { + $url .= '&' . SID; + } + } + + if (!defined('XOOPS_CPFUNC_LOADED')) { + require_once XOOPS_ROOT_PATH.'/class/template.php'; + $xoopsTpl = new XoopsTpl(); + $xoopsTpl->assign('sitename', htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES)); + $xoopsTpl->assign('langcode', _LANGCODE); + $xoopsTpl->assign('charset', _CHARSET); + $xoopsTpl->assign('time', $time); + + $xoopsTpl->assign('url', $url); + $xoopsTpl->assign('message', $displayMessage); + $xoopsTpl->assign('lang_ifnotreload', sprintf(_IFNOTRELOAD, $url)); + $GLOBALS['xoopsModuleUpdate'] = 1; + $xoopsTpl->display('db:system_redirect.html'); + } else { + $url = preg_replace("/&/i", '&', htmlspecialchars($url, ENT_QUOTES)); + echo ' + + + '.htmlspecialchars($xoopsConfig['sitename']).' + + + + + +
+
+ '.$displayMessage.' +
+

'.sprintf(_IFNOTRELOAD, $url).'

+
+
+ + '; + } + + exit(); + } } /** From minahito @ users.sourceforge.jp Mon Jul 10 13:50:17 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 13:50:17 +0900 Subject: [xoops-cvslog 3452] CVS update: xoops2jp/html/modules/legacyRender/admin/actions Message-ID: <20060710045017.DABD62AC050@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/actions/BannerclientDeleteAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/actions/BannerclientDeleteAction.class.php:1.1.2.1 xoops2jp/html/modules/legacyRender/admin/actions/BannerclientDeleteAction.class.php:1.1.2.2 --- xoops2jp/html/modules/legacyRender/admin/actions/BannerclientDeleteAction.class.php:1.1.2.1 Mon Apr 24 16:30:10 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/BannerclientDeleteAction.class.php Mon Jul 10 13:50:17 2006 @@ -1,4 +1,8 @@ executeRedirect("./index.php?action=BannerclientList", 1, _AD_LEGACYRENDER_ERROR_DBUPDATE_FAILED); } } From minahito @ users.sourceforge.jp Mon Jul 10 13:50:45 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 13:50:45 +0900 Subject: [xoops-cvslog 3453] CVS update: xoops2jp/html/modules/legacyRender/admin/forms Message-ID: <20060710045045.3A7562AC050@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/forms/BannerclientAdminDeleteForm.class.php diff -u xoops2jp/html/modules/legacyRender/admin/forms/BannerclientAdminDeleteForm.class.php:1.1.2.1 xoops2jp/html/modules/legacyRender/admin/forms/BannerclientAdminDeleteForm.class.php:1.1.2.2 --- xoops2jp/html/modules/legacyRender/admin/forms/BannerclientAdminDeleteForm.class.php:1.1.2.1 Mon Apr 24 16:30:22 2006 +++ xoops2jp/html/modules/legacyRender/admin/forms/BannerclientAdminDeleteForm.class.php Mon Jul 10 13:50:45 2006 @@ -1,4 +1,8 @@ get('cid'); } function prepare() @@ -22,7 +26,6 @@ // // Set field properties // - $this->mFieldProperties['cid'] =& new XCube_FieldProperty($this); $this->mFieldProperties['cid']->setDependsByArray(array('required')); $this->mFieldProperties['cid']->addMessage('required', _AD_LEGACYRENDER_ERROR_REQUIRED, _AD_LEGACYRENDER_LANG_CID); From minahito @ users.sourceforge.jp Mon Jul 10 13:51:59 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 13:51:59 +0900 Subject: [xoops-cvslog 3454] CVS update: xoops2jp/html/modules/legacyRender/admin/templates Message-ID: <20060710045159.364902AC04D@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/templates/banner_delete.html diff -u xoops2jp/html/modules/legacyRender/admin/templates/banner_delete.html:1.1.2.5 xoops2jp/html/modules/legacyRender/admin/templates/banner_delete.html:1.1.2.6 --- xoops2jp/html/modules/legacyRender/admin/templates/banner_delete.html:1.1.2.5 Wed Jun 14 00:41:26 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/banner_delete.html Mon Jul 10 13:51:59 2006 @@ -20,23 +20,23 @@ <{if $object->get('htmlbanner')}> <{$object->get('htmlcode')}> <{else}> - Banner + Banner <{/if}> - + - + - + - + - + - + @@ -64,10 +64,11 @@ - + + - + - + - + - + - + - + - + From minahito @ users.sourceforge.jp Mon Jul 10 14:52:25 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 14:52:25 +0900 Subject: [xoops-cvslog 3456] CVS update: xoops2jp/html/modules/legacyRender/class Message-ID: <20060710055225.CA8EE2AC039@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/class/ActionFrame.class.php diff -u xoops2jp/html/modules/legacyRender/class/ActionFrame.class.php:1.1.2.2 xoops2jp/html/modules/legacyRender/class/ActionFrame.class.php:1.1.2.3 --- xoops2jp/html/modules/legacyRender/class/ActionFrame.class.php:1.1.2.2 Tue Jun 27 18:12:01 2006 +++ xoops2jp/html/modules/legacyRender/class/ActionFrame.class.php Mon Jul 10 14:52:25 2006 @@ -13,6 +13,8 @@ define ("LEGACYRENDER_FRAME_VIEW_ERROR", 3); define ("LEGACYRENDER_FRAME_VIEW_INDEX", 4); define ("LEGACYRENDER_FRAME_VIEW_INPUT", 5); +define ("LEGACYRENDER_FRAME_VIEW_PREVIEW", 6); +define ("LEGACYRENDER_FRAME_VIEW_CANCEL", 7); class LegacyRender_ActionFrame extends XCube_ActionStrategy { @@ -20,7 +22,7 @@ var $mAction = null; var $mAdminFlag = null; - function Legacy_ActionFrame($admin) + function LegacyRender_ActionFrame($admin) { $this->mAdminFlag = $admin; } @@ -42,10 +44,10 @@ $className = "LegacyRender_" . ucfirst($this->mActionName) . "Action"; $fileName = ucfirst($this->mActionName) . "Action"; if ($this->mAdminFlag) { - $fileName = XOOPS_MODULE_PATH . "/base/admin/actions/${fileName}.class.php"; + $fileName = XOOPS_MODULE_PATH . "/legacyRender/admin/actions/${fileName}.class.php"; } else { - $fileName = XOOPS_MODULE_PATH . "/base/actions/${fileName}.class.php"; + $fileName = XOOPS_MODULE_PATH . "/legacyRender/actions/${fileName}.class.php"; } if (!file_exists($fileName)) { @@ -96,6 +98,14 @@ case LEGACYRENDER_FRAME_VIEW_INPUT: $this->mAction->executeViewInput($controller, $controller->getXoopsUser(), $controller->mRenderSystem); break; + + case LEGACYRENDER_FRAME_VIEW_PREVIEW: + $this->mAction->executeViewPreview($controller, $controller->getXoopsUser(), $controller->mRenderSystem); + break; + + case LEGACYRENDER_FRAME_VIEW_CANCEL: + $this->mAction->executeViewCancel($controller, $controller->getXoopsUser(), $controller->mRenderSystem); + break; } } } @@ -107,7 +117,7 @@ */ var $_mAdminFlag = false; - function Legacy_Action($adminFlag = false) + function LegacyRender_Action($adminFlag = false) { $this->_mAdminFlag = $adminFlag; } @@ -146,6 +156,14 @@ function executeViewInput(&$controller, &$xoopsUser, &$render) { } + + function executeViewPreview(&$controller, &$xoopsUser, &$render) + { + } + + function executeViewCancel(&$controller, &$xoopsUser, &$render) + { + } } ?> From minahito @ users.sourceforge.jp Mon Jul 10 14:53:49 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 14:53:49 +0900 Subject: [xoops-cvslog 3457] CVS update: xoops2jp/html/modules/legacyRender/class Message-ID: <20060710055349.A3C512AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/class/AbstractEditAction.class.php diff -u xoops2jp/html/modules/legacyRender/class/AbstractEditAction.class.php:1.1.2.1 xoops2jp/html/modules/legacyRender/class/AbstractEditAction.class.php:1.1.2.2 --- xoops2jp/html/modules/legacyRender/class/AbstractEditAction.class.php:1.1.2.1 Mon Apr 24 16:31:08 2006 +++ xoops2jp/html/modules/legacyRender/class/AbstractEditAction.class.php Mon Jul 10 14:53:49 2006 @@ -60,6 +60,10 @@ if ($this->mObject == null) { return LEGACYRENDER_FRAME_VIEW_ERROR; } + + if (xoops_getrequest('_form_control_cancel') != null) { + return LEGACYRENDER_FRAME_VIEW_CANCEL; + } $this->mActionForm->load($this->mObject); From minahito @ users.sourceforge.jp Mon Jul 10 14:54:24 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 14:54:24 +0900 Subject: [xoops-cvslog 3458] CVS update: xoops2jp/html/modules/legacyRender/class Message-ID: <20060710055424.625DE2AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/class/banner.php diff -u xoops2jp/html/modules/legacyRender/class/banner.php:1.1.2.2 xoops2jp/html/modules/legacyRender/class/banner.php:1.1.2.3 --- xoops2jp/html/modules/legacyRender/class/banner.php:1.1.2.2 Tue Apr 25 12:55:49 2006 +++ xoops2jp/html/modules/legacyRender/class/banner.php Mon Jul 10 14:54:24 2006 @@ -24,7 +24,7 @@ function loadBannerclient() { if ($this->_mClientLoadedFlag == false) { - $handler =& xoops_getmodulehandler('bannerclient'); + $handler =& xoops_getmodulehandler('bannerclient', 'legacyRender'); $this->mClient =& $handler->get($this->get('cid')); $this->_mClientLoadedFlag = true; } From minahito @ users.sourceforge.jp Mon Jul 10 14:54:45 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 14:54:45 +0900 Subject: [xoops-cvslog 3459] CVS update: xoops2jp/html/modules/legacyRender/class Message-ID: <20060710055445.C9FE22AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/class/bannerclient.php diff -u xoops2jp/html/modules/legacyRender/class/bannerclient.php:1.1.2.2 xoops2jp/html/modules/legacyRender/class/bannerclient.php:1.1.2.3 --- xoops2jp/html/modules/legacyRender/class/bannerclient.php:1.1.2.2 Mon Apr 24 19:57:57 2006 +++ xoops2jp/html/modules/legacyRender/class/bannerclient.php Mon Jul 10 14:54:45 2006 @@ -30,7 +30,7 @@ function loadBanner() { if ($this->_mBannersLoadedFlag == false) { - $handler =& xoops_getmodulehandler('banner'); + $handler =& xoops_getmodulehandler('banner', 'legacyRender'); $this->mBanners =& $handler->getObjects(new Criteria('cid', $this->get('cid'))); $this->_mBannersLoadedFlag = true; } @@ -39,7 +39,7 @@ function loadBannerCount() { if ($this->_mBannerCountLoadedFlag == false) { - $handler =& xoops_getmodulehandler('banner'); + $handler =& xoops_getmodulehandler('banner', 'legacyRender'); $this->mBannerCount = $handler->getCount(new Criteria('cid', $this->get('cid'))); $this->_mBannerCountLoadedFlag = true; } @@ -47,7 +47,7 @@ function &createBanner() { - $handler =& xoops_getmodulehandler('banner'); + $handler =& xoops_getmodulehandler('banner', 'legacyRender'); $obj =& $handler->create(); $obj->set('cid', $this->get('cid')); return $obj; @@ -56,7 +56,7 @@ function loadBannerfinish() { if ($this->_mBannerfinishCountFlag == false) { - $handler =& xoops_getmodulehandler('bannerfinish'); + $handler =& xoops_getmodulehandler('bannerfinish', 'legacyRender'); $this->mFinishBanners =& $handler->getObjects(new Criteria('cid', $this->get('cid'))); $this->_mBannerfinishCountLoadedFlag = true; } @@ -65,7 +65,7 @@ function loadFinishBannerCount() { if ($this->_mFinishBannerCountLoadedFlag == false) { - $handler =& xoops_getmodulehandler('bannerfinish'); + $handler =& xoops_getmodulehandler('bannerfinish', 'legacyRender'); $this->mFinishBannerCount = $handler->getCount(new Criteria('cid', $this->get('cid'))); $this->_mFinishBannerCountLoadedFlag = true; } @@ -73,7 +73,7 @@ function &createBannerfinish() { - $handler =& xoops_getmodulehandler('bannerfinish'); + $handler =& xoops_getmodulehandler('bannerfinish', 'legacyRender'); $obj =& $handler->create(); $obj->set('cid', $this->get('cid')); return $obj; @@ -88,11 +88,11 @@ function delete(&$obj) { - $handler =& xoops_getmodulehandler('banner'); + $handler =& xoops_getmodulehandler('banner', 'legacyRender'); $handler->deleteAll(new Criteria('cid', $obj->get('cid'))); unset($handler); - $handler =& xoops_getmodulehandler('bannerfinish'); + $handler =& xoops_getmodulehandler('bannerfinish', 'legacyRender'); $handler->deleteAll(new Criteria('cid', $obj->get('cid'))); unset($handler); From minahito @ users.sourceforge.jp Mon Jul 10 14:54:59 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 14:54:59 +0900 Subject: [xoops-cvslog 3460] CVS update: xoops2jp/html/modules/legacyRender/class Message-ID: <20060710055459.722792AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/class/bannerfinish.php diff -u xoops2jp/html/modules/legacyRender/class/bannerfinish.php:1.1.2.1 xoops2jp/html/modules/legacyRender/class/bannerfinish.php:1.1.2.2 --- xoops2jp/html/modules/legacyRender/class/bannerfinish.php:1.1.2.1 Mon Apr 24 16:31:08 2006 +++ xoops2jp/html/modules/legacyRender/class/bannerfinish.php Mon Jul 10 14:54:59 2006 @@ -20,7 +20,7 @@ function loadBannerclient() { if ($this->_mClientLoadedFlag == false) { - $handler =& xoops_getmodulehandler('bannerclient'); + $handler =& xoops_getmodulehandler('bannerclient', 'legacyRender'); $this->mClient =& $handler->get($this->get('cid')); $this->_mClientLoadedFlag = true; } From minahito @ users.sourceforge.jp Mon Jul 10 14:55:23 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 14:55:23 +0900 Subject: [xoops-cvslog 3461] CVS update: xoops2jp/html/modules/legacyRender/class Message-ID: <20060710055523.BFBE02AC03D@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/class/tplfile.php diff -u xoops2jp/html/modules/legacyRender/class/tplfile.php:1.1.2.11 xoops2jp/html/modules/legacyRender/class/tplfile.php:1.1.2.12 --- xoops2jp/html/modules/legacyRender/class/tplfile.php:1.1.2.11 Thu May 25 14:20:55 2006 +++ xoops2jp/html/modules/legacyRender/class/tplfile.php Mon Jul 10 14:55:23 2006 @@ -27,7 +27,7 @@ function loadSource() { if (!is_object($this->Source)) { - $handler =& xoops_getmodulehandler('tplsource'); + $handler =& xoops_getmodulehandler('tplsource', 'legacyRender'); $this->Source =& $handler->get($this->get('tpl_id')); if (!is_object($this->Source)) { $this->Source =& $handler->create(); @@ -58,7 +58,7 @@ $obj->set('tpl_lastimported', $this->get('tpl_lastimported')); $obj->set('tpl_type', $this->get('tpl_type')); - $handler =& xoops_getmodulehandler('tplsource'); + $handler =& xoops_getmodulehandler('tplsource', 'legacyRender'); $obj->Source =& $handler->create(); $obj->Source->set('tpl_source', $this->Source->get('tpl_source')); @@ -107,7 +107,7 @@ return true; } else { - $handler =& xoops_getmodulehandler('tplsource'); + $handler =& xoops_getmodulehandler('tplsource', 'legacyRender'); if ($obj->Source->isNew()) { $obj->Source->set('tpl_id', $obj->get('tpl_id')); @@ -154,7 +154,7 @@ $obj->loadSource(); if (is_object($obj->Source)) { - $handler =& xoops_getmodulehandler('tplsource'); + $handler =& xoops_getmodulehandler('tplsource', 'legacyRender'); if (!$handler->delete($obj->Source, $force)) { return false; } From minahito @ users.sourceforge.jp Mon Jul 10 14:55:36 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 14:55:36 +0900 Subject: [xoops-cvslog 3462] CVS update: xoops2jp/html/modules/legacyRender/class Message-ID: <20060710055536.68D0F2AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/class/tplset.php diff -u xoops2jp/html/modules/legacyRender/class/tplset.php:1.1.2.8 xoops2jp/html/modules/legacyRender/class/tplset.php:1.1.2.9 --- xoops2jp/html/modules/legacyRender/class/tplset.php:1.1.2.8 Tue Mar 28 22:30:48 2006 +++ xoops2jp/html/modules/legacyRender/class/tplset.php Mon Jul 10 14:55:36 2006 @@ -34,7 +34,7 @@ $moduleHandler =& xoops_gethandler('module'); $modules =& $moduleHandler->getObjects(); - $tplfileHandler =& xoops_getmodulehandler('tplfile'); + $tplfileHandler =& xoops_getmodulehandler('tplfile', 'legacyRender'); foreach ($modules as $module) { $modtpl =& new LegacyRenderModuletplObject(); @@ -71,7 +71,7 @@ // // fetch all tplfile object and do cloning. // - $handler =& xoops_getmodulehandler('tplfile'); + $handler =& xoops_getmodulehandler('tplfile', 'legacyRender'); $files =& $handler->getObjects(new Criteria('tpl_tplset', $original->get('tplset_name'))); foreach ($files as $file) { @@ -84,7 +84,7 @@ function delete(&$obj, $force) { - $handler =& xoops_getmodulehandler('tplfile'); + $handler =& xoops_getmodulehandler('tplfile', 'legacyRender'); $handler->deleteAll(new Criteria('tpl_tplset', $obj->get('tplset_name'))); return parent::delete($obj, $force); From minahito @ users.sourceforge.jp Mon Jul 10 14:55:58 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 14:55:58 +0900 Subject: [xoops-cvslog 3463] CVS update: xoops2jp/html/modules/legacyRender/admin Message-ID: <20060710055558.C71C22AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/index.php diff -u xoops2jp/html/modules/legacyRender/admin/index.php:1.1.2.1 xoops2jp/html/modules/legacyRender/admin/index.php:1.1.2.2 --- xoops2jp/html/modules/legacyRender/admin/index.php:1.1.2.1 Fri Nov 25 19:28:16 2005 +++ xoops2jp/html/modules/legacyRender/admin/index.php Mon Jul 10 14:55:58 2006 @@ -1,25 +1,24 @@ mController->getRenderSystem(); +$root =& XCube_Root::getSingleton(); -require_once "./class/LegacyRenderActionFrame.class.php"; +$actionName = isset($_GET['action']) ? trim($_GET['action']) : "ThemeList"; -$moduleRunner=new LegacyRenderActionFrame(); +$moduleRunner =& new LegacyRender_ActionFrame(true); +$moduleRunner->setActionName($actionName); -// -// Regist the module level easy framework to virtual controller. -// $root->mController->setActionStrategy($moduleRunner); -// -// Execute framework. -// $root->mController->executeAction(); -require_once XOOPS_ROOT_PATH."/footer.php"; +require_once XOOPS_ROOT_PATH . "/footer.php"; -?> \ No newline at end of file +?> From minahito @ users.sourceforge.jp Mon Jul 10 14:56:35 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 14:56:35 +0900 Subject: [xoops-cvslog 3464] CVS update: xoops2jp/html/modules/legacyRender/admin/actions Message-ID: <20060710055635.1950B2AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/actions/BannerclientDeleteAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/actions/BannerclientDeleteAction.class.php:1.1.2.2 xoops2jp/html/modules/legacyRender/admin/actions/BannerclientDeleteAction.class.php:1.1.2.3 --- xoops2jp/html/modules/legacyRender/admin/actions/BannerclientDeleteAction.class.php:1.1.2.2 Mon Jul 10 13:50:17 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/BannerclientDeleteAction.class.php Mon Jul 10 14:56:34 2006 @@ -1,7 +1,7 @@ executeRedirect("./index.php?action=BannerclientList", 1, _AD_LEGACYRENDER_ERROR_DBUPDATE_FAILED); } + + function executeViewCancel(&$controller, &$xoopsUser, &$render) + { + $controller->executeForward("./index.php?action=BannerclientList"); + } } ?> From minahito @ users.sourceforge.jp Mon Jul 10 14:56:52 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 14:56:52 +0900 Subject: [xoops-cvslog 3465] CVS update: xoops2jp/html/modules/legacyRender/admin/actions Message-ID: <20060710055652.56B5C2AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/actions/BannerclientEditAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/actions/BannerclientEditAction.class.php:1.1.2.1 xoops2jp/html/modules/legacyRender/admin/actions/BannerclientEditAction.class.php:1.1.2.2 --- xoops2jp/html/modules/legacyRender/admin/actions/BannerclientEditAction.class.php:1.1.2.1 Mon Apr 24 16:30:10 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/BannerclientEditAction.class.php Mon Jul 10 14:56:52 2006 @@ -1,4 +1,8 @@ executeRedirect("./index.php?action=BannerclientList", 1, _AD_LEGACYRENDER_ERROR_DBUPDATE_FAILED); + } + + function executeViewCancel(&$controller, &$xoopsUser, &$render) + { + $controller->executeForward("./index.php?action=BannerclientList"); } } From minahito @ users.sourceforge.jp Mon Jul 10 14:57:22 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 14:57:22 +0900 Subject: [xoops-cvslog 3466] CVS update: xoops2jp/html/modules/legacyRender/admin/forms Message-ID: <20060710055722.081732AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/forms/BannerclientAdminEditForm.class.php diff -u xoops2jp/html/modules/legacyRender/admin/forms/BannerclientAdminEditForm.class.php:1.1.2.2 xoops2jp/html/modules/legacyRender/admin/forms/BannerclientAdminEditForm.class.php:1.1.2.3 --- xoops2jp/html/modules/legacyRender/admin/forms/BannerclientAdminEditForm.class.php:1.1.2.2 Tue Apr 25 14:17:19 2006 +++ xoops2jp/html/modules/legacyRender/admin/forms/BannerclientAdminEditForm.class.php Mon Jul 10 14:57:21 2006 @@ -1,4 +1,8 @@ get('cid'); } function prepare() @@ -28,7 +32,6 @@ // // Set field properties // - $this->mFieldProperties['cid'] =& new XCube_FieldProperty($this); $this->mFieldProperties['cid']->setDependsByArray(array('required')); $this->mFieldProperties['cid']->addMessage('required', _AD_LEGACYRENDER_ERROR_REQUIRED, _AD_LEGACYRENDER_LANG_CID); From minahito @ users.sourceforge.jp Mon Jul 10 14:58:38 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 14:58:38 +0900 Subject: [xoops-cvslog 3467] CVS update: xoops2jp/html/modules/legacyRender/admin/templates Message-ID: <20060710055838.229632AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/templates/bannerclient_delete.html diff -u xoops2jp/html/modules/legacyRender/admin/templates/bannerclient_delete.html:1.1.2.6 xoops2jp/html/modules/legacyRender/admin/templates/bannerclient_delete.html:1.1.2.7 --- xoops2jp/html/modules/legacyRender/admin/templates/bannerclient_delete.html:1.1.2.6 Mon Jul 10 13:53:14 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/bannerclient_delete.html Mon Jul 10 14:58:37 2006 @@ -42,9 +42,8 @@
From minahito @ users.sourceforge.jp Tue Jul 4 18:51:18 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 4 Jul 2006 18:51:18 +0900 Subject: [xoops-cvslog 3423] CVS update: xoops2jp/html/modules/pm/class Message-ID: <20060704095118.1139E2AC02B@users.sourceforge.jp> Index: xoops2jp/html/modules/pm/class/PmActionFrame.class.php diff -u xoops2jp/html/modules/pm/class/PmActionFrame.class.php:1.1.2.4 xoops2jp/html/modules/pm/class/PmActionFrame.class.php:removed --- xoops2jp/html/modules/pm/class/PmActionFrame.class.php:1.1.2.4 Tue Mar 28 22:30:49 2006 +++ xoops2jp/html/modules/pm/class/PmActionFrame.class.php Tue Jul 4 18:51:18 2006 @@ -1,174 +0,0 @@ - // -// ------------------------------------------------------------------------ // -// This program is free software; you can redistribute it and/or modify // -// it under the terms of the GNU General Public License as published by // -// the Free Software Foundation; either version 2 of the License, or // -// (at your option) any later version. // -// // -// 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. See the // -// GNU General Public License for more details. // -// // -// You should have received a copy of the GNU General Public License // -// along with this program; if not, write to the Free Software // -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// ------------------------------------------------------------------------ // - -if (!defined('XOOPS_ROOT_PATH')) exit(); - -require_once XOOPS_ROOT_PATH."/class/XCube_ActionStrategy.class.php"; - -define ("PM_FRAME_PERFORM_SUCCESS",1); -define ("PM_FRAME_PERFORM_FAIL",2); -define ("PM_FRAME_INIT_SUCCESS",3); - -define ("PM_FRAME_VIEW_NONE",0); -define ("PM_FRAME_VIEW_SUCCESS",1); -define ("PM_FRAME_VIEW_ERROR",2); -define ("PM_FRAME_VIEW_INDEX",3); -define ("PM_FRAME_VIEW_INPUT",4); - -/** - * This is simple frame work for misc page controller. - * @package pm - */ -class PmActionFrame extends XCube_ActionStrategy -{ - var $mActionName=""; - var $mAction=null; - - function PmActionFrame() - { - } - - function setActionName($actionName) - { - $this->mActionName=$actionName; - } - - function execute(&$controller) - { - if($this->mActionName==null) - $this->mActionName=isset($_REQUEST['action']) ? trim($_REQUEST['action']) : null; - - if(!preg_match("/^\w+$/",$this->mActionName)) - die(); - - - // - // Create action object by mActionName - // - $className="Pm".ucfirst($this->mActionName)."Action"; - $fileName=XOOPS_MODULE_PATH."/pm/actions/${className}.class.php"; - if(!file_exists($fileName)) - die(); // TODO - - require_once $fileName; - if(class_exists($className)) - $this->mAction=new $className($controller,$controller->getXoopsUser()); - - if(!is_object($this->mAction)) - die(); // TODO - - // - // Simple Permission check - // - if($this->mAction->isSecure()&&!is_object($controller->getXoopsUser())) { - $errorMessages= array(_PM_SORRY,_PM_PLZREG); - XCube_Utils::redirectHeader(XOOPS_URL,2,$errorMessages); - } - - // - // Simple execute action switch. - // - if(xoops_getenv("REQUEST_METHOD")=="POST") { - $viewStatus=$this->mAction->execute($controller,$controller->getXoopsUser()); - } - else { - $viewStatus=$this->mAction->getDefaultView($controller,$controller->getXoopsUser()); - } - - - // - // Call the view stab method of action by $viewStatus - // - switch($viewStatus) { - case PM_FRAME_VIEW_SUCCESS: - $this->mAction->executeViewSuccess($controller,$controller->getXoopsUser(),$controller->mRenderSystem); - break; - - case PM_FRAME_VIEW_ERROR: - $this->mAction->executeViewError($controller,$controller->getXoopsUser(),$controller->mRenderSystem); - break; - - case PM_FRAME_VIEW_INDEX: - $this->mAction->executeViewIndex($controller,$controller->getXoopsUser(),$controller->mRenderSystem); - break; - - case PM_FRAME_VIEW_INPUT: - $this->mAction->executeViewInput($controller,$controller->getXoopsUser(),$controller->mRenderSystem); - break; - } - } -} - -class PmAction -{ - var $mConfig; - - function PmAction(&$controller,&$xoopsUser) - { - $this->mConfig=$controller->mModuleController->getConfig(); - } - - /** - * @return bool - */ - function isSecure() - { - return false; - } - - /** - * @param $controller Base_Controller - * @param $xoopsUser XoopsUserObject - */ - function getDefaultView(&$controller,&$xoopsUser) - { - return PM_FRAME_VIEW_NONE; - } - - function execute() - { - return PM_FRAME_VIEW_NONE; - } - - function executeViewSuccess(&$controller,&$xoopsUser,&$renderSystem) - { - } - - function executeViewError(&$controller,&$xoopsUser,&$renderSystem) - { - } - - function executeViewIndex(&$controller,&$xoopsUser,&$renderSystem) - { - } - - function executeViewInput(&$controller,&$xoopsUser,&$renderSystem) - { - } -} - -?> \ No newline at end of file From minahito @ users.sourceforge.jp Tue Jul 4 18:51:24 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 4 Jul 2006 18:51:24 +0900 Subject: [xoops-cvslog 3424] CVS update: xoops2jp/html/modules/pm/forms Message-ID: <20060704095124.72E7B2AC02B@users.sourceforge.jp> Index: xoops2jp/html/modules/pm/forms/DeletePmsgForm.class.php diff -u xoops2jp/html/modules/pm/forms/DeletePmsgForm.class.php:1.1.2.2 xoops2jp/html/modules/pm/forms/DeletePmsgForm.class.php:removed --- xoops2jp/html/modules/pm/forms/DeletePmsgForm.class.php:1.1.2.2 Tue Mar 28 22:30:48 2006 +++ xoops2jp/html/modules/pm/forms/DeletePmsgForm.class.php Tue Jul 4 18:51:24 2006 @@ -1,25 +0,0 @@ -mFormProperties['msg_id']=new XCube_IntArrayProperty('msg_id'); - - // set fields - $this->mFieldProperties['msg_id']=new XCube_FieldProperty($this); - $this->mFieldProperties['msg_id']->setDependsByArray(array('required')); - - } -} - -?> From minahito @ users.sourceforge.jp Wed Jul 5 11:36:23 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 5 Jul 2006 11:36:23 +0900 Subject: [xoops-cvslog 3425] CVS update: xoops2jp/html/modules/pm/forms Message-ID: <20060705023623.6C03E2AC033@users.sourceforge.jp> Index: xoops2jp/html/modules/pm/forms/PmliteEditForm.class.php diff -u xoops2jp/html/modules/pm/forms/PmliteEditForm.class.php:1.1.2.7 xoops2jp/html/modules/pm/forms/PmliteEditForm.class.php:1.1.2.8 --- xoops2jp/html/modules/pm/forms/PmliteEditForm.class.php:1.1.2.7 Tue Jul 4 18:49:43 2006 +++ xoops2jp/html/modules/pm/forms/PmliteEditForm.class.php Wed Jul 5 11:36:23 2006 @@ -61,7 +61,7 @@ } } -class Pm_PmliteComboEditForm extends PmliteEditForm +class Pm_PmliteComboEditForm extends Pm_PmliteEditForm { function prepare() { @@ -98,7 +98,7 @@ } } -class Pm_PmliteDirectEditForm extends PmliteEditForm +class Pm_PmliteDirectEditForm extends Pm_PmliteEditForm { var $_mUid; From minahito @ users.sourceforge.jp Wed Jul 5 11:37:06 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 5 Jul 2006 11:37:06 +0900 Subject: [xoops-cvslog 3426] CVS update: xoops2jp/html/modules/pm/templates Message-ID: <20060705023706.C7F3A2AC074@users.sourceforge.jp> Index: xoops2jp/html/modules/pm/templates/viewpmsg.html diff -u xoops2jp/html/modules/pm/templates/viewpmsg.html:1.1.2.10 xoops2jp/html/modules/pm/templates/viewpmsg.html:1.1.2.11 --- xoops2jp/html/modules/pm/templates/viewpmsg.html:1.1.2.10 Tue Jul 4 18:50:07 2006 +++ xoops2jp/html/modules/pm/templates/viewpmsg.html Wed Jul 5 11:37:06 2006 @@ -45,7 +45,7 @@ <{$pm->get("from_userid")|xoops_user:"uname"}> - <{$pm->getVar("subject")}> + <{$pm->getShow('subject')}> Index: xoops2jp/html/modules/pm/templates/readpmsg.html diff -u xoops2jp/html/modules/pm/templates/readpmsg.html:1.1.2.13 xoops2jp/html/modules/pm/templates/readpmsg.html:1.1.2.14 --- xoops2jp/html/modules/pm/templates/readpmsg.html:1.1.2.13 Thu Apr 13 00:11:20 2006 +++ xoops2jp/html/modules/pm/templates/readpmsg.html Wed Jul 5 11:37:06 2006 @@ -1,8 +1,8 @@

<{$xoops_pagetitle}>

<{if $feature.user.profile}> - <{$smarty.const._PM_PROFILE}> »» + <{$smarty.const._PM_PROFILE}> »» <{/if}> -<{$smarty.const._PM_INBOX}> »» <{$privMessage->getVar('subject')}> +<{$smarty.const._PM_INBOX}> »» <{$privMessage->getShow('subject')}> @@ -10,44 +10,44 @@ <{if $sendUser->hasAvatar()}> <{/if}> - - + - + Index: xoops2jp/html/modules/pm/templates/pmlite.html diff -u xoops2jp/html/modules/pm/templates/pmlite.html:1.1.2.7 xoops2jp/html/modules/pm/templates/pmlite.html:1.1.2.8 --- xoops2jp/html/modules/pm/templates/pmlite.html:1.1.2.7 Wed Jun 14 01:12:54 2006 +++ xoops2jp/html/modules/pm/templates/pmlite.html Wed Jul 5 11:37:06 2006 @@ -15,31 +15,29 @@ From minahito @ users.sourceforge.jp Wed Jul 5 11:37:54 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 5 Jul 2006 11:37:54 +0900 Subject: [xoops-cvslog 3427] CVS update: xoops2jp/html/kernel Message-ID: <20060705023754.6F4702AC033@users.sourceforge.jp> Index: xoops2jp/html/kernel/object.php diff -u xoops2jp/html/kernel/object.php:1.2.8.10 xoops2jp/html/kernel/object.php:1.2.8.11 --- xoops2jp/html/kernel/object.php:1.2.8.10 Tue May 16 22:25:07 2006 +++ xoops2jp/html/kernel/object.php Wed Jul 5 11:37:54 2006 @@ -1,5 +1,5 @@ getVar($key, 's'); + } + function set($key, $value) { $this->setVar($key, $value); From minahito @ users.sourceforge.jp Wed Jul 5 11:39:00 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 5 Jul 2006 11:39:00 +0900 Subject: [xoops-cvslog 3428] CVS update: xoops2jp/html/modules/base/kernel Message-ID: <20060705023900.036682AC071@users.sourceforge.jp> Index: xoops2jp/html/modules/base/kernel/object.php diff -u xoops2jp/html/modules/base/kernel/object.php:1.1.2.5 xoops2jp/html/modules/base/kernel/object.php:1.1.2.6 --- xoops2jp/html/modules/base/kernel/object.php:1.1.2.5 Tue Jun 20 19:53:52 2006 +++ xoops2jp/html/modules/base/kernel/object.php Wed Jul 5 11:38:59 2006 @@ -1,5 +1,5 @@ assignVars($values); } + + /** + * @deprecated + */ + function getVar($key) + { + return $this->getShow($key); + } /** * Return HTML string for displaying only by HTML. * The second parametor doesn't exist. */ - function getVar($key) + function getShow($key) { $value = null; From minahito @ users.sourceforge.jp Fri Jul 7 11:52:24 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 7 Jul 2006 11:52:24 +0900 Subject: [xoops-cvslog 3429] CVS update: xoops2jp/html/kernel Message-ID: <20060707025224.D00EB2AC046@users.sourceforge.jp> Index: xoops2jp/html/kernel/privmessage.php diff -u xoops2jp/html/kernel/privmessage.php:1.2.8.5 xoops2jp/html/kernel/privmessage.php:1.2.8.6 --- xoops2jp/html/kernel/privmessage.php:1.2.8.5 Tue May 16 22:25:07 2006 +++ xoops2jp/html/kernel/privmessage.php Fri Jul 7 11:52:24 2006 @@ -1,5 +1,5 @@ * @copyright copyright (c) 2000-2003 The XOOPS Project (http://www.xoops.org) * - * @version $Revision: 1.2.8.5 $ - $Date: 2006/05/16 13:25:07 $ + * @version $Revision: 1.2.8.6 $ - $Date: 2006/07/07 02:52:24 $ */ class XoopsPrivmessage extends XoopsObject { @@ -84,7 +84,7 @@ * @author Kazumi Ono * @copyright copyright (c) 2000-2003 The XOOPS Project (http://www.xoops.org) * - * @version $Revision: 1.2.8.5 $ - $Date: 2006/05/16 13:25:07 $ + * @version $Revision: 1.2.8.6 $ - $Date: 2006/07/07 02:52:24 $ */ class XoopsPrivmessageHandler extends XoopsObjectHandler { @@ -237,7 +237,7 @@ return $this->getCount(new Criteria('to_userid',$uid)); } - function getUnreadCountByFromUid($uid) + function getCountUnreadByFromUid($uid) { $criteria = new CriteriaCompo(new Criteria('read_msg', 0)); $criteria->add(new Criteria('to_userid', $uid)); From minahito @ users.sourceforge.jp Fri Jul 7 11:54:05 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 7 Jul 2006 11:54:05 +0900 Subject: [xoops-cvslog 3430] CVS update: xoops2jp/html/modules/base/kernel Message-ID: <20060707025405.926732AC09F@users.sourceforge.jp> Index: xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php diff -u xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.44 xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.45 --- xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.44 Sat Jul 1 16:26:04 2006 +++ xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php Fri Jul 7 11:54:05 2006 @@ -36,6 +36,16 @@ */ var $mSiteLogin = null; + /** + * @var XCube_Delegate + */ + var $mGetCountUnreadPM = null; + + /** + * @var XCube_Delegate + */ + var $mGetPMInboxUrl = null; + function Legacy_Controller() { // @@ -43,6 +53,9 @@ // $this->mSiteLogin =& new XCube_NewDelegate(); $this->mSiteLogin->register("Site.Login"); + + $this->mGetCountUnreadPM =& new XCube_NewDelegate(); + $this->mGetPMInboxUrl =& new XCube_NewDelegate(); set_magic_quotes_runtime(0); // ^^; @@ -760,6 +773,34 @@ $ret =& $this->_mControllerState->getVirtualCurrentModule($this); return $ret; } + + /** + * Return URL of pm inbox. This is X2 fixed feature. + * + * @param $uid int ID of the user + * @return string if any functions don't return value, return null. + */ + function getPMInboxUrl($uid) + { + $url = null; + $this->mGetPMInboxUrl->call(new XCube_Ref($url), $uid); + + return $url; + } + + /** + * Return counts of unread pm. This is X2 fixed feature. + * + * @param $uid int ID of the user + * @return int + */ + function getCountUnreadPM($uid) + { + $count = 0; + $this->mGetCountUnreadPM->call(new XCube_Ref($count), $uid); + + return $count; + } } /** From minahito @ users.sourceforge.jp Fri Jul 7 11:55:13 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 7 Jul 2006 11:55:13 +0900 Subject: [xoops-cvslog 3431] CVS update: xoops2jp/html/modules/base/blocks Message-ID: <20060707025513.D2BC22AC09F@users.sourceforge.jp> Index: xoops2jp/html/modules/base/blocks/legacy_usermenu.php diff -u xoops2jp/html/modules/base/blocks/legacy_usermenu.php:1.1.2.2 xoops2jp/html/modules/base/blocks/legacy_usermenu.php:1.1.2.3 --- xoops2jp/html/modules/base/blocks/legacy_usermenu.php:1.1.2.2 Mon Apr 3 14:44:24 2006 +++ xoops2jp/html/modules/base/blocks/legacy_usermenu.php Fri Jul 7 11:55:13 2006 @@ -1,25 +1,40 @@ mController->mXoopsUser; if (is_object($xoopsUser)) { - $pm_handler =& xoops_gethandler('privmessage'); $block = array(); $block['uid'] = $xoopsUser->getVar('uid'); - $block['flagShowInbox']=false; + $block['flagShowInbox'] = false; + // // Check does this system have PrivateMessage feature. - $root=&XCube_Root::getSingleton(); - $service=&$root->mServiceManager->searchXCubeService("PrivateMessage"); - if($service) { - $client=new XCube_ServiceClient($service); - $parameters=array("uid"=>$xoopsUser->getVar('uid')); - $block['new_messages'] = $client->call("getCountUnread",$parameters); + // + $url = $root->mController->getPMInboxUrl($block['uid']); + + if ($url != null) { + $block['inbox_url'] = $url; + $block['new_messages'] = $root->mController->getCountUnreadPM($block['uid']); $block['flagShowInbox']=true; } + return $block; } return false; From minahito @ users.sourceforge.jp Fri Jul 7 11:55:44 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 7 Jul 2006 11:55:44 +0900 Subject: [xoops-cvslog 3432] CVS update: xoops2jp/html/modules/base/templates/blocks Message-ID: <20060707025544.96BD52AC09F@users.sourceforge.jp> Index: xoops2jp/html/modules/base/templates/blocks/legacy_block_usermenu.html diff -u xoops2jp/html/modules/base/templates/blocks/legacy_block_usermenu.html:1.1.2.1 xoops2jp/html/modules/base/templates/blocks/legacy_block_usermenu.html:1.1.2.2 --- xoops2jp/html/modules/base/templates/blocks/legacy_block_usermenu.html:1.1.2.1 Sun Mar 26 15:07:49 2006 +++ xoops2jp/html/modules/base/templates/blocks/legacy_block_usermenu.html Fri Jul 7 11:55:44 2006 @@ -5,16 +5,16 @@ <{$smarty.const._MB_BASE_EACNT}> <{$smarty.const._MB_BASE_NOTIF}> <{$smarty.const._MB_BASE_LOUT}> -<{if $block.flagShowInbox}> -<{if $block.new_messages > 0}> - <{$smarty.const.lang_inbox}> (<{$block.new_messages}>) -<{else}> - <{$smarty.const._MB_BASE_INBOX}> -<{/if}> -<{/if}> -<{if $xoops_isadmin}> - <{$smarty.const._MB_BASE_ADMENU}> -<{/if}> + <{if $block.flagShowInbox}> + <{if $block.new_messages > 0}> + <{$smarty.const._MB_BASE_INBOX}> (<{$block.new_messages}>) + <{else}> + <{$smarty.const._MB_BASE_INBOX}> + <{/if}> + <{/if}> + <{if $xoops_isadmin}> + <{$smarty.const._MB_BASE_ADMENU}> + <{/if}>
hasAvatar()}>colspan="2"<{/if}>><{$smarty.const._MD_PM_LANG_MESSAGE_DETAIL}>
- <{$sendUser->getVar('uname')}> - <{if $sendUser->getVar('user_from')}> -
<{$sendUser->getVar('user_from')}> + <{$sendUser->getShow('uname')}> + <{if $sendUser->getShow('user_from')}> +
<{$sendUser->getShow('user_from')}> <{/if}>
<{$smarty.const._PM_FROMC}><{$sendUser->getVar('uname')}> + <{$smarty.const._PM_FROMC}><{$sendUser->getShow('uname')}>
<{$smarty.const._PM_SENTC}><{$privMessage->getVar("msg_time")|xoops_formattimestamp}><{$smarty.const._PM_SENTC}><{$privMessage->get("msg_time")|xoops_formattimestamp}>
<{$smarty.const._MD_PM_LANG_SUBJECTC}> <{$privMessage->getVar('subject')}><{$smarty.const._MD_PM_LANG_SUBJECTC}> <{$privMessage->getShow('subject')}>
- <{$privMessage->getVar('msg_text')}>

+ <{$privMessage->getShow('msg_text')}>

hasAvatar()}>colspan="2"<{/if}> style="text-align:left;"> - ','pmlite',450,380);"><{$smarty.const._PM_REPLY}> + ','pmlite',450,380);"><{$smarty.const._PM_REPLY}> - - <{$smarty.const._PM_DELETE}> + + <{$smarty.const._PM_DELETE}>
hasAvatar()}>colspan="2"<{/if}> style="text-align:right;"> <{if $previousMessage}> - <{$smarty.const._PM_PREVIOUS}> + <{$smarty.const._PM_PREVIOUS}> <{/if}> <{if $nextMessage}> <{if $previousMessage}> | <{/if}> - <{$smarty.const._PM_NEXT}> + <{$smarty.const._PM_NEXT}> <{/if}>
<{$smarty.const._PM_TO}> <{if $send_type==0}> - <{if $actionForm->getVar('to_userid')}> - <{$actionForm->getVar('to_userid')|xoops_user:"uname"}> - + <{if $actionForm->get('to_userid')}> + <{$actionForm->get('to_userid')|xoops_user:"uname"}> + <{xoops_input type=hidden name=to_userid value=$actionForm->get('to_userid')}> <{else}> - + <{xoops_optionsArray value=uid label=uname from=$userList default=$actionForm->get('to_userid')}> <{/if}> <{else}> - <{xoops_input name=to_uname value=$actionForm->getVar('to_uname')}> + <{xoops_input name=to_uname value=$actionForm->get('to_uname')}> <{/if}>
<{$smarty.const._PM_SUBJECTC}> - <{xoops_input name=subject size=30 maxlength=100 id=Text1 value=$actionForm->getVar('subject')}> + <{xoops_input name=subject size=30 maxlength=100 id=Text1 value=$actionForm->get('subject')}>
<{$smarty.const._PM_MESSAGEC}> - <{xoops_dhtmltarea cols=37 rows=8 name=message value=$actionForm->getVar('message')}> + <{xoops_dhtmltarea cols=37 rows=8 name=message value=$actionForm->get('message')}>
From minahito @ users.sourceforge.jp Fri Jul 7 11:56:14 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 7 Jul 2006 11:56:14 +0900 Subject: [xoops-cvslog 3433] CVS update: xoops2jp/html/modules/base/preload/Primary Message-ID: <20060707025614.6334D2AC09F@users.sourceforge.jp> Index: xoops2jp/html/modules/base/preload/Primary/NuSoapLoader.class.php diff -u xoops2jp/html/modules/base/preload/Primary/NuSoapLoader.class.php:1.1.2.3 xoops2jp/html/modules/base/preload/Primary/NuSoapLoader.class.php:1.1.2.4 --- xoops2jp/html/modules/base/preload/Primary/NuSoapLoader.class.php:1.1.2.3 Fri Jun 30 14:10:35 2006 +++ xoops2jp/html/modules/base/preload/Primary/NuSoapLoader.class.php Fri Jul 7 11:56:14 2006 @@ -9,7 +9,7 @@ function preFilter() { require_once XOOPS_ROOT_PATH . "/modules/base/lib/nusoap/nusoap.php"; - $this->mController->mRoot->mDelegateManager->add('XCube_ServiceManager.CreateClient', array('Legacy_NuSoapLoader', 'createClient')); + $this->mController->mRoot->mDelegateManager->add('XCube_ServiceManager.CreateClient', 'Legacy_NuSoapLoader::createClient'); } function createClient(&$client, $service) From minahito @ users.sourceforge.jp Fri Jul 7 11:57:08 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 7 Jul 2006 11:57:08 +0900 Subject: [xoops-cvslog 3434] CVS update: xoops2jp/html/modules/pm/preload Message-ID: <20060707025708.ECFA02AC09F@users.sourceforge.jp> Index: xoops2jp/html/modules/pm/preload/Preload.class.php diff -u xoops2jp/html/modules/pm/preload/Preload.class.php:1.1.2.2 xoops2jp/html/modules/pm/preload/Preload.class.php:1.1.2.3 --- xoops2jp/html/modules/pm/preload/Preload.class.php:1.1.2.2 Wed Jun 28 14:47:32 2006 +++ xoops2jp/html/modules/pm/preload/Preload.class.php Fri Jul 7 11:57:08 2006 @@ -2,18 +2,27 @@ if (!defined('XOOPS_ROOT_PATH')) die(); -class Pm_Preload extends XCube_ActionFilter { +class Pm_Preload extends XCube_ActionFilter +{ function preBlockFilter() { - require_once XOOPS_ROOT_PATH . "/modules/pm/kernel/PmEventProxyRegister.class.php"; - $this->mController->mRoot->mEventManager->addProxyRegister(new PmEventProxyRegister()); - - /* - require_once XOOPS_ROOT_PATH . "/modules/pm/service/LegacyPmService.class.php"; - $service =& new LegacyPmService(); - $this->mController->mRoot->mServiceManager->addXCubeService("PrivateMessage", $service); - unset($service); - */ + $this->mController->mGetPMInboxUrl->add("Pm_Preload::getPmInboxUrl"); + $this->mController->mGetCountUnreadPM->add("Pm_Preload::getCountUnreadPM"); + } + + function getPmInboxUrl(&$url, $uid) + { + if ($uid > 0) { + $url = XOOPS_MODULE_URL . "/pm/index.php"; + } + } + + function getCountUnreadPM(&$count, $uid) + { + if ($uid > 0) { + $handler =& xoops_gethandler('privmessage'); + $count = $handler->getCountUnreadByFromUid($uid); + } } } From minahito @ users.sourceforge.jp Fri Jul 7 12:17:57 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 7 Jul 2006 12:17:57 +0900 Subject: [xoops-cvslog 3435] CVS update: xoops2jp/html/modules/pm/kernel Message-ID: <20060707031757.DD90D2AC0B5@users.sourceforge.jp> Index: xoops2jp/html/modules/pm/kernel/PmEventProxyRegister.class.php diff -u xoops2jp/html/modules/pm/kernel/PmEventProxyRegister.class.php:1.1.2.5 xoops2jp/html/modules/pm/kernel/PmEventProxyRegister.class.php:removed --- xoops2jp/html/modules/pm/kernel/PmEventProxyRegister.class.php:1.1.2.5 Tue Mar 28 22:30:49 2006 +++ xoops2jp/html/modules/pm/kernel/PmEventProxyRegister.class.php Fri Jul 7 12:17:57 2006 @@ -1,31 +0,0 @@ -_mList; - } - - function &createLegacypage_Viewpmsg_AccessDelegate() - { - require_once XOOPS_MODULE_PATH."/pm/kernel/PmEventFunction.class.php"; - $delegate=new XCube_Delegate("PmEventFunction","AccessToViewpmsg"); - return $delegate; - } - - function &createLegacypage_Pmlite_AccessDelegate() - { - require_once XOOPS_MODULE_PATH."/pm/kernel/PmEventFunction.class.php"; - $delegate=new XCube_Delegate("PmEventFunction","AccessToPmlite"); - return $delegate; - } -} - -?> Index: xoops2jp/html/modules/pm/kernel/PmEventFunction.class.php diff -u xoops2jp/html/modules/pm/kernel/PmEventFunction.class.php:1.1.2.4 xoops2jp/html/modules/pm/kernel/PmEventFunction.class.php:removed --- xoops2jp/html/modules/pm/kernel/PmEventFunction.class.php:1.1.2.4 Sun Nov 13 13:49:29 2005 +++ xoops2jp/html/modules/pm/kernel/PmEventFunction.class.php Fri Jul 7 12:17:57 2006 @@ -1,34 +0,0 @@ -executeForward(XOOPS_MODULE_URL."/pm/index.php"); - } - - function AccessToReadpmsg(&$controller,$eventArgs) - { - $msg_id=intval($_GET['msg_id']); - $controller->executeForward(XOOPS_MODULE_URL."/pm/index.php?action=read&msg_id=".$msg_id); - } - - function AccessToPmlite(&$controller,$eventArgs) - { - // - // Does this access request reply mode? - // - $reply=isset($_GET['reply']) ? intval($_GET['reply']) : null; - $msg_id=isset($_GET['msg_id']) ? intval($_GET['msg_id']) : 0; - - if($reply==null||$msg_id==0) { - $controller->executeForward(XOOPS_MODULE_URL."/pm/pmlite.php"); - } - else { - $controller->executeForward(XOOPS_MODULE_URL."/pm/pmlite.php?reply=1&msg_id=".$msg_id); - } - } -} - -?> \ No newline at end of file Index: xoops2jp/html/modules/pm/kernel/PrivateMessage.class.php diff -u xoops2jp/html/modules/pm/kernel/PrivateMessage.class.php:1.1.2.2 xoops2jp/html/modules/pm/kernel/PrivateMessage.class.php:removed --- xoops2jp/html/modules/pm/kernel/PrivateMessage.class.php:1.1.2.2 Tue Mar 28 22:30:49 2006 +++ xoops2jp/html/modules/pm/kernel/PrivateMessage.class.php Fri Jul 7 12:17:57 2006 @@ -1,85 +0,0 @@ -_setToUser($user); - } - - function _setToUser(&$user) - { - $this->mToUsers[0]=&$user; - } - - function setFromUsers(&$users) - { - if(is_array($users)) - $user=&$users[0]; - else - $user=&$users; - - $this->_setFromUser($user); - } - - function _setFromUser(&$user) - { - $this->mFromUsers[0]=&$user; - } - - function setSubject($subject) - { - $this->mSubject=$subject; - } - - function setMessage($message) - { - $this->mMessage=$message; - } - - /** - * @return bool - */ - function send() - { - $pmHandler=&xoops_gethandler('privmessage'); - $pm=&$pmHandler->create(); - $pm->setVar("to_userid",$this->mToUsers[0]->getVar('uid')); - $pm->setVar("from_userid",$this->mFromUsers[0]->getVar('uid')); - $pm->setVar("subject",$this->mSubject); - $pm->setVar("msg_text",$this->mMessage); - - return $pmHandler->insert($pm); - } -} - -// Wmm... -class PrivateMessageManager -{ - function &create() - { - $instance=new PrivateMessage(); - return $instance; - } -} - - -?> \ No newline at end of file From minahito @ users.sourceforge.jp Fri Jul 7 12:18:29 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 7 Jul 2006 12:18:29 +0900 Subject: [xoops-cvslog 3436] CVS update: xoops2jp/html/modules/pm/preload Message-ID: <20060707031829.548DC2AC0B5@users.sourceforge.jp> Index: xoops2jp/html/modules/pm/preload/Preload.class.php diff -u xoops2jp/html/modules/pm/preload/Preload.class.php:1.1.2.3 xoops2jp/html/modules/pm/preload/Preload.class.php:1.1.2.4 --- xoops2jp/html/modules/pm/preload/Preload.class.php:1.1.2.3 Fri Jul 7 11:57:08 2006 +++ xoops2jp/html/modules/pm/preload/Preload.class.php Fri Jul 7 12:18:29 2006 @@ -6,6 +6,11 @@ { function preBlockFilter() { + $root =& XCube_Root::getSingleton(); + $root->mDelegateManager->add('Legacypage.Viewpmsg.Access', "Pm_Preload::accessToViewpmsg"); + $root->mDelegateManager->add('Legacypage.Readpmsg.Access', "Pm_Preload::accessToReadpmsg"); + $root->mDelegateManager->add('Legacypage.Pmlite.Access', "Pm_Preload::accessToPmlite"); + $this->mController->mGetPMInboxUrl->add("Pm_Preload::getPmInboxUrl"); $this->mController->mGetCountUnreadPM->add("Pm_Preload::getCountUnreadPM"); } @@ -24,6 +29,37 @@ $count = $handler->getCountUnreadByFromUid($uid); } } + + function accessToReadpmsg() + { + $root =& XCube_Root::getSingleton(); + $root->mController->executeForward(XOOPS_MODULE_URL . "/pm/index.php?action=read&msg_id=" . intval(xoops_getrequest('msg_id'))); + } + + function accessToViewpmsg() + { + $root =& XCube_Root::getSingleton(); + $root->mController->executeForward(XOOPS_MODULE_URL . "/pm/index.php"); + } + + function accessToPmlite() + { + $root =& XCube_Root::getSingleton(); + + // + // Does this access request reply mode? + // + $reply = xoops_getrequest('reply'); + $msg_id = intval(xoops_getrequest('msg_id')); + + if ($reply == null ||$msg_id == 0) { + $root->mController->executeForward(XOOPS_MODULE_URL . "/pm/pmlite.php"); + } + else { + $root->mController->executeForward(XOOPS_MODULE_URL . "/pm/pmlite.php?reply=1&msg_id=" . $msg_id); + } + } + } ?> \ No newline at end of file From minahito @ users.sourceforge.jp Fri Jul 7 12:18:36 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 7 Jul 2006 12:18:36 +0900 Subject: [xoops-cvslog 3437] CVS update: xoops2jp/html/modules/pm/service Message-ID: <20060707031836.3FBEA2AC0B5@users.sourceforge.jp> Index: xoops2jp/html/modules/pm/service/LegacyPmService.class.php diff -u xoops2jp/html/modules/pm/service/LegacyPmService.class.php:1.1.2.3 xoops2jp/html/modules/pm/service/LegacyPmService.class.php:removed --- xoops2jp/html/modules/pm/service/LegacyPmService.class.php:1.1.2.3 Wed May 24 18:42:25 2006 +++ xoops2jp/html/modules/pm/service/LegacyPmService.class.php Fri Jul 7 12:18:36 2006 @@ -1,42 +0,0 @@ -getObjectsByFromUid($uid); - return $pmObjects; - } - - function doGetCountUnread(&$parameters) - { - $uid=$parameters['uid']; - $pmHandler=&xoops_gethandler('privmessage'); - return $pmHandler->getUnreadCountByFromUid($uid); - } - - function doSend(&$parameters) - { - $pmHandler=&xoops_gethandler('privmessage'); - $pm=&$pmHandler->create(); - $pm->setVar("to_userid",$parameters['to_uid']); - $pm->setVar("from_userid",$parameters['from_uid']); - $pm->setVar("subject",$parameters['subject']); - $pm->setVar("msg_text",$parameters['message']); - - if(!$pmHandler->insert($pm)) { - $this->setError("Sending error"); - } - } -} - -?> \ No newline at end of file From minahito @ users.sourceforge.jp Fri Jul 7 12:19:05 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 7 Jul 2006 12:19:05 +0900 Subject: [xoops-cvslog 3438] CVS update: xoops2jp/html/modules/pm/service Message-ID: <20060707031905.7F4682AC0B5@users.sourceforge.jp> Index: xoops2jp/html/modules/pm/service/index.html diff -u xoops2jp/html/modules/pm/service/index.html:1.1.2.1 xoops2jp/html/modules/pm/service/index.html:removed --- xoops2jp/html/modules/pm/service/index.html:1.1.2.1 Mon Mar 27 11:41:56 2006 +++ xoops2jp/html/modules/pm/service/index.html Fri Jul 7 12:19:05 2006 @@ -1 +0,0 @@ - \ No newline at end of file From minahito @ users.sourceforge.jp Fri Jul 7 12:19:05 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 7 Jul 2006 12:19:05 +0900 Subject: [xoops-cvslog 3439] CVS update: xoops2jp/html/modules/pm/kernel Message-ID: <20060707031905.AA9E72AC0BA@users.sourceforge.jp> Index: xoops2jp/html/modules/pm/kernel/index.html diff -u xoops2jp/html/modules/pm/kernel/index.html:1.1.2.1 xoops2jp/html/modules/pm/kernel/index.html:removed --- xoops2jp/html/modules/pm/kernel/index.html:1.1.2.1 Mon Mar 27 11:41:50 2006 +++ xoops2jp/html/modules/pm/kernel/index.html Fri Jul 7 12:19:05 2006 @@ -1 +0,0 @@ - \ No newline at end of file From minahito @ users.sourceforge.jp Fri Jul 7 12:21:04 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 7 Jul 2006 12:21:04 +0900 Subject: [xoops-cvslog 3440] CVS update: xoops2jp/html/modules/pm Message-ID: <20060707032104.0E1552AC0B5@users.sourceforge.jp> Index: xoops2jp/html/modules/pm/xoops_version.php diff -u xoops2jp/html/modules/pm/xoops_version.php:1.1.2.12 xoops2jp/html/modules/pm/xoops_version.php:1.1.2.13 --- xoops2jp/html/modules/pm/xoops_version.php:1.1.2.12 Sat Feb 4 03:07:19 2006 +++ xoops2jp/html/modules/pm/xoops_version.php Fri Jul 7 12:21:03 2006 @@ -1,5 +1,5 @@ "send_type", - "title"=>"_MI_PM_CONF_SEND_TYPE", - "description"=>"_MI_PM_CONF_SEND_TYPE_DESC", - "formtype"=>"select", - "options"=>array(_MI_PM_CONF_SEND_TYPE_COMBO=>0,_MI_PM_CONF_SEND_TYPE_TEXT=>1), - "valuetype"=>"int", - "default"=>0 +$modversion['config'][] = array ( + "name" => "send_type", + "title" => "_MI_PM_CONF_SEND_TYPE", + "description" => "_MI_PM_CONF_SEND_TYPE_DESC", + "formtype" => "select", + "options" => array(_MI_PM_CONF_SEND_TYPE_COMBO=>0, _MI_PM_CONF_SEND_TYPE_TEXT=>1), + "valuetype" => "int", + "default" => 0 ); // Menu From nobunobu @ users.sourceforge.jp Fri Jul 7 13:52:25 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Fri, 7 Jul 2006 13:52:25 +0900 Subject: [xoops-cvslog 3441] CVS update: xoops2jp/html/kernel Message-ID: <20060707045225.42BAD2AC0BE@users.sourceforge.jp> Index: xoops2jp/html/kernel/XCube_Delegate.class.php diff -u xoops2jp/html/kernel/XCube_Delegate.class.php:1.1.2.8 xoops2jp/html/kernel/XCube_Delegate.class.php:1.1.2.9 --- xoops2jp/html/kernel/XCube_Delegate.class.php:1.1.2.8 Fri Jun 30 15:06:08 2006 +++ xoops2jp/html/kernel/XCube_Delegate.class.php Fri Jul 7 13:52:25 2006 @@ -1,6 +1,6 @@ 2) { + if ($num > 1) { $delegateName = $args[0]; $string = $args[1]; if (!empty($strint) && is_string($string)) { From nobunobu @ users.sourceforge.jp Fri Jul 7 16:03:22 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Fri, 7 Jul 2006 16:03:22 +0900 Subject: [xoops-cvslog 3442] CVS update: xoops2jp/html/modules/legacyRender/preload Message-ID: <20060707070322.4F6E92AC040@users.sourceforge.jp> From nobunobu @ users.sourceforge.jp Sat Jul 8 11:20:44 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Sat, 8 Jul 2006 11:20:44 +0900 Subject: [xoops-cvslog 3443] CVS update: xoops2jp/html/modules/base/preload Message-ID: <20060708022044.352932AC01C@users.sourceforge.jp> Index: xoops2jp/html/modules/base/preload/Wating.class.php diff -u /dev/null xoops2jp/html/modules/base/preload/Wating.class.php:1.1.2.1 --- /dev/null Sat Jul 8 11:20:44 2006 +++ xoops2jp/html/modules/base/preload/Wating.class.php Sat Jul 8 11:20:43 2006 @@ -0,0 +1,90 @@ +mController->mRoot->mDelegateManager->add('Legacyblock.Wating.Show',array(&$this,"callbackWatingShow")); + } + + function callbackWatingShow(&$modules) { + $xoopsDB =& Database::getInstance(); + // for News Module + $module_handler =& xoops_gethandler('module'); + if ($module_handler->getCount(new Criteria('dirname', 'news'))) { + $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("stories")." WHERE published=0"); + if ( $result ) { + $blockVal = array(); + $blockVal['adminlink'] = XOOPS_URL."/modules/news/admin/index.php?op=newarticle"; + list($blockVal['pendingnum']) = $xoopsDB->fetchRow($result); + $blockVal['lang_linkname'] = _MB_BASE_SUBMS; + $modules = $blockVal; + } + } + // for MyLinks Module + if ($module_handler->getCount(new Criteria('dirname', 'mylinks'))) { + $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mylinks_links")." WHERE status=0"); + if ( $result ) { + $blockVal = array(); + $blockVal['adminlink'] = XOOPS_URL."/modules/mylinks/admin/index.php?op=listNewLinks"; + list($blockVal['pendingnum']) = $xoopsDB->fetchRow($result); + $blockVal['lang_linkname'] = _MB_BASE_WLNKS; + $modules[] = $blockVal; + } + $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mylinks_broken")); + if ( $result ) { + $blockVal = array(); + $blockVal['adminlink'] = XOOPS_URL."/modules/mylinks/admin/index.php?op=listBrokenLinks"; + list($blockVal['pendingnum']) = $xoopsDB->fetchRow($result); + $blockVal['lang_linkname'] = _MB_BASE_BLNK; + $modules[] = $blockVal; + } + $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mylinks_mod")); + if ( $result ) { + $blockVal = array(); + $blockVal['adminlink'] = XOOPS_URL."/modules/mylinks/admin/index.php?op=listModReq"; + list($blockVal['pendingnum']) = $xoopsDB->fetchRow($result); + $blockVal['lang_linkname'] = _MB_BASE_MLNKS; + $modules[] = $blockVal; + } + } + // for MyDownloads Modules + if ($module_handler->getCount(new Criteria('dirname', 'mydownloads'))) { + $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mydownloads_downloads")." WHERE status=0"); + if ( $result ) { + $blockVal = array(); + $blockVal['adminlink'] = XOOPS_URL."/modules/mydownloads/admin/index.php?op=listNewDownloads"; + list($blockVal['pendingnum']) = $xoopsDB->fetchRow($result); + $blockVal['lang_linkname'] = _MB_BASE_WDLS; + $modules[] = $blockVal; + } + $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mydownloads_broken").""); + if ( $result ) { + $blockVal = array(); + $blockVal['adminlink'] = XOOPS_URL."/modules/mydownloads/admin/index.php?op=listBrokenDownloads"; + list($blockVal['pendingnum']) = $xoopsDB->fetchRow($result); + $blockVal['lang_linkname'] = _MB_BASE_BFLS; + $modules[] = $blockVal; + } + $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mydownloads_mod").""); + if ( $result ) { + $blockVal = array(); + $blockVal['adminlink'] = XOOPS_URL."/modules/mydownloads/admin/index.php?op=listModReq"; + list($blockVal['pendingnum']) = $xoopsDB->fetchRow($result); + $blockVal['lang_linkname'] = _MB_BASE_MFLS; + $modules[] = $blockVal; + } + } + // for Comments + $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("xoopscomments")." WHERE com_status=1"); + if ( $result ) { + $blockVal = array(); + $blockVal['adminlink'] = XOOPS_URL."/modules/system/admin.php?module=0&status=1&fct=comments"; + list($blockVal['pendingnum']) = $xoopsDB->fetchRow($result); + $blockVal['lang_linkname'] =_MB_BASE_COMPEND; + $modules[] = $blockVal; + } + } +} +?> From nobunobu @ users.sourceforge.jp Sat Jul 8 11:20:44 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Sat, 8 Jul 2006 11:20:44 +0900 Subject: [xoops-cvslog 3444] CVS update: xoops2jp/html/modules/base/class Message-ID: <20060708022044.5838C2AC029@users.sourceforge.jp> Index: xoops2jp/html/modules/base/class/modulePreloadWating.class.php diff -u xoops2jp/html/modules/base/class/modulePreloadWating.class.php:1.1.2.2 xoops2jp/html/modules/base/class/modulePreloadWating.class.php:removed --- xoops2jp/html/modules/base/class/modulePreloadWating.class.php:1.1.2.2 Mon Apr 3 14:44:19 2006 +++ xoops2jp/html/modules/base/class/modulePreloadWating.class.php Sat Jul 8 11:20:44 2006 @@ -1,90 +0,0 @@ -mController->mRoot->mEventManager->add('Legacyblock.Wating.Show',new XCube_InstanceDelegate($this,"callbackWatingShow")); - } - - function callbackWatingShow(&$controller,&$eventArgs) { - $xoopsDB =& Database::getInstance(); - // for News Module - $module_handler =& xoops_gethandler('module'); - if ($module_handler->getCount(new Criteria('dirname', 'news'))) { - $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("stories")." WHERE published=0"); - if ( $result ) { - $blockVal = array(); - $blockVal['adminlink'] = XOOPS_URL."/modules/news/admin/index.php?op=newarticle"; - list($blockVal['pendingnum']) = $xoopsDB->fetchRow($result); - $blockVal['lang_linkname'] = _MB_BASE_SUBMS; - $eventArgs['modules'][] = $blockVal; - } - } - // for MyLinks Module - if ($module_handler->getCount(new Criteria('dirname', 'mylinks'))) { - $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mylinks_links")." WHERE status=0"); - if ( $result ) { - $blockVal = array(); - $blockVal['adminlink'] = XOOPS_URL."/modules/mylinks/admin/index.php?op=listNewLinks"; - list($blockVal['pendingnum']) = $xoopsDB->fetchRow($result); - $blockVal['lang_linkname'] = _MB_BASE_WLNKS; - $eventArgs['modules'][] = $blockVal; - } - $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mylinks_broken")); - if ( $result ) { - $blockVal = array(); - $blockVal['adminlink'] = XOOPS_URL."/modules/mylinks/admin/index.php?op=listBrokenLinks"; - list($blockVal['pendingnum']) = $xoopsDB->fetchRow($result); - $blockVal['lang_linkname'] = _MB_BASE_BLNK; - $eventArgs['modules'][] = $blockVal; - } - $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mylinks_mod")); - if ( $result ) { - $blockVal = array(); - $blockVal['adminlink'] = XOOPS_URL."/modules/mylinks/admin/index.php?op=listModReq"; - list($blockVal['pendingnum']) = $xoopsDB->fetchRow($result); - $blockVal['lang_linkname'] = _MB_BASE_MLNKS; - $eventArgs['modules'][] = $blockVal; - } - } - // for MyDownloads Modules - if ($module_handler->getCount(new Criteria('dirname', 'mydownloads'))) { - $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mydownloads_downloads")." WHERE status=0"); - if ( $result ) { - $blockVal = array(); - $blockVal['adminlink'] = XOOPS_URL."/modules/mydownloads/admin/index.php?op=listNewDownloads"; - list($blockVal['pendingnum']) = $xoopsDB->fetchRow($result); - $blockVal['lang_linkname'] = _MB_BASE_WDLS; - $eventArgs['modules'][] = $blockVal; - } - $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mydownloads_broken").""); - if ( $result ) { - $blockVal = array(); - $blockVal['adminlink'] = XOOPS_URL."/modules/mydownloads/admin/index.php?op=listBrokenDownloads"; - list($blockVal['pendingnum']) = $xoopsDB->fetchRow($result); - $blockVal['lang_linkname'] = _MB_BASE_BFLS; - $eventArgs['modules'][] = $blockVal; - } - $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mydownloads_mod").""); - if ( $result ) { - $blockVal = array(); - $blockVal['adminlink'] = XOOPS_URL."/modules/mydownloads/admin/index.php?op=listModReq"; - list($blockVal['pendingnum']) = $xoopsDB->fetchRow($result); - $blockVal['lang_linkname'] = _MB_BASE_MFLS; - $eventArgs['modules'][] = $blockVal; - } - } - // for Comments - $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("xoopscomments")." WHERE com_status=1"); - if ( $result ) { - $blockVal = array(); - $blockVal['adminlink'] = XOOPS_URL."/modules/system/admin.php?module=0&status=1&fct=comments"; - list($blockVal['pendingnum']) = $xoopsDB->fetchRow($result); - $blockVal['lang_linkname'] =_MB_BASE_COMPEND; - $eventArgs['modules'][] = $blockVal; - } - } -} -?> From nobunobu @ users.sourceforge.jp Sat Jul 8 11:20:44 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Sat, 8 Jul 2006 11:20:44 +0900 Subject: [xoops-cvslog 3445] CVS update: xoops2jp/html/modules/legacyRender/class Message-ID: <20060708022044.7C0402AC0C3@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/class/modulePreloadCacheclear.class.php diff -u xoops2jp/html/modules/legacyRender/class/modulePreloadCacheclear.class.php:1.1.2.1 xoops2jp/html/modules/legacyRender/class/modulePreloadCacheclear.class.php:removed --- xoops2jp/html/modules/legacyRender/class/modulePreloadCacheclear.class.php:1.1.2.1 Tue May 30 12:58:32 2006 +++ xoops2jp/html/modules/legacyRender/class/modulePreloadCacheclear.class.php Sat Jul 8 11:20:44 2006 @@ -1,26 +0,0 @@ -mController->mRoot->mEventManager->add('Module.Legacy.ModuleInstall.Success', new XCube_Delegate("legacyRenderModulePreloadCacheclear", "callback")); - $this->mController->mRoot->mEventManager->add('Module.Legacy.ModuleUpdate.Success', new XCube_Delegate("legacyRenderModulePreloadCacheclear", "callback")); - } - - function callback(&$action, &$module) - { - $handler =& xoops_getmodulehandler('tplfile', 'legacyRender'); - - $criteria =& new Criteria('tpl_module', $module->get('dirname')); - $tplfileArr = $handler->getObjects($criteria); - - $xoopsTpl =& new XoopsTpl(); - foreach (array_keys($tplfileArr) as $key) { - $xoopsTpl->clear_cache('db:' . $tplfileArr[$key]->get('tpl_file')); - $xoopsTpl->clear_compiled_tpl('db:' . $tplfileArr[$key]->get('tpl_file')); - } - } -} -?> From nobunobu @ users.sourceforge.jp Sat Jul 8 11:20:47 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Sat, 8 Jul 2006 11:20:47 +0900 Subject: [xoops-cvslog 3446] CVS update: xoops2jp/html/modules/legacyRender/preload Message-ID: <20060708022047.8DDC02AC01C@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/preload/Cacheclear.class.php diff -u /dev/null xoops2jp/html/modules/legacyRender/preload/Cacheclear.class.php:1.1.2.1 --- /dev/null Sat Jul 8 11:20:47 2006 +++ xoops2jp/html/modules/legacyRender/preload/Cacheclear.class.php Sat Jul 8 11:20:47 2006 @@ -0,0 +1,25 @@ +mController->mRoot->mEventManager->add('Module.Legacy.ModuleInstall.Success', new XCube_Delegate("legacyRender_Cacheclear", "callback")); + $this->mController->mRoot->mEventManager->add('Module.Legacy.ModuleUpdate.Success', new XCube_Delegate("legacyRender_Cacheclear", "callback")); + } + + function callback(&$action, &$module) + { + $handler =& xoops_getmodulehandler('tplfile', 'legacyRender'); + + $criteria =& new Criteria('tpl_module', $module->get('dirname')); + $tplfileArr = $handler->getObjects($criteria); + + $xoopsTpl =& new XoopsTpl(); + foreach (array_keys($tplfileArr) as $key) { + $xoopsTpl->clear_cache('db:' . $tplfileArr[$key]->get('tpl_file')); + $xoopsTpl->clear_compiled_tpl('db:' . $tplfileArr[$key]->get('tpl_file')); + } + } +} +?> From nobunobu @ users.sourceforge.jp Sat Jul 8 11:22:22 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Sat, 8 Jul 2006 11:22:22 +0900 Subject: [xoops-cvslog 3447] CVS update: xoops2jp/html Message-ID: <20060708022222.34B832AC01C@users.sourceforge.jp> Index: xoops2jp/html/admin.php diff -u xoops2jp/html/admin.php:1.2.8.4 xoops2jp/html/admin.php:1.2.8.5 --- xoops2jp/html/admin.php:1.2.8.4 Sat May 27 23:06:23 2006 +++ xoops2jp/html/admin.php Sat Jul 8 11:22:22 2006 @@ -1,21 +1,6 @@ _mList; - } - function &createLegacypage_Admin_SystemCheckDelegate() - { - $delegate=new XCube_Delegate("DefaultSystemCheckFunction","DefaultCheck"); - return $delegate; - } - -} class DefaultSystemCheckFunction { function DefaultCheck() @@ -34,8 +19,7 @@ require_once XOOPS_ROOT_PATH . "/header.php"; $root=&XCube_Root::getSingleton(); -$root->mEventManager->addProxyRegister(new DefaultSystemCheckProxyRegister()); -$eventArgs=array(); -$root->mEventManager->raiseEvent("Legacypage.Admin.SystemCheck",$root->mController,$eventArgs); +$root->mDelegateManager->add("Legacypage.Admin.SystemCheck", "DefaultSystemCheckFunction::DefaultCheck"); +XCube_DelegateUtils::call("Legacypage.Admin.SystemCheck"); require_once XOOPS_ROOT_PATH . "/footer.php"; ?> \ No newline at end of file From nobunobu @ users.sourceforge.jp Sun Jul 9 00:50:58 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Sun, 9 Jul 2006 00:50:58 +0900 Subject: [xoops-cvslog 3448] CVS update: xoops2jp/html/modules/base/blocks Message-ID: <20060708155058.D18C82AC04E@users.sourceforge.jp> Index: xoops2jp/html/modules/base/blocks/legacy_waiting.php diff -u xoops2jp/html/modules/base/blocks/legacy_waiting.php:1.1.2.2 xoops2jp/html/modules/base/blocks/legacy_waiting.php:1.1.2.3 --- xoops2jp/html/modules/base/blocks/legacy_waiting.php:1.1.2.2 Sun Apr 2 23:54:57 2006 +++ xoops2jp/html/modules/base/blocks/legacy_waiting.php Sun Jul 9 00:50:58 2006 @@ -1,11 +1,8 @@ &$modules)); + XCube_DelegateUtils::call('Legacyblock.Wating.Show', new XCube_Ref(&$modules)); + $block['modules'] = $modules; return $block; } ?> From minahito @ users.sourceforge.jp Mon Jul 10 12:06:28 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 12:06:28 +0900 Subject: [xoops-cvslog 3449] CVS update: xoops2jp/html/kernel Message-ID: <20060710030628.EE98E2AC04A@users.sourceforge.jp> Index: xoops2jp/html/kernel/XCube_Delegate.class.php diff -u xoops2jp/html/kernel/XCube_Delegate.class.php:1.1.2.9 xoops2jp/html/kernel/XCube_Delegate.class.php:1.1.2.10 --- xoops2jp/html/kernel/XCube_Delegate.class.php:1.1.2.9 Fri Jul 7 13:52:25 2006 +++ xoops2jp/html/kernel/XCube_Delegate.class.php Mon Jul 10 12:06:28 2006 @@ -1,6 +1,6 @@ getObject(); From minahito @ users.sourceforge.jp Mon Jul 10 13:13:52 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 13:13:52 +0900 Subject: [xoops-cvslog 3450] CVS update: xoops2jp/html/modules/base/admin/templates Message-ID: <20060710041352.277002AC04A@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/templates/preference_edit.html diff -u xoops2jp/html/modules/base/admin/templates/preference_edit.html:1.1.2.11 xoops2jp/html/modules/base/admin/templates/preference_edit.html:1.1.2.12 --- xoops2jp/html/modules/base/admin/templates/preference_edit.html:1.1.2.11 Sat Jul 1 16:25:19 2006 +++ xoops2jp/html/modules/base/admin/templates/preference_edit.html Mon Jul 10 13:13:52 2006 @@ -56,11 +56,11 @@
"> <{if $config->get('conf_formtype') == 'textarea'}> - <{xoops_textarea name=$config->getVar('conf_name') id=$config->getVar('conf_name') rows=5 cols=50 value=$actionForm->get($config->get('conf_name'))}> + <{xoops_textarea name=$config->getVar('conf_name') rows=5 cols=50 value=$actionForm->get($config->get('conf_name'))}> <{elseif $config->get('conf_formtype') == 'select'}> - ' id='legacy_xoopsform_<{$config->getVar('conf_name')}>'> <{foreach item=option from=$config->getOptionItems()}> <{/foreach}> @@ -68,7 +68,7 @@ <{elseif $config->get('conf_formtype') == 'select_multi'}> - []' id='legacy_xoopsform_<{$config->getVar('conf_name')}>' size='5' multiple> <{foreach item=option from=$config->getOptionItems()}> <{assign var=flag value=0}> <{foreach item=selected from=$actionForm->get($config->get('conf_name'))}> @@ -80,12 +80,13 @@ <{elseif $config->get('conf_formtype') == 'yesno'}> - <{xoops_input type=radio name=$config->get('conf_name') id=$config->get('conf_name') value=1 default=$actionForm->get($config->get('conf_name'))}><{$smarty.const._YES}> - <{xoops_input type=radio name=$config->get('conf_name') id=$config->get('conf_name') value=0 default=$actionForm->get($config->get('conf_name'))}><{$smarty.const._NO}> + <{*TODO ID conflict*}> + <{xoops_input type=radio name=$config->get('conf_name') value=1 default=$actionForm->get($config->get('conf_name'))}><{$smarty.const._YES}> + <{xoops_input type=radio name=$config->get('conf_name') value=0 default=$actionForm->get($config->get('conf_name'))}><{$smarty.const._NO}> <{elseif $config->get('conf_formtype') == 'theme'}> - ' id='legacy_xoopsform_<{$config->getVar('conf_name')}>'> <{foreach item=theme from=$themeArr}> <{/foreach}> @@ -93,7 +94,7 @@ <{elseif $config->get('conf_formtype') == 'theme_multi'}> - []' id='legacy_xoopsform_<{$config->getVar('conf_name')}>' size='5' multiple> <{foreach item=theme from=$themeArr}> <{assign var=flag value=0}> <{foreach item=selected from=$actionForm->get($config->get('conf_name'))}> @@ -105,19 +106,19 @@ <{elseif $config->get('conf_formtype') == 'tplset'}> - ' id='legacy_xoopsform_<{$config->getVar('conf_name')}>'> <{xoops_optionsArray value=tplset_name label=tplset_name from=$tplsetArr default=$actionForm->get($config->get('conf_name'))}> <{elseif $config->get('conf_formtype') == 'timezone'}> - ' id='legacy_xoopsform_<{$config->getVar('conf_name')}>'> <{xoops_optionsArray value=offset label=zone_name from=$timezoneArr default=$actionForm->get($config->get('conf_name'))}> <{elseif $config->get('conf_formtype') == 'language'}> - ' id='legacy_xoopsform_<{$config->getVar('conf_name')}>'> <{foreach item=language from=$languageArr}> <{/foreach}> @@ -125,20 +126,20 @@ <{elseif $config->get('conf_formtype') == 'startpage'}> - ' id='legacy_xoopsform_<{$config->getVar('conf_name')}>'> <{xoops_optionsArray value=mid label=name from=$moduleArr default=$actionForm->get($config->get('conf_name'))}> <{elseif $config->get('conf_formtype') == 'group'}> - ' id='legacy_xoopsform_<{$config->getVar('conf_name')}>'> <{xoops_optionsArray value=groupid label=name from=$groupArr default=$actionForm->get($config->get('conf_name'))}> <{elseif $config->get('conf_formtype') == 'group_multi'}> - []' id='legacy_xoopsform_<{$config->getVar('conf_name')}>' size='3' multiple> <{foreach item=group from=$groupArr}> <{assign var=flag value=0}> <{foreach item=selected from=$actionForm->get($config->get('conf_name'))}> @@ -150,7 +151,7 @@ <{elseif $config->get('conf_formtype') == 'user'}> - ' id='legacy_xoopsform_<{$config->getVar('conf_name')}>'> <{foreach key=value item=label from=$userArr}> <{/foreach}> @@ -158,7 +159,7 @@ <{elseif $config->get('conf_formtype') == 'user_multi'}> - []' id='legacy_xoopsform_<{$config->getVar('conf_name')}>' size='3' multiple> <{foreach key=value item=label from=$userArr}> <{assign var=flag value=0}> <{foreach item=selected from=$actionForm->get($config->get('conf_name'))}> @@ -172,7 +173,7 @@ <{elseif $config->get('conf_formtype') == 'module_cache'}> <{foreach item=module from=$moduleArr}> <{$module->getVar('name')}> - id='legacy_xoopsform_<{$config->getVar('conf_name')}>_<{$module->getVar('mid')}>' <{foreach item=cachetime from=$cachetimeArr}> <{if $actionForm->get($config->get('conf_name'), $module->get('mid')) == $cachetime->get('cachetime')}> @@ -186,14 +187,14 @@ <{elseif $config->get('conf_formtype') == 'password'}> - <{xoops_input type=password name=$config->get('conf_name') id=$config->get('conf_name') size=50 maxlength=255 value=$actionForm->get($config->get('conf_name'))}> + <{xoops_input type=password name=$config->get('conf_name') size=50 maxlength=255 value=$actionForm->get($config->get('conf_name'))}> <{elseif $config->get('conf_formtype') == 'textbox'}> - <{xoops_input type=text name=$config->get('conf_name') id=$config->get('conf_name') size=50 maxlength=255 value=$actionForm->get($config->get('conf_name'))}> + <{xoops_input type=text name=$config->get('conf_name') size=50 maxlength=255 value=$actionForm->get($config->get('conf_name'))}> <{elseif $config->get('conf_formtype') == 'text'}> <{* deprecated *}> - <{xoops_input type=text name=$config->get('conf_name') id=$config->get('conf_name') size=50 maxlength=255 value=$actionForm->get($config->get('conf_name'))}> + <{xoops_input type=text name=$config->get('conf_name') size=50 maxlength=255 value=$actionForm->get($config->get('conf_name'))}> <{/if}>
<{$smarty.const._AD_LEGACYRENDER_LANG_BID}>"><{$object->getVar('bid')}>"><{$object->getShow('bid')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_CLIENT_NAME}>"><{$object->mClient->getVar('name')}>"><{$object->mClient->getShow('name')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_IMPTOTAL}> "> <{if $object->get('imptotal') > 0}> - <{$object->getVar('imptotal')}> + <{$object->getShow('imptotal')}> <{else}> <{$smarty.const._AD_LEGACYRENDER_LANG_UN_LIMITED}> <{/if}> @@ -44,19 +44,19 @@
<{$smarty.const._AD_LEGACYRENDER_LANG_IMPMADE}>"><{$object->getVar('impmade')}>"><{$object->getShow('impmade')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_CLICKS}>"><{$object->getVar('clicks')}>"><{$object->getShow('clicks')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_IMAGEURL}>"><{$object->getVar('imageurl')}>"><{$object->getShow('imageurl')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_CLICKURL}>"><{$object->getVar('clickurl')}>"><{$object->getShow('clickurl')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_DATE}>
<{$smarty.const._AD_LEGACYRENDER_LANG_HTMLBANNER}>"><{if $object->getVar('htmlbanner') ==1}><{$smarty.const._YES}><{else}><{$smarty.const._NO}><{/if}>
"><{if $object->getShow('htmlbanner') ==1}><{$smarty.const._YES}><{else}><{$smarty.const._NO}><{/if}>
<{$smarty.const._AD_LEGACYRENDER_LANG_HTMLCODE}>"><{$object->getVar('htmlcode')}>"><{$object->getShow('htmlcode')}>
From minahito @ users.sourceforge.jp Mon Jul 10 13:53:14 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 13:53:14 +0900 Subject: [xoops-cvslog 3455] CVS update: xoops2jp/html/modules/legacyRender/admin/templates Message-ID: <20060710045314.2452F2AC04D@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/templates/bannerclient_delete.html diff -u xoops2jp/html/modules/legacyRender/admin/templates/bannerclient_delete.html:1.1.2.5 xoops2jp/html/modules/legacyRender/admin/templates/bannerclient_delete.html:1.1.2.6 --- xoops2jp/html/modules/legacyRender/admin/templates/bannerclient_delete.html:1.1.2.5 Wed Jun 14 00:41:26 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/bannerclient_delete.html Mon Jul 10 13:53:14 2006 @@ -18,31 +18,32 @@
<{$smarty.const._AD_LEGACYRENDER_LANG_CID}>"><{$object->getVar('cid')}>"><{$object->getShow('cid')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_NAME}>"><{$object->getVar('name')}>"><{$object->getShow('name')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_CONTACT}>"><{$object->getVar('contact')}>"><{$object->getShow('contact')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_EMAIL}>"><{$object->getVar('email')}>"><{$object->getShow('email')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_LOGIN}>"><{$object->getVar('login')}>"><{$object->getShow('login')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_EXTRAINFO}>"><{$object->getVar('extrainfo')}>"><{$object->getShow('extrainfo')}>
+ <{* TODO The back button problem is there *}>
- - <{* TODO The back button problem is there *}> - + +
From minahito @ users.sourceforge.jp Mon Jul 10 15:08:31 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 15:08:31 +0900 Subject: [xoops-cvslog 3468] CVS update: xoops2jp/html/modules/legacyRender/class Message-ID: <20060710060831.DF6822AC03D@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/class/AbstractFilterForm.class.php diff -u xoops2jp/html/modules/legacyRender/class/AbstractFilterForm.class.php:1.1.2.1 xoops2jp/html/modules/legacyRender/class/AbstractFilterForm.class.php:1.1.2.2 --- xoops2jp/html/modules/legacyRender/class/AbstractFilterForm.class.php:1.1.2.1 Mon Apr 24 16:31:08 2006 +++ xoops2jp/html/modules/legacyRender/class/AbstractFilterForm.class.php Mon Jul 10 15:08:31 2006 @@ -22,7 +22,7 @@ function getSort() { $sortkey = abs($this->mSort); - return isset($this->_mSortKeys[$sortkey]) ? $this->_mSortKeys[$sortkey] : null; + return isset($this->mSortKeys[$sortkey]) ? $this->mSortKeys[$sortkey] : null; } function getOrder() From minahito @ users.sourceforge.jp Mon Jul 10 15:08:41 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 15:08:41 +0900 Subject: [xoops-cvslog 3469] CVS update: xoops2jp/html/modules/legacyRender/class Message-ID: <20060710060841.A5D962AC03D@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/class/ActionFrame.class.php diff -u xoops2jp/html/modules/legacyRender/class/ActionFrame.class.php:1.1.2.3 xoops2jp/html/modules/legacyRender/class/ActionFrame.class.php:1.1.2.4 --- xoops2jp/html/modules/legacyRender/class/ActionFrame.class.php:1.1.2.3 Mon Jul 10 14:52:25 2006 +++ xoops2jp/html/modules/legacyRender/class/ActionFrame.class.php Mon Jul 10 15:08:41 2006 @@ -133,12 +133,12 @@ function getDefaultView(&$controller, &$xoopsUser) { - return LEGACY_FRAME_VIEW_NONE; + return LEGACYRENDER_FRAME_VIEW_NONE; } function execute(&$controller, &$xoopsUser) { - return LEGACY_FRAME_VIEW_NONE; + return LEGACYRENDER_FRAME_VIEW_NONE; } function executeViewSuccess(&$controller, &$xoopsUser, &$render) From minahito @ users.sourceforge.jp Mon Jul 10 15:15:53 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 15:15:53 +0900 Subject: [xoops-cvslog 3470] CVS update: xoops2jp/html/modules/legacyRender/admin/templates Message-ID: <20060710061553.006572AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/templates/bannerclient_edit.html diff -u xoops2jp/html/modules/legacyRender/admin/templates/bannerclient_edit.html:1.1.2.4 xoops2jp/html/modules/legacyRender/admin/templates/bannerclient_edit.html:1.1.2.5 --- xoops2jp/html/modules/legacyRender/admin/templates/bannerclient_edit.html:1.1.2.4 Wed Jun 14 01:12:52 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/bannerclient_edit.html Mon Jul 10 15:15:53 2006 @@ -27,7 +27,7 @@ <{xoops_token form=$actionForm}> - <{xoops_input type=hidden name=cid value=$actionForm->getVar('cid')}> + <{xoops_input type=hidden name=cid value=$actionForm->get('cid')}>
@@ -41,43 +41,43 @@
<{$smarty.const._AD_LEGACYRENDER_LANG_NAME}> "> - <{xoops_input type=text name=name value=$actionForm->getVar('name') size=50 maxlength=60}> + <{xoops_input type=text name=name value=$actionForm->get('name') size=50 maxlength=60}>
<{$smarty.const._AD_LEGACYRENDER_LANG_CONTACT}> "> - <{xoops_input type=text name=contact value=$actionForm->getVar('contact') size=50 maxlength=60}> + <{xoops_input type=text name=contact value=$actionForm->get('contact') size=50 maxlength=60}>
<{$smarty.const._AD_LEGACYRENDER_LANG_EMAIL}> "> - <{xoops_input type=text name=email value=$actionForm->getVar('email') size=50 maxlength=60}> + <{xoops_input type=text name=email value=$actionForm->get('email') size=50 maxlength=60}>
<{$smarty.const._AD_LEGACYRENDER_LANG_LOGIN}> "> - <{xoops_input type=text name=login value=$actionForm->getVar('login') size=15 maxlength=10}> + <{xoops_input type=text name=login value=$actionForm->get('login') size=15 maxlength=10}>
<{$smarty.const._AD_LEGACYRENDER_LANG_PASSWD}> "> - <{xoops_input type=text name=passwd value=$actionForm->getVar('passwd') size=15 maxlength=10}> + <{xoops_input type=text name=passwd value=$actionForm->get('passwd') size=15 maxlength=10}>
<{$smarty.const._AD_LEGACYRENDER_LANG_EXTRAINFO}> "> - <{xoops_dhtmltarea type=text name=extrainfo value=$actionForm->getVar('extrainfo')}> + <{xoops_dhtmltarea type=text name=extrainfo value=$actionForm->get('extrainfo') rows=5 cols=50}>
- +
From minahito @ users.sourceforge.jp Mon Jul 10 16:04:37 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 16:04:37 +0900 Subject: [xoops-cvslog 3471] CVS update: xoops2jp/html/modules/legacyRender/admin/templates Message-ID: <20060710070437.13A8A2AC03E@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/templates/bannerclient_list.html diff -u xoops2jp/html/modules/legacyRender/admin/templates/bannerclient_list.html:1.1.2.4 xoops2jp/html/modules/legacyRender/admin/templates/bannerclient_list.html:1.1.2.5 --- xoops2jp/html/modules/legacyRender/admin/templates/bannerclient_list.html:1.1.2.4 Mon Jun 12 02:03:51 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/bannerclient_list.html Mon Jul 10 16:04:36 2006 @@ -36,18 +36,18 @@ <{foreach item=obj from=$objects}> - <{$obj->getVar('cid')}> - <{$obj->getVar('name')}> - <{$obj->getVar('contact')}> - <{$obj->getVar('email')}> - <{$obj->getVar('login')}> - <{$obj->getVar('extrainfo')}> + <{$obj->getShow('cid')}> + <{$obj->getShow('name')}> + <{$obj->getShow('contact')}> + <{$obj->getShow('email')}> + <{$obj->getShow('login')}> + <{$obj->getShow('extrainfo')}> <{assign var=count value=count($obj->mBanners)}> - <{$smarty.const._AD_LEGACYRENDER_LANG_BANNER_LIST}>(<{$obj->mBannerCount|escape}>)
- <{$smarty.const._AD_LEGACYRENDER_LANG_BANNERFINISH_LIST}>(<{$obj->mFinishBannerCount|escape}>)
- " alt="<{$smarty.const._EDIT}>" title="<{$smarty.const._EDIT}>" /> - " alt="<{$smarty.const._DELETE}>" title="<{$smarty.const._DELETE}>" /> + <{$smarty.const._AD_LEGACYRENDER_LANG_BANNER_LIST}>(<{$obj->mBannerCount|escape}>)
+ <{$smarty.const._AD_LEGACYRENDER_LANG_BANNERFINISH_LIST}>(<{$obj->mFinishBannerCount|escape}>)
+ " alt="<{$smarty.const._EDIT}>" title="<{$smarty.const._EDIT}>" /> + " alt="<{$smarty.const._DELETE}>" title="<{$smarty.const._DELETE}>" /> <{/foreach}> From minahito @ users.sourceforge.jp Mon Jul 10 16:23:21 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 16:23:21 +0900 Subject: [xoops-cvslog 3472] CVS update: xoops2jp/html/modules/legacyRender/admin/actions Message-ID: <20060710072321.D66EF2AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/actions/BannerDeleteAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/actions/BannerDeleteAction.class.php:1.1.2.1 xoops2jp/html/modules/legacyRender/admin/actions/BannerDeleteAction.class.php:1.1.2.2 --- xoops2jp/html/modules/legacyRender/admin/actions/BannerDeleteAction.class.php:1.1.2.1 Mon Apr 24 16:30:10 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/BannerDeleteAction.class.php Mon Jul 10 16:23:21 2006 @@ -1,4 +1,8 @@ executeRedirect("./index.php?action=BannerList", 1, _AD_LEGACYRENDER_ERROR_DBUPDATE_FAILED); + } + + function executeViewCancel(&$controller, &$xoopsUser, &$render) + { + $controller->executeForward("./index.php?action=BannerList"); } } From minahito @ users.sourceforge.jp Mon Jul 10 16:23:37 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 16:23:37 +0900 Subject: [xoops-cvslog 3473] CVS update: xoops2jp/html/modules/legacyRender/admin/actions Message-ID: <20060710072337.736992AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/actions/BannerEditAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/actions/BannerEditAction.class.php:1.1.2.2 xoops2jp/html/modules/legacyRender/admin/actions/BannerEditAction.class.php:1.1.2.3 --- xoops2jp/html/modules/legacyRender/admin/actions/BannerEditAction.class.php:1.1.2.2 Thu May 11 18:09:55 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/BannerEditAction.class.php Mon Jul 10 16:23:37 2006 @@ -1,4 +1,8 @@ executeRedirect("./index.php?action=BannerList", 1, _AD_LEGACYRENDER_ERROR_DBUPDATE_FAILED); + } + + function executeViewCancel(&$controller, &$xoopsUser, &$render) + { + $controller->executeForward("./index.php?action=BannerList"); } } From minahito @ users.sourceforge.jp Mon Jul 10 16:24:03 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 16:24:03 +0900 Subject: [xoops-cvslog 3474] CVS update: xoops2jp/html/modules/legacyRender/admin/forms Message-ID: <20060710072403.F3CF72AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/forms/BannerAdminDeleteForm.class.php diff -u xoops2jp/html/modules/legacyRender/admin/forms/BannerAdminDeleteForm.class.php:1.1.2.1 xoops2jp/html/modules/legacyRender/admin/forms/BannerAdminDeleteForm.class.php:1.1.2.2 --- xoops2jp/html/modules/legacyRender/admin/forms/BannerAdminDeleteForm.class.php:1.1.2.1 Mon Apr 24 16:30:22 2006 +++ xoops2jp/html/modules/legacyRender/admin/forms/BannerAdminDeleteForm.class.php Mon Jul 10 16:24:03 2006 @@ -1,4 +1,8 @@ get('bid'); } function prepare() @@ -22,7 +26,6 @@ // // Set field properties // - $this->mFieldProperties['bid'] =& new XCube_FieldProperty($this); $this->mFieldProperties['bid']->setDependsByArray(array('required')); $this->mFieldProperties['bid']->addMessage('required', _AD_LEGACYRENDER_ERROR_REQUIRED, _AD_LEGACYRENDER_LANG_BID); From minahito @ users.sourceforge.jp Mon Jul 10 16:24:22 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 16:24:22 +0900 Subject: [xoops-cvslog 3475] CVS update: xoops2jp/html/modules/legacyRender/admin/forms Message-ID: <20060710072422.E26B92AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/forms/BannerAdminEditForm.class.php diff -u xoops2jp/html/modules/legacyRender/admin/forms/BannerAdminEditForm.class.php:1.1.2.2 xoops2jp/html/modules/legacyRender/admin/forms/BannerAdminEditForm.class.php:1.1.2.3 --- xoops2jp/html/modules/legacyRender/admin/forms/BannerAdminEditForm.class.php:1.1.2.2 Tue Apr 25 12:58:58 2006 +++ xoops2jp/html/modules/legacyRender/admin/forms/BannerAdminEditForm.class.php Mon Jul 10 16:24:22 2006 @@ -1,15 +1,23 @@ get('bid'); } function prepare() @@ -28,7 +36,6 @@ // // Set field properties // - $this->mFieldProperties['bid'] =& new XCube_FieldProperty($this); $this->mFieldProperties['bid']->setDependsByArray(array('required')); $this->mFieldProperties['bid']->addMessage('required', _AD_LEGACYRENDER_ERROR_REQUIRED, _AD_LEGACYRENDER_LANG_BID); From minahito @ users.sourceforge.jp Mon Jul 10 16:24:39 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 16:24:39 +0900 Subject: [xoops-cvslog 3476] CVS update: xoops2jp/html/modules/legacyRender/admin/forms Message-ID: <20060710072439.14BF02AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/forms/BannerclientFilterForm.class.php diff -u xoops2jp/html/modules/legacyRender/admin/forms/BannerclientFilterForm.class.php:1.1.2.2 xoops2jp/html/modules/legacyRender/admin/forms/BannerclientFilterForm.class.php:1.1.2.3 --- xoops2jp/html/modules/legacyRender/admin/forms/BannerclientFilterForm.class.php:1.1.2.2 Tue Apr 25 14:24:16 2006 +++ xoops2jp/html/modules/legacyRender/admin/forms/BannerclientFilterForm.class.php Mon Jul 10 16:24:38 2006 @@ -18,7 +18,7 @@ class LegacyRender_BannerclientFilterForm extends LegacyRender_AbstractFilterForm { var $mSort = 0; - var $_mSortKeys = array( + var $mSortKeys = array( BANNERCLIENT_SORT_KEY_CID => 'cid', BANNERCLIENT_SORT_KEY_NAME => 'name', BANNERCLIENT_SORT_KEY_CONTACT => 'contact', @@ -33,20 +33,20 @@ { $this->mSort = isset($_REQUEST['sort']) ? intval($_REQUEST['sort']) : BANNERCLIENT_SORT_KEY_DEFAULT; - if ($this->mSort > BANNERCLIENT_SORT_KEY_MAXVALUE) { + if (!isset($this->mSortKeys[abs($this->mSort)])) { $this->mSort = BANNERCLIENT_SORT_KEY_DEFAULT; } if (isset($_REQUEST['name'])) { $this->_mNavi->addExtra('name', xoops_getrequest('name')); // TODO Changet to 'LIKE' (?) - $this->_mCriteria->add(new Criteria('name', array(XOBJ_DTYPE_STRING, xoops_getrequest('name')))); + $this->_mCriteria->add(new Criteria('name', xoops_getrequest('name'))); } if (isset($_REQUEST['contact'])) { $this->_mNavi->addExtra('contact', xoops_getrequest('contact')); // TODO Changet to 'LIKE' (?) - $this->_mCriteria->add(new Criteria('contact', array(XOBJ_DTYPE_STRING, xoops_getrequest('contact')))); + $this->_mCriteria->add(new Criteria('contact', xoops_getrequest('contact'))); } $this->_mCriteria->addSort($this->getSort(), $this->getOrder()); From minahito @ users.sourceforge.jp Mon Jul 10 16:24:55 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 16:24:55 +0900 Subject: [xoops-cvslog 3477] CVS update: xoops2jp/html/modules/legacyRender/admin/forms Message-ID: <20060710072455.9221B2AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/forms/BannerFilterForm.class.php diff -u xoops2jp/html/modules/legacyRender/admin/forms/BannerFilterForm.class.php:1.1.2.3 xoops2jp/html/modules/legacyRender/admin/forms/BannerFilterForm.class.php:1.1.2.4 --- xoops2jp/html/modules/legacyRender/admin/forms/BannerFilterForm.class.php:1.1.2.3 Tue Apr 25 14:24:16 2006 +++ xoops2jp/html/modules/legacyRender/admin/forms/BannerFilterForm.class.php Mon Jul 10 16:24:55 2006 @@ -1,4 +1,8 @@ 'bid', BANNER_SORT_KEY_CID => 'cid', BANNER_SORT_KEY_IMPTOTAL => 'imptotal', @@ -39,18 +43,18 @@ { $this->mSort = isset($_REQUEST['sort']) ? intval($_REQUEST['sort']) : BANNER_SORT_KEY_DEFAULT; - if ($this->mSort > BANNER_SORT_KEY_MAXVALUE) { + if (!isset($this->mSortKeys[abs($this->mSort)])) { $this->mSort = BANNER_SORT_KEY_DEFAULT; } if (isset($_REQUEST['cid'])) { $this->_mNavi->addExtra('cid', xoops_getrequest('cid')); - $this->_mCriteria->add(new Criteria('cid', array(XOBJ_DTYPE_INT, xoops_getrequest('cid')))); + $this->_mCriteria->add(new Criteria('cid', xoops_getrequest('cid'))); } if (isset($_REQUEST['htmlbanner'])) { $this->_mNavi->addExtra('htmlbanner', xoops_getrequest('htmlbanner')); - $this->_mCriteria->add(new Criteria('htmlbanner', array(XOBJ_DTYPE_BOOL, xoops_getrequest('htmlbanner')))); + $this->_mCriteria->add(new Criteria('htmlbanner', xoops_getrequest('htmlbanner'))); } $this->_mCriteria->addSort($this->getSort(), $this->getOrder()); From minahito @ users.sourceforge.jp Mon Jul 10 16:25:10 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 16:25:10 +0900 Subject: [xoops-cvslog 3478] CVS update: xoops2jp/html/modules/legacyRender/admin/templates Message-ID: <20060710072510.ED4DC2AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/templates/banner_delete.html diff -u xoops2jp/html/modules/legacyRender/admin/templates/banner_delete.html:1.1.2.6 xoops2jp/html/modules/legacyRender/admin/templates/banner_delete.html:1.1.2.7 --- xoops2jp/html/modules/legacyRender/admin/templates/banner_delete.html:1.1.2.6 Mon Jul 10 13:51:59 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/banner_delete.html Mon Jul 10 16:25:10 2006 @@ -72,8 +72,8 @@ - - + + From minahito @ users.sourceforge.jp Mon Jul 10 16:25:23 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 16:25:23 +0900 Subject: [xoops-cvslog 3479] CVS update: xoops2jp/html/modules/legacyRender/admin/templates Message-ID: <20060710072523.961092AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/templates/banner_list.html diff -u xoops2jp/html/modules/legacyRender/admin/templates/banner_list.html:1.1.2.5 xoops2jp/html/modules/legacyRender/admin/templates/banner_list.html:1.1.2.6 --- xoops2jp/html/modules/legacyRender/admin/templates/banner_list.html:1.1.2.5 Mon Jun 12 02:03:51 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/banner_list.html Mon Jul 10 16:25:23 2006 @@ -5,7 +5,7 @@

<{$smarty.const._AD_LEGACYRENDER_LANG_BANNER_LIST}> <{if $currentClient}> - ( <{$currentClient->getVar('name')}> ) + ( <{$currentClient->getShow('name')}> ) <{/if}>

@@ -42,19 +42,19 @@ <{foreach item=obj from=$objects}> - <{$obj->getVar('bid')}> - <{$obj->mClient->getVar('name')}> + <{$obj->getShow('bid')}> + <{$obj->mClient->getShow('name')}> <{if $obj->get('imptotal') > 0}> - <{$obj->getVar('imptotal')}> + <{$obj->getShow('imptotal')}> <{else}> <{$smarty.const._AD_LEGACYRENDER_LANG_UN_LIMITED}> <{/if}> - <{$obj->getVar('impmade')}> - <{$obj->getVar('clicks')}> + <{$obj->getShow('impmade')}> + <{$obj->getShow('clicks')}> <{$obj->get('date')|xoops_formattimestamp}> - <{if $obj->getVar('htmlbanner') == 1}><{$smarty.const._YES}><{else}><{$smarty.const._NO}><{/if}> + <{if $obj->getShow('htmlbanner') == 1}><{$smarty.const._YES}><{else}><{$smarty.const._NO}><{/if}> " alt="<{$smarty.const._EDIT}>" title="<{$smarty.const._EDIT}>" /> " alt="<{$smarty.const._DELETE}>" title="<{$smarty.const._DELETE}>" /> From minahito @ users.sourceforge.jp Mon Jul 10 16:26:43 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 16:26:43 +0900 Subject: [xoops-cvslog 3480] CVS update: xoops2jp/html/modules/legacyRender/admin/templates Message-ID: <20060710072643.478A82AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/templates/banner_edit.html diff -u xoops2jp/html/modules/legacyRender/admin/templates/banner_edit.html:1.1.2.6 xoops2jp/html/modules/legacyRender/admin/templates/banner_edit.html:1.1.2.7 --- xoops2jp/html/modules/legacyRender/admin/templates/banner_edit.html:1.1.2.6 Wed Jun 14 01:12:52 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/banner_edit.html Mon Jul 10 16:26:43 2006 @@ -43,7 +43,7 @@ <{if $actionForm->get('htmlbanner')}> <{$actionForm->get('htmlcode')}> <{else}> - Banner + Banner <{/if}> @@ -85,7 +85,7 @@ - + From minahito @ users.sourceforge.jp Mon Jul 10 18:37:08 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 18:37:08 +0900 Subject: [xoops-cvslog 3481] CVS update: xoops2jp/html/modules/base/kernel Message-ID: <20060710093708.CA6C62AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/base/kernel/handler.php diff -u xoops2jp/html/modules/base/kernel/handler.php:1.1.2.16 xoops2jp/html/modules/base/kernel/handler.php:1.1.2.17 --- xoops2jp/html/modules/base/kernel/handler.php:1.1.2.16 Tue Jun 20 19:53:44 2006 +++ xoops2jp/html/modules/base/kernel/handler.php Mon Jul 10 18:37:08 2006 @@ -13,6 +13,11 @@ var $mPrimary = null; var $mClass = null; + /** + * A instance of xoops simple object to get type information. + */ + var $_mDummyObj = null; + function XoopsObjectGenericHandler(&$db) { parent::XoopsObjectHandler($db); @@ -34,31 +39,34 @@ { $ret = null; - $id = $this->db->quoteString($id); - $sql = "SELECT * FROM " . $this->mTable . " WHERE " . $this->mPrimary . "=${id}"; - - $result = $this->db->query($sql); + $criteria =& new Criteria($this->mPrimary, $id); + $objArr =& $this->getObjects($criteria); - if (!$result) { - return $ret; - } - - if ($this->db->getRowsNum($result) == 1) { - $ret =& new $this->mClass(); - $ret->assignVars($this->db->fetchArray($result)); - $ret->unsetNew(); + if (count($objArr) == 1) { + $ret =& $objArr[0]; } return $ret; } + /** + * Return array of object with $criteria. + * + * @access public + * @param CriteriaElement $criteria + * @param int $limit + * @param int $start + * @param bool $id_as_key + * + * @return array + */ function &getObjects($criteria = null, $param1 = false, $param2 = false, $param3 = false) { $ret = array(); - $sql = "SELECT * FROM " . $this->mTable; - if($criteria !== null && is_a($criteria, 'CriteriaElement')) { + $sql = "SELECT * FROM " . $this->mTable; + $where = $this->_makeCriteria4sql($criteria); if (trim($where)) { @@ -73,51 +81,36 @@ $sql .= " ORDER BY " . implode(',', $sorts); } - $limit=$criteria->getLimit(); - $start=$criteria->getStart(); + $limit = $criteria->getLimit(); + $start = $criteria->getStart(); - $ret =& $this->_getObjects($sql, $limit, $start, $param1); - } - else { - $ret =& $this->_getObjects($sql, $param1, $param2, $param3); - } - - return $ret; - } - - /** - * @access private - */ - function &_getObjects($sql = null, $limit = 0, $start = 0, $id_as_key = false) - { - $ret = array(); - - $result = $this->db->query($sql, $limit, $start); + $result = $this->db->query($sql, $limit, $start); - if (!$result) { - return $ret; - } + if (!$result) { + return $ret; + } - while($row=$this->db->fetchArray($result)) { - $obj =& new $this->mClass(); - $obj->assignVars($row); - $obj->unsetNew(); + while($row = $this->db->fetchArray($result)) { + $obj =& new $this->mClass(); + $obj->assignVars($row); + $obj->unsetNew(); - if ($id_as_key) - { - $ret[$obj->get($this->mPrimary)]=&$obj; - } - else - { - $ret[]=&$obj; - } + if ($id_as_key) { + $ret[$obj->get($this->mPrimary)] =& $obj; + } + else { + $ret[]=&$obj; + } - unset($obj); + unset($obj); + } + + return $ret; } return $ret; } - + function getCount($criteria = null) { $ret = array(); @@ -247,9 +240,11 @@ function _makeCriteria4sql($criteria) { - $dmmyObj =& $this->create(); + if ($this->_mDummyObj == null) { + $this->_mDummyObj =& $this->create(); + } - return $this->_makeCriteriaElement4sql($criteria, $dmmyObj); + return $this->_makeCriteriaElement4sql($criteria, $this->_mDummyObj); } /** @@ -350,8 +345,10 @@ */ function &createCriteria() { - $dmy =& $this->create(); - $criteria =& new Legacy_Criteria($dmy->getTypeInformations()); + if ($this->_mDummyObj == null) { + $this->_mDummyObj =& $this->create(); + } + $criteria =& new Legacy_Criteria($this->_mDummyObj->getTypeInformations()); return $criteria; } From minahito @ users.sourceforge.jp Mon Jul 10 19:01:49 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 19:01:49 +0900 Subject: [xoops-cvslog 3482] CVS update: xoops2jp/html/modules/base/kernel Message-ID: <20060710100149.BCDA52AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/base/kernel/handler.php diff -u xoops2jp/html/modules/base/kernel/handler.php:1.1.2.17 xoops2jp/html/modules/base/kernel/handler.php:1.1.2.18 --- xoops2jp/html/modules/base/kernel/handler.php:1.1.2.17 Mon Jul 10 18:37:08 2006 +++ xoops2jp/html/modules/base/kernel/handler.php Mon Jul 10 19:01:49 2006 @@ -311,20 +311,32 @@ } /** + * Delete $obj. + * * @return bool */ - function delete(&$obj, $force=false) + function delete(&$obj, $force = false) { - $id = $this->db->quoteString($obj->get($this->mPrimary)); - $sql = "DELETE FROM " . $this->mTable . " WHERE " . $this->mPrimary . "=${id}"; + // + // Because Criteria can generate the most appropriate sentence, use + // criteria even if this approach is few slow. + // + $criteria =& new Criteria($this->mPrimary, $obj->get($this->mPrimary)); + $sql = "DELETE FROM " . $this->mTable . " WHERE " . $this->_makeCriteriaElement4sql($criteria, $obj); return $force ? $this->db->queryF($sql) : $this->db->query($sql); } /** - * @param $criteria mixed Criteria or string + * Delete plural objects by $criteria. If the sub-class want to override + * the procedure of delete, delete() is better. This member function + * fetches objects by $criteria and casts these objects into delete() + * inside. + * + * @param Criteria $criteria + * @param bool $force */ - function deleteAll($criteria, $force=false) + function deleteAll($criteria, $force = false) { $objs =& $this->getObjects($criteria); From minahito @ users.sourceforge.jp Mon Jul 10 19:57:40 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 19:57:40 +0900 Subject: [xoops-cvslog 3483] CVS update: xoops2jp/html/modules/base/kernel Message-ID: <20060710105740.D839A2AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/base/kernel/handler.php diff -u xoops2jp/html/modules/base/kernel/handler.php:1.1.2.18 xoops2jp/html/modules/base/kernel/handler.php:1.1.2.19 --- xoops2jp/html/modules/base/kernel/handler.php:1.1.2.18 Mon Jul 10 19:01:49 2006 +++ xoops2jp/html/modules/base/kernel/handler.php Mon Jul 10 19:57:40 2006 @@ -60,13 +60,13 @@ * * @return array */ - function &getObjects($criteria = null, $param1 = false, $param2 = false, $param3 = false) + function &getObjects($criteria = null, $limit = null, $start = null, $id_as_key = false) { $ret = array(); + $sql = "SELECT * FROM " . $this->mTable; + if($criteria !== null && is_a($criteria, 'CriteriaElement')) { - $sql = "SELECT * FROM " . $this->mTable; - $where = $this->_makeCriteria4sql($criteria); if (trim($where)) { @@ -81,33 +81,45 @@ $sql .= " ORDER BY " . implode(',', $sorts); } - $limit = $criteria->getLimit(); - $start = $criteria->getStart(); - - $result = $this->db->query($sql, $limit, $start); - - if (!$result) { - return $ret; + if ($limit === null) { + $limit = $criteria->getLimit(); } - - while($row = $this->db->fetchArray($result)) { - $obj =& new $this->mClass(); - $obj->assignVars($row); - $obj->unsetNew(); - if ($id_as_key) { - $ret[$obj->get($this->mPrimary)] =& $obj; - } - else { - $ret[]=&$obj; - } + if ($start === null) { + $start = $criteria->getStart(); + } + } + else { + if ($limit === null) { + $limit = 0; + } - unset($obj); + if ($start === null) { + $start = 0; } - + } + + $result = $this->db->query($sql, $limit, $start); + + if (!$result) { return $ret; } + + while($row = $this->db->fetchArray($result)) { + $obj =& new $this->mClass(); + $obj->assignVars($row); + $obj->unsetNew(); + + if ($id_as_key) { + $ret[$obj->get($this->mPrimary)] =& $obj; + } + else { + $ret[]=&$obj; + } + unset($obj); + } + return $ret; } From minahito @ users.sourceforge.jp Mon Jul 10 19:57:57 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 19:57:57 +0900 Subject: [xoops-cvslog 3484] CVS update: xoops2jp/html/modules/legacyRender/admin/class Message-ID: <20060710105757.440482AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/class/LegacyRenderActionFrame.class.php diff -u xoops2jp/html/modules/legacyRender/admin/class/LegacyRenderActionFrame.class.php:1.1.2.5 xoops2jp/html/modules/legacyRender/admin/class/LegacyRenderActionFrame.class.php:removed --- xoops2jp/html/modules/legacyRender/admin/class/LegacyRenderActionFrame.class.php:1.1.2.5 Tue Mar 28 22:30:48 2006 +++ xoops2jp/html/modules/legacyRender/admin/class/LegacyRenderActionFrame.class.php Mon Jul 10 19:57:57 2006 @@ -1,165 +0,0 @@ - // -// ------------------------------------------------------------------------ // -// This program is free software; you can redistribute it and/or modify // -// it under the terms of the GNU General Public License as published by // -// the Free Software Foundation; either version 2 of the License, or // -// (at your option) any later version. // -// // -// 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. See the // -// GNU General Public License for more details. // -// // -// You should have received a copy of the GNU General Public License // -// along with this program; if not, write to the Free Software // -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// ------------------------------------------------------------------------ // - -if (!defined('XOOPS_ROOT_PATH')) exit(); - -require_once XOOPS_ROOT_PATH."/class/XCube_ActionStrategy.class.php"; - -define ("LEGACYRENDER_FRAME_PERFORM_SUCCESS",1); -define ("LEGACYRENDER_FRAME_PERFORM_FAIL",2); -define ("LEGACYRENDER_FRAME_INIT_SUCCESS",3); - -define ("LEGACYRENDER_FRAME_VIEW_NONE",0); -define ("LEGACYRENDER_FRAME_VIEW_SUCCESS",1); -define ("LEGACYRENDER_FRAME_VIEW_ERROR",2); -define ("LEGACYRENDER_FRAME_VIEW_INDEX",3); -define ("LEGACYRENDER_FRAME_VIEW_INPUT",4); - -/** - * This is simple frame work for misc page controller. - * @package legacy - */ -class LegacyRenderActionFrame extends XCube_ActionStrategy -{ - var $mActionName=""; - var $mAction=null; - - function LegacyRenderActionFrame() - { - } - - function setActionName($actionName) - { - $this->mActionName=$actionName; - } - - function execute(&$controller) - { - if($this->mActionName==null) - $this->mActionName=isset($_REQUEST['action']) ? trim($_REQUEST['action']) : "ThemeList"; - - if(!preg_match("/^\w+$/",$this->mActionName)) - die(); - - - // - // Create action object by mActionName - // - $className="LegacyRender_".ucfirst($this->mActionName)."Action"; - $fileName=XOOPS_ROOT_PATH."/modules/legacyRender/admin/actions/".ucfirst($this->mActionName)."Action.class.php"; - if(!file_exists($fileName)) - die(); // TODO - - require_once $fileName; - if(class_exists($className)) - $this->mAction=new $className($controller,$controller->getXoopsUser()); - - if(!is_object($this->mAction)) - die(); // TODO - - $this->mAction->prepare($controller,$controller->getXoopsUser()); - - // - // Simple execute action switch. - // - if(xoops_getenv("REQUEST_METHOD")=="POST") { - $viewStatus=$this->mAction->execute($controller,$controller->getXoopsUser()); - } - else { - $viewStatus=$this->mAction->getDefaultView($controller,$controller->getXoopsUser()); - } - - - // - // Call the view stab method of action by $viewStatus - // - switch($viewStatus) { - case LEGACYRENDER_FRAME_VIEW_SUCCESS: - $this->mAction->executeViewSuccess($controller,$controller->getXoopsUser(),$controller->mRenderSystem); - break; - - case LEGACYRENDER_FRAME_VIEW_ERROR: - $this->mAction->executeViewError($controller,$controller->getXoopsUser(),$controller->mRenderSystem); - break; - - case LEGACYRENDER_FRAME_VIEW_INDEX: - $this->mAction->executeViewIndex($controller,$controller->getXoopsUser(),$controller->mRenderSystem); - break; - - case LEGACYRENDER_FRAME_VIEW_INPUT: - $this->mAction->executeViewInput($controller,$controller->getXoopsUser(),$controller->mRenderSystem); - break; - } - } -} - -class LegacyRender_Action -{ - var $mConfig; - - function LegacyRenderAction(&$controller,&$xoopsUser) - { - $this->mConfig=$controller->mModuleController->getConfig(); - } - - function prepare(&$controller,&$xoopsUser) - { - return LEGACYRENDER_FRAME_VIEW_NONE; - } - - /** - * @param $controller Base_Controller - * @param $xoopsUser XoopsUserObject - */ - function getDefaultView(&$controller,&$xoopsUser) - { - return LEGACYRENDER_FRAME_VIEW_NONE; - } - - function execute(&$controller,&$xoopsUser) - { - return LEGACYRENDER_FRAME_VIEW_NONE; - } - - function executeViewSuccess(&$controller,&$xoopsUser,&$renderSystem) - { - } - - function executeViewError(&$controller,&$xoopsUser,&$renderSystem) - { - } - - function executeViewIndex(&$controller,&$xoopsUser,&$renderSystem) - { - } - - function executeViewInput(&$controller,&$xoopsUser,&$renderSystem) - { - } -} - -?> \ No newline at end of file Index: xoops2jp/html/modules/legacyRender/admin/class/AbstractListAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/class/AbstractListAction.class.php:1.1.2.5 xoops2jp/html/modules/legacyRender/admin/class/AbstractListAction.class.php:removed --- xoops2jp/html/modules/legacyRender/admin/class/AbstractListAction.class.php:1.1.2.5 Tue Mar 28 22:30:48 2006 +++ xoops2jp/html/modules/legacyRender/admin/class/AbstractListAction.class.php Mon Jul 10 19:57:57 2006 @@ -1,47 +0,0 @@ -mPageNavi =& new LegacyRender_PageNavigator($this->_getBaseUrl(), 0, XCUBE_PAGENAVI_START | XCUBE_PAGENAVI_PERPAGE); - - $this->mFilter =& $this->_getFilterForm(); - $this->mFilter->fetch(); - - $handler =& $this->_getHandler(); - - $total = $handler->getCount($this->mFilter->getCriteria()); - - $this->mPageNavi->setTotal($total); - $this->mPageNavi->fetch(); - - $criteria = $this->mFilter->getCriteria($this->mPageNavi->getStart(), $this->mPageNavi->getPerpage()); - $this->mObjects =& $handler->getObjects($criteria); - - return LEGACYRENDER_FRAME_VIEW_INDEX; - } -} - -?> \ No newline at end of file Index: xoops2jp/html/modules/legacyRender/admin/class/AbstractEditAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/class/AbstractEditAction.class.php:1.1.2.2 xoops2jp/html/modules/legacyRender/admin/class/AbstractEditAction.class.php:removed --- xoops2jp/html/modules/legacyRender/admin/class/AbstractEditAction.class.php:1.1.2.2 Tue Mar 28 22:30:48 2006 +++ xoops2jp/html/modules/legacyRender/admin/class/AbstractEditAction.class.php Mon Jul 10 19:57:57 2006 @@ -1,85 +0,0 @@ -_getId(); - - $this->mObjectHandler = $this->_getHandler(); - - $this->mObject =& $this->mObjectHandler->get($id); - if ($this->mObject == null && $this->isEnableCreate()) { - $this->mObject =& $this->mObjectHandler->create(); - } - } - - function _setupActionForm() - { - } - - /** - * @return bool - */ - function isEnableCreate() - { - return true; - } - - function prepare(&$controller, &$xoopsUser) - { - $this->_setupActionForm(); - $this->_setupObject(); - } - - function getDefaultView(&$controller,&$xoopsUser) - { - if ($this->mObject == null) { - return LEGACYRENDER_FRAME_VIEW_ERROR; - } - - $this->mActionForm->load($this->mObject); - - return LEGACYRENDER_FRAME_VIEW_INPUT; - } - - function execute(&$controller,&$xoopsUser) - { - if ($this->mObject == null) { - return LEGACYRENDER_FRAME_VIEW_ERROR; - } - - // - // If image is no, the data has to continue to keep his value. - // - $this->mActionForm->load($this->mObject); - - $this->mActionForm->fetch(); - $this->mActionForm->validate(); - - if($this->mActionForm->hasError()) { - return LEGACYRENDER_FRAME_VIEW_INPUT; - } - - $this->mActionForm->update($this->mObject); - - return $this->mObjectHandler->insert($this->mObject) ? LEGACYRENDER_FRAME_VIEW_SUCCESS - : LEGACYRENDER_FRAME_VIEW_ERROR; - } -} - -?> \ No newline at end of file From minahito @ users.sourceforge.jp Mon Jul 10 19:58:22 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 19:58:22 +0900 Subject: [xoops-cvslog 3485] CVS update: xoops2jp/html/modules/legacyRender/admin/actions Message-ID: <20060710105822.6386F2AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/actions/BannerDeleteAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/actions/BannerDeleteAction.class.php:1.1.2.2 xoops2jp/html/modules/legacyRender/admin/actions/BannerDeleteAction.class.php:1.1.2.3 --- xoops2jp/html/modules/legacyRender/admin/actions/BannerDeleteAction.class.php:1.1.2.2 Mon Jul 10 16:23:21 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/BannerDeleteAction.class.php Mon Jul 10 19:58:22 2006 @@ -1,7 +1,7 @@ Index: xoops2jp/html/modules/legacyRender/admin/actions/BannerEditAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/actions/BannerEditAction.class.php:1.1.2.3 xoops2jp/html/modules/legacyRender/admin/actions/BannerEditAction.class.php:1.1.2.4 --- xoops2jp/html/modules/legacyRender/admin/actions/BannerEditAction.class.php:1.1.2.3 Mon Jul 10 16:23:37 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/BannerEditAction.class.php Mon Jul 10 19:58:34 2006 @@ -1,7 +1,7 @@ Index: xoops2jp/html/modules/legacyRender/admin/actions/BannerfinishDeleteAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/actions/BannerfinishDeleteAction.class.php:1.1.2.1 xoops2jp/html/modules/legacyRender/admin/actions/BannerfinishDeleteAction.class.php:1.1.2.2 --- xoops2jp/html/modules/legacyRender/admin/actions/BannerfinishDeleteAction.class.php:1.1.2.1 Mon Apr 24 16:30:10 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/BannerfinishDeleteAction.class.php Mon Jul 10 19:58:55 2006 @@ -1,4 +1,8 @@ executeRedirect("./index.php?action=BannerfinishList", 1, _AD_LEGACYRENDER_ERROR_DBUPDATE_FAILED); + } + + function executeViewCancel(&$controller, &$xoopsUser, &$render) + { + $controller->executeForward("./index.php?action=BannerfinishList"); } } From minahito @ users.sourceforge.jp Mon Jul 10 20:00:12 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 20:00:12 +0900 Subject: [xoops-cvslog 3488] CVS update: xoops2jp/html/modules/legacyRender/admin/actions Message-ID: <20060710110012.96C092AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/actions/TplfileDownloadAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/actions/TplfileDownloadAction.class.php:1.1.2.2 xoops2jp/html/modules/legacyRender/admin/actions/TplfileDownloadAction.class.php:1.1.2.3 --- xoops2jp/html/modules/legacyRender/admin/actions/TplfileDownloadAction.class.php:1.1.2.2 Thu May 18 12:04:51 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/TplfileDownloadAction.class.php Mon Jul 10 20:00:12 2006 @@ -1,4 +1,8 @@ executeRedirect("./index.php?action=TplsetList", 1, _AD_LEGACYRENDER_ERROR_DBUPDATE_FAILED); } } From minahito @ users.sourceforge.jp Mon Jul 10 20:00:49 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 20:00:49 +0900 Subject: [xoops-cvslog 3489] CVS update: xoops2jp/html/modules/legacyRender/admin/actions Message-ID: <20060710110049.1EEAC2AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php:1.1.2.11 xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php:1.1.2.12 --- xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php:1.1.2.11 Sat May 27 22:10:07 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php Mon Jul 10 20:00:48 2006 @@ -1,19 +1,27 @@ mActionForm =& new LegacyRender_TplfileUploadForm(); $this->mActionForm->prepare(); } @@ -26,7 +34,7 @@ function &_getFilterForm() { - $filter = isset($_REQUEST['tpl_tplset']) ? new LegacyRender_TplfileSetFilterForm($this->mPageNavi) : new LegacyRender_TplfileFilterForm($this->mPageNavi); + $filter = isset($_REQUEST['tpl_tplset']) ? new LegacyRender_TplfileSetFilterForm($this->mNavi) : new LegacyRender_TplfileFilterForm($this->mNavi); return $filter; } @@ -37,7 +45,7 @@ function getDefaultView(&$controller, &$xoopsUser) { - $this->mPageNavi =& new LegacyRender_PageNavigator($this->_getBaseUrl(), 0, XCUBE_PAGENAVI_START | XCUBE_PAGENAVI_PERPAGE); + $this->mNavi =& new LegacyRender_PageNavigator($this->_getBaseUrl(), 0, XCUBE_PAGENAVI_START | XCUBE_PAGENAVI_PERPAGE); $this->mFilter =& $this->_getFilterForm(); $this->mFilter->fetch(); @@ -46,10 +54,10 @@ $total = $handler->getCount($this->mFilter->getCriteria()); - $this->mPageNavi->setTotal($total); - $this->mPageNavi->fetch(); + $this->mNavi->setTotal($total); + $this->mNavi->fetch(); - $criteria = $this->mFilter->getCriteria($this->mPageNavi->getStart(), $this->mPageNavi->getPerpage()); + $criteria = $this->mFilter->getCriteria($this->mNavi->getStart(), $this->mNavi->getPerpage()); if (isset($_REQUEST['tpl_tplset'])) { $this->mObjects =& $handler->getObjectsWithOverride($criteria, xoops_getrequest('tpl_tplset')); @@ -61,6 +69,9 @@ return LEGACYRENDER_FRAME_VIEW_INDEX; } + /** + * This member function processes the uploaded file. + */ function execute(&$controller, &$xoopsUser) { require_once XOOPS_ROOT_PATH . "/class/template.php"; @@ -124,7 +135,11 @@ $errorMessage = $successFlag ? _AD_LEGACYRENDER_MESSAGE_UPLOAD_TEMPLATE_SUCCESS : _AD_LEGACYRENDER_ERROR_DBUPDATE_FAILED; - XCube_Utils::redirectHeader("index.php?action=TplfileList&tpl_tplset=${last_tplset}&tpl_module=${last_module}", 1, $errorMessage); + // + // No good exmaple ;) + // Because some local variables are used, jump directly without the return value of view status. + // + $controller->executeRedirect("index.php?action=TplfileList&tpl_tplset=${last_tplset}&tpl_module=${last_module}", 1, $errorMessage); } function executeViewIndex(&$controller, &$xoopsUser, &$render) @@ -141,7 +156,7 @@ } $render->setAttribute('objects', $this->mObjects); - $render->setAttribute('pageNavi', $this->mPageNavi); + $render->setAttribute('pageNavi', $this->mNavi); $render->setAttribute('filterForm', $this->mFilter); $render->setAttribute('actionForm', $this->mActionForm); From minahito @ users.sourceforge.jp Mon Jul 10 20:01:07 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 20:01:07 +0900 Subject: [xoops-cvslog 3490] CVS update: xoops2jp/html/modules/legacyRender/admin/actions Message-ID: <20060710110107.74FBD2AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/actions/TplfileViewAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/actions/TplfileViewAction.class.php:1.1.2.2 xoops2jp/html/modules/legacyRender/admin/actions/TplfileViewAction.class.php:1.1.2.3 --- xoops2jp/html/modules/legacyRender/admin/actions/TplfileViewAction.class.php:1.1.2.2 Tue Mar 28 22:30:49 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/TplfileViewAction.class.php Mon Jul 10 20:01:07 2006 @@ -1,4 +1,8 @@ mObject =& $handler->get($id); @@ -30,7 +34,7 @@ function executeViewError(&$controller, &$xoopsUser, &$render) { - redirect_header("./index.php?action=TplsetList", 1, _AD_LEGACYRENDER_ERROR_OBJECT_IS_NOT_EXIST); + $controller->executeRedirect("./index.php?action=TplsetList", 1, _AD_LEGACYRENDER_ERROR_OBJECT_IS_NOT_EXIST); } } From minahito @ users.sourceforge.jp Mon Jul 10 20:01:21 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 20:01:21 +0900 Subject: [xoops-cvslog 3491] CVS update: xoops2jp/html/modules/legacyRender/admin/actions Message-ID: <20060710110121.D2E332AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/actions/TplsetCloneAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/actions/TplsetCloneAction.class.php:1.1.2.4 xoops2jp/html/modules/legacyRender/admin/actions/TplsetCloneAction.class.php:1.1.2.5 --- xoops2jp/html/modules/legacyRender/admin/actions/TplsetCloneAction.class.php:1.1.2.4 Tue Mar 28 22:30:49 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/TplsetCloneAction.class.php Mon Jul 10 20:01:21 2006 @@ -1,4 +1,8 @@ mActionForm =& new TplsetCloneForm(); + $this->mActionForm =& new LegacyRender_TplsetCloneForm(); $this->mActionForm->prepare(); } @@ -31,6 +35,11 @@ if ($this->mObject == null) { return LEGACYRENDER_FRAME_VIEW_ERROR; } + + if (xoops_getrequest('_form_control_cancel') != null) { + return LEGACYRENDER_FRAME_VIEW_CANCEL; + } + // // If image is no, the data has to continue to keep his value. // @@ -48,7 +57,7 @@ return $this->mObjectHandler->insertClone($this->mObject, $this->mCloneObject) ? LEGACYRENDER_FRAME_VIEW_SUCCESS : LEGACYRENDER_FRAME_VIEW_ERROR; } - + function executeViewInput(&$controller, &$xoopsUser, &$render) { $render->setTemplateName("tplset_clone.html"); @@ -63,7 +72,13 @@ function executeViewError(&$controller, &$xoopsUser, &$render) { - redirect_header("./index.php?action=TplsetList", 1, _AD_LEGACYRENDER_ERROR_DBUPDATE_FAILED); + $controller->executeRedirect("./index.php?action=TplsetList", 1, _AD_LEGACYRENDER_ERROR_DBUPDATE_FAILED); + } + + function executeViewCancel(&$controller, &$xoopsUser, &$render) + { + die("HOGE"); + $controller->executeForward("./index.php?action=TplsetList"); } } From minahito @ users.sourceforge.jp Mon Jul 10 20:01:34 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 20:01:34 +0900 Subject: [xoops-cvslog 3492] CVS update: xoops2jp/html/modules/legacyRender/admin/actions Message-ID: <20060710110134.B65032AC04E@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/actions/TplsetEditAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/actions/TplsetEditAction.class.php:1.1.2.4 xoops2jp/html/modules/legacyRender/admin/actions/TplsetEditAction.class.php:1.1.2.5 --- xoops2jp/html/modules/legacyRender/admin/actions/TplsetEditAction.class.php:1.1.2.4 Tue Mar 28 22:30:49 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/TplsetEditAction.class.php Mon Jul 10 20:01:34 2006 @@ -1,20 +1,24 @@ mActionForm =& new TplsetEditForm(); + $this->mActionForm =& new LegacyRender_TplsetEditForm(); $this->mActionForm->prepare(); } @@ -54,13 +58,17 @@ function executeViewSuccess(&$controller, &$xoopsUser, &$render) { - header("location: ./index.php?action=TplsetList"); - exit(); + $controller->executeForward("./index.php?action=TplsetList"); } function executeViewError(&$controller, &$xoopsUser, &$render) { - redirect_header("./index.php?action=TplsetList", 1, _AD_LEGACYRENDER_ERROR_DBUPDATE_FAILED); + $controller->executeRedirect("./index.php?action=TplsetList", 1, _AD_LEGACYRENDER_ERROR_DBUPDATE_FAILED); + } + + function executeViewCancel(&$controller, &$xoopsUser, &$render) + { + $controller->executeForward("./index.php?action=TplsetList"); } } From minahito @ users.sourceforge.jp Mon Jul 10 20:02:25 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 20:02:25 +0900 Subject: [xoops-cvslog 3493] CVS update: xoops2jp/html/modules/legacyRender/class Message-ID: <20060710110225.752D92AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/class/ActionFrame.class.php diff -u xoops2jp/html/modules/legacyRender/class/ActionFrame.class.php:1.1.2.4 xoops2jp/html/modules/legacyRender/class/ActionFrame.class.php:1.1.2.5 --- xoops2jp/html/modules/legacyRender/class/ActionFrame.class.php:1.1.2.4 Mon Jul 10 15:08:41 2006 +++ xoops2jp/html/modules/legacyRender/class/ActionFrame.class.php Mon Jul 10 20:02:25 2006 @@ -64,7 +64,12 @@ die(); } - if (!$this->mAction->hasPerm($controller, $controller->getXoopsUser())) { + $handler =& xoops_gethandler('config'); + $moduleConfig =& $handler->getConfigsByDirname('legacyRender'); + + $this->mAction->prepare($controller, $controller->getXoopsUser(), $moduleConfig); + + if (!$this->mAction->hasPermission($controller, $controller->getXoopsUser())) { if ($this->mAdminFlag) { $controller->executeForward(XOOPS_URL . "/admin.php"); } @@ -73,8 +78,6 @@ } } - $this->mAction->prepare($controller, $controller->getXoopsUser()); - if (xoops_getenv("REQUEST_METHOD") == "POST") { $viewStatus = $this->mAction->execute($controller, $controller->getXoopsUser()); } @@ -122,12 +125,12 @@ $this->_mAdminFlag = $adminFlag; } - function hasPerm(&$controller, &$xoopsUser) + function hasPermission(&$controller, &$xoopsUser) { return true; } - function prepare(&$controller, &$xoopsUser) + function prepare(&$controller, &$xoopsUser, $moduleConfig) { } From minahito @ users.sourceforge.jp Mon Jul 10 20:02:55 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 20:02:55 +0900 Subject: [xoops-cvslog 3494] CVS update: xoops2jp/html/modules/legacyRender/admin/templates Message-ID: <20060710110255.E8EB92AC04E@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/templates/banner_list.html diff -u xoops2jp/html/modules/legacyRender/admin/templates/banner_list.html:1.1.2.6 xoops2jp/html/modules/legacyRender/admin/templates/banner_list.html:1.1.2.7 --- xoops2jp/html/modules/legacyRender/admin/templates/banner_list.html:1.1.2.6 Mon Jul 10 16:25:23 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/banner_list.html Mon Jul 10 20:02:55 2006 @@ -56,8 +56,8 @@ <{$obj->get('date')|xoops_formattimestamp}> <{if $obj->getShow('htmlbanner') == 1}><{$smarty.const._YES}><{else}><{$smarty.const._NO}><{/if}> - " alt="<{$smarty.const._EDIT}>" title="<{$smarty.const._EDIT}>" /> - " alt="<{$smarty.const._DELETE}>" title="<{$smarty.const._DELETE}>" /> + " alt="<{$smarty.const._EDIT}>" title="<{$smarty.const._EDIT}>" /> + " alt="<{$smarty.const._DELETE}>" title="<{$smarty.const._DELETE}>" /> <{/foreach}> From minahito @ users.sourceforge.jp Mon Jul 10 20:03:17 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 20:03:17 +0900 Subject: [xoops-cvslog 3495] CVS update: xoops2jp/html/modules/legacyRender/admin/templates Message-ID: <20060710110317.7D62D2AC04E@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/templates/bannerfinish_delete.html diff -u xoops2jp/html/modules/legacyRender/admin/templates/bannerfinish_delete.html:1.1.2.5 xoops2jp/html/modules/legacyRender/admin/templates/bannerfinish_delete.html:1.1.2.6 --- xoops2jp/html/modules/legacyRender/admin/templates/bannerfinish_delete.html:1.1.2.5 Wed Jun 14 00:41:26 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/bannerfinish_delete.html Mon Jul 10 20:03:17 2006 @@ -18,19 +18,19 @@ <{$smarty.const._AD_LEGACYRENDER_LANG_BID}> - "><{$object->getVar('bid')}> + "><{$object->getShow('bid')}> <{$smarty.const._AD_LEGACYRENDER_LANG_CID}> - "><{$object->mClient->getVar('name')}> + "><{$object->mClient->getShow('name')}> <{$smarty.const._AD_LEGACYRENDER_LANG_IMPRESSIONS}> - "><{$object->getVar('impressions')}> + "><{$object->getShow('impressions')}> <{$smarty.const._AD_LEGACYRENDER_LANG_CLICKS}> - "><{$object->getVar('clicks')}> + "><{$object->getShow('clicks')}> <{$smarty.const._AD_LEGACYRENDER_LANG_DATESTART}> @@ -42,8 +42,8 @@ - - + + From minahito @ users.sourceforge.jp Mon Jul 10 20:03:25 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 20:03:25 +0900 Subject: [xoops-cvslog 3496] CVS update: xoops2jp/html/modules/legacyRender/admin/templates Message-ID: <20060710110325.047262AC04E@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/templates/bannerfinish_list.html diff -u xoops2jp/html/modules/legacyRender/admin/templates/bannerfinish_list.html:1.1.2.5 xoops2jp/html/modules/legacyRender/admin/templates/bannerfinish_list.html:1.1.2.6 --- xoops2jp/html/modules/legacyRender/admin/templates/bannerfinish_list.html:1.1.2.5 Mon Jun 12 02:03:51 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/bannerfinish_list.html Mon Jul 10 20:03:24 2006 @@ -6,7 +6,7 @@

<{$smarty.const._AD_LEGACYRENDER_LANG_BANNERFINISH_LIST}> <{if $currentClient}> - ( <{$currentClient->getVar('name')}> ) + ( <{$currentClient->getShow('name')}> ) <{/if}>

@@ -39,14 +39,14 @@ <{foreach item=obj from=$objects}> - <{$obj->getVar('bid')}> - <{$obj->mClient->getVar('name')}> - <{$obj->getVar('impressions')}> - <{$obj->getVar('clicks')}> + <{$obj->getShow('bid')}> + <{$obj->mClient->getShow('name')}> + <{$obj->getShow('impressions')}> + <{$obj->getShow('clicks')}> <{$obj->get('datestart')|xoops_formattimestamp}> <{$obj->get('dateend')|xoops_formattimestamp}> - " alt="<{$smarty.const._DELETE}>" title="<{$smarty.const._DELETE}>" /> + " alt="<{$smarty.const._DELETE}>" title="<{$smarty.const._DELETE}>" /> <{/foreach}> From minahito @ users.sourceforge.jp Mon Jul 10 20:04:00 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 20:04:00 +0900 Subject: [xoops-cvslog 3497] CVS update: xoops2jp/html/modules/legacyRender/admin/templates Message-ID: <20060710110400.306712AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/templates/tplfile_view.html diff -u xoops2jp/html/modules/legacyRender/admin/templates/tplfile_view.html:1.1.2.4 xoops2jp/html/modules/legacyRender/admin/templates/tplfile_view.html:1.1.2.5 --- xoops2jp/html/modules/legacyRender/admin/templates/tplfile_view.html:1.1.2.4 Thu Feb 2 22:59:52 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/tplfile_view.html Mon Jul 10 20:04:00 2006 @@ -25,19 +25,19 @@ <{$smarty.const._AD_LEGACYRENDER_LANG_TPL_TPLSET}> - "><{$object->getVar('tpl_tplset')}> + "><{$object->getShow('tpl_tplset')}> <{$smarty.const._AD_LEGACYRENDER_LANG_TPL_MODULE}> - "><{$object->getVar('tpl_module')}> + "><{$object->getShow('tpl_module')}> <{$smarty.const._AD_LEGACYRENDER_LANG_TPL_FILE}> - "><{$object->getVar('tpl_file')}> + "><{$object->getShow('tpl_file')}> <{$smarty.const._AD_LEGACYRENDER_LANG_TPL_DESC}> - "><{$object->getVar('tpl_desc')}> + "><{$object->getShow('tpl_desc')}> <{$smarty.const._AD_LEGACYRENDER_LANG_TPL_SOURCE}> @@ -55,7 +55,7 @@ »» <{$smarty.const._AD_LEGACYRENDER_LANG_MORE_LARGE}> - + From minahito @ users.sourceforge.jp Mon Jul 10 20:04:22 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 20:04:22 +0900 Subject: [xoops-cvslog 3498] CVS update: xoops2jp/html/modules/legacyRender/admin/templates Message-ID: <20060710110422.4F5B02AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/templates/tplset_clone.html diff -u xoops2jp/html/modules/legacyRender/admin/templates/tplset_clone.html:1.1.2.9 xoops2jp/html/modules/legacyRender/admin/templates/tplset_clone.html:1.1.2.10 --- xoops2jp/html/modules/legacyRender/admin/templates/tplset_clone.html:1.1.2.9 Wed Jun 14 01:12:52 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/tplset_clone.html Mon Jul 10 20:04:22 2006 @@ -26,26 +26,26 @@ <{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_NAME}> "> - <{$object->getVar('tplset_name')}> » » + <{$object->getShow('tplset_name')}> » » <{xoops_input type=text name=tplset_name value=$actionForm->get('tplset_name') size=30 maxlength=50}> <{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_DESC}> "> - <{xoops_input type=text name=tplset_desc value=$object->getVar('tplset_desc') size=50 maxlength=255}> + <{xoops_input type=text name=tplset_desc value=$object->get('tplset_desc') size=50 maxlength=255}> <{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_CREDITS}> "> - <{xoops_textarea type=text name=tplset_credits rows=5 cols=50 value=$object->getVar('tplset_credits')}> + <{xoops_textarea name=tplset_credits rows=5 cols=50 value=$actionForm->get('tplset_credits')}> - + From minahito @ users.sourceforge.jp Mon Jul 10 20:04:49 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 20:04:49 +0900 Subject: [xoops-cvslog 3499] CVS update: xoops2jp/html/modules/legacyRender/admin/templates Message-ID: <20060710110449.D9E072AC04E@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/templates/tplset_delete.html diff -u xoops2jp/html/modules/legacyRender/admin/templates/tplset_delete.html:1.1.2.7 xoops2jp/html/modules/legacyRender/admin/templates/tplset_delete.html:1.1.2.8 --- xoops2jp/html/modules/legacyRender/admin/templates/tplset_delete.html:1.1.2.7 Wed Jun 14 00:41:26 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/tplset_delete.html Mon Jul 10 20:04:49 2006 @@ -6,7 +6,7 @@

<{$smarty.const._AD_LEGACYRENDER_LANG_TEMPLATE_SET_DELETE}>

-
<{$smarty.const._AD_LEGACYRENDER_LANG_TEMPLATE_SET_DELETE_CONF|replace:"%s":$object->getVar('tplset_name')}>
+
<{$smarty.const._AD_LEGACYRENDER_LANG_TEMPLATE_SET_DELETE_CONF|replace:"%s":$object->getShow('tplset_name')}>
<{xoops_token form=$actionForm}> @@ -17,15 +17,15 @@ <{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_ID}> - "><{$object->getVar('tplset_id')}> + "><{$object->getShow('tplset_id')}> <{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_NAME}> - "><{$object->getVar('tplset_name')}> + "><{$object->getShow('tplset_name')}> <{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_DESC}> - "><{$object->getVar('tplset_desc')}> + "><{$object->getShow('tplset_desc')}> <{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_CREDITS}> @@ -33,12 +33,12 @@ <{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_CREATED}> - "><{$object->getVar('tplset_created')|xoops_formattimestamp:l}> + "><{$object->get('tplset_created')|xoops_formattimestamp:l}> - - + + From minahito @ users.sourceforge.jp Mon Jul 10 20:05:00 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 20:05:00 +0900 Subject: [xoops-cvslog 3500] CVS update: xoops2jp/html/modules/legacyRender/admin/templates Message-ID: <20060710110500.9D18E2AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/templates/tplset_edit.html diff -u xoops2jp/html/modules/legacyRender/admin/templates/tplset_edit.html:1.1.2.9 xoops2jp/html/modules/legacyRender/admin/templates/tplset_edit.html:1.1.2.10 --- xoops2jp/html/modules/legacyRender/admin/templates/tplset_edit.html:1.1.2.9 Wed Jun 14 01:12:52 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/tplset_edit.html Mon Jul 10 20:05:00 2006 @@ -25,7 +25,7 @@ <{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_NAME}> - "><{$object->getVar('tplset_name')}> + "><{$object->getShow('tplset_name')}> <{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_DESC}> @@ -36,13 +36,13 @@ <{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_CREDITS}> "> - <{xoops_textarea type=text name=tplset_credits rows=5 cols=50 value=$actionForm->get('tplset_credits')}> + <{xoops_textarea name=tplset_credits rows=5 cols=50 value=$actionForm->get('tplset_credits')}> - + From minahito @ users.sourceforge.jp Mon Jul 10 20:05:08 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 20:05:08 +0900 Subject: [xoops-cvslog 3501] CVS update: xoops2jp/html/modules/legacyRender/admin/templates Message-ID: <20060710110509.0C0B62AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/templates/tplset_list.html diff -u xoops2jp/html/modules/legacyRender/admin/templates/tplset_list.html:1.1.2.17 xoops2jp/html/modules/legacyRender/admin/templates/tplset_list.html:1.1.2.18 --- xoops2jp/html/modules/legacyRender/admin/templates/tplset_list.html:1.1.2.17 Wed Jun 14 01:12:52 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/tplset_list.html Mon Jul 10 20:05:08 2006 @@ -56,25 +56,25 @@ <{$smarty.const._AD_LEGACYRENDER_LANG_CONTROL}> <{foreach item=obj from=$objects}> - <{if $activeTemplateSet == $obj->getVar('tplset_name')}> + <{if $activeTemplateSet == $obj->get('tplset_name')}> <{else}> <{/if}> - <{$obj->getVar('tplset_id')}> - <{$obj->getVar('tplset_name')}>

- <{$obj->getVar('tplset_desc')}> + <{$obj->getShow('tplset_id')}> + <{$obj->getShow('tplset_name')}>

+ <{$obj->getShow('tplset_desc')}> <{$obj->get('tplset_credits')|escape|nl2br}> - <{$obj->getVar('tplset_created')|xoops_formattimestamp:l}> + <{$obj->get('tplset_created')|xoops_formattimestamp:l}> - <{if $activeTemplateSet == $obj->getVar('tplset_name')}> + <{if $activeTemplateSet == $obj->get('tplset_name')}> " alt="*active*" title="*active*" />

<{else}> @@ -87,9 +87,9 @@ " alt="<{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_DOWNLOAD}>" title="<{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_DOWNLOAD}>" /> " alt="<{$smarty.const._CLONE}>" title="<{$smarty.const._CLONE}>" />
- <{if $obj->getVar('tplset_name') != "default"}> + <{if $obj->get('tplset_name') != "default"}> " alt="<{$smarty.const._EDIT}>" title="<{$smarty.const._EDIT}>" /> - <{if $activeTemplateSet != $obj->getVar('tplset_name')}> + <{if $activeTemplateSet != $obj->get('tplset_name')}> " alt="<{$smarty.const._DELETE}>" title="<{$smarty.const._DELETE}>" /> <{/if}> <{/if}> @@ -115,23 +115,23 @@ <{$smarty.const._AD_LEGACYRENDER_LANG_CONTROL}> <{foreach item=obj from=$recentObjects}> - <{if $obj->getVar('tpl_type') == "block"}> + <{if $obj->get('tpl_type') == "block"}> <{else}> <{/if}> - <{$obj->getVar('tpl_id')}> - <{$obj->getVar('tpl_module')}> - <{$obj->getVar('tpl_tplset')}> + <{$obj->getShow('tpl_id')}> + <{$obj->getShow('tpl_module')}> + <{$obj->getShow('tpl_tplset')}> - <{$obj->getVar('tpl_file')}>
- <{$obj->getVar('tpl_desc')}> + <{$obj->getShow('tpl_file')}>
+ <{$obj->getShow('tpl_desc')}> - <{$obj->getVar('tpl_lastmodified')|xoops_formattimestamp:l}> - <{$obj->getVar('tpl_lastimported')|xoops_formattimestamp:l}> - <{$obj->getVar('tpl_type')}> + <{$obj->get('tpl_lastmodified')|xoops_formattimestamp:l}> + <{$obj->get('tpl_lastimported')|xoops_formattimestamp:l}> + <{$obj->getShow('tpl_type')}> - <{if $obj->getVar('tpl_tplset') == "default"}> + <{if $obj->get('tpl_tplset') == "default"}> " alt="<{$smarty.const._AD_LEGACYRENDER_LANG_VIEW}>" title="<{$smarty.const._AD_LEGACYRENDER_LANG_VIEW}>" /> <{else}> " alt="<{$smarty.const._EDIT}>" title="<{$smarty.const._EDIT}>" /> @@ -145,3 +145,5 @@ + + From minahito @ users.sourceforge.jp Mon Jul 10 20:06:04 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 20:06:04 +0900 Subject: [xoops-cvslog 3502] CVS update: xoops2jp/html/modules/legacyRender/admin/actions Message-ID: <20060710110604.1B9652AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/actions/BannerclientListAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/actions/BannerclientListAction.class.php:1.1.2.2 xoops2jp/html/modules/legacyRender/admin/actions/BannerclientListAction.class.php:1.1.2.3 --- xoops2jp/html/modules/legacyRender/admin/actions/BannerclientListAction.class.php:1.1.2.2 Mon Apr 24 19:58:21 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/BannerclientListAction.class.php Mon Jul 10 20:06:03 2006 @@ -1,4 +1,8 @@ Index: xoops2jp/html/modules/legacyRender/admin/templates/tplfile_delete.html diff -u xoops2jp/html/modules/legacyRender/admin/templates/tplfile_delete.html:1.1.2.3 xoops2jp/html/modules/legacyRender/admin/templates/tplfile_delete.html:1.1.2.4 --- xoops2jp/html/modules/legacyRender/admin/templates/tplfile_delete.html:1.1.2.3 Wed Jun 14 00:41:26 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/tplfile_delete.html Mon Jul 10 20:09:39 2006 @@ -11,35 +11,35 @@ - + - + - + - + - + - + - + - + @@ -50,8 +50,8 @@ <{xoops_token form=$actionForm}> <{xoops_input type=hidden name=tpl_id value=$actionForm->get('tpl_id')}> - - + + From minahito @ users.sourceforge.jp Mon Jul 10 20:09:53 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 20:09:53 +0900 Subject: [xoops-cvslog 3504] CVS update: xoops2jp/html/modules/legacyRender/admin/actions Message-ID: <20060710110953.2278D2AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/actions/TplfileDeleteAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/actions/TplfileDeleteAction.class.php:1.1.2.4 xoops2jp/html/modules/legacyRender/admin/actions/TplfileDeleteAction.class.php:1.1.2.5 --- xoops2jp/html/modules/legacyRender/admin/actions/TplfileDeleteAction.class.php:1.1.2.4 Sat May 27 22:10:07 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/TplfileDeleteAction.class.php Mon Jul 10 20:09:53 2006 @@ -9,7 +9,7 @@ { function _getId() { - return isset($_REQUEST['tpl_id']) ? intval($_REQUEST['tpl_id']) : 0; + return xoops_getrequest('tpl_id'); } function &_getHandler() @@ -36,7 +36,7 @@ { $render->setTemplateName("tplfile_delete.html"); $render->setAttribute('actionForm', $this->mActionForm); - #cubson::lazy_load('tplfile', $this->mObject); + $this->mObject->loadSource(); $render->setAttribute('object', $this->mObject); } @@ -55,7 +55,14 @@ function executeViewError(&$controller, &$xoopsUser, &$render) { - redirect_header("./index.php?action=TplfileList", 1, _AD_LEGACYRENDER_ERROR_DBUPDATE_FAILED); + $controller->executeRedirect("./index.php?action=TplfileList", 1, _AD_LEGACYRENDER_ERROR_DBUPDATE_FAILED); + } + + function executeViewCancel(&$controller, &$xoopsUser, &$render) + { + $tplset = $this->mObject->get('tpl_tplset'); + $module = $this->mObject->get('tpl_module'); + $controller->executeForward("./index.php?action=TplfileList&tpl_tplset=${tplset}&tpl_module=${module}"); } } From minahito @ users.sourceforge.jp Mon Jul 10 20:10:19 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 20:10:19 +0900 Subject: [xoops-cvslog 3505] CVS update: xoops2jp/html/modules/legacyRender/admin/actions Message-ID: <20060710111019.E32BB2AC04E@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/actions/TplsetListAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/actions/TplsetListAction.class.php:1.1.2.7 xoops2jp/html/modules/legacyRender/admin/actions/TplsetListAction.class.php:1.1.2.8 --- xoops2jp/html/modules/legacyRender/admin/actions/TplsetListAction.class.php:1.1.2.7 Tue Mar 28 22:30:49 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/TplsetListAction.class.php Mon Jul 10 20:10:19 2006 @@ -3,7 +3,7 @@ if (!defined('XOOPS_ROOT_PATH')) exit(); require_once XOOPS_ROOT_PATH . "/class/XCube_PageNavigator.class.php"; -require_once XOOPS_MODULE_PATH . "/legacyRender/admin/class/AbstractListAction.class.php"; +require_once XOOPS_MODULE_PATH . "/legacyRender/class/AbstractListAction.class.php"; require_once XOOPS_MODULE_PATH . "/legacyRender/admin/forms/TplsetFilterForm.class.php"; require_once XOOPS_MODULE_PATH . "/legacyRender/admin/forms/TplsetSelectForm.class.php"; @@ -12,9 +12,10 @@ var $mActionForm = null; var $mActiveTemplateSet = null; - function prepare(&$controller, &$xoopsUser) + function prepare(&$controller, &$xoopsUser, $moduleConfig) { - $this->mActionForm = new TplsetSelectForm(); + LegacyRender_AbstractListAction::prepare($controller, $xoopsUser, $moduleConfig); + $this->mActionForm =& new TplsetSelectForm(); $this->mActionForm->prepare(); } @@ -24,9 +25,9 @@ return $handler; } - function &_getFilterForm() + function &_getFilterForm(&$navi) { - $filter =& new LegacyRender_TplsetFilterForm($this->mPageNavi); + $filter =& new LegacyRender_TplsetFilterForm($navi); return $filter; } @@ -72,7 +73,7 @@ $render->setTemplateName("tplset_list.html"); $render->setAttribute('objects', $this->mObjects); - $render->setAttribute('pageNavi', $this->mPageNavi); + $render->setAttribute('pageNavi', $this->mNavi); $render->setAttribute('activeTemplateSet', $this->mActiveTemplateSet); $render->setAttribute('actionForm', $this->mActionForm); From minahito @ users.sourceforge.jp Mon Jul 10 20:10:37 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 20:10:37 +0900 Subject: [xoops-cvslog 3506] CVS update: xoops2jp/html/modules/legacyRender/admin/forms Message-ID: <20060710111037.7C3EB2AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/forms/BannerclientFilterForm.class.php diff -u xoops2jp/html/modules/legacyRender/admin/forms/BannerclientFilterForm.class.php:1.1.2.3 xoops2jp/html/modules/legacyRender/admin/forms/BannerclientFilterForm.class.php:1.1.2.4 --- xoops2jp/html/modules/legacyRender/admin/forms/BannerclientFilterForm.class.php:1.1.2.3 Mon Jul 10 16:24:38 2006 +++ xoops2jp/html/modules/legacyRender/admin/forms/BannerclientFilterForm.class.php Mon Jul 10 20:10:37 2006 @@ -1,4 +1,8 @@ 'cid', BANNERCLIENT_SORT_KEY_NAME => 'name', @@ -27,7 +30,6 @@ BANNERCLIENT_SORT_KEY_PASSWD => 'passwd', BANNERCLIENT_SORT_KEY_EXTRAINFO => 'extrainfo' ); - var $_mCriteria = null; function fetch() { From minahito @ users.sourceforge.jp Mon Jul 10 20:10:48 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 20:10:48 +0900 Subject: [xoops-cvslog 3507] CVS update: xoops2jp/html/modules/legacyRender/admin/forms Message-ID: <20060710111048.332412AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/forms/BannerFilterForm.class.php diff -u xoops2jp/html/modules/legacyRender/admin/forms/BannerFilterForm.class.php:1.1.2.4 xoops2jp/html/modules/legacyRender/admin/forms/BannerFilterForm.class.php:1.1.2.5 --- xoops2jp/html/modules/legacyRender/admin/forms/BannerFilterForm.class.php:1.1.2.4 Mon Jul 10 16:24:55 2006 +++ xoops2jp/html/modules/legacyRender/admin/forms/BannerFilterForm.class.php Mon Jul 10 20:10:48 2006 @@ -1,7 +1,7 @@ 'bid', BANNER_SORT_KEY_CID => 'cid', @@ -37,7 +36,6 @@ BANNER_SORT_KEY_HTMLBANNER => 'htmlbanner', BANNER_SORT_KEY_HTMLCODE => 'htmlcode' ); - var $_mCriteria = null; function fetch() { From minahito @ users.sourceforge.jp Mon Jul 10 20:11:03 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 20:11:03 +0900 Subject: [xoops-cvslog 3508] CVS update: xoops2jp/html/modules/legacyRender/admin/forms Message-ID: <20060710111103.526E52AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/forms/BannerfinishAdminDeleteForm.class.php diff -u xoops2jp/html/modules/legacyRender/admin/forms/BannerfinishAdminDeleteForm.class.php:1.1.2.1 xoops2jp/html/modules/legacyRender/admin/forms/BannerfinishAdminDeleteForm.class.php:1.1.2.2 --- xoops2jp/html/modules/legacyRender/admin/forms/BannerfinishAdminDeleteForm.class.php:1.1.2.1 Mon Apr 24 16:30:22 2006 +++ xoops2jp/html/modules/legacyRender/admin/forms/BannerfinishAdminDeleteForm.class.php Mon Jul 10 20:11:03 2006 @@ -1,4 +1,8 @@ get('bid'); } function prepare() @@ -22,7 +26,6 @@ // // Set field properties // - $this->mFieldProperties['bid'] =& new XCube_FieldProperty($this); $this->mFieldProperties['bid']->setDependsByArray(array('required')); $this->mFieldProperties['bid']->addMessage('required', _AD_LEGACYRENDER_ERROR_REQUIRED, _AD_LEGACYRENDER_LANG_BID); From minahito @ users.sourceforge.jp Mon Jul 10 20:11:30 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 20:11:30 +0900 Subject: [xoops-cvslog 3509] CVS update: xoops2jp/html/modules/legacyRender/admin/forms Message-ID: <20060710111130.1879A2AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/forms/BannerfinishFilterForm.class.php diff -u xoops2jp/html/modules/legacyRender/admin/forms/BannerfinishFilterForm.class.php:1.1.2.2 xoops2jp/html/modules/legacyRender/admin/forms/BannerfinishFilterForm.class.php:1.1.2.3 --- xoops2jp/html/modules/legacyRender/admin/forms/BannerfinishFilterForm.class.php:1.1.2.2 Tue Apr 25 14:24:16 2006 +++ xoops2jp/html/modules/legacyRender/admin/forms/BannerfinishFilterForm.class.php Mon Jul 10 20:11:29 2006 @@ -1,4 +1,8 @@ 'bid', BANNERFINISH_SORT_KEY_CID => 'cid', BANNERFINISH_SORT_KEY_IMPRESSIONS => 'impressions', @@ -25,19 +28,18 @@ BANNERFINISH_SORT_KEY_DATESTART => 'datestart', BANNERFINISH_SORT_KEY_DATEEND => 'dateend' ); - var $_mCriteria = null; function fetch() { $this->mSort = isset($_REQUEST['sort']) ? intval($_REQUEST['sort']) : BANNERFINISH_SORT_KEY_DEFAULT; - if ($this->mSort > BANNERFINISH_SORT_KEY_MAXVALUE) { + if (!isset($this->mSortKeys[abs($this->mSort)])) { $this->mSort = BANNERFINISH_SORT_KEY_DEFAULT; } if (isset($_REQUEST['cid'])) { $this->_mNavi->addExtra('cid', xoops_getrequest('cid')); - $this->_mCriteria->add(new Criteria('cid', array(XOBJ_DTYPE_INT, xoops_getrequest('cid')))); + $this->_mCriteria->add(new Criteria('cid', xoops_getrequest('cid'))); } $this->_mCriteria->addSort($this->getSort(), $this->getOrder()); From minahito @ users.sourceforge.jp Mon Jul 10 20:11:41 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 20:11:41 +0900 Subject: [xoops-cvslog 3510] CVS update: xoops2jp/html/modules/legacyRender/admin/forms Message-ID: <20060710111141.C984E2AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/forms/TplsetCloneForm.class.php diff -u xoops2jp/html/modules/legacyRender/admin/forms/TplsetCloneForm.class.php:1.1.2.7 xoops2jp/html/modules/legacyRender/admin/forms/TplsetCloneForm.class.php:1.1.2.8 --- xoops2jp/html/modules/legacyRender/admin/forms/TplsetCloneForm.class.php:1.1.2.7 Tue Mar 28 22:30:48 2006 +++ xoops2jp/html/modules/legacyRender/admin/forms/TplsetCloneForm.class.php Mon Jul 10 20:11:41 2006 @@ -1,17 +1,22 @@ get('tplset_id'); } function prepare() @@ -55,14 +60,14 @@ function load(&$obj) { parent::load($obj); - $this->setVar('tplset_name', $obj->get('tplset_name')); + $this->set('tplset_name', $obj->get('tplset_name')); } function update(&$obj) { parent::update($obj); - $obj->setVar('tplset_name', $this->get('tplset_name')); - $obj->setVar('tplset_id', 0); + $obj->set('tplset_name', $this->get('tplset_name')); + $obj->set('tplset_id', 0); } } From minahito @ users.sourceforge.jp Mon Jul 10 20:11:54 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 20:11:54 +0900 Subject: [xoops-cvslog 3511] CVS update: xoops2jp/html/modules/legacyRender/admin/forms Message-ID: <20060710111154.929CE2AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/forms/TplsetEditForm.class.php diff -u xoops2jp/html/modules/legacyRender/admin/forms/TplsetEditForm.class.php:1.1.2.4 xoops2jp/html/modules/legacyRender/admin/forms/TplsetEditForm.class.php:1.1.2.5 --- xoops2jp/html/modules/legacyRender/admin/forms/TplsetEditForm.class.php:1.1.2.4 Tue Mar 28 22:30:48 2006 +++ xoops2jp/html/modules/legacyRender/admin/forms/TplsetEditForm.class.php Mon Jul 10 20:11:54 2006 @@ -1,14 +1,24 @@ get('tplset_id'); + } + function prepare() { // @@ -30,23 +40,19 @@ $this->mFieldProperties['tplset_desc']->addMessage('maxlength', _AD_LEGACYRENDER_ERROR_MAXLENGTH, _AD_LEGACYRENDER_LANG_TPLSET_DESC, '255'); $this->mFieldProperties['tplset_desc']->addVar('maxlength', 255); } - function getTokenName() - { - return "module.legacyRender.TplsetEditForm.TOKEN"; - } function load(&$obj) { - $this->setVar('tplset_id', $obj->get('tplset_id')); - $this->setVar('tplset_desc', $obj->get('tplset_desc')); - $this->setVar('tplset_credits', $obj->get('tplset_credits')); + $this->set('tplset_id', $obj->get('tplset_id')); + $this->set('tplset_desc', $obj->get('tplset_desc')); + $this->set('tplset_credits', $obj->get('tplset_credits')); } function update(&$obj) { - $obj->setVar('tplset_id', $this->get('tplset_id')); - $obj->setVar('tplset_desc', $this->get('tplset_desc')); - $obj->setVar('tplset_credits', $this->get('tplset_credits')); + $obj->set('tplset_id', $this->get('tplset_id')); + $obj->set('tplset_desc', $this->get('tplset_desc')); + $obj->set('tplset_credits', $this->get('tplset_credits')); } } From minahito @ users.sourceforge.jp Mon Jul 10 20:12:12 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Jul 2006 20:12:12 +0900 Subject: [xoops-cvslog 3512] CVS update: xoops2jp/html/modules/legacyRender/admin/forms Message-ID: <20060710111212.09A742AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/forms/TplsetFilterForm.class.php diff -u xoops2jp/html/modules/legacyRender/admin/forms/TplsetFilterForm.class.php:1.1.2.5 xoops2jp/html/modules/legacyRender/admin/forms/TplsetFilterForm.class.php:1.1.2.6 --- xoops2jp/html/modules/legacyRender/admin/forms/TplsetFilterForm.class.php:1.1.2.5 Tue Mar 28 22:30:48 2006 +++ xoops2jp/html/modules/legacyRender/admin/forms/TplsetFilterForm.class.php Mon Jul 10 20:12:11 2006 @@ -2,66 +2,37 @@ if (!defined('XOOPS_ROOT_PATH')) exit(); -define('TPLSET_SORT_KEY_DEFAULT', 0); +require_once XOOPS_MODULE_PATH . "/legacyRender/class/AbstractFilterForm.class.php"; + define('TPLSET_SORT_KEY_TPLSET_ID', 1); -define('TPLSET_SORT_KEY_NAME', 2); -define('TPLSET_SORT_KEY_DESC', 3); -define('TPLSET_SORT_KEY_LOCK', 4); -define('TPLSET_SORT_KEY_MAXVALUE', 4); +define('TPLSET_SORT_KEY_TPLSET_NAME', 2); +define('TPLSET_SORT_KEY_TPLSET_DESC', 3); +define('TPLSET_SORT_KEY_TPLSET_CREDITS', 4); +define('TPLSET_SORT_KEY_TPLSET_CREATED', 5); + +define('TPLSET_SORT_KEY_DEFAULT', TPLSET_SORT_KEY_TPLSET_ID); +define('TPLSET_SORT_KEY_MAXVALUE', 5); -class LegacyRender_TplsetFilterForm +class LegacyRender_TplsetFilterForm extends LegacyRender_AbstractFilterForm { - var $mSort = 0; - var $_mSortKeys = array( + var $mSortKeys = array( TPLSET_SORT_KEY_DEFAULT => 'tplset_id', TPLSET_SORT_KEY_TPLSET_ID => 'tplset_id', - TPLSET_SORT_KEY_NAME => 'name', - TPLSET_SORT_KEY_DESC => 'desc', - TPLSET_SORT_KEY_LOCK => 'lock' + TPLSET_SORT_KEY_TPLSET_NAME => 'tplset_name', + TPLSET_SORT_KEY_TPLSET_DESC => 'tplset_desc', + TPLSET_SORT_KEY_TPLSET_CREDITS => 'tplset_credits', + TPLSET_SORT_KEY_TPLSET_CREATED => 'tplset_created' ); - var $_mCriteria = null; - - var $_mNavi = null; - - function LegacyRender_TplsetFilterForm(&$navi) - { - $this->_mNavi =& $navi; - $this->_mCriteria =& new CriteriaCompo(); - } function fetch() { $this->mSort = isset($_REQUEST['sort']) ? intval($_REQUEST['sort']) : 0; - if (abs($this->mSort) > TPLSET_SORT_KEY_MAXVALUE) { + if (!isset($this->mSort[abs($this->mSort)])) { $this->mSort = TPLSET_SORT_KEY_DEFAULT; } - - $this->_mNavi->addExtra('sort', $this->mSort); - } - - function getSort() - { - $sortkey = abs($this->mSort); - return $this->_mSortKeys[$sortkey]; - } - - function getOrder() - { - return ($this->mSort < 0) ? "DESC" : "ASC"; - } - - function getCriteria($start = 0, $limit = 0) - { - $criteria = $this->_mCriteria; - - $criteria->setStart($start); - $criteria->setLimit($limit); - - $criteria->setSort($this->getSort()); - $criteria->setOrder($this->getOrder()); - return $criteria; + $this->_mCriteria->addSort($this->getSort(), $this->getOrder()); } } From minahito @ users.sourceforge.jp Tue Jul 11 10:33:36 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 11 Jul 2006 10:33:36 +0900 Subject: [xoops-cvslog 3513] CVS update: xoops2jp/html Message-ID: <20060711013336.A728F2AC042@users.sourceforge.jp> Index: xoops2jp/html/readpmsg.php diff -u xoops2jp/html/readpmsg.php:1.2.8.1 xoops2jp/html/readpmsg.php:1.2.8.2 --- xoops2jp/html/readpmsg.php:1.2.8.1 Tue Nov 8 18:49:34 2005 +++ xoops2jp/html/readpmsg.php Tue Jul 11 10:33:36 2006 @@ -1,5 +1,5 @@ mEventManager->raiseEvent("Legacypage.Readpmsg.Access",$root->mController,$eventArgs); +XCube_DelegateUtils::call("Legacypage.Readpmsg.Access"); ?> \ No newline at end of file From minahito @ users.sourceforge.jp Tue Jul 11 10:33:49 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 11 Jul 2006 10:33:49 +0900 Subject: [xoops-cvslog 3514] CVS update: xoops2jp/html Message-ID: <20060711013349.488172AC042@users.sourceforge.jp> Index: xoops2jp/html/pmlite.php diff -u xoops2jp/html/pmlite.php:1.2.8.3 xoops2jp/html/pmlite.php:1.2.8.4 --- xoops2jp/html/pmlite.php:1.2.8.3 Mon Dec 26 21:16:27 2005 +++ xoops2jp/html/pmlite.php Tue Jul 11 10:33:49 2006 @@ -1,5 +1,5 @@ mEventManager->raiseEvent("Legacypage.Pmlite.Access", $root->mController, $eventArgs); +XCube_DelegateUtils::call("Legacypage.Pmlite.Access"); ?> \ No newline at end of file From minahito @ users.sourceforge.jp Tue Jul 11 10:33:59 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 11 Jul 2006 10:33:59 +0900 Subject: [xoops-cvslog 3515] CVS update: xoops2jp/html Message-ID: <20060711013359.AE4B02AC042@users.sourceforge.jp> Index: xoops2jp/html/viewpmsg.php diff -u xoops2jp/html/viewpmsg.php:1.2.8.2 xoops2jp/html/viewpmsg.php:1.2.8.3 --- xoops2jp/html/viewpmsg.php:1.2.8.2 Tue Nov 8 18:49:48 2005 +++ xoops2jp/html/viewpmsg.php Tue Jul 11 10:33:59 2006 @@ -1,5 +1,5 @@ mEventManager->raiseEvent("Legacypage.Viewpmsg.Access",$root->mController,$eventArgs); +XCube_DelegateUtils::call("Legacypage.Viewpmsg.Access"); ?> \ No newline at end of file From minahito @ users.sourceforge.jp Tue Jul 11 11:41:14 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 11 Jul 2006 11:41:14 +0900 Subject: [xoops-cvslog 3516] CVS update: xoops2jp/html/modules/legacyRender/admin/actions Message-ID: <20060711024114.A90B32AC044@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/actions/TplsetCloneAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/actions/TplsetCloneAction.class.php:1.1.2.5 xoops2jp/html/modules/legacyRender/admin/actions/TplsetCloneAction.class.php:1.1.2.6 --- xoops2jp/html/modules/legacyRender/admin/actions/TplsetCloneAction.class.php:1.1.2.5 Mon Jul 10 20:01:21 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/TplsetCloneAction.class.php Tue Jul 11 11:41:14 2006 @@ -1,7 +1,7 @@ executeForward("./index.php?action=TplsetList"); } } From minahito @ users.sourceforge.jp Tue Jul 11 11:58:47 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 11 Jul 2006 11:58:47 +0900 Subject: [xoops-cvslog 3517] CVS update: xoops2jp/html/modules/legacyRender/kernel Message-ID: <20060711025847.87DDB2AC053@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/kernel/Legacy_RenderSystem.class.php diff -u xoops2jp/html/modules/legacyRender/kernel/Legacy_RenderSystem.class.php:1.1.2.17 xoops2jp/html/modules/legacyRender/kernel/Legacy_RenderSystem.class.php:1.1.2.18 --- xoops2jp/html/modules/legacyRender/kernel/Legacy_RenderSystem.class.php:1.1.2.17 Tue Jun 27 18:12:50 2006 +++ xoops2jp/html/modules/legacyRender/kernel/Legacy_RenderSystem.class.php Tue Jul 11 11:58:47 2006 @@ -1,6 +1,6 @@ getConfigsByCat(0, $legacyRender->getVar('mid')); + $configs =& $configHandler->getConfigsByCat(0, $legacyRender->get('mid')); foreach ($configs as $name => $value) { // prefix each tag with 'xoops_' @@ -106,8 +106,8 @@ if (is_object($this->mController->mXoopsUser)) { $arr = array( 'xoops_isuser' => true, - 'xoops_userid' => $this->mController->mXoopsUser->getVar('uid'), - 'xoops_uname' => $this->mController->mXoopsUser->getVar('uname'), + 'xoops_userid' => $this->mController->mXoopsUser->getShow('uid'), + 'xoops_uname' => $this->mController->mXoopsUser->getShow('uname'), 'xoops_isadmin' => $this->mController->mXoopsUser->isAdmin()); } else { @@ -239,10 +239,10 @@ // if($this->mController->mModuleController->isModuleProcess()) { // The process of module $xoopsModule=&$this->mController->mModuleController->mModuleObject; - $this->mXoopsTpl->assign(array('xoops_modulename' => $xoopsModule->getVar('name'), - 'xoops_dirname' => $xoopsModule->getVar('dirname'))); + $this->mXoopsTpl->assign(array('xoops_modulename' => $xoopsModule->getShow('name'), + 'xoops_dirname' => $xoopsModule->getShow('dirname'))); if (!$this->mXoopsTpl->get_template_vars('xoops_pagetitle')) { - $this->mXoopsTpl->assign(array('xoops_pagetitle' => $xoopsModule->getVar('name'))); + $this->mXoopsTpl->assign(array('xoops_pagetitle' => $xoopsModule->getShow('name'))); } } else { From minahito @ users.sourceforge.jp Tue Jul 11 11:59:03 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 11 Jul 2006 11:59:03 +0900 Subject: [xoops-cvslog 3518] CVS update: xoops2jp/html/modules/legacyRender/admin/templates Message-ID: <20060711025903.6E8D32AC053@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/templates/theme_list.html diff -u xoops2jp/html/modules/legacyRender/admin/templates/theme_list.html:1.1.2.15 xoops2jp/html/modules/legacyRender/admin/templates/theme_list.html:1.1.2.16 --- xoops2jp/html/modules/legacyRender/admin/templates/theme_list.html:1.1.2.15 Wed Jun 14 21:45:25 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/theme_list.html Tue Jul 11 11:59:03 2006 @@ -36,7 +36,7 @@ <{$theme->get('name')}>
<{/if}> - <{$theme->getVar('name')}> + <{$theme->getShow('name')}> - + - + - + - + @@ -76,6 +76,7 @@
<{$smarty.const._AD_LEGACYRENDER_LANG_TPL_ID}>"><{$object->getVar('tpl_id')}>"><{$object->getShow('tpl_id')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_TPL_REFID}>"><{$object->getVar('tpl_refid')}>"><{$object->getShow('tpl_refid')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_TPL_MODULE}>"><{$object->getVar('tpl_module')}>"><{$object->getShow('tpl_module')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_TPL_TPLSET}>"><{$object->getVar('tpl_tplset')}>"><{$object->getShow('tpl_tplset')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_TPL_FILE}>"><{$object->getVar('tpl_file')}>"><{$object->getShow('tpl_file')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_TPL_DESC}>"><{$object->getVar('tpl_desc')}>"><{$object->getShow('tpl_desc')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_TPL_LASTMODIFIED}>"><{$object->getVar('tpl_lastmodified')}>"><{$object->get('tpl_lastmodified')|xoops_formattimestamp:l}>
<{$smarty.const._AD_LEGACYRENDER_LANG_TPL_LASTIMPORTED}>"><{$object->getVar('tpl_lastimported')}>"><{$object->getVar('tpl_lastimported')|xoops_formattimestamp:l}>
<{$smarty.const._AD_LEGACYRENDER_LANG_TPL_TYPE}>
<{if $theme->mPackage}> From minahito @ users.sourceforge.jp Tue Jul 11 11:59:28 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 11 Jul 2006 11:59:28 +0900 Subject: [xoops-cvslog 3519] CVS update: xoops2jp/html/modules/legacyRender/admin/templates Message-ID: <20060711025928.78F752AC053@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/templates/tplfile_clone.html diff -u xoops2jp/html/modules/legacyRender/admin/templates/tplfile_clone.html:1.1.2.3 xoops2jp/html/modules/legacyRender/admin/templates/tplfile_clone.html:1.1.2.4 --- xoops2jp/html/modules/legacyRender/admin/templates/tplfile_clone.html:1.1.2.3 Wed Jun 14 01:12:52 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/tplfile_clone.html Tue Jul 11 11:59:28 2006 @@ -40,19 +40,19 @@
<{$smarty.const._AD_LEGACYRENDER_LANG_TPL_TPLSET}>"><{$object->getVar('tpl_tplset')}>"><{$object->getShow('tpl_tplset')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_TPL_MODULE}>"><{$object->getVar('tpl_module')}>"><{$object->getShow('tpl_module')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_TPL_FILE}>"><{$object->getVar('tpl_file')}>"><{$object->getShow('tpl_file')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_TPL_DESC}>"><{$actionForm->get('tpl_desc')}>"><{$object->getShow('tpl_desc')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_TPL_SOURCE}>
+
From minahito @ users.sourceforge.jp Tue Jul 11 12:00:15 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 11 Jul 2006 12:00:15 +0900 Subject: [xoops-cvslog 3520] CVS update: xoops2jp/html/modules/legacyRender/admin/templates Message-ID: <20060711030015.5FA432AC053@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/templates/tplfile_delete.html diff -u xoops2jp/html/modules/legacyRender/admin/templates/tplfile_delete.html:1.1.2.4 xoops2jp/html/modules/legacyRender/admin/templates/tplfile_delete.html:1.1.2.5 --- xoops2jp/html/modules/legacyRender/admin/templates/tplfile_delete.html:1.1.2.4 Mon Jul 10 20:09:39 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/tplfile_delete.html Tue Jul 11 12:00:15 2006 @@ -39,11 +39,11 @@ <{$smarty.const._AD_LEGACYRENDER_LANG_TPL_LASTIMPORTED}> - "><{$object->getVar('tpl_lastimported')|xoops_formattimestamp:l}> + "><{$object->get('tpl_lastimported')|xoops_formattimestamp:l}> <{$smarty.const._AD_LEGACYRENDER_LANG_TPL_TYPE}> - "><{$object->getVar('tpl_type')}> + "><{$object->getShow('tpl_type')}>
From minahito @ users.sourceforge.jp Tue Jul 11 12:00:29 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 11 Jul 2006 12:00:29 +0900 Subject: [xoops-cvslog 3521] CVS update: xoops2jp/html/modules/legacyRender/admin/templates Message-ID: <20060711030029.55E272AC06F@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/templates/tplfile_edit.html diff -u xoops2jp/html/modules/legacyRender/admin/templates/tplfile_edit.html:1.1.2.9 xoops2jp/html/modules/legacyRender/admin/templates/tplfile_edit.html:1.1.2.10 --- xoops2jp/html/modules/legacyRender/admin/templates/tplfile_edit.html:1.1.2.9 Wed Jun 14 01:12:52 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/tplfile_edit.html Tue Jul 11 12:00:29 2006 @@ -39,19 +39,19 @@ <{$smarty.const._AD_LEGACYRENDER_LANG_TPL_TPLSET}> - "><{$object->getVar('tpl_tplset')}> + "><{$object->getShow('tpl_tplset')}> <{$smarty.const._AD_LEGACYRENDER_LANG_TPL_MODULE}> - "><{$object->getVar('tpl_module')}> + "><{$object->getShow('tpl_module')}> <{$smarty.const._AD_LEGACYRENDER_LANG_TPL_FILE}> - "><{$object->getVar('tpl_file')}> + "><{$object->getShow('tpl_file')}> <{$smarty.const._AD_LEGACYRENDER_LANG_TPL_DESC}> - "><{$actionForm->get('tpl_desc')}> + "><{$object->getShow('tpl_desc')}> <{$smarty.const._AD_LEGACYRENDER_LANG_TPL_SOURCE}> @@ -75,6 +75,7 @@ + From minahito @ users.sourceforge.jp Tue Jul 11 12:00:39 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 11 Jul 2006 12:00:39 +0900 Subject: [xoops-cvslog 3522] CVS update: xoops2jp/html/modules/legacyRender/admin/templates Message-ID: <20060711030039.A46DD2AC053@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/templates/tplfile_list.html diff -u xoops2jp/html/modules/legacyRender/admin/templates/tplfile_list.html:1.1.2.13 xoops2jp/html/modules/legacyRender/admin/templates/tplfile_list.html:1.1.2.14 --- xoops2jp/html/modules/legacyRender/admin/templates/tplfile_list.html:1.1.2.13 Wed Jun 14 01:12:52 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/tplfile_list.html Tue Jul 11 12:00:39 2006 @@ -29,11 +29,11 @@ @@ -42,11 +42,11 @@ @@ -95,65 +95,65 @@ <{foreach item=obj from=$objects}> <{if $obj->mOverride == null && $targetTplset != null && $targetTplset != 'default'}> - <{elseif $obj->getVar('tpl_type') == "block"}> + <{elseif $obj->get('tpl_type') == "block"}> <{else}> <{/if}> <{if $obj->mOverride != null}> - <{$obj->mOverride->getVar('tpl_id')}> + <{$obj->mOverride->getShow('tpl_id')}> <{else}> - <{$obj->getVar('tpl_id')}> + <{$obj->getShow('tpl_id')}> <{/if}> - <{$obj->getVar('tpl_module')}> + <{$obj->getShow('tpl_module')}> <{if $obj->mOverride != null}> - <{$obj->mOverride->getVar('tpl_tplset')}> + <{$obj->mOverride->getShow('tpl_tplset')}> <{else}> - <{$obj->getVar('tpl_tplset')}> + <{$obj->getShow('tpl_tplset')}> <{/if}> - <{$obj->getVar('tpl_file')}>
- <{$obj->getVar('tpl_desc')}> + <{$obj->getShow('tpl_file')}>
+ <{$obj->getShow('tpl_desc')}> <{if $obj->mOverride != null}> - <{$obj->mOverride->getVar('tpl_lastmodified')|xoops_formattimestamp:l}> + <{$obj->mOverride->get('tpl_lastmodified')|xoops_formattimestamp:l}> <{else}> - <{$obj->getVar('tpl_lastmodified')|xoops_formattimestamp:l}> + <{$obj->get('tpl_lastmodified')|xoops_formattimestamp:l}> <{/if}> <{if $obj->mOverride != null}> - <{$obj->mOverride->getVar('tpl_lastimported')|xoops_formattimestamp:l}> + <{$obj->mOverride->get('tpl_lastimported')|xoops_formattimestamp:l}> <{else}> - <{$obj->getVar('tpl_lastimported')|xoops_formattimestamp:l}> + <{$obj->get('tpl_lastimported')|xoops_formattimestamp:l}> <{/if}> - <{$obj->getVar('tpl_type')}> + <{$obj->getShow('tpl_type')}> <{if $targetTplset == 'default'}> - " alt="<{$smarty.const._AD_LEGACYRENDER_LANG_VIEW}>" title="<{$smarty.const._AD_LEGACYRENDER_LANG_VIEW}>" /> - " alt="<{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_DOWNLOAD}>" title="<{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_DOWNLOAD}>" /> + " alt="<{$smarty.const._AD_LEGACYRENDER_LANG_VIEW}>" title="<{$smarty.const._AD_LEGACYRENDER_LANG_VIEW}>" /> + " alt="<{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_DOWNLOAD}>" title="<{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_DOWNLOAD}>" /> <{elseif $obj->mOverride != null}> - " alt="<{$smarty.const._EDIT}>" title="<{$smarty.const._EDIT}>" /> - " alt="<{$smarty.const._DELETE}>" title="<{$smarty.const._DELETE}>" /> - " alt="<{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_DOWNLOAD}>" title="<{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_DOWNLOAD}>" /> + " alt="<{$smarty.const._EDIT}>" title="<{$smarty.const._EDIT}>" /> + " alt="<{$smarty.const._DELETE}>" title="<{$smarty.const._DELETE}>" /> + " alt="<{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_DOWNLOAD}>" title="<{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_DOWNLOAD}>" /> - <{xoops_input type=file name=upload key=$obj->mOverride->getVar('tpl_id')}> + <{xoops_input type=file name=upload key=$obj->mOverride->get('tpl_id')}> <{elseif $obj->mOverride == null && $targetTplset != null && $targetTplset != 'default'}> - " alt="<{$smarty.const._CLONE}>" title="<{$smarty.const._CLONE}>" /> - " alt="<{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_DOWNLOAD}>" title="<{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_DOWNLOAD}>" /> + " alt="<{$smarty.const._CLONE}>" title="<{$smarty.const._CLONE}>" /> + " alt="<{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_DOWNLOAD}>" title="<{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_DOWNLOAD}>" />   <{else}> - <{if $obj->getVar('tpl_tplset') == 'default'}> - " alt="<{$smarty.const._AD_LEGACYRENDER_LANG_VIEW}>" title="<{$smarty.const._AD_LEGACYRENDER_LANG_VIEW}>" /> + <{if $obj->get('tpl_tplset') == 'default'}> + " alt="<{$smarty.const._AD_LEGACYRENDER_LANG_VIEW}>" title="<{$smarty.const._AD_LEGACYRENDER_LANG_VIEW}>" /> <{else}> - " alt="<{$smarty.const._EDIT}>" title="<{$smarty.const._EDIT}>" /> + " alt="<{$smarty.const._EDIT}>" title="<{$smarty.const._EDIT}>" /> <{/if}> - " alt="<{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_DOWNLOAD}>" title="<{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_DOWNLOAD}>" /> + " alt="<{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_DOWNLOAD}>" title="<{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_DOWNLOAD}>" /> <{/if}> From minahito @ users.sourceforge.jp Tue Jul 11 12:00:52 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 11 Jul 2006 12:00:52 +0900 Subject: [xoops-cvslog 3523] CVS update: xoops2jp/html/modules/legacyRender/admin/templates Message-ID: <20060711030052.D5E242AC053@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/templates/tplset_upload.html diff -u xoops2jp/html/modules/legacyRender/admin/templates/tplset_upload.html:1.1.2.4 xoops2jp/html/modules/legacyRender/admin/templates/tplset_upload.html:1.1.2.5 --- xoops2jp/html/modules/legacyRender/admin/templates/tplset_upload.html:1.1.2.4 Wed Jun 14 01:12:52 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/tplset_upload.html Tue Jul 11 12:00:52 2006 @@ -39,7 +39,7 @@ - + From minahito @ users.sourceforge.jp Tue Jul 11 12:01:45 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 11 Jul 2006 12:01:45 +0900 Subject: [xoops-cvslog 3524] CVS update: xoops2jp/html/modules/legacyRender/admin/forms Message-ID: <20060711030145.8F7102AC053@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/forms/TplfileCloneForm.class.php diff -u xoops2jp/html/modules/legacyRender/admin/forms/TplfileCloneForm.class.php:1.1.2.1 xoops2jp/html/modules/legacyRender/admin/forms/TplfileCloneForm.class.php:1.1.2.2 --- xoops2jp/html/modules/legacyRender/admin/forms/TplfileCloneForm.class.php:1.1.2.1 Wed May 17 16:19:56 2006 +++ xoops2jp/html/modules/legacyRender/admin/forms/TplfileCloneForm.class.php Tue Jul 11 12:01:45 2006 @@ -1,11 +1,15 @@ loadSource(); - $obj->setVar('tpl_desc', $this->get('tpl_desc')); - $obj->setVar('tpl_lastmodified', time()); + $obj->set('tpl_desc', $this->get('tpl_desc')); + $obj->set('tpl_lastmodified', time()); - $obj->Source->setVar('tpl_source', $this->get('tpl_source')); + $obj->Source->set('tpl_source', $this->get('tpl_source')); } } From minahito @ users.sourceforge.jp Tue Jul 11 12:02:34 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 11 Jul 2006 12:02:34 +0900 Subject: [xoops-cvslog 3525] CVS update: xoops2jp/html/modules/legacyRender/admin/forms Message-ID: <20060711030234.D35182AC053@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/forms/TplfileEditForm.class.php diff -u xoops2jp/html/modules/legacyRender/admin/forms/TplfileEditForm.class.php:1.1.2.3 xoops2jp/html/modules/legacyRender/admin/forms/TplfileEditForm.class.php:1.1.2.4 --- xoops2jp/html/modules/legacyRender/admin/forms/TplfileEditForm.class.php:1.1.2.3 Tue Mar 28 22:30:48 2006 +++ xoops2jp/html/modules/legacyRender/admin/forms/TplfileEditForm.class.php Tue Jul 11 12:02:34 2006 @@ -1,4 +1,8 @@ loadSource(); - $this->setVar('tpl_id', $obj->get('tpl_id')); - $this->setVar('tpl_desc', $obj->get('tpl_desc')); - $this->setVar('tpl_source', $obj->Source->get('tpl_source')); + $this->set('tpl_id', $obj->get('tpl_id')); + $this->set('tpl_desc', $obj->get('tpl_desc')); + $this->set('tpl_source', $obj->Source->get('tpl_source')); } function update(&$obj) { $obj->loadSource(); - $obj->setVar('tpl_id', $this->get('tpl_id')); - $obj->setVar('tpl_desc', $this->get('tpl_desc')); + $obj->set('tpl_id', $this->get('tpl_id')); + $obj->set('tpl_desc', $this->get('tpl_desc')); - $obj->setVar('tpl_lastmodified', time()); + $obj->set('tpl_lastmodified', time()); - $obj->Source->setVar('tpl_source', $this->get('tpl_source')); + $obj->Source->set('tpl_source', $this->get('tpl_source')); } } From minahito @ users.sourceforge.jp Tue Jul 11 12:03:11 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 11 Jul 2006 12:03:11 +0900 Subject: [xoops-cvslog 3526] CVS update: xoops2jp/html/modules/legacyRender/admin/forms Message-ID: <20060711030311.07A742AC053@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/forms/TplsetDeleteForm.class.php diff -u xoops2jp/html/modules/legacyRender/admin/forms/TplsetDeleteForm.class.php:1.1.2.2 xoops2jp/html/modules/legacyRender/admin/forms/TplsetDeleteForm.class.php:1.1.2.3 --- xoops2jp/html/modules/legacyRender/admin/forms/TplsetDeleteForm.class.php:1.1.2.2 Tue Mar 28 22:30:48 2006 +++ xoops2jp/html/modules/legacyRender/admin/forms/TplsetDeleteForm.class.php Tue Jul 11 12:03:10 2006 @@ -1,4 +1,8 @@ get('tplset_id'); + } + function prepare() { // @@ -23,19 +32,15 @@ $this->mFieldProperties['tplset_id']->setDependsByArray(array('required')); $this->mFieldProperties['tplset_id']->addMessage('required', _AD_LEGACYRENDER_ERROR_REQUIRED, _AD_LEGACYRENDER_LANG_TPLSET_ID); } - function getTokenName() - { - return "module.legacyRender.TplsetDeleteForm.TOKEN"; - } function load(&$obj) { - $this->setVar('tplset_id', $obj->get('tplset_id')); + $this->set('tplset_id', $obj->get('tplset_id')); } function update(&$obj) { - $obj->setVar('tplset_id', $this->get('tplset_id')); + $obj->set('tplset_id', $this->get('tplset_id')); } } From minahito @ users.sourceforge.jp Tue Jul 11 12:03:30 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 11 Jul 2006 12:03:30 +0900 Subject: [xoops-cvslog 3527] CVS update: xoops2jp/html/modules/legacyRender/admin/forms Message-ID: <20060711030330.EE28F2AC053@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/forms/TplsetSelectForm.class.php diff -u xoops2jp/html/modules/legacyRender/admin/forms/TplsetSelectForm.class.php:1.1.2.2 xoops2jp/html/modules/legacyRender/admin/forms/TplsetSelectForm.class.php:1.1.2.3 --- xoops2jp/html/modules/legacyRender/admin/forms/TplsetSelectForm.class.php:1.1.2.2 Tue Mar 28 22:30:48 2006 +++ xoops2jp/html/modules/legacyRender/admin/forms/TplsetSelectForm.class.php Tue Jul 11 12:03:30 2006 @@ -1,4 +1,8 @@ Index: xoops2jp/html/modules/legacyRender/admin/actions/TplfileCloneAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/actions/TplfileCloneAction.class.php:1.1.2.3 xoops2jp/html/modules/legacyRender/admin/actions/TplfileCloneAction.class.php:1.1.2.4 --- xoops2jp/html/modules/legacyRender/admin/actions/TplfileCloneAction.class.php:1.1.2.3 Wed May 17 18:43:27 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/TplfileCloneAction.class.php Tue Jul 11 12:04:17 2006 @@ -1,9 +1,13 @@ mObjectHandler =& $this->_getHandler(); $obj =& $this->mObjectHandler->get($id); + // + // The following code uses 'tpl_tplset' directly. This input value will + // be checked by ActionForm. + // if (is_object($obj) && $obj->get('tpl_tplset') == 'default') { $this->mObject =& $obj->createClone(xoops_getrequest('tpl_tplset')); } @@ -60,7 +68,7 @@ function executeViewError(&$controller, &$xoopsUser, &$render) { - redirect_header("./index.php?action=TplsetList", 1, _AD_LEGACYRENDER_ERROR_DBUPDATE_FAILED); + $controller->executeRedirect("./index.php?action=TplsetList", 1, _AD_LEGACYRENDER_ERROR_DBUPDATE_FAILED); } } From minahito @ users.sourceforge.jp Tue Jul 11 12:04:31 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 11 Jul 2006 12:04:31 +0900 Subject: [xoops-cvslog 3529] CVS update: xoops2jp/html/modules/legacyRender/admin/actions Message-ID: <20060711030431.6B7D52AC06E@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/actions/TplfileDownloadAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/actions/TplfileDownloadAction.class.php:1.1.2.3 xoops2jp/html/modules/legacyRender/admin/actions/TplfileDownloadAction.class.php:1.1.2.4 --- xoops2jp/html/modules/legacyRender/admin/actions/TplfileDownloadAction.class.php:1.1.2.3 Mon Jul 10 20:00:12 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/TplfileDownloadAction.class.php Tue Jul 11 12:04:31 2006 @@ -1,7 +1,7 @@ mObject->getVar('tpl_file')); + header('Content-Disposition: filename=' . $this->mObject->getShow('tpl_file')); } else { - header('Content-Disposition: attachment; filename=' . $this->mObject->getVar('tpl_file')); + header('Content-Disposition: attachment; filename=' . $this->mObject->getShow('tpl_file')); } header('Content-length: ' . strlen($source)); From minahito @ users.sourceforge.jp Tue Jul 11 12:04:58 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 11 Jul 2006 12:04:58 +0900 Subject: [xoops-cvslog 3530] CVS update: xoops2jp/html/modules/legacyRender/admin/actions Message-ID: <20060711030458.DD59E2AC06F@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/actions/TplfileEditAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/actions/TplfileEditAction.class.php:1.1.2.8 xoops2jp/html/modules/legacyRender/admin/actions/TplfileEditAction.class.php:1.1.2.9 --- xoops2jp/html/modules/legacyRender/admin/actions/TplfileEditAction.class.php:1.1.2.8 Sat May 27 22:10:07 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/TplfileEditAction.class.php Tue Jul 11 12:04:58 2006 @@ -1,20 +1,24 @@ mActionForm =& new TplfileEditForm(); + $this->mActionForm =& new LegacyRender_TplfileEditForm(); $this->mActionForm->prepare(); } @@ -47,8 +51,12 @@ function executeViewSuccess(&$controller, &$xoopsUser, &$render) { + // + // This class knows the db template mechanism, because this is in + // LegacyRender. + // require_once XOOPS_ROOT_PATH . "/class/template.php"; - + $xoopsTpl =& new XoopsTpl(); $xoopsTpl->clear_cache('db:' . $this->mObject->get('tpl_file')); $xoopsTpl->clear_compiled_tpl('db:' . $this->mObject->get('tpl_file')); @@ -60,7 +68,14 @@ function executeViewError(&$controller, &$xoopsUser, &$render) { - redirect_header("./index.php?action=TplsetList", 1, _AD_LEGACYRENDER_ERROR_DBUPDATE_FAILED); + $controller->executeRedirect("./index.php?action=TplsetList", 1, _AD_LEGACYRENDER_ERROR_DBUPDATE_FAILED); + } + + function executeViewCancel(&$controller, &$xoopsUser, &$render) + { + $tplset = $this->mObject->get('tpl_tplset'); + $module = $this->mObject->get('tpl_module'); + $controller->executeForward("./index.php?action=TplfileList&tpl_tplset=${tplset}&tpl_module=${module}"); } } From minahito @ users.sourceforge.jp Tue Jul 11 12:05:13 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 11 Jul 2006 12:05:13 +0900 Subject: [xoops-cvslog 3531] CVS update: xoops2jp/html/modules/legacyRender/admin/actions Message-ID: <20060711030513.8822A2AC075@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php:1.1.2.12 xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php:1.1.2.13 --- xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php:1.1.2.12 Mon Jul 10 20:00:48 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php Tue Jul 11 12:05:13 2006 @@ -1,7 +1,7 @@ loadSource(); - $last_tplset = $obj->getVar('tpl_tplset'); - $last_module = $obj->getVar('tpl_module'); + $last_tplset = $obj->get('tpl_tplset'); + $last_module = $obj->get('tpl_module'); // // [Warning] Access to a private property of XCube_FormFile. From minahito @ users.sourceforge.jp Tue Jul 11 12:05:26 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 11 Jul 2006 12:05:26 +0900 Subject: [xoops-cvslog 3532] CVS update: xoops2jp/html/modules/legacyRender/admin/actions Message-ID: <20060711030526.90F042AC06E@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/actions/TplsetDeleteAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/actions/TplsetDeleteAction.class.php:1.1.2.2 xoops2jp/html/modules/legacyRender/admin/actions/TplsetDeleteAction.class.php:1.1.2.3 --- xoops2jp/html/modules/legacyRender/admin/actions/TplsetDeleteAction.class.php:1.1.2.2 Tue Mar 28 22:30:49 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/TplsetDeleteAction.class.php Tue Jul 11 12:05:26 2006 @@ -1,53 +1,25 @@ _setupActionForm(); - $this->_setupObject($controller); - - if ($this->mObject == null) { - return LEGACYRENDER_FRAME_VIEW_ERROR; - } - - $this->mActionForm->load($this->mObject); - - return LEGACYRENDER_FRAME_VIEW_INPUT; + return xoops_getrequest('tplset_id'); } - - function execute(&$controller,&$xoopsUser) - { - $this->_setupActionForm(); - $this->_setupObject($controller); - - if ($this->mObject == null) { - return LEGACYRENDER_FRAME_VIEW_ERROR; - } - - // - // If image is no, the data has to continue to keep his value. - // - $this->mActionForm->load($this->mObject); - - $this->mActionForm->fetch(); - $this->mActionForm->validate(); - - if($this->mActionForm->hasError()) - return LEGACYRENDER_FRAME_VIEW_INPUT; - - $this->mActionForm->update($this->mObject); - return $this->mObjectHandler->delete($this->mObject) ? LEGACYRENDER_FRAME_VIEW_SUCCESS - : LEGACYRENDER_FRAME_VIEW_ERROR; + function &_getHandler() + { + $handler = xoops_getmodulehandler('tplset'); + return $handler; } function _setupObject(&$controller) @@ -62,20 +34,9 @@ } } - function &_getHandler() - { - $handler = xoops_getmodulehandler('tplset'); - return $handler; - } - - function _getId() - { - return isset($_REQUEST['tplset_id']) ? intval($_REQUEST['tplset_id']) : 0; - } - function _setupActionForm() { - $this->mActionForm =& new TplsetDeleteForm(); + $this->mActionForm =& new LegacyRender_TplsetDeleteForm(); $this->mActionForm->prepare(); } @@ -88,13 +49,17 @@ function executeViewSuccess(&$controller, &$xoopsUser, &$render) { - header("location: ./index.php?action=TplsetList"); - exit(); + $controller->executeForward("./index.php?action=TplsetList"); } function executeViewError(&$controller, &$xoopsUser, &$render) { - redirect_header("./index.php?action=TplsetList", 1, _AD_LEGACYRENDER_ERROR_DBUPDATE_FAILED); + $controller->executeRedirect("./index.php?action=TplsetList", 1, _AD_LEGACYRENDER_ERROR_DBUPDATE_FAILED); + } + + function executeViewCancel(&$controller, &$xoopsUser, &$render) + { + $controller->executeForward("./index.php?action=TplsetList"); } } From minahito @ users.sourceforge.jp Tue Jul 11 12:05:43 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 11 Jul 2006 12:05:43 +0900 Subject: [xoops-cvslog 3533] CVS update: xoops2jp/html/modules/legacyRender/admin/actions Message-ID: <20060711030543.443D02AC06E@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/actions/TplsetDownloadAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/actions/TplsetDownloadAction.class.php:1.1.2.1 xoops2jp/html/modules/legacyRender/admin/actions/TplsetDownloadAction.class.php:1.1.2.2 --- xoops2jp/html/modules/legacyRender/admin/actions/TplsetDownloadAction.class.php:1.1.2.1 Thu May 18 12:04:07 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/TplsetDownloadAction.class.php Tue Jul 11 12:05:43 2006 @@ -1,4 +1,8 @@ " . "\n" . "" . "\n" . - " " . $this->mTplset->getVar('tplset_name') . "" . "\n" . - " " . $this->mTplset->getVar('tplset_created') . "" . "\n" . - " " . $this->mTplset->getVar('tplset_credits') . "" . "\n" . + " " . $this->mTplset->getShow('tplset_name') . "" . "\n" . + " " . $this->mTplset->getShow('tplset_created') . "" . "\n" . + " " . $this->mTplset->getShow('tplset_credits') . "" . "\n" . " " . XOOPS_VERSION. "" . "\n"; $handler =& xoops_getmodulehandler('tplfile'); @@ -72,20 +76,20 @@ if ($files[$i]->Source != null) { $type = null; if ($files[$i]->get('tpl_type') == 'block') { - $path = $this->mTplset->getVar('tplset_name') . '/templates/' . $files[$i]->getVar('tpl_module') . "/blocks/" . $files[$i]->getVar('tpl_file'); + $path = $this->mTplset->getShow('tplset_name') . '/templates/' . $files[$i]->getShow('tpl_module') . "/blocks/" . $files[$i]->getShow('tpl_file'); $type = "block"; } elseif ($files[$i]->get('tpl_type') == 'module') { - $path = $this->mTplset->getVar('tplset_name') . '/templates/' . $files[$i]->getVar('tpl_module') . "/" . $files[$i]->getVar('tpl_file'); + $path = $this->mTplset->getShow('tplset_name') . '/templates/' . $files[$i]->getShow('tpl_module') . "/" . $files[$i]->getShow('tpl_file'); $type = "module"; } - $xml .= '