Revert "Fix database queries to use table prefix for settings and usergroup retrieval"
This reverts commit b9daa8e0b4.
This commit is contained in:
@@ -63,7 +63,7 @@ function htmlposts_activate()
|
|||||||
'disporder' => 100,
|
'disporder' => 100,
|
||||||
'isdefault' => 0
|
'isdefault' => 0
|
||||||
);
|
);
|
||||||
$gid = $db->insert_query($db->table_prefix."settinggroups", $insertarray);
|
$gid = $db->insert_query("settinggroups", $insertarray);
|
||||||
|
|
||||||
// add settings
|
// add settings
|
||||||
$setting = array(
|
$setting = array(
|
||||||
@@ -77,7 +77,7 @@ function htmlposts_activate()
|
|||||||
"gid" => $gid
|
"gid" => $gid
|
||||||
);
|
);
|
||||||
|
|
||||||
$db->insert_query($db->table_prefix."settings", $setting);
|
$db->insert_query("settings", $setting);
|
||||||
|
|
||||||
$setting = array(
|
$setting = array(
|
||||||
"sid" => NULL,
|
"sid" => NULL,
|
||||||
@@ -90,7 +90,7 @@ function htmlposts_activate()
|
|||||||
"gid" => $gid
|
"gid" => $gid
|
||||||
);
|
);
|
||||||
|
|
||||||
$db->insert_query($db->table_prefix."settings", $setting);
|
$db->insert_query("settings", $setting);
|
||||||
|
|
||||||
$setting = array(
|
$setting = array(
|
||||||
"sid" => NULL,
|
"sid" => NULL,
|
||||||
@@ -103,7 +103,7 @@ function htmlposts_activate()
|
|||||||
"gid" => $gid
|
"gid" => $gid
|
||||||
);
|
);
|
||||||
|
|
||||||
$db->insert_query($db->table_prefix."settings", $setting);
|
$db->insert_query("settings", $setting);
|
||||||
|
|
||||||
rebuild_settings();
|
rebuild_settings();
|
||||||
}
|
}
|
||||||
@@ -114,10 +114,10 @@ function htmlposts_deactivate()
|
|||||||
global $db, $mybb;
|
global $db, $mybb;
|
||||||
|
|
||||||
// delete settings group
|
// delete settings group
|
||||||
$db->delete_query($db->table_prefix."settinggroups", "name = 'htmlposts'");
|
$db->delete_query("settinggroups", "name = 'htmlposts'");
|
||||||
|
|
||||||
// remove settings
|
// remove settings
|
||||||
$db->delete_query($db->table_prefix.'settings', 'name IN (\'htmlposts_groups\',\'htmlposts_uids\',\'htmlposts_forums\')');
|
$db->delete_query('settings', 'name IN (\'htmlposts_groups\',\'htmlposts_uids\',\'htmlposts_forums\')');
|
||||||
|
|
||||||
rebuild_settings();
|
rebuild_settings();
|
||||||
}
|
}
|
||||||
@@ -257,7 +257,7 @@ function htmlposts_parse(&$message)
|
|||||||
if(THIS_SCRIPT == 'portal.php' || (THIS_SCRIPT == 'newreply.php' && !isset($mypost['usergroup'])))
|
if(THIS_SCRIPT == 'portal.php' || (THIS_SCRIPT == 'newreply.php' && !isset($mypost['usergroup'])))
|
||||||
{
|
{
|
||||||
// Get usergroup and additionalgroups if we're in portal.php
|
// Get usergroup and additionalgroups if we're in portal.php
|
||||||
$q = $db->simple_select($db->table_prefix.'users', 'usergroup,additionalgroups', 'uid='.$mypost['uid']);
|
$q = $db->simple_select('users', 'usergroup,additionalgroups', 'uid='.$mypost['uid']);
|
||||||
$data = $db->fetch_array($q);
|
$data = $db->fetch_array($q);
|
||||||
$mypost['usergroup'] = $data['usergroup'];
|
$mypost['usergroup'] = $data['usergroup'];
|
||||||
$mypost['additionalgroups'] = $data['additionalgroups'];
|
$mypost['additionalgroups'] = $data['additionalgroups'];
|
||||||
|
|||||||
Reference in New Issue
Block a user