From: <tr...@us...> - 2011-11-13 18:55:55
|
Revision: 8284 http://xoops.svn.sourceforge.net/xoops/?rev=8284&view=rev Author: trabis Date: 2011-11-13 18:55:47 +0000 (Sun, 13 Nov 2011) Log Message: ----------- removing xoopsOpion from system files. Now using $xoTheme->header('templatenname'); Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/cp_functions.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/avatars/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/banners/main.php 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/mailusers/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/maintenance/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/modulesadmin/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/smilies/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/userrank/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/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/help.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/admin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/admin.php 2011-11-13 18:18:44 UTC (rev 8283) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/admin.php 2011-11-13 18:55:47 UTC (rev 8284) @@ -38,7 +38,7 @@ exit(); } -xoops_cp_header(); +$xoops->header(); // ###### Output warn messages for security ###### /** * Error warning messages @@ -135,4 +135,4 @@ echo $ret; } } -xoops_cp_footer(); \ No newline at end of file +$xoops->footer(); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/include/cp_functions.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/include/cp_functions.php 2011-11-13 18:18:44 UTC (rev 8283) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/include/cp_functions.php 2011-11-13 18:55:47 UTC (rev 8284) @@ -25,6 +25,7 @@ function xoops_cp_header() { $xoops = Xoops::getInstance(); + $xoops->logger->addDeprecated('xoops_cp_header() is deprecated. See how to replace it in file ' . __FILE__ . ' line ' . __LINE__); $xoops->header($xoops->getOption('template_main')); } @@ -35,5 +36,6 @@ function xoops_cp_footer() { $xoops = Xoops::getInstance(); + $xoops->logger->addDeprecated('xoops_cp_footer() is deprecated. See how to replace it in file ' . __FILE__ . ' line ' . __LINE__); $xoops->footer($xoops->getOption('template_main')); } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/avatars/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/avatars/main.php 2011-11-13 18:18:44 UTC (rev 8283) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/avatars/main.php 2011-11-13 18:55:47 UTC (rev 8284) @@ -40,10 +40,8 @@ case 'main': default: - // Define main template - $xoops->option['template_main'] = 'system_avatars.html'; // Call Header - xoops_cp_header(); + $xoops->header('system_avatars.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define Breadcrumb and tips @@ -70,17 +68,16 @@ // Assign form $xoops->tpl->assign('form', $form->render()); // Call Footer - xoops_cp_footer(); + $xoops->footer(); break; case 'list': // Get Avatar type $type = $system->cleanVars($_GET, 'type', 'c', 'string'); $start = $system->cleanVars($_GET, 'start', 0, 'int'); - // Define main template - $xoops->option['template_main'] = 'system_avatars.html'; + // Call Header - xoops_cp_header(); + $xoops->header('system_avatars.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define scripts @@ -127,14 +124,12 @@ $xoops->tpl->assign('nav_menu', $nav->renderImageNav()); } // Call Footer - xoops_cp_footer(); + $xoops->footer(); break; case 'edit': - // Define main template - $xoopsOption['template_main'] = 'system_avatars.html'; // Call Header - xoops_cp_header(); + $xoops->header('system_avatars.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define Breadcrumb and tips @@ -158,7 +153,7 @@ $xoops->redirect('admin.php?fct=avatars', 1, _AM_SYSTEM_DBERROR); } // Call Footer - xoops_cp_footer(); + $xoops->footer(); break; case'save': @@ -204,10 +199,8 @@ } } if (count($err) > 0) { - // Define main template - $xoopsOption['template_main'] = 'system_header.html'; // Call header - xoops_cp_header(); + $xoops->header('system_header.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define Breadcrumb and tips @@ -217,8 +210,7 @@ // Display errors $xoops->error($err); // Call Footer - xoops_cp_footer(); - exit(); + $xoops->footer(); } $xoops->redirect('admin.php?fct=avatars', 2, _AM_SYSTEM_DBUPDATED); break; @@ -241,10 +233,8 @@ break; case 'delete': - // Define main template - $xoopsOption['template_main'] = 'system_avatars.html'; // Call Header - xoops_cp_header(); + $xoops->header('system_avatars.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define Breadcrumb and tips @@ -269,7 +259,7 @@ $xoops->redirect('admin.php?fct=avatars', 1, _AM_SYSTEM_DBERROR); } // Call footer - xoops_cp_footer(); + $xoops->footer(); break; case 'delete_ok': @@ -287,12 +277,11 @@ } if (!$avatar_handler->delete($avatar)) { // Call Header - xoops_cp_header(); + $xoops->header(); // Display errors $xoops->error(sprintf(_AM_SYSTEM_AVATAR_FAILDEL, $avatar->getVar('avatar_id'))); // Call Footer - xoops_cp_footer(); - exit(); + $xoops->footer(); } $file = $avatar->getVar('avatar_file'); // Delete file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/banners/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/banners/main.php 2011-11-13 18:18:44 UTC (rev 8283) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/banners/main.php 2011-11-13 18:55:47 UTC (rev 8284) @@ -41,10 +41,8 @@ $banner_client_Handler = $xoops->getHandlerBannerclient(); // Get Action type $op = $system->cleanVars($_REQUEST, 'op', 'default', 'string'); -// Define template -$xoopsOption['template_main'] = 'system_banners.html'; // Call header -xoops_cp_header(); +$xoops->header('system_banners.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); $xoops->theme->addStylesheet('media/jquery/ui/' . $xoops->getModuleConfig('jquery_theme', 'system') . '/ui.all.css'); @@ -406,6 +404,6 @@ } break; } -xoops_cp_footer(); +$xoops->footer(); ?> \ No newline at end of file Modified: 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/blocksadmin/main.php 2011-11-13 18:18:44 UTC (rev 8283) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/blocksadmin/main.php 2011-11-13 18:55:47 UTC (rev 8284) @@ -66,10 +66,8 @@ switch ($op) { case 'list': - // Define main template - $xoopsOption['template_main'] = 'system_blocks.html'; // Call Header - xoops_cp_header(); + $xoops->header('system_blocks.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define scripts @@ -173,14 +171,12 @@ $blockform = $block->getForm(); $xoops->tpl->assign('blockform', $blockform->render()); // Call Footer - xoops_cp_footer(); + $xoops->footer(); break; case 'add': - // Define main template - $xoopsOption['template_main'] = 'system_blocks.html'; // Call Header - xoops_cp_header(); + $xoops->header('system_blocks.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); $xoops->theme->addStylesheet('media/jquery/ui/' . $xoops->getModuleConfig('jquery_theme', 'system') . '/ui.all.css'); @@ -200,7 +196,7 @@ $blockform = $block->getForm(); $xoops->tpl->assign('blockform', $blockform->render()); // Call Footer - xoops_cp_footer(); + $xoops->footer(); break; case 'display': @@ -324,9 +320,9 @@ $block->setVar('content', $content); if (!$newid = $block_handler->insertBlock($block)) { - xoops_cp_header(); + $xoops->header(); $xoops->error($block->getHtmlErrors()); - xoops_cp_footer(); + $xoops->footer(); exit(); } if ($newid != 0) { @@ -341,9 +337,9 @@ $blockmodulelink->setVar('block_id', $newid); $blockmodulelink->setVar('module_id', $mid); if (!$blockmodulelink_handler->insert($blockmodulelink)) { - xoops_cp_header(); + $xoops->header(); $xoops->error($blockmodulelink->getHtmlErrors()); - xoops_cp_footer(); + $xoops->footer(); exit(); } } @@ -379,10 +375,8 @@ // Get avatar id $block_id = $system->cleanVars($_REQUEST, 'bid', 0, 'int'); if ($block_id > 0) { - // Define main template - $xoopsOption['template_main'] = 'system_blocks.html'; // Call Header - xoops_cp_header(); + $xoops->header('system_blocks.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); $xoops->theme->addStylesheet('media/jquery/ui/' . $xoops->getModuleConfig('jquery_theme', 'system') . '/ui.all.css'); @@ -400,7 +394,7 @@ $blockform = $block->getForm(); $xoops->tpl->assign('blockform', $blockform->render()); // Call Footer - xoops_cp_footer(); + $xoops->footer(); } else { $xoops->redirect('admin.php?fct=blocksadmin', 1, _AM_SYSTEM_DBERROR); } @@ -426,16 +420,14 @@ exit(); } } - // Define main template - $xoopsOption['template_main'] = 'system_header.html'; // Call Header - xoops_cp_header(); + $xoops->header('system_header.html'); // Display Question $xoops->confirm(array( 'op' => 'delete_ok', 'fct' => 'blocksadmin', 'bid' => $block->getVar('bid') ), 'admin.php', sprintf(_AM_SYSTEM_BLOCKS_RUSUREDEL, $block->getVar('title'))); // Call Footer - xoops_cp_footer(); + $xoops->footer(); } break; @@ -486,10 +478,8 @@ // Get avatar id $block_id = $system->cleanVars($_REQUEST, 'bid', 0, 'int'); if ($block_id > 0) { - // Define main template - $xoopsOption['template_main'] = 'system_blocks.html'; // Call Header - xoops_cp_header(); + $xoops->header('system_blocks.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define Breadcrumb and tips @@ -501,7 +491,7 @@ $blockform = $block->getForm('clone'); $xoops->tpl->assign('blockform', $blockform->render()); // Call Footer - xoops_cp_footer(); + $xoops->footer(); } else { $xoops->redirect('admin.php?fct=blocksadmin', 1, _AM_SYSTEM_DBERROR); } Modified: 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/comments/main.php 2011-11-13 18:18:44 UTC (rev 8283) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/comments/main.php 2011-11-13 18:55:47 UTC (rev 8284) @@ -38,9 +38,8 @@ // Get Action type $op = $system->cleanVars($_REQUEST, 'op', 'default', 'string'); -// Define main template -$xoopsOption['template_main'] = 'system_comments.html'; -xoops_cp_header(); +// Call Header +$xoops->header('system_comments.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); $xoops->theme->addStylesheet('media/jquery/ui/' . $xoops->getModuleConfig('jquery_theme', 'system') . '/ui.all.css'); @@ -315,4 +314,4 @@ break; } // Call Footer -xoops_cp_footer(); \ No newline at end of file +$xoops->footer(); \ No newline at end of file Modified: 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/groups/main.php 2011-11-13 18:18:44 UTC (rev 8283) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/groups/main.php 2011-11-13 18:55:47 UTC (rev 8284) @@ -36,10 +36,9 @@ // Get groups handler $groups_Handler = $xoops->getModuleHandler("group", "system"); $member_handler = $xoops->getHandlerMember(); -// Define main template -$xoopsOption['template_main'] = 'system_groups.html'; + // Call Header -xoops_cp_header(); +$xoops->header('system_groups.html'); $system_breadcrumb->addLink(_AM_SYSTEM_GROUPS_NAV_MANAGER, system_adminVersion('groups', 'adminpath')); switch ($op) { @@ -158,9 +157,9 @@ $group->setVar('group_type', 'Admin'); } if (!$member_handler->insertGroup($group)) { - xoops_cp_header(); + $xoops->header(); $xoops->error($group->getHtmlErrors()); - xoops_cp_footer(); + $xoops->footer(); } else { $groupid = $group->getVar('groupid'); $gperm_handler = $xoops->getHandlerGroupperm(); @@ -230,9 +229,9 @@ } } if (!$member_handler->insertGroup($group)) { - xoops_cp_header(); + $xoops->header(); echo $group->getHtmlErrors(); - xoops_cp_footer(); + $xoops->footer(); } else { $groupid = $group->getVar('groupid'); $gperm_handler = $xoops->getHandlerGroupperm(); @@ -347,4 +346,4 @@ break; } // Call Footer -xoops_cp_footer(); \ No newline at end of file +$xoops->footer(); \ No newline at end of file Modified: 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/images/main.php 2011-11-13 18:18:44 UTC (rev 8283) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/images/main.php 2011-11-13 18:55:47 UTC (rev 8284) @@ -12,6 +12,8 @@ /** * Images Manager * + * @todo this files as some undefined constants, needs fixing + * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @author Kazumi Ono (AKA onokazu) @@ -54,12 +56,12 @@ } $gperm_handler = $xoops->getHandlerGroupperm(); -$groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS; +$groups = $xoops->isUser() ? $xoops->user->getGroups() : XOOPS_GROUP_ANONYMOUS; // check READ right by category before continue if (isset($imgcat_id) && $op == 'listimg') { - $imgcat_read = $gperm_handler->checkRight('imgcat_read', $imgcat_id, $groups, $xoopsModule->mid()); - $imgcat_write = $gperm_handler->checkRight('imgcat_write', $imgcat_id, $groups, $xoopsModule->mid()); + $imgcat_read = $gperm_handler->checkRight('imgcat_read', $imgcat_id, $groups, $xoops->module->mid()); + $imgcat_write = $gperm_handler->checkRight('imgcat_write', $imgcat_id, $groups, $xoops->module->mid()); if (!$imgcat_read && !$imgcat_write) { $xoops->redirect('admin.php?fct=images', 1); } @@ -67,7 +69,7 @@ // check WRITE right by category before continue if (isset($imgcat_id) && ($op == 'addfile' || $op == 'editcat' || $op == 'updatecat' || $op == 'delcatok' || $op == 'delcat')) { - $imgcat_write = $gperm_handler->checkRight('imgcat_write', $imgcat_id, $groups, $xoopsModule->mid()); + $imgcat_write = $gperm_handler->checkRight('imgcat_write', $imgcat_id, $groups, $xoops->module->mid()); if (!$imgcat_write) { $xoops->redirect('admin.php?fct=images', 1); } @@ -81,10 +83,8 @@ switch ($op) { case 'list': - // Define main template - $xoopsOption['template_main'] = 'system_images.html'; // Call Header - xoops_cp_header(); + $xoops->header('system_images.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define scripts @@ -104,8 +104,8 @@ $image_handler = $xoops->getHandlerImage(); foreach (array_keys($imagecategorys) as $i) { - $imgcat_read = $gperm_handler->checkRight('imgcat_read', $imagecategorys[$i]->getVar('imgcat_id'), $groups, $xoopsModule->mid()); - $imgcat_write = $gperm_handler->checkRight('imgcat_write', $imagecategorys[$i]->getVar('imgcat_id'), $groups, $xoopsModule->mid()); + $imgcat_read = $gperm_handler->checkRight('imgcat_read', $imagecategorys[$i]->getVar('imgcat_id'), $groups, $xoops->module->mid()); + $imgcat_write = $gperm_handler->checkRight('imgcat_write', $imagecategorys[$i]->getVar('imgcat_id'), $groups, $xoops->module->mid()); if ($imgcat_read || $imgcat_write) { $count = $image_handler->getCount(new Criteria('imgcat_id', $imagecategorys[$i]->getVar('imgcat_id'))); @@ -164,7 +164,7 @@ $form->assign($xoopsTpl); } // Call Footer - xoops_cp_footer(); + $xoops->footer(); break; case 'display_cat': @@ -189,7 +189,7 @@ $xoops->redirect('admin.php?fct=images', 1); } // Get rights - $imgcat_write = $gperm_handler->checkRight('imgcat_write', $imgcat_id, $groups, $xoopsModule->mid()); + $imgcat_write = $gperm_handler->checkRight('imgcat_write', $imgcat_id, $groups, $xoops->module->mid()); // Get category handler $imgcat_handler = $xoops->getHandlerImagecategory(); @@ -199,10 +199,8 @@ } // Get image handler $image_handler = $xoops->getHandlerImage(); - // Define main template - $xoopsOption['template_main'] = 'system_images.html'; // Call header - xoops_cp_header(); + $xoops->header('system_images.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); $xoops->theme->addStylesheet('media/jquery/ui/' . $xoops->getModuleConfig('jquery_theme', 'system') . '/ui.all.css'); @@ -268,7 +266,7 @@ $form->assign($xoopsTpl); // Call Footer - xoops_cp_footer(); + $xoops->footer(); break; case 'display_img': @@ -287,10 +285,8 @@ break; case 'editimg': - // Define main template - $xoopsOption['template_main'] = 'system_images.html'; // Call Header - xoops_cp_header(); + $xoops->header('system_images.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define scripts @@ -333,14 +329,14 @@ $xoops->redirect('admin.php?fct=images', 1, _AM_SYSTEM_DBERROR); } // Call Footer - xoops_cp_footer(); + $xoops->footer(); break; case 'delfile': // Get image handler $image_handler = $xoops->getHandlerImage(); // Call Header - xoops_cp_header(); + $xoops->header(); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); $xoops->theme->addStylesheet('browse.php?Frameworks/jquery/css/thumbs/thumbs.css'); @@ -360,7 +356,7 @@ $xoops->redirect('admin.php?fct=images', 1, _AM_SYSTEM_DBERROR); } // Call Footer - xoops_cp_footer(); + $xoops->footer(); break; case 'delfileok': @@ -378,9 +374,9 @@ $xoops->redirect('admin.php?fct=images', 1); } if (!$image_handler->deleteImage($image)) { - xoops_cp_header(); + $xoops->header(); $xoops->error(sprintf(_AM_SYSTEM_IMAGES_FAILDEL, $image->getVar('image_id'))); - xoops_cp_footer(); + $xoops->footer(); exit(); } @unlink(XOOPS_UPLOAD_PATH . '/' . $image->getVar('image_name')); @@ -395,7 +391,7 @@ // Get image handler $image_handler = $xoops->getHandlerImage(); // Call Header - xoops_cp_header(); + $xoops->header(); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Get image id @@ -405,14 +401,14 @@ $image->setVars($_POST); if (!$image_handler->insertImage($image)) { echo sprintf(_AM_SYSTEM_IMAGES_FAILSAVE, $avatar->getVar('avatar_name')); - xoops_cp_footer(); + $xoops->footer(); exit; } $xoops->redirect('admin.php?fct=images&op=listimg&imgcat_id=' . $image->getVar('imgcat_id'), 2, _AM_SYSTEM_DBUPDATED); } // Call Footer - xoops_cp_footer(); + $xoops->footer(); break; case 'addfile': @@ -462,9 +458,9 @@ } } if (count($err) > 0) { - xoops_cp_header(); + $xoops->header(); $xoops->error($err); - xoops_cp_footer(); + $xoops->footer(); exit(); } $xoops->redirect('admin.php?fct=images&op=listimg&imgcat_id=' . $image->getVar('imgcat_id'), 2, _AM_SYSTEM_DBUPDATED); @@ -550,10 +546,9 @@ $form->addElement(new XoopsFormHidden('op', 'updatecat')); $form->addElement(new XoopsFormHidden('fct', 'images')); $form->addElement(new XoopsFormButton('', 'imgcat_button', _SUBMIT, 'submit')); - // Define main template - $xoopsOption['template_main'] = 'system_header.html'; + // Call Header - xoops_cp_header(); + $xoops->header('system_header.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); $xoops->theme->addStylesheet('browse.php?Frameworks/jquery/css/thumbs/thumbs.css'); @@ -569,7 +564,7 @@ echo "<br />"; $form->display(); // Call Footer - xoops_cp_footer(); + $xoops->footer(); exit(); case 'updatecat': @@ -633,13 +628,13 @@ case 'delcat': // Call Header - xoops_cp_header(); + $xoops->header(); // Display message $xoops->confirm(array( 'op' => 'delcatok', 'imgcat_id' => $imgcat_id, 'fct' => 'images' ), 'admin.php', _AM_SYSTEM_IMAGES_RUDELIMGCAT); // Call Footer - xoops_cp_footer(); + $xoops->footer(); break; case 'delcatok': @@ -656,9 +651,9 @@ $xoops->redirect('admin.php?fct=images', 1); } if ($imagecategory->getVar('imgcat_type') != 'C') { - xoops_cp_header(); + $xoops->header(); $xoops->error(_MD_SCATDELNG); - xoops_cp_footer(); + $xoops->footer(); exit(); } $image_handler = $xoops->getHandlerImagecategory(); @@ -677,13 +672,11 @@ $errors[] = sprintf(_AM_SYSTEM_IMAGES_FAILDELCAT, $imagecategory->getVar('imgcat_name')); } if (count($errors) > 0) { - xoops_cp_header(); + $xoops->header(); $xoops->error($errors); - xoops_cp_footer(); + $xoops->footer(); exit(); } $xoops->redirect('admin.php?fct=images', 2, _AM_SYSTEM_DBUPDATED); break; -} - -?> \ No newline at end of file +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/mailusers/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/mailusers/main.php 2011-11-13 18:18:44 UTC (rev 8283) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/mailusers/main.php 2011-11-13 18:55:47 UTC (rev 8284) @@ -38,10 +38,9 @@ $limit = 100; // Get Action type $op = $system->cleanVars($_REQUEST, 'op', 'list', 'string'); -// Define main template -$xoopsOption['template_main'] = 'system_mailusers.html'; + // Call Header -xoops_cp_header(); +$xoops->header('system_mailusers.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); $xoops->theme->addScript('media/jquery/jquery.js'); @@ -323,4 +322,4 @@ break; } // Call Footer -xoops_cp_footer(); \ No newline at end of file +$xoops->footer(); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/maintenance/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/maintenance/main.php 2011-11-13 18:18:44 UTC (rev 8283) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/maintenance/main.php 2011-11-13 18:55:47 UTC (rev 8284) @@ -40,10 +40,9 @@ // Get Action type $op = $system->cleanVars($_REQUEST, 'op', 'list', 'string'); -// Define main template -$xoopsOption['template_main'] = 'system_maintenance.html'; + // Call Header -xoops_cp_header(); +$xoops->header('system_maintenance.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define scripts @@ -203,4 +202,4 @@ break; } -xoops_cp_footer(); +$xoops->footer(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/modulesadmin/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/modulesadmin/main.php 2011-11-13 18:18:44 UTC (rev 8283) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/modulesadmin/main.php 2011-11-13 18:55:47 UTC (rev 8284) @@ -53,10 +53,8 @@ switch ($op) { case 'list': - // Define main template - $xoopsOption['template_main'] = 'system_modules.html'; // Call Header - xoops_cp_header(); + $xoops->header('system_modules.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); $xoops->theme->addStylesheet('media/jquery/ui/' . $xoops->getModuleConfig('jquery_theme', 'system') . '/ui.all.css'); @@ -117,14 +115,12 @@ $xoops->tpl->assign('mods_popup', $listed_mods); // Call Footer - xoops_cp_footer(); + $xoops->footer(); break; case 'installlist': - // Define main template - $xoopsOption['template_main'] = 'system_modules.html'; // Call Header - xoops_cp_header(); + $xoops->header('system_modules.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); $xoops->theme->addStylesheet('media/jquery/ui/' . $xoops->getModuleConfig('jquery_theme', 'system') . '/ui.all.css'); @@ -173,7 +169,7 @@ $xoops->tpl->assign('toinstall_mods', $toinstall_mods); $xoops->tpl->assign('mods_popup', $toinstall_mods); // Call Footer - xoops_cp_footer(); + $xoops->footer(); //xoops_module_list(); break; @@ -200,10 +196,8 @@ break; case 'confirm': - // Define main template - $xoopsOption['template_main'] = 'system_modules_confirm.html'; // Call Header - xoops_cp_header(); + $xoops->header('system_modules_confirm.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define Breadcrumb and tips @@ -223,7 +217,7 @@ // Display Error $xoops->error($error); // Call Footer - xoops_cp_footer(); + $xoops->footer(); exit(); } $i = 0; @@ -239,7 +233,7 @@ $xoops->tpl->assign('modifs_mods', $modifs_mods); $xoops->tpl->assign('input_security', $xoops->security->getTokenHTML()); // Call Footer - xoops_cp_footer(); + $xoops->footer(); break; case 'display': @@ -304,10 +298,8 @@ //Set active modules in cache folder $xoops->setActiveModules(); - // Define main template - $xoopsOption['template_main'] = 'system_modules_confirm.html'; // Call Header - xoops_cp_header(); + $xoops->header('system_modules_confirm.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define Breadcrumb and tips @@ -319,7 +311,7 @@ $xoops->tpl->assign('result', $ret); } // Call Footer - xoops_cp_footer(); + $xoops->footer(); break; case 'install': @@ -334,7 +326,7 @@ } $msgs .= '<br /><span style="font-size:smaller;">' . $mod->getVar('name', 's') . '</span><br /><br />' . _AM_SYSTEM_MODULES_RUSUREINS; // Call Header - xoops_cp_header(); + $xoops->header(); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define Breadcrumb and tips @@ -347,7 +339,7 @@ 'module' => $module, 'op' => 'install_ok', 'fct' => 'modulesadmin' ), 'admin.php', $msgs, _AM_SYSTEM_MODULES_INSTALL); // Call Footer - xoops_cp_footer(); + $xoops->footer(); break; case 'install_ok': @@ -355,10 +347,8 @@ $ret[] = xoops_module_install($module); //Set active modules in cache folder $xoops->setActiveModules(); - // Define main template - $xoopsOption['template_main'] = 'system_header.html'; // Call Header - xoops_cp_header(); + $xoops->header('system_header.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define Breadcrumb and tips @@ -374,7 +364,7 @@ } } // Call Footer - xoops_cp_footer(); + $xoops->footer(); break; case 'uninstall': @@ -388,7 +378,7 @@ } $msgs .= '<br /><span style="font-size:smaller;">' . $mod->getVar('name') . '</span><br /><br />' . _AM_SYSTEM_MODULES_RUSUREUNINS; // Call Header - xoops_cp_header(); + $xoops->header(); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define Breadcrumb and tips @@ -401,7 +391,7 @@ 'module' => $module, 'op' => 'uninstall_ok', 'fct' => 'modulesadmin' ), 'admin.php', $msgs, _AM_SYSTEM_MODULES_UNINSTALL); // Call Footer - xoops_cp_footer(); + $xoops->footer(); break; case 'uninstall_ok': @@ -409,10 +399,8 @@ $ret[] = xoops_module_uninstall($module); //Set active modules in cache folder $xoops->setActiveModules(); - // Define main template - $xoopsOption['template_main'] = 'system_header.html'; // Call Header - xoops_cp_header(); + $xoops->header('system_header.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define Breadcrumb and tips @@ -428,7 +416,7 @@ } } // Call Footer - xoops_cp_footer(); + $xoops->footer(); break; case 'update': @@ -442,7 +430,7 @@ } $msgs .= '<br /><span style="font-size:smaller;">' . $mod->getVar('name', 's') . '</span><br /><br />' . _AM_SYSTEM_MODULES_RUSUREUPD; // Call Header - xoops_cp_header(); + $xoops->header(); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define Breadcrumb and tips @@ -455,7 +443,7 @@ 'dirname' => $module, 'op' => 'update_ok', 'fct' => 'modulesadmin' ), 'admin.php', $msgs, _AM_SYSTEM_MODULES_UPDATE); // Call Footer - xoops_cp_footer(); + $xoops->footer(); break; case 'update_ok': @@ -473,10 +461,7 @@ $module->setVar('name', $temp_name); $module->setVar('last_update', time()); // Call Header - // Define main template - $xoopsOption['template_main'] = 'system_header.html'; - // Call Header - xoops_cp_header(); + $xoops->header('system_header.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define Breadcrumb and tips @@ -894,7 +879,7 @@ } } // Call Footer - xoops_cp_footer(); + $xoops->footer(); require_once $xoops->path('modules/system/class/maintenance.php'); $maintenance = new SystemMaintenance(); Modified: 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/preferences/main.php 2011-11-13 18:18:44 UTC (rev 8283) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/preferences/main.php 2011-11-13 18:55:47 UTC (rev 8284) @@ -44,10 +44,8 @@ $op = $system->cleanVars($_REQUEST, 'op', 'default', 'string'); // Setting type $confcat_id = $system->cleanVars($_REQUEST, 'confcat_id', 0, 'int'); -// Define main template -$xoopsOption['template_main'] = 'system_preferences.html'; // Call Header -xoops_cp_header(); +$xoops->header('system_preferences.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define scripts @@ -559,4 +557,4 @@ break; } // Call Footer -xoops_cp_footer(); \ No newline at end of file +$xoops->footer(); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/smilies/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/smilies/main.php 2011-11-13 18:18:44 UTC (rev 8283) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/smilies/main.php 2011-11-13 18:55:47 UTC (rev 8284) @@ -44,10 +44,8 @@ $op = $system->cleanVars($_REQUEST, 'op', 'list', 'string'); // Get smilies handler $smilies_Handler = $xoops->getModuleHandler("smilies", "system"); -// Define main template -$xoopsOption['template_main'] = 'system_smilies.html'; // Call Header -xoops_cp_header(); +$xoops->header('system_smilies.html'); $system_breadcrumb->addLink(_AM_SYSTEM_SMILIES_NAV_MANAGER, system_adminVersion('smilies', 'adminpath')); @@ -227,4 +225,4 @@ break; } // Call Footer -xoops_cp_footer(); \ No newline at end of file +$xoops->footer(); \ No newline at end of file Modified: 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/tplsets/main.php 2011-11-13 18:18:44 UTC (rev 8283) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/tplsets/main.php 2011-11-13 18:55:47 UTC (rev 8284) @@ -34,10 +34,8 @@ // Get Action type $op = $system->cleanVars($_REQUEST, 'op', 'default', 'string'); -// Define main template -$xoopsOption['template_main'] = 'system_templates.html'; // Call Header -xoops_cp_header(); +$xoops->header('system_templates.html'); // Define scripts $xoops->theme->addScript('media/jquery/jquery.js'); $xoops->theme->addScript('media/jquery/ui/jquery.ui.js'); @@ -371,4 +369,4 @@ break; } // Call Footer -xoops_cp_footer(); +$xoops->footer(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/userrank/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/userrank/main.php 2011-11-13 18:18:44 UTC (rev 8283) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/userrank/main.php 2011-11-13 18:55:47 UTC (rev 8284) @@ -44,10 +44,9 @@ $op = $system->cleanVars($_REQUEST, 'op', 'list', 'string'); // Get userrank handler $userrank_Handler = $xoops->getModuleHandler("userrank", "system"); -// Define main template -$xoopsOption['template_main'] = 'system_userrank.html'; + // Call Header -xoops_cp_header(); +$xoops->header('system_userrank.html'); switch ($op) { @@ -219,4 +218,4 @@ } // Call Footer -xoops_cp_footer(); +$xoops->footer(); Modified: 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/admin/users/main.php 2011-11-13 18:18:44 UTC (rev 8283) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/users/main.php 2011-11-13 18:55:47 UTC (rev 8284) @@ -41,10 +41,9 @@ $op = $system->cleanVars($_REQUEST, 'op', 'default', 'string'); $member_handler = $xoops->getHandlerMember(); -// Define main template -$xoopsOption['template_main'] = 'system_users.html'; + // Call Header -xoops_cp_header(); +$xoops->header('system_users.html'); $myts = MyTextSanitizer::getInstance(); // Define Stylesheet @@ -154,13 +153,13 @@ $edituser = $member_handler->getUser($uid); if ($edituser->getVar('uname', 'n') != $_REQUEST['username'] && $member_handler->getUserCount(new Criteria('uname', $myts->addSlashes($_REQUEST['username']))) > 0) { - xoops_cp_header(); + $xoops->header(); $xoops->error(sprintf(_AM_SYSTEM_USERS_PSEUDO_ERROR, htmlspecialchars($_REQUEST['username']))); - xoops_cp_footer(); + $xoops->footer(); } elseif ($edituser->getVar('email', 'n') != $_REQUEST['email'] && $member_handler->getUserCount(new Criteria('email', $myts->addSlashes($_REQUEST['email']))) > 0) { - xoops_cp_header(); + $xoops->header(); $xoops->error(sprintf(_AM_SYSTEM_USERS_MAIL_ERROR, htmlspecialchars($_REQUEST['email']))); - xoops_cp_footer(); + $xoops->footer(); } else { $edituser->setVar("name", $_REQUEST['name']); $edituser->setVar("uname", $_REQUEST['username']); @@ -190,18 +189,18 @@ $edituser->setVar('user_mailok', $_REQUEST['user_mailok']); if ($_REQUEST['pass2'] != "") { if ($_REQUEST['password'] != $_REQUEST['pass2']) { - xoops_cp_header(); + $xoops->header(); echo " <strong>" . _AM_SYSTEM_USERS_STNPDNM . "</strong>"; - xoops_cp_footer(); + $xoops->footer(); exit(); } $edituser->setVar("pass", md5($_REQUEST['password'])); } if (!$member_handler->insertUser($edituser)) { - xoops_cp_header(); + $xoops->header(); echo $edituser->getHtmlErrors(); - xoops_cp_footer(); + $xoops->footer(); } else { if ($_REQUEST['groups'] != array()) { global $xoopsUser; @@ -257,9 +256,9 @@ $newuser->setVar("user_msnm", $_REQUEST['user_msnm']); if ($_REQUEST['pass2'] != "") { if ($_REQUEST['password'] != $_REQUEST['pass2']) { - xoops_cp_header(); + $xoops->header(); echo "<strong>" . _AM_SYSTEM_USERS_STNPDNM . "</strong>"; - xoops_cp_footer(); + $xoops->footer(); exit(); } $newuser->setVar("pass", md5($_REQUEST['password'])); @@ -892,4 +891,4 @@ break; } // Call Footer -xoops_cp_footer(); \ No newline at end of file +$xoops->footer(); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin.php 2011-11-13 18:18:44 UTC (rev 8283) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin.php 2011-11-13 18:55:47 UTC (rev 8284) @@ -96,8 +96,7 @@ exit; } // Define main template - $xoopsOption['template_main'] = 'system_index.html'; - xoops_cp_header(); + $xoops->header('system_index.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define scripts @@ -197,5 +196,5 @@ } } unset($dirlist); - xoops_cp_footer(); + $xoops->footer(); } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/help.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/help.php 2011-11-13 18:18:44 UTC (rev 8283) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/help.php 2011-11-13 18:55:47 UTC (rev 8284) @@ -29,8 +29,7 @@ $mid = $system->cleanVars($_REQUEST, 'mid', 0, 'int'); // Define main template -$xoopsOption['template_main'] = 'system_help.html'; -xoops_cp_header(); +$xoops->header('system_help.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); $xoops->theme->addStylesheet('modules/system/css/help.css'); @@ -79,20 +78,20 @@ if ($page != '') { // Call template if (file_exists(XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/language/' . $xoopsConfig['language'] . '/help/' . $page . '.html')) { - $helpcontent = $xoopsTpl->fetch(XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/language/' . $xoopsConfig['language'] . '/help/' . $page . '.html'); + $helpcontent = $xoops->tpl->fetch(XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/language/' . $xoopsConfig['language'] . '/help/' . $page . '.html'); } else { if (file_exists(XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/language/english/help/' . $page . '.html')) { - $helpcontent = $xoopsTpl->fetch(XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/language/english/help/' . $page . '.html'); + $helpcontent = $xoops->tpl->fetch(XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/language/english/help/' . $page . '.html'); } else { - $xoopsTpl->assign('load_error', 1); + $xoops->tpl->assign('load_error', 1); } } $xoops->tpl->assign('helpcontent', $helpcontent); } else { - if (file_exists(XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/language/' . $xoopsConfig['language'] . '/help/module_index.html')) { - $helpcontent = $xoopsTpl->fetch(XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/language/' . $xoopsConfig['language'] . '/help/module_index.html'); + if (file_exists(XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/language/' . $xoops->getConfig('language') . '/help/module_index.html')) { + $helpcontent = $xoops->tpl->fetch(XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/language/' . $xoops->getConfig('language') . '/help/module_index.html'); } else { $helpcontent = $module->getInfo('description'); $helpcontent = '<div id="non-modhelp">' . $helpcontent . '</div>'; @@ -103,7 +102,7 @@ } } else { - $xoBreadCrumb->render(); + $system_breadcrumb->render(); $criteria = new CriteriaCompo(); $criteria->setOrder('weight'); // Get all installed modules @@ -158,14 +157,14 @@ $i++; $j++; } - $xoopsTpl->assign('list_mods', $listed_mods); + $xoops->tpl->assign('list_mods', $listed_mods); - if (file_exists(XOOPS_ROOT_PATH . '/modules/system/language/' . $xoopsConfig['language'] . '/help/help_center.html')) { - $helpcontent = $xoopsTpl->fetch(XOOPS_ROOT_PATH . '/modules/system/language/' . $xoopsConfig['language'] . '/help/help_center.html'); + if (file_exists(XOOPS_ROOT_PATH . '/modules/system/language/' . $xoops->getConfig('language') . '/help/help_center.html')) { + $helpcontent = $xoops->tpl->fetch(XOOPS_ROOT_PATH . '/modules/system/language/' . $xoops->getConfig('language') . '/help/help_center.html'); } else { $helpcontent = '<div id="non-modhelp">' . _MD_CPANEL_HELPCENTER . '</div>'; } $xoops->tpl->assign('helpcontent', $helpcontent); } -xoops_cp_footer(); \ No newline at end of file +$xoops->footer(); \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |