Author Topic: [FIX] - admin/usergroups.php  (Read 3979 times)

0 Members and 1 Guest are viewing this topic.

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
[FIX] - admin/usergroups.php
« on: September 08, 2007, 07:33:39 PM »
Detail: Check variable for right result.

Find:

Quote
$start_date = trim($HTTP_POST_VARS['group_start_date'][$key]);

$end_date = trim($HTTP_POST_VARS['group_end_date'][$key]);

replace:

Code: [Select]
$start_date = (isset($HTTP_POST_VARS['group_start_date'][$key])) ? trim($HTTP_POST_VARS['group_start_date'][$key]) : "";

$end_date = (isset($HTTP_POST_VARS['group_end_date'][$key])) ? trim($HTTP_POST_VARS['group_end_date'][$key]) : "";

Find:

Quote
$group_id = intval($HTTP_POST_VARS['group_id']);

replace:

Code: [Select]
$group_id = (isset($HTTP_POST_VARS['group_id'])) ? intval($HTTP_POST_VARS['group_id']) : intval($HTTP_GET_VARS['group_id']);
$group_id = preg_replace("/[^0-9]+/i", "", $group_id);

Find (2 time):

Quote
$group_name = trim($HTTP_POST_VARS['group_name']);

replace:

Code: [Select]
$group_name = (isset($HTTP_POST_VARS['group_name'])) ? trim($HTTP_POST_VARS['group_name']) : "";
$group_name = preg_replace("/[^A-Za-z0-9_-]+/i", "", $group_name);
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?