
Originally Posted by
Reviresco
Okay here's how I got it to work:
In easypopulate_4.php, change:
Code:
zen_draw_form('import_form', basename($_SERVER['SCRIPT_NAME']), /*$parameters = */'', 'post', /*$params =*/ '', $request_type == 'SSL')
to:
Code:
zen_draw_form('import_form', FILENAME_EASYPOPULATE_4, /*$parameters = */'', 'post', /*$params =*/ '', $request_type == 'SSL')
and also do the same with the forms "delete_form" and "split_form"
Changing
Code:
basename($_SERVER['SCRIPT_NAME'])
to
Code:
basename($_SERVER['SCRIPT_NAME'], '.php')
also works.
The best solution is to upgrade as soon as possible to 1.5.7c. There are a number of corrections that are implemented and considered necessary.
As to "this issue", the correction I believe is located in admin/includes/application_bootstrap.php (with possibility of other areas of the system affected/touched):
changing:
Code:
$serverScript = basename($_SERVER['SCRIPT_NAME']);
$PHP_SELF = isset($_SERVER['SCRIPT_NAME']) ? $serverScript : 'home.php';
$PHP_SELF = isset($_GET['cmd']) ? basename($_GET['cmd'] . '.php') : $PHP_SELF;
$PHP_SELF = htmlspecialchars($PHP_SELF);
$_SERVER['SCRIPT_NAME'] = str_replace($serverScript, '', $_SERVER['SCRIPT_NAME']) . $PHP_SELF;
To:
Code:
$serverScript = basename($_SERVER['SCRIPT_NAME']);
$PHP_SELF = isset($_SERVER['SCRIPT_NAME']) ? $serverScript : 'home.php';
if (basename($PHP_SELF, '.php') === 'index') {
$PHP_SELF = isset($_GET['cmd']) ? basename($_GET['cmd'] . '.php') : $PHP_SELF;
}
$PHP_SELF = htmlspecialchars($PHP_SELF);
$_SERVER['SCRIPT_NAME'] = str_replace($serverScript, '', $_SERVER['SCRIPT_NAME']) . $PHP_SELF;
There may be other places where a change may be necessary to support the above; however, EP4 has not required the change described above to work in up-to-date systems.
Bookmarks