Author Topic: [1.7.4] BUG in userqroups.php & solution  (Read 18446 times)

0 Members and 1 Guest are viewing this topic.

Offline vanish

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
    • White Album
[1.7.4] BUG in userqroups.php & solution
« on: November 17, 2006, 11:59:49 AM »
BUG in 1.7,4 when you add latest updates ("checkbox" selector type)
Description: When "checkbox" is selected (default setting now) you don't change category permission to "No"

file:
admin/usergroups.php

find:
Code: [Select]
  foreach ($auth as $key => $val) {
    $sql = "DELETE FROM ".GROUP_ACCESS_TABLE."
            WHERE cat_id = $key AND group_id = $group_id";
    $site_db->query($sql);


replace with:
Code: [Select]
  $sql = "DELETE FROM ".GROUP_ACCESS_TABLE."
          WHERE group_id = $group_id";
  $site_db->query($sql);
  foreach ($auth as $key => $val) {


Also I recommend this changes for correct look:
find:
Code: [Select]
    echo "<td class=\"tableseparator\" width=\"".$col_width."%\" align=\"center\"><input name=\"allbox[".$val."]\" type=\"checkbox\" onClick=\"CheckAllCats(this, '".$val."');\" />".$lang[$val]."</td>\n";

replace with:
Code: [Select]
    echo "<td class=\"tableseparator\" width=\"".$col_width."%\" align=\"center\">".($permission_select_type == "checkbox" ? "<input name=\"allbox[".$val."]\" type=\"checkbox\" onClick=\"CheckAllCats(this, '".$val."');\" />":"").$lang[$val]."</td>\n";
« Last Edit: November 17, 2006, 01:58:14 PM by Jan »

Offline ripejuice

  • Newbie
  • *
  • Posts: 11
    • View Profile
    • Sexy Wallpapers
Re: [1.7.4] BUG in userqroups.php & solution
« Reply #1 on: December 08, 2008, 10:10:49 PM »
jeevani esthar bur! don't get it