Icy Phoenix

     
 

Admin_db_maintenance.php

Category: ACP
Version Icy Phoenix 2.0 (PHP 5.x - MySQL 5.x)
Description
TopoMotoV3X
Mon 15 Oct, 2012 00:11
In Database Maintenance, all items that require confirmation by [Yes] [No], they do not work, even clicking on No, the procedure begins.
I replaced it with a piece of old code:

Find:

Code: [Hide] [Select]
// Set up variables and constants
$function = request_var('function', '');
$mode_id = request_var('mode', '');

// Check for parameters
reset ($config_data);
while (list(, $value) = each ($config_data))
{
if (!isset($config[$value]))
{
message_die(GENERAL_MESSAGE, sprintf($lang['Incomplete_configuration'], $value));
}
}

//
// Get form-data if specified and override old settings
//
if ($mode_id == 'perform')
{
if (isset($_POST['confirm']))
{
$mode_id = 'perform';
$function = request_var('function', '');
}
}


Replace with:

Code: [Hide] [Select]
// Set up variables and constants
$function = (isset($_GET['function'])) ? htmlspecialchars(trim($_GET['function'])) : '';
$mode_id = (isset($_GET['mode'])) ? htmlspecialchars(trim($_GET['mode'])) : '';

// Check for parameters
reset ($config_data);
while (list(, $value) = each ($config_data))
{
if (!isset($config[$value]))
{
message_die(GENERAL_MESSAGE, sprintf($lang['Incomplete_configuration'], $value));
}
}

//
// Get form-data if specified and override old settings
//
if (isset($_POST['mode']) && $_POST['mode'] == 'perform')
{
if (isset($_POST['confirm']))
{
$mode_id = 'perform';
$function = (isset($_POST['function'])) ? htmlspecialchars(trim($_POST['function'])) : '';
}
}
Reply
Mighty Gorgon
Sat 12 Jan, 2013 22:26
I have changed the code a bit...

Code: [Hide] [Select]
// Set up variables and constants
$function = request_var('function', '');
$mode_id = request_var('mode', '');

if (($mode_id == 'perform') && !isset($_POST['confirm']))
{
$mode_id = '';
}

// Check for parameters
reset ($config_data);
while (list(, $value) = each ($config_data))
{
if (!isset($config[$value]))
{
message_die(GENERAL_MESSAGE, sprintf($lang['Incomplete_configuration'], $value));
}
}


This should work as well.
Details Assigned To: Mighty Gorgon
Priority: Low
Status: Fixed
Fixed: Yes
 




 

  cron