Bug #238
SQL Error unban
| Status: | Resolved | Start: | 08/26/2008 | |
| Priority: | Immediate | Due date: | ||
| Assigned to: | Jannik Hartung | % Done: | 100% |
|
| Category: | Web Panel | |||
| Target version: | 1.3.1 | |||
Description
When you click unban on the banlist, you see the sql error: cant find 'gid' in fields (or something to that effect)
This has something todo with this query: source:/trunk/pages/page.banlist.php#L46
not quite sure what it's doing, but it's not right :o
Related issues
| related to SourceBans - Bug #236 | Unban from banlist gives sql error | Rejected | 08/26/2008 |
Associated revisions
- Fixed problems with installer layout and disabled error logging
- Fixed
#238- SQL Error on unban >.< - Fixed
#241- Unable to select information in ban log dialog. you can drag&drop by dragging the titleline - Fixed
#230- ip/steamid info entry box goes away upon ip selection in drop down in ie. IE doesn't support 'table' display options! - Added ability to import banned_ip.cfg
- Installers debug mode can be switched on with &debug=1 and off with &debug=0. this helps to show errors, without modifying files.
- Changed installer footer to interwavestudios.com ;)
- Fixed evOnClick notice on servers page.
- Fixed some style beautyissues
History
Updated by Recon _ 132 days ago
The gid column is not in bans table...
The solution is to use a join on the admins table:
SELECT a.aid, a.gid FROM prefix_bans b INNER JOIN prefix_admins a ON a.aid = b.aid;
The complete fix:
pages/page.banlist.php line 46 (before)
$res = $GLOBALS['db']->Execute("SELECT aid, gid FROM `".DB_PREFIX."_bans` WHERE bid = '".intval($_GET["id"])."';");
pages/page.banlist.php line 46 (after)
$res = $GLOBALS['db']->Execute("SELECT a.aid, a.gid FROM `".DB_PREFIX."_bans` b INNER JOIN ".DB_PREFIX."_admins a ON a.aid = b.aid WHERE bid = '".intval($_GET["id"])."';");
pages/page.banlist.php line 47 (before)
if (!$userbank->HasAccess(ADMIN_OWNER|ADMIN_UNBAN|ADMIN_UNBAN_OWN_BANS|ADMIN_UNBAN_GROUP_BANS) || ($userbank->HasAccess(ADMIN_UNBAN_OWN_BANS) && $res->fields['aid']!=$userbank->GetAid()) || ($userbank->HasAccess(ADMIN_UNBAN_GROUP_BANS) && $res->fields['gid']!=$userbank->GetProperty('gid')))
pages/page.banlist.php line 47 (after)
if (!$userbank->HasAccess(ADMIN_OWNER|ADMIN_UNBAN|ADMIN_UNBAN_OWN_BANS|ADMIN_UNBAN_GROUP_BANS) || ($userbank->HasAccess(ADMIN_UNBAN_OWN_BANS) && $res->fields['a.aid']!=$userbank->GetAid()) || ($userbank->HasAccess(ADMIN_UNBAN_GROUP_BANS) && $res->fields['a.gid']!=$userbank->GetProperty('gid')))
Updated by Erik Minekus 131 days ago
- Category set to Game Plugin
- Status changed from Rejected to Assigned
- Assigned to set to Jannik Hartung
Updated by Jannik Hartung 131 days ago
- Status changed from Assigned to Resolved
- % Done changed from 0 to 100
Updated by Jannik Hartung 131 days ago
- Category changed from Game Plugin to Web Panel