From: <tr...@us...> - 2012-12-05 19:25:13
|
Revision: 10321 http://sourceforge.net/p/xoops/svn/10321 Author: trabis Date: 2012-12-05 19:25:07 +0000 (Wed, 05 Dec 2012) Log Message: ----------- XoopsThemeForm::render method should allways return content. While display should display it. I also changed xoopsModulesAdmin to follow this logic. It is important to be consistent. Several modules/templates were updated Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/themeform.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/admin/about.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/admin/avatar_custom.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/admin/avatar_system.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/admin/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/templates/admin/avatars_custom.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/templates/admin/avatars_system.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/admin/about.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/admin/banners.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/admin/clients.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/admin/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/admin/banners_admin_banners.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/admin/banners_admin_clients.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/banners_client.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/admin/about.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/admin/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/admin/send_mails.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/templates/admin/mailusers_send_mail.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/about.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/center.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/dump.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/templates/admin/maintenance_center.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/templates/admin/maintenance_dump.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/page/admin/about.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/page/admin/content.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/page/admin/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/page/admin/permissions.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/page/admin/related.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/page/header.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/page/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/page/print.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/page/rating.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/page/templates/admin/page_admin_content.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/page/templates/admin/page_admin_related.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/page/viewpage.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/pm/admin/about.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/pm/admin/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/pm/admin/prune.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/about.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/category.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/field.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/permissions.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/step.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/user.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/visibility.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/templates/admin/categorylist.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/templates/admin/fieldlist.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/templates/admin/steplist.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/admin/about.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/admin/center.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/admin/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/admin/prefix_manager.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/about.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/smilies.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/templates/admin/smilies_smilies.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/blocksadmin/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/comments/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/groups/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/images/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/preferences/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/tplsets/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/users/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/imagecat.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_blocks.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_blocks_item.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_comments.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_extensions.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_groups.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_preferences.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_users.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/testform.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/userrank/admin/about.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/userrank/admin/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/userrank/admin/userrank.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/userrank/templates/admin/userrank.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/admin/about.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/admin/footer.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/admin/header.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/admin/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/form/captcha.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/form/image.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/form/recaptcha.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/form/text.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/admin/about.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/admin/footer.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/admin/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/class/form/language.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php 2012-12-05 19:21:45 UTC (rev 10320) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php 2012-12-05 19:25:07 UTC (rev 10321) @@ -24,51 +24,63 @@ { /** * Set module directory + * * @var string */ public $_tplModule = 'system'; /** * Template call for each render parts + * * @var array */ - public $_tplFile = array('index' => 'admin_index.html', 'about' => 'admin_about.html', 'infobox' => 'admin_infobox.html', 'bread' => 'admin_breadcrumb.html', 'button' => 'admin_buttons.html', 'tips' => 'admin_tips.html', 'nav' => 'admin_navigation.html'); + public $_tplFile = array( + 'index' => 'admin_index.html', 'about' => 'admin_about.html', 'infobox' => 'admin_infobox.html', + 'bread' => 'admin_breadcrumb.html', 'button' => 'admin_buttons.html', 'tips' => 'admin_tips.html', + 'nav' => 'admin_navigation.html' + ); /** * Tips to display in admin page + * * @var string */ private $_tips = ''; /** * List of button + * * @var array */ private $_itemButton = array(); /** * List of Info Box + * * @var array */ private $_itemInfoBox = array(); /** * List of line of an Info Box + * * @var array */ private $_itemConfigBoxLine = array(); /** * Breadcrumb data + * * @var array */ private $_bread = array(); /** * Current module object - * @var #P#M#C\Xoops.getInstance.module|array|? + * + * @var XoopsModule $_obj */ - private $_obj = array(); + private $_obj = null; /** * Constructor @@ -82,31 +94,31 @@ /** * Add breadcrumb menu + * * @param string $title * @param string $link - * @param bool $home + * @param bool $home */ public function addBreadcrumbLink($title = '', $link = '', $home = false) { if ($title != '') { $this->_bread[] = array( - 'link' => $link, - 'title' => $title, - 'home' => $home + 'link' => $link, 'title' => $title, 'home' => $home ); } } /** * Add config line + * * @param string $value * @param string $type + * * @return bool */ public function addConfigBoxLine($value = '', $type = 'default') { - switch ($type) - { + switch ($type) { default: case "default": $this->_itemConfigBoxLine[] = array('type' => $type, 'text' => $value); @@ -114,22 +126,32 @@ case "folder": if (!is_dir($value)) { - $this->_itemConfigBoxLine[] = array('type' => 'error', 'text' => sprintf(_AM_MODULEADMIN_CONFIG_FOLDERKO, $value)); + $this->_itemConfigBoxLine[] = array( + 'type' => 'error', 'text' => sprintf(_AM_MODULEADMIN_CONFIG_FOLDERKO, $value) + ); } else { - $this->_itemConfigBoxLine[] = array('type' => 'accept', 'text' => sprintf(_AM_MODULEADMIN_CONFIG_FOLDEROK, $value)); + $this->_itemConfigBoxLine[] = array( + 'type' => 'accept', 'text' => sprintf(_AM_MODULEADMIN_CONFIG_FOLDEROK, $value) + ); } break; case "chmod": if (is_dir($value[0])) { if (substr(decoct(fileperms($value[0])), 2) != $value[1]) { - $this->_itemConfigBoxLine[] = array('type' => 'error', 'text' => sprintf(_AM_MODULEADMIN_CONFIG_CHMOD, $value[0], $value[1], substr(decoct(fileperms($value[0])), 2))); + $this->_itemConfigBoxLine[] = array( + 'type' => 'error', + 'text' => sprintf(_AM_MODULEADMIN_CONFIG_CHMOD, $value[0], $value[1], substr(decoct(fileperms($value[0])), 2)) + ); } else { - $this->_itemConfigBoxLine[] = array('type' => 'accept', 'text' => sprintf(_AM_MODULEADMIN_CONFIG_CHMOD, $value[0], $value[1], substr(decoct(fileperms($value[0])), 2))); + $this->_itemConfigBoxLine[] = array( + 'type' => 'accept', + 'text' => sprintf(_AM_MODULEADMIN_CONFIG_CHMOD, $value[0], $value[1], substr(decoct(fileperms($value[0])), 2)) + ); } } break; - + case "extension": $xoops = Xoops::getInstance(); if (is_array($value)) { @@ -140,9 +162,13 @@ $type = 'error'; } if ($xoops->isActiveModule($text) == false) { - $this->_itemConfigBoxLine[] = array('type' => $type, 'text' => sprintf(_AM_MODULEADMIN_CONFIG_EXTENSIONKO, $text)); + $this->_itemConfigBoxLine[] = array( + 'type' => $type, 'text' => sprintf(_AM_MODULEADMIN_CONFIG_EXTENSIONKO, $text) + ); } else { - $this->_itemConfigBoxLine[] = array('type' => 'accept', 'text' => sprintf(_AM_MODULEADMIN_CONFIG_EXTENSIONOK, $text)); + $this->_itemConfigBoxLine[] = array( + 'type' => 'accept', 'text' => sprintf(_AM_MODULEADMIN_CONFIG_EXTENSIONOK, $text) + ); } break; @@ -156,9 +182,13 @@ $type = 'error'; } if ($xoops->isActiveModule($text) == false) { - $this->_itemConfigBoxLine[] = array('type' => $type, 'text' => sprintf(_AM_MODULEADMIN_CONFIG_MODULEKO, $text)); + $this->_itemConfigBoxLine[] = array( + 'type' => $type, 'text' => sprintf(_AM_MODULEADMIN_CONFIG_MODULEKO, $text) + ); } else { - $this->_itemConfigBoxLine[] = array('type' => 'accept', 'text' => sprintf(_AM_MODULEADMIN_CONFIG_MODULEOK, $text)); + $this->_itemConfigBoxLine[] = array( + 'type' => 'accept', 'text' => sprintf(_AM_MODULEADMIN_CONFIG_MODULEOK, $text) + ); } break; } @@ -167,9 +197,11 @@ /** * Add Info box - * @param $title + * + * @param $title * @param string $type * @param string $extra + * * @return bool */ public function addInfoBox($title, $type = 'default', $extra = '') @@ -183,9 +215,11 @@ /** * Add line to the info box + * * @param string $text * @param string $type * @param string $color + * * @return bool */ public function addInfoBoxLine($text = '', $type = 'default', $color = 'inherit') @@ -199,17 +233,18 @@ $this->_itemInfoBox[$i]['line'][] = $ret; unset($ret); } - } return true; } /** * Add Item button - * @param $title - * @param $link + * + * @param $title + * @param $link * @param string $icon * @param string $extra + * * @return bool */ public function addItemButton($title, $link, $icon = 'add', $extra = '') @@ -224,6 +259,7 @@ /** * Add a tips + * * @param string $text */ public function addTips($text = '') @@ -233,7 +269,9 @@ /** * Construct template path + * * @param string $type + * * @return string */ private function getTplPath($type = '') @@ -244,44 +282,57 @@ public function renderBreadcrumb() { $xoops = Xoops::getInstance(); - $xoops->tpl->assign('xo_admin_breadcrumb', $this->_bread); - //$xoops->tpl->assign('xo_admin_help', $this->_help); - if ($xoops->tpl_name == '') { - $xoops->tpl->display($this->getTplPath('bread')); - } + return $xoops->tpl->fetch($this->getTplPath('bread')); } + public function displayBreadcrumb() + { + echo $this->renderBreadcrumb(); + } + /** * Render all items buttons + * * @param string $position - * @param string $delimeter + * @param string $delimiter + * * @return string */ - public function renderButton($position = "floatright", $delimeter = " ") + public function renderButton($position = "floatright", $delimiter = " ") { $xoops = Xoops::getInstance(); $xoops->tpl->assign('xo_admin_buttons_position', $position); - $xoops->tpl->assign('xo_admin_buttons_delim', $delimeter); + $xoops->tpl->assign('xo_admin_buttons_delim', $delimiter); $xoops->tpl->assign('xo_admin_buttons', $this->_itemButton); - if ($xoops->tpl_name == '') { - $xoops->tpl->display($this->getTplPath('button')); - } + return $xoops->tpl->fetch($this->getTplPath('button')); } /** + * @param string $position + * @param string $delimiter + */ + public function displayButton($position = "floatright", $delimiter = " ") + { + echo $this->renderButton($position, $delimiter); + } + + /** * Render InfoBox */ public function renderInfoBox() { $xoops = Xoops::getInstance(); $xoops->tpl->assign('xo_admin_box', $this->_itemInfoBox); - if ($xoops->tpl_name == '') { - $xoops->tpl->display($this->getTplPath('infobox')); - } + return $xoops->tpl->fetch($this->getTplPath('infobox')); } + public function displayInfoBox() + { + echo $this->renderInfoBox(); + } + /** * Render index page for admin */ @@ -290,7 +341,7 @@ $xoops = Xoops::getInstance(); $this->_obj->loadAdminMenu(); foreach (array_keys($this->_obj->adminmenu) as $i) { - if ( file_exists($xoops->path("/media/xoops/images/icons/32/" . $this->_obj->adminmenu[$i]['icon']) ) ) { + if (file_exists($xoops->path("/media/xoops/images/icons/32/" . $this->_obj->adminmenu[$i]['icon']))) { $this->_obj->adminmenu[$i]['icon'] = $xoops->url("/media/xoops/images/icons/32/" . $this->_obj->adminmenu[$i]['icon']); } else { $this->_obj->adminmenu[$i]['icon'] = $xoops->url("/modules/" . $xoops->module->dirname() . "/icons/32/" . $this->_obj->adminmenu[$i]['icon']); @@ -327,7 +378,6 @@ $dbCurrentVersion = mysqli_get_server_info(); break; case "pdo": - global $xoopsDB; $dbCurrentVersion = $xoops->db->getAttribute(PDO::ATTR_SERVER_VERSION); break; default: @@ -367,50 +417,73 @@ } $xoops->tpl->assign('xo_admin_index_config', $this->_itemConfigBoxLine); } - $xoops->tpl->display($this->getTplPath('index')); + return $xoops->tpl->fetch($this->getTplPath('index')); } + public function displayIndex() + { + echo $this->renderIndex(); + } + /** * Render navigation to admin page + * * @param string $menu + * + * @return array */ - function renderNavigation($menu = '') + public function renderNavigation($menu = '') { $xoops = Xoops::getInstance(); + $ret = array(); $this->_obj->loadAdminMenu(); foreach (array_keys($this->_obj->adminmenu) as $i) { if ($this->_obj->adminmenu[$i]['link'] == "admin/" . $menu) { - if ( file_exists($xoops->path("/media/xoops/images/icons/32/" . $this->_obj->adminmenu[$i]['icon']) ) ) { + if (file_exists($xoops->path("/media/xoops/images/icons/32/" . $this->_obj->adminmenu[$i]['icon']))) { $this->_obj->adminmenu[$i]['icon'] = $xoops->url("/media/xoops/images/icons/32/" . $this->_obj->adminmenu[$i]['icon']); } else { $this->_obj->adminmenu[$i]['icon'] = $xoops->url("/modules/" . $xoops->module->dirname() . "/icons/32/" . $this->_obj->adminmenu[$i]['icon']); } $xoops->tpl->assign('xo_sys_navigation', $this->_obj->adminmenu[$i]); - if ($xoops->tpl_name == '') { - $xoops->tpl->display($this->getTplPath('nav')); - } + $ret[] = $xoops->tpl->fetch($this->getTplPath('nav')); } } + return $ret; } /** + * @param string $menu + */ + public function displayNavigation($menu = '') + { + $items = $this->renderNavigation($menu); + foreach ($items as $item) { + echo $item; + } + } + + /** * Render tips to admin page */ public function renderTips() { $xoops = Xoops::getInstance(); - $xoops->tpl->assign('xo_admin_tips', $this->_tips); - if ($xoops->tpl_name == '') { - $xoops->tpl->display($this->getTplPath('tips')); - } + return $xoops->tpl->fetch($this->getTplPath('tips')); } + public function displayTips() + { + echo $this->renderTips(); + } + /** * Render about page - * @param string $paypal + * * @param bool $logo_xoops + * + * @return bool|mixed|string */ public function renderAbout($logo_xoops = true) { @@ -431,11 +504,11 @@ } } $changelog = ''; - $language = $GLOBALS['xoopsConfig']['language']; + $language = $xoops->getConfig('language'); if (!is_file(XOOPS_ROOT_PATH . "/modules/" . $this->_obj->getVar("dirname") . "/language/" . $language . "/changelog.txt")) { $language = 'english'; } - $language = empty($language) ? $GLOBALS['xoopsConfig']['language'] : $language; + $language = empty($language) ? $xoops->getConfig('language') : $language; $file = XOOPS_ROOT_PATH . "/modules/" . $this->_obj->getVar("dirname") . "/language/" . $language . "/changelog.txt"; if (is_readable($file)) { $changelog = utf8_encode(implode("<br />", file($file))) . "\n"; @@ -449,8 +522,8 @@ $this->_obj->setInfo('release_date', $release_date); $this->_obj->setInfo('author_list', $author_list); - if (is_array($this->_obj->getInfo('paypal'))) { - $this->_obj->setInfo('paypal', $this->_obj->getInfo('paypal')); + if (is_array($this->_obj->getInfo('paypal'))) { + $this->_obj->setInfo('paypal', $this->_obj->getInfo('paypal')); } $this->_obj->setInfo('changelog', $changelog); $xoops->tpl->assign('module', $this->_obj); @@ -463,6 +536,14 @@ $xoops->tpl->assign('xoops_logo', $logo_xoops); $xoops->tpl->assign('xo_admin_box', $this->_itemInfoBox); - $xoops->tpl->display($this->getTplPath('about')); + return $xoops->tpl->fetch($this->getTplPath('about')); } + + /** + * @param bool $logo_xoops + */ + public function displayAbout($logo_xoops = true) + { + echo $this->renderAbout($logo_xoops); + } } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/themeform.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/themeform.php 2012-12-05 19:21:45 UTC (rev 10320) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/themeform.php 2012-12-05 19:25:07 UTC (rev 10321) @@ -52,9 +52,8 @@ /** * create HTML to output the form as a theme-enabled table with validation. - * @param bool $template */ - public function render($template = true) + public function render() { $xoops = Xoops::getInstance(); $xoops->theme->addStylesheet('media/xoops/css/form.css'); @@ -98,13 +97,13 @@ } else { $hidden .= $ele->render(). NWLINE; } - + } $xoops->tpl->assign('hidden', $hidden); $xoops->tpl->assign('validationJS', $this->renderValidationJS(true)); - if ($xoops->tpl_name == '' || $template == false) { - $xoops->tpl->display('module:system|system_form.html'); - $xoops->tpl->clear_assign('xo_input'); - } + $ret = $xoops->tpl->fetch('module:system|system_form.html'); + $xoops->tpl->clear_assign('xo_input'); + return $ret; + } } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/admin/about.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/admin/about.php 2012-12-05 19:21:45 UTC (rev 10320) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/admin/about.php 2012-12-05 19:25:07 UTC (rev 10321) @@ -20,8 +20,9 @@ * @version $Id$ */ include dirname(__FILE__) . '/header.php'; +$xoops = Xoops::getInstance(); $xoops->header(); $aboutAdmin = new XoopsModuleAdmin(); -$aboutAdmin->renderNavigation('about.php'); -$aboutAdmin->renderabout('6KJ7RW5DR3VTJ', true); +$aboutAdmin->displayNavigation('about.php'); +$aboutAdmin->displayAbout('6KJ7RW5DR3VTJ', true); $xoops->footer(); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/admin/avatar_custom.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/admin/avatar_custom.php 2012-12-05 19:21:45 UTC (rev 10320) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/admin/avatar_custom.php 2012-12-05 19:25:07 UTC (rev 10321) @@ -22,10 +22,8 @@ include dirname(__FILE__) . '/header.php'; // Get main instance $system = System::getInstance(); -// Check users rights -if (!$xoops->isUser() || !$xoops->isModule() || !$xoops->user->isAdmin($xoops->module->mid())) { - exit(_NOPERM); -} +$xoops = Xoops::getInstance(); + // Parameters $nb_avatars = $xoops->getModuleConfig('avatars_pager'); $mimetypes = array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png', 'image/png'); @@ -53,6 +51,7 @@ $admin_page->addTips(_AM_AVATARS_CUSTOM_TIPS); $admin_page->renderTips(); + // Get start pager $start = $system->cleanVars($_REQUEST, 'start', 0, 'int'); // Filter avatars Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/admin/avatar_system.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/admin/avatar_system.php 2012-12-05 19:21:45 UTC (rev 10320) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/admin/avatar_system.php 2012-12-05 19:25:07 UTC (rev 10321) @@ -22,10 +22,7 @@ include dirname(__FILE__) . '/header.php'; // Get main instance $system = System::getInstance(); -// Check users rights -if (!$xoops->isUser() || !$xoops->isModule() || !$xoops->user->isAdmin($xoops->module->mid())) { - exit(_NOPERM); -} +$xoops = Xoops::getInstance(); // Parameters $nb_avatars = $xoops->getModuleConfig('avatars_pager'); $mimetypes = array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png', 'image/png'); @@ -92,8 +89,7 @@ $obj = $avatar_Handler->create(); $form = $xoops->getModuleForm($obj, 'avatar'); // Assign form - $form->render(); - $xoops->tpl->assign('form', true); + $xoops->tpl->assign('form', $form->render()); break; // Edit @@ -107,8 +103,7 @@ $obj = $avatar_Handler->get($system->cleanVars($_REQUEST, 'avatar_id', 0, 'int')); $form = $xoops->getModuleForm($obj, 'avatar'); // Assign form - $form->render(); - $xoops->tpl->assign('form', true); + $xoops->tpl->assign('form', $form->render()); break; // Save @@ -146,8 +141,7 @@ } $xoops->error($obj->getHtmlErrors()); $form = $xoops->getModuleForm($obj, 'avatar'); - $form->render(); - $xoops->tpl->assign('form', true); + $xoops->tpl->assign('form', $form->render()); break; //Delete Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/admin/index.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/admin/index.php 2012-12-05 19:21:45 UTC (rev 10320) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/admin/index.php 2012-12-05 19:25:07 UTC (rev 10321) @@ -21,6 +21,7 @@ */ include dirname(__FILE__) . '/header.php'; // Get avatars handler +$xoops = Xoops::getInstance(); $avatar_Handler = $xoops->getHandlerAvatar(); $xoops->header(); @@ -67,6 +68,6 @@ $admin_page->addConfigBoxLine($folder_path, 'folder'); $admin_page->addConfigBoxLine(array($folder_path, '777'), 'chmod'); -$admin_page->renderIndex(); +$admin_page->displayIndex(); $xoops->footer(); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/templates/admin/avatars_custom.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/templates/admin/avatars_custom.html 2012-12-05 19:21:45 UTC (rev 10320) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/templates/admin/avatars_custom.html 2012-12-05 19:25:07 UTC (rev 10321) @@ -46,6 +46,4 @@ </div> <{/if}> <!-- Display Avatar form (add,edit) --> -<{if $form}> -<div class="spacer"><{$form}></div> -<{/if}> \ No newline at end of file +<{$form}> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/templates/admin/avatars_system.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/templates/admin/avatars_system.html 2012-12-05 19:21:45 UTC (rev 10320) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/templates/admin/avatars_system.html 2012-12-05 19:25:07 UTC (rev 10321) @@ -44,6 +44,4 @@ </div> <{/if}> <!-- Display Avatar form (add,edit) --> -<{if $form}> -<{includeq file="module:system|system_form.html"}> -<{/if}> \ No newline at end of file +<{$form}> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/admin/about.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/admin/about.php 2012-12-05 19:21:45 UTC (rev 10320) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/admin/about.php 2012-12-05 19:25:07 UTC (rev 10321) @@ -20,8 +20,9 @@ * @version $Id$ */ include dirname(__FILE__) . '/header.php'; +$xoops = Xoops::getInstance(); $xoops->header(); $aboutAdmin = new XoopsModuleAdmin(); -$aboutAdmin->renderNavigation('about.php'); -$aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', true); +$aboutAdmin->displayNavigation('about.php'); +$aboutAdmin->displayAbout('6KJ7RW5DR3VTJ', true); $xoops->footer(); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/admin/banners.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/admin/banners.php 2012-12-05 19:21:45 UTC (rev 10320) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/admin/banners.php 2012-12-05 19:25:07 UTC (rev 10321) @@ -22,10 +22,7 @@ include dirname(__FILE__) . '/header.php'; // Get main instance $system = System::getInstance(); -// Check users rights -if (!$xoops->isUser() || !$xoops->isModule() || !$xoops->user->isAdmin($xoops->module->mid())) { - exit(_NOPERM); -} +$xoops = Xoops::getInstance(); // Parameters $nb_banners = $xoops->getModuleConfig('banners_pager'); $mimetypes = array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png', 'image/png', 'application/x-shockwave-flash'); @@ -200,8 +197,7 @@ $admin_page->renderButton(); $obj = $banner_Handler->create(); $form = $xoops->getModuleForm($obj, 'banner'); - $form->render(); - $xoops->tpl->assign('form', true); + $xoops->tpl->assign('form', $form->render()); break; case 'edit': @@ -213,8 +209,7 @@ if ($bid > 0) { $obj = $banner_Handler->get($bid); $form = $xoops->getModuleForm($obj, 'banner'); - $form->render(); - $xoops->tpl->assign('form', true); + $xoops->tpl->assign('form', $form->render()); } else { $xoops->redirect('banners.php', 1, _AM_SYSTEM_DBERROR); } @@ -264,8 +259,7 @@ } $xoops->error($obj->getHtmlErrors()); $form = $xoops->getModuleForm($obj, 'banner'); - $form->render(); - $xoops->tpl->assign('form', true); + $xoops->tpl->assign('form', $form->render()); break; case 'delete': @@ -330,5 +324,5 @@ } $xoops->error($obj->getHtmlErrors()); break; -} +} $xoops->footer(); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/admin/clients.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/admin/clients.php 2012-12-05 19:21:45 UTC (rev 10320) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/admin/clients.php 2012-12-05 19:25:07 UTC (rev 10321) @@ -21,15 +21,13 @@ */ include dirname(__FILE__) . '/header.php'; -// Get main instance +// Get main instance $system = System::getInstance(); -// Check users rights -if (!$xoops->isUser() || !$xoops->isModule() || !$xoops->user->isAdmin($xoops->module->mid())) { - exit(_NOPERM); -} +$xoops = Xoops::getInstance(); + // Parameters $nb_clients = $xoops->getModuleConfig('banners_clientspager'); -// Get Action type +// Get Action type $op = $system->cleanVars($_REQUEST, 'op', 'default', 'string'); // Get banners handler $banner_Handler = $xoops->getModuleHandler('banner'); @@ -114,8 +112,7 @@ $admin_page->renderButton(); $obj = $client_Handler->create(); $form = $xoops->getModuleForm($obj, 'bannerclient'); - $form->render(); - $xoops->tpl->assign('form', true); + $xoops->tpl->assign('form', $form->render()); break; case 'edit': @@ -127,8 +124,7 @@ if ($cid > 0) { $obj = $client_Handler->get($cid); $form = $xoops->getModuleForm($obj, 'bannerclient'); - $form->render(); - $xoops->tpl->assign('form', true); + $xoops->tpl->assign('form', $form->render()); } else { $xoops->redirect('clients.php', 1, _AM_SYSTEM_DBERROR); } @@ -156,8 +152,7 @@ } $xoops->error($obj->getHtmlErrors()); $form = $xoops->getModuleForm($obj, 'bannerclient'); - $form->render(); - $xoops->tpl->assign('form', true); + $xoops->tpl->assign('form', $form->render()); break; case 'delete': @@ -201,5 +196,5 @@ $xoops->redirect('clients.php', 1, _AM_SYSTEM_DBERROR); } break; -} +} $xoops->footer(); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/admin/index.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/admin/index.php 2012-12-05 19:21:45 UTC (rev 10320) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/admin/index.php 2012-12-05 19:25:07 UTC (rev 10321) @@ -20,19 +20,20 @@ * @version $Id$ */ include dirname(__FILE__) . '/header.php'; +$xoops = Xoops::getInstance(); // Get banners handler $banner_Handler = $xoops->getModuleHandler('banner'); -$client_Handler = $xoops->getModuleHandler('bannerclient'); +$client_Handler = $xoops->getModuleHandler('bannerclient'); // heaser $xoops->header(); // banners $criteria = new CriteriaCompo(); $criteria->add(new Criteria('status', 0, '!=')); $banners_banner = $banner_Handler->getCount($criteria); -// banner clients +// banner clients $criteria = new CriteriaCompo(); $banners_client = $client_Handler->getCount($criteria); -// banner finish +// banner finish $criteria = new CriteriaCompo(); $criteria->add(new Criteria('status', 0)); $banners_finish = $banner_Handler->getCount($criteria); @@ -46,6 +47,6 @@ $admin_page->addInfoBoxLine(sprintf(_AM_BANNERS_INDEX_NBFINISH, '<span class="red">' . $banners_finish . '</span>')); $admin_page->addConfigBoxLine($folder_path, 'folder'); $admin_page->addConfigBoxLine(array($folder_path, '777'), 'chmod'); -$admin_page->renderNavigation('index.php'); -$admin_page->renderIndex(); +$admin_page->displayNavigation('index.php'); +$admin_page->displayIndex(); $xoops->footer(); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/index.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/index.php 2012-12-05 19:21:45 UTC (rev 10320) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/index.php 2012-12-05 19:25:07 UTC (rev 10321) @@ -42,7 +42,7 @@ default: $access = false; $admin = false; - if (is_object($xoops->user)) { + if ($xoops->isUser()) { $uid = $xoops->user->getVar('uid'); } else { $uid = 0; @@ -56,7 +56,7 @@ if ($client_count != 0) { $access = true; } - if (is_object($xoopsUser) && $xoopsUser->isAdmin($xoopsModule->mid())) { + if ($xoops->userIsAdmin) { $access = true; $admin = true; } @@ -238,7 +238,7 @@ case 'edit': $access = false; $admin = false; - if (is_object($xoops->user)) { + if ($xoops->isUser()) { $uid = $xoops->user->getVar('uid'); } else { $uid = 0; @@ -252,7 +252,7 @@ if ($client_count != 0) { $access = true; } - if (is_object($xoopsUser) && $xoopsUser->isAdmin($xoopsModule->mid())) { + if ($xoops->userIsAdmin) { $access = true; $admin = true; } @@ -269,8 +269,7 @@ $form->addElement(new XoopsFormHidden('op', 'save')); $form->addElement(new XoopsFormHidden('bid', $obj->getVar('bid'))); $form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit')); - $form->render(); - $xoops->tpl->assign('form', true); + $xoops->tpl->assign('form', $form->render()); $xoops->footer(); } else { $xoops->redirect(XOOPS_URL, 1, _MD_BANNERS_INDEX_DBERROR); @@ -280,7 +279,7 @@ case 'save': $access = true; $admin = false; - if (is_object($xoops->user)) { + if ($xoops->isUser()) { $uid = $xoops->user->getVar('uid'); } else { $uid = 0; @@ -288,7 +287,7 @@ if ($uid == 0) { $access = false; } - if (is_object($xoopsUser) && $xoopsUser->isAdmin($xoopsModule->mid())) { + if ($xoops->userIsAdmin) { $access = true; $admin = true; } @@ -324,7 +323,7 @@ case 'EmailStats': $access = true; $admin = false; - if (is_object($xoops->user)) { + if ($xoops->isUser()) { $uid = $xoops->user->getVar('uid'); } else { $uid = 0; @@ -332,7 +331,7 @@ if ($uid == 0) { $access = false; } - if (is_object($xoopsUser) && $xoopsUser->isAdmin($xoopsModule->mid())) { + if ($xoops->userIsAdmin) { $access = true; $admin = true; } @@ -397,7 +396,7 @@ if ($banner) { if ($xoops->security->checkReferer()) { $banner->setVar('clicks', $banner->getVar('clicks') + 1); - $xoops->getHandlerBanner()->insert($banner); + $banner_Handler->insert($banner); header('Location: ' . $banner->getVar('clickurl')); exit(); } else { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/admin/banners_admin_banners.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/admin/banners_admin_banners.html 2012-12-05 19:21:45 UTC (rev 10320) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/admin/banners_admin_banners.html 2012-12-05 19:25:07 UTC (rev 10321) @@ -100,6 +100,4 @@ <!--Pop-pup--> <{/if}> <!-- Display form (add,edit) --> -<{if $form}> -<{includeq file="module:system|system_form.html"}> -<{/if}> \ No newline at end of file +<{$form}> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/admin/banners_admin_clients.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/admin/banners_admin_clients.html 2012-12-05 19:21:45 UTC (rev 10320) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/admin/banners_admin_clients.html 2012-12-05 19:25:07 UTC (rev 10321) @@ -8,9 +8,9 @@ <tr> <th class="txtcenter width15"><{$smarty.const._AM_BANNERS_CLIENTS_NAME}></th> <th class="txtcenter width15"><{$smarty.const._AM_BANNERS_CLIENTS_UNAME}></th> - <th class="txtcenter width10"><{$smarty.const._AM_BANNERS_CLIENTS_ACTIVEBANNERS}></th> + <th class="txtcenter width10"><{$smarty.const._AM_BANNERS_CLIENTS_ACTIVEBANNERS}></th> <th class="txtcenter"><{$smarty.const._AM_BANNERS_CLIENTS_MAIL}></th> - <th class="txtcenter width10"><{$smarty.const._AM_BANNERS_ACTION}></th> + <th class="txtcenter width10"><{$smarty.const._AM_BANNERS_ACTION}></th> </tr> </thead> <tbody> @@ -22,7 +22,7 @@ <{else}> <td class="txtcenter"><a title="<{$client.uname}>" href="<{$xoops_url}>/userinfo.php?uid=<{$client.uid}>" ><{$client.uname}></a></td> <{/if}> - <td class="txtcenter"><{$client.banner_active}></td> + <td class="txtcenter"><{$client.banner_active}></td> <td class="txtcenter"><{$client.email}></td> <td class="xo-actions txtcenter"> <img onclick="display_dialog(<{$client.cid}>, true, true, 'slide', 'slide', 250, 400);" src="<{xoAdminIcons display.png}>" alt="<{$smarty.const._AM_BANNERS_VIEW}>" title="<{$smarty.const._AM_BANNERS_VIEW}>" /> @@ -75,6 +75,4 @@ <!--Pop-pup--> <{/if}> <!-- Display form (add,edit) --> -<{if $form}> -<{includeq file="module:system|system_form.html"}> -<{/if}> +<{$form}> Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/banners_client.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/banners_client.html 2012-12-05 19:21:45 UTC (rev 10320) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/banners_client.html 2012-12-05 19:25:07 UTC (rev 10321) @@ -63,7 +63,7 @@ <th class="txtcenter"><{$smarty.const._AM_BANNERS_BANNERS_STARTDATE}></th> <th class="txtcenter"><{$smarty.const._AM_BANNERS_BANNERS_ENDDATE}></th> <th class="txtcenter width10"><{$smarty.const._AM_BANNERS_BANNERS_CLICKS}></th> - <th class="txtcenter width10"><{$smarty.const._AM_BANNERS_BANNERS_NCLICKS}></th> + <th class="txtcenter width10"><{$smarty.const._AM_BANNERS_BANNERS_NCLICKS}></th> <th class="txtcenter width10"><{$smarty.const._AM_BANNERS_ACTION}></th> </tr> </thead> @@ -108,6 +108,4 @@ <!--Pop-pup--> <{/if}> <!-- Display form (edit) --> -<{if $form}> -<{includeq file="module:system|system_form.html"}> -<{/if}> \ No newline at end of file +<{$form}> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/admin/about.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/admin/about.php 2012-12-05 19:21:45 UTC (rev 10320) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/admin/about.php 2012-12-05 19:25:07 UTC (rev 10321) @@ -20,8 +20,9 @@ * @version $Id$ */ include dirname(__FILE__) . '/header.php'; +$xoops = Xoops::getInstance(); $xoops->header(); $aboutAdmin = new XoopsModuleAdmin(); -$aboutAdmin->renderNavigation('about.php'); -$aboutAdmin->renderabout('6KJ7RW5DR3VTJ', true); +$aboutAdmin->displayNavigation('about.php'); +$aboutAdmin->displayAbout('6KJ7RW5DR3VTJ', true); $xoops->footer(); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/admin/index.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/admin/index.php 2012-12-05 19:21:45 UTC (rev 10320) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/admin/index.php 2012-12-05 19:25:07 UTC (rev 10321) @@ -22,17 +22,17 @@ include dirname(__FILE__) . '/header.php'; - +$xoops = Xoops::getInstance(); $xoops->header(); $admin_page = new XoopsModuleAdmin(); -$admin_page->renderNavigation('index.php'); +$admin_page->displayNavigation('index.php'); //global $xoopsModuleConfig; $xmcMailusers = $xoops->getModuleConfigs('mailusers'); $admin_page->addInfoBox(_MI_MAILUSERS_MAILUSER_MANAGER); - + $tplString = "%1\$s : <span class='red'>%2\$s</span>"; $admin_page->addInfoBoxLine(sprintf($tplString,_AM_MAILUSERS_MAILFROM,$xmcMailusers['from'])); @@ -41,7 +41,7 @@ $admin_page->addInfoBoxLine(sprintf($tplString,_AM_MAILUSERS_SMTPHOST, implode(';', $xmcMailusers['smtphost']))); $admin_page->addInfoBoxLine(sprintf($tplString,_AM_MAILUSERS_SMTPUSER,$xmcMailusers['smtpuser'])); -$admin_page->renderIndex(); +$admin_page->displayIndex(); $xoops->footer(); @@ -57,5 +57,5 @@ - - + + Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/admin/send_mails.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/admin/send_mails.php 2012-12-05 19:21:45 UTC (rev 10320) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/admin/send_mails.php 2012-12-05 19:25:07 UTC (rev 10321) @@ -20,16 +20,9 @@ * @version $Id$ */ -include_once ("header.php"); - -defined('XOOPS_ROOT_PATH') or die('Restricted access'); +include_once dirname(__FILE__) . '/header.php'; - -// Check users rights -if (!$xoops->isUser() || !$xoops->isModule() || !$xoops->user->isAdmin($xoops->module->mid())) { - exit(_NOPERM); -} - +$xoops = Xoops::getInstance(); // Parameters $limit = 100; // Get Action type @@ -54,7 +47,7 @@ case 'list': default: - $display_criteria = 1; + $display_criteria = 1; $form = new XoopsThemeForm(_AM_MAILUSERS_LIST, "mailusers", "send_mails.php", 'post', true); //---------------------------------------- if (!empty($_POST['memberslist_id'])) { @@ -106,7 +99,7 @@ $inactive_cbox = new XoopsFormCheckBox('', "mail_inactive"); $inactive_cbox->addOption(1, _AM_MAILUSERS_INACTIVE . '<span class="bold green">*</span>'); $inactive_cbox->setExtra("onclick='javascript:disableElement(\"mail_lastlog_min\");disableElement(\"mail_lastlog_max\");disableElement(\"mail_idle_more\");disableElement(\"mail_idle_less\");disableElement(\"mail_to_group[]\");'"); - + $criteria_tray = new XoopsFormElementTray(_AM_MAILUSERS_SENDTOUSERS, "<br /><br />"); $criteria_tray->setDescription('<span class="bold green">*</span>' . _AM_MAILUSERS_OPTIONAL); $criteria_tray->addElement($group_select); @@ -157,14 +150,12 @@ $form->addElement($submit_button); $form->setRequired($subject_text); $form->setRequired($body_text); - - $form->render(); - $xoops->tpl->assign('form', true); + $xoops->tpl->assign('form', $form->render()); break; // Send case 'send': - + if (!empty($_POST['mail_send_to'])) { $added = array(); $added_id = array(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/templates/admin/mailusers_send_mail.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/templates/admin/mailusers_send_mail.html 2012-12-05 19:21:45 UTC (rev 10320) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/templates/admin/mailusers_send_mail.html 2012-12-05 19:25:07 UTC (rev 10321) @@ -8,6 +8,4 @@ <{includeq file="admin:system|admin_tips.html"}> <{includeq file="admin:system|admin_buttons.html"}> -<{if $form}> -<{includeq file="module:system|system_form.html"}> -<{/if}> \ No newline at end of file +<{$form}> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/about.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/about.php 2012-12-05 19:21:45 UTC (rev 10320) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/about.php 2012-12-05 19:25:07 UTC (rev 10321) @@ -21,8 +21,9 @@ */ include dirname(__FILE__) . '/header.php'; +$xoops = Xoops::getInstance(); $xoops->header(); $aboutAdmin = new XoopsModuleAdmin(); -$aboutAdmin->renderNavigation('about.php'); -$aboutAdmin->renderabout('6KJ7RW5DR3VTJ', true); +$aboutAdmin->displayNavigation('about.php'); +$aboutAdmin->displayAbout('6KJ7RW5DR3VTJ', true); $xoops->footer(); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/center.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/center.php 2012-12-05 19:21:45 UTC (rev 10320) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/center.php 2012-12-05 19:25:07 UTC (rev 10321) @@ -23,11 +23,8 @@ include dirname(__FILE__) . '/header.php'; // Get main instance $system = System::getInstance(); -// Check users rights -if (!$xoops->isUser() || !$xoops->isModule() || !$xoops->user->isAdmin($xoops->module->mid())) { - exit(_NOPERM); -} -$system = System::getInstance(); +$xoops = Xoops::getInstance(); + // Get Action type $op = $system->cleanVars($_REQUEST, 'op', 'list', 'string'); @@ -46,7 +43,7 @@ $admin_page->renderTips(); $form = $xoops->getModuleForm(null, 'maintenance'); $form->getMaintenance(); - $form->render(); + $form->display(); break; case 'maintenance_save': @@ -59,7 +56,7 @@ $tables_op = $system->cleanVars($_REQUEST, 'maintenance', array(), 'array'); $db = XoopsDatabaseFactory::getDatabaseConnection(); //Cache - $res_cache = $system->CleanCache($cache); + $res_cache = $system->CleanCache($cache); if (!empty($cache)) { for ($i = 0; $i < count($cache); $i++) { switch ($cache[$i]) { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/dump.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/dump.php 2012-12-05 19:21:45 UTC (rev 10320) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/dump.php 2012-12-05 19:25:07 UTC (rev 10321) @@ -23,11 +23,8 @@ include dirname(__FILE__) . '/header.php'; // Get main instance $system = System::getInstance(); -// Check users rights -if (!$xoops->isUser() || !$xoops->isModule() || !$xoops->user->isAdmin($xoops->module->mid())) { - exit(_NOPERM); -} -$system = System::getInstance(); +$xoops = Xoops::getInstance(); + // Get Action type $op = $system->cleanVars($_REQUEST, 'op', 'list', 'string'); @@ -59,7 +56,7 @@ if ($count == 0 && $op == 'list') { $form = $xoops->getModuleForm(null, 'maintenance'); $form->getDump(); - $form->render(); + $form->display(); } else { $admin_page->addItemButton(_AM_MAINTENANCE_DUMP_FORM, 'dump.php?op=dump', 'cd'); $admin_page->renderButton(); @@ -158,7 +155,7 @@ case 'dump': $form = $xoops->getModuleForm(null, 'maintenance'); $form->getDump(); - $form->render(); + $form->display(); break; } $xoops->footer(); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/index.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/index.php 2012-12-05 19:21:45 UTC (rev 10320) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/index.php 2012-12-05 19:25:07 UTC (rev 10321) @@ -22,10 +22,11 @@ include dirname(__FILE__) . '/header.php'; +$xoops = Xoops::getInstance(); $xoops->header(); $admin_page = new XoopsModuleAdmin(); -$admin_page->renderNavigation('index.php'); +$admin_page->displayNavigation('index.php'); // folder path $folder_path = XOOPS_ROOT_PATH . '/modules/maintenance/dump'; @@ -42,5 +43,5 @@ $admin_page->addConfigBoxLine(array($folder_path, '777'), 'chmod'); $admin_page->addInfoBox(_MI_MAINTENANCE_DUMP); $admin_page->addInfoBoxLine(sprintf(_AM_MAINTENANCE_NBFILES, $count)); -$admin_page->renderIndex(); +$admin_page->displayIndex(); $xoops->footer(); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/templates/admin/maintenance_center.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/templates/admin/maintenance_center.html 2012-12-05 19:21:45 UTC (rev 10320) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/templates/admin/maintenance_center.html 2012-12-05 19:25:07 UTC (rev 10321) @@ -2,7 +2,7 @@ <{includeq file="admin:system|admin_tips.html"}> <{includeq file="admin:system|admin_buttons.html"}> <!-- Display form --> -<{includeq file="module:system|system_form.html"}> +<{$form}> <{if $smarty_cache || $smarty_compile || $xoops_cache || $session || $maintenance}> <div class="xo-moduleadmin-config outer"> Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/templates/admin/maintenance_dump.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/templates/admin/maintenance_dump.html 2012-12-05 19:21:45 UTC (rev 10320) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/templates/admin/maintenance_dump.html 2012-12-05 19:25:07 UTC (rev 10321) @@ -2,7 +2,7 @@ <{includeq file="admin:system|admin_tips.html"}> <{includeq file="admin:system|admin_buttons.html"}> <!-- Display form --> -<{includeq file="module:system|system_form.html"}> +<{$form}> <{if $result_m}> <table class="outer tablesorter"> Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/page/admin/about.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/page/admin/about.php 2012-12-05 19:21:45 UTC (rev 10320) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/page/admin/about.php 2012-12-05 19:25:07 UTC (rev 10321) @@ -20,8 +20,9 @@ * @version $Id$ */ include dirname(__FILE__) . '/header.php'; +$xoops = Xoops::getInstance(); $xoops->header(); $aboutAdmin = new XoopsModuleAdmin(); -$aboutAdmin->renderNavigation('about.php'); -$aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', true); +$aboutAdmin->displayNavigation('about.php'); +$aboutAdmin->displayAbout('6KJ7RW5DR3VTJ', true); $xoops->footer(); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/page/admin/content.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/page/admin/content.php 2012-12-05 19:21:45 UTC (rev 10320) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/page/admin/content.php 2012-12-05 19:25:07 UTC (rev 10321) @@ -22,10 +22,7 @@ include dirname(__FILE__) . '/header.php'; // Get main instance $system = System::getInstance(); -// Check users rights -if (!$xoops->isUser() || !$xoops->isModule() || !$xoops->user->isAdmin($xoops->module->mid())) { - exit(_NOPERM); -} +$xoops = Xoops::getInstance(); // Parameters $nb_content = $xoops->getModuleConfig('page_adminpager'); // Get Action type @@ -91,8 +88,7 @@ $admin_page->renderButton(); $obj = $content_Handler->create(); $form = $xoops->getModuleForm($obj, 'page_content'); - $form->render(); - $xoops->tpl->assign('form', true); + $xoops->tpl->assign('form', $form->render()); break; case 'edit': @@ -102,8 +98,7 @@ // Create form $obj = $content_Handler->get($system->cleanVars($_REQUEST, 'id', 0, 'int')); $form = $xoops->getModuleForm($obj, 'page_content'); - $form->render(); - $xoops->tpl->assign('form', true); + $xoops->tpl->assign('form', $form->render()); break; case 'save': @@ -201,13 +196,13 @@ $perm_id = isset($_REQUEST['content_id']) ? $content_id : $newcontent_id; $criteria = new CriteriaCompo(); $criteria->add(new Criteria('gperm_itemid', $perm_id, '=')); - $criteria->add(new Criteria('gperm_modid', $xoopsModule->getVar('mid'),'=')); + $criteria->add(new Criteria('gperm_modid', $xoops->module->getVar('mid'),'=')); $criteria->add(new Criteria('gperm_name', 'page_view_item', '=')); $gperm_handler->deleteAll($criteria); //permissions view if(isset($_POST['groups_view_item'])) { foreach($_POST['groups_view_item'] as $onegroup_id) { - $gperm_handler->addRight('page_view_item', $perm_id, $onegroup_id, $xoopsModule->getVar('mid')); + $gperm_handler->addRight('page_view_item', $perm_id, $onegroup_id, $xoops->module->getVar('mid')); } } $xoops->redirect("content.php", 2, _AM_PAGE_DBUPDATED); @@ -215,8 +210,7 @@ $xoops->error($obj->getHtmlErrors()); } $form = $xoops->getModuleForm($obj, 'page_content'); - $form->render(); - $xoops->tpl->assign('form', true); + $xoops->tpl->assign('form', $form->render()); break; case 'delete': @@ -236,7 +230,7 @@ // deleting permissions $criteria = new CriteriaCompo(); $criteria->add(new Criteria('gperm_itemid', $content_id, '=')); - $criteria->add(new Criteria('gperm_modid', $xoopsModule->getVar('mid'),'=')); + $criteria->add(new Criteria('gperm_modid', $xoops->module->getVar('mid'),'=')); $criteria->add(new Criteria('gperm_name', 'page_view_item', '=')); $gperm_handler->deleteAll($criteria); // deleting secondary @@ -339,7 +333,7 @@ $gperm_handler = $xoops->getHandler('groupperm'); $criteria = new CriteriaCompo(); $criteria->add(new Criteria('gperm_itemid', $content_id, '=')); - $criteria->add(new Criteria('gperm_modid', $xoopsModule->getVar('mid'),'=')); + $criteria->add(new Criteria('gperm_modid', $xoops->module->getVar('mid'),'=')); $criteria->add(new Criteria('gperm_name', 'page_view_item', '=')); $gperm_arr = $gperm_handler->getall($criteria); //permissions view Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/page/admin/index.php =================================================================== --- XoopsCore/branches/... [truncated message content] |