Dear Experts:
I need help for manual editing for Operation #2 in QueryString.php file.
As mentioned: http://custom.simplemachines.org/upgrades/index.php?action=upgrade;file=smf_patch_1.0.21_1.1.13.tar.gz;smf_version=1.1.12
Operation #2:
Find:
// Now make absolutely sure it's a number.
$board = (int) $_REQUEST['board'];
Replace With:
// Now make absolutely sure it's a number.
$board = (int) $_REQUEST['board'];
$_REQUEST['start'] = isset($_REQUEST['start']) ? (int) $_REQUEST['start'] : 0;
But due to some other Mods like Pretty URLs I've these lines as:
// Now make absolutely sure it's a number.
// Check for pretty board URLs too, and possibly redirect if oldschool queries were used.
$_REQUEST['board'] = str_replace(array(''', '\\'), array("\x12", ''), $_REQUEST['board']);
$context['pretty']['query_string']['board'] = $_REQUEST['board'];
if (is_numeric($_REQUEST['board']))
{
$board = (int) $_REQUEST['board'];
if (!isset($_REQUEST['pretty']))
$context['pretty']['oldschoolquery'] = true;
} else {
$pretty_board_lookup = unserialize($modSettings['pretty_board_lookup']);
$board = (int) isset($pretty_board_lookup[$_REQUEST['board']]) ? $pretty_board_lookup[$_REQUEST['board']] : 0;
Please help / guide me to edit these lines without any problem.
uninstall the pretty urls mods install the upgrade patch then reinstall pretty urls
:-\ I've already done some manual editing for this upgrade.
Please tell me if there is any way to "Edit" only this one.
Otherwise I've to uninstall this up-gradation and Pretty URLs; manually... :-[
Hello there.
This should work:
// Now make absolutely sure it's a number.
// Check for pretty board URLs too, and possibly redirect if oldschool queries were used.
$_REQUEST['board'] = str_replace(array(''', '\\'), array("\x12", ''), $_REQUEST['board']);
$context['pretty']['query_string']['board'] = $_REQUEST['board'];
if (is_numeric($_REQUEST['board']))
{
$board = (int) $_REQUEST['board'];
$_REQUEST['start'] = isset($_REQUEST['start']) ? (int) $_REQUEST['start'] : 0;
if (!isset($_REQUEST['pretty']))
$context['pretty']['oldschoolquery'] = true;
} else {
$pretty_board_lookup = unserialize($modSettings['pretty_board_lookup']);
$board = (int) isset($pretty_board_lookup[$_REQUEST['board']]) ? $pretty_board_lookup[$_REQUEST['board']] : 0;
Let us know if there is any more problems.
Regards.
Thanks "Dzonny"
I've updated as per your instructions, I think It's OK and still working properly.
I'll inform here if I see / feel any problem.
Thanks