From: <ma...@us...> - 2012-10-26 17:37:22
|
Revision: 10236 http://sourceforge.net/p/xoops/svn/10236 Author: mageg Date: 2012-10-26 17:37:20 +0000 (Fri, 26 Oct 2012) Log Message: ----------- change redirect_header() by $xoops->redirect() in xcaptcha and xlanguage Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/admin/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/admin/index.php Modified: 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/admin/index.php 2012-10-26 01:43:51 UTC (rev 10235) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/admin/index.php 2012-10-26 17:37:20 UTC (rev 10236) @@ -22,17 +22,17 @@ switch ( $op ) { case 'save': if ( !$GLOBALS['xoopsSecurity']->check() ) { - redirect_header('index.php', 5, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); + $xoops->redirect('index.php', 5, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); } if ( $type == 'config' ) { $config = $xcaptcha_handler->VerifyData(); $xcaptcha_handler->writeConfig('captcha.config', $config ); - redirect_header('index.php?type=config', 5, _AM_XCAPTCHA_SAVED); + $xoops->redirect('index.php?type=config', 5, _AM_XCAPTCHA_SAVED); } else { if ($xcaptcha_handler->loadPluginHandler( $type )) { $config = $xcaptcha_handler->Pluginhandler->VerifyData(); $xcaptcha_handler->writeConfig('captcha.config.' . $type, $config ); - redirect_header('index.php?type=' . $type, 5, _AM_XCAPTCHA_SAVED); + $xoops->redirect('index.php?type=' . $type, 5, _AM_XCAPTCHA_SAVED); } } break; @@ -55,7 +55,7 @@ $admin_page->addInfoBox( $title ); $admin_page->addInfoBoxLine($xcaptcha_handler->Pluginhandler->getForm()); } else { - redirect_header('index.php', 5, _AM_XCAPTCHA_ERROR); + $xoops->redirect('index.php', 5, _AM_XCAPTCHA_ERROR); } } $admin_page->renderIndex(); Modified: 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/admin/index.php 2012-10-26 01:43:51 UTC (rev 10235) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/admin/index.php 2012-10-26 17:37:20 UTC (rev 10236) @@ -25,7 +25,7 @@ case 'save': if ( !$GLOBALS['xoopsSecurity']->check() ) { - redirect_header('index.php', 5, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); + $xoops->redirect('index.php', 5, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); } $xlanguage_id = $system->CleanVars($_POST, 'xlanguage_id', 0, 'int'); @@ -38,7 +38,7 @@ if ($xlanguage_handler->insert($lang)) { $xlanguage_handler->createConfig(); - redirect_header('index.php', 5, _AM_XLANGUAGE_SAVED); + $xoops->redirect('index.php', 5, _AM_XLANGUAGE_SAVED); } break; @@ -55,10 +55,10 @@ $admin_page->addInfoBox(_MI_XLANGUAGE_MODIFY); $admin_page->addInfoBoxLine($lang->getForm()); } else { - redirect_header('index.php', 5); + $xoops->redirect('index.php', 5); } } else { - redirect_header('index.php', 5); + $xoops->redirect('index.php', 5); } break; @@ -69,30 +69,30 @@ $delete = $system->CleanVars( $_POST, 'ok', 0, 'int' ); if ($delete == 1) { if ( !$GLOBALS['xoopsSecurity']->check() ) { - redirect_header('index.php', 5, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); + $xoops->redirect('index.php', 5, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); } $xlanguage_handler->delete($lang); $xlanguage_handler->createConfig(); - redirect_header('index.php', 5, _AM_XLANGUAGE_DELETED); + $xoops->redirect('index.php', 5, _AM_XLANGUAGE_DELETED); } else { ob_start(); - $xoops->confirm(array('ok' => 1, 'xlanguage_id' => $xlanguage_id, 'op' => 'del'), $_SERVER['REQUEST_URI'], sprintf(_AM_XLANGUAGE_DELETE_CFM . "<br /><b><span style='color : Red'> %s </span><br /><br />", $lang->getVar('xlanguage_name'))); + $xoops->confirm(array('ok' => 1, 'xlanguage_id' => $xlanguage_id, 'op' => 'del'), $_SERVER['REQUEST_URI'], sprintf(_AM_XLANGUAGE_DELETE_CFM . "<br /><b><span style='color : Red'> %s </span></b><br /><br />", $lang->getVar('xlanguage_name'))); $confirm = '<div class="confirm">' . ob_get_contents() . '</div>'; ob_end_clean(); $admin_page->addInfoBox(_MI_XLANGUAGE_DELETE); $admin_page->addInfoBoxLine($confirm); } } else { - redirect_header('index.php', 5); + $xoops->redirect('index.php', 5); } } else { - redirect_header('index.php', 5); + $xoops->redirect('index.php', 5); } break; case 'createconfig': $xlanguage_handler->createConfig(); - redirect_header( 'index.php', 5, _AM_XLANGUAGE_CREATED ); + $xoops->redirect( 'index.php', 5, _AM_XLANGUAGE_CREATED ); break; case 'default': |