|
|
@@ -1608,7 +1608,15 @@ function auth()
|
|
|
$ban = isset($_GET['ban']) ? strtoupper($_GET['ban']) : "";
|
|
|
$whitelist = isset($_GET['whitelist']) ? $_GET['whitelist'] : false;
|
|
|
$blacklist = isset($_GET['blacklist']) ? $_GET['blacklist'] : false;
|
|
|
- $group = isset($_GET['group']) ? (int)$_GET['group'] : (int)0;
|
|
|
+ $group = 0;
|
|
|
+ $groupParam = $_GET['group'];
|
|
|
+ if(isset($groupParam)) {
|
|
|
+ if (is_numeric($groupParam)) {
|
|
|
+ $group = (int)$groupParam;
|
|
|
+ } else {
|
|
|
+ $group = getTabGroup($groupParam);
|
|
|
+ }
|
|
|
+ }
|
|
|
$currentIP = userIP();
|
|
|
$unlocked = ($GLOBALS['organizrUser']['locked'] == '1') ? false : true;
|
|
|
if (isset($GLOBALS['organizrUser'])) {
|
|
|
@@ -1641,6 +1649,20 @@ function auth()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+function getTabGroup ($tab)
|
|
|
+{
|
|
|
+ try {
|
|
|
+ $connect = new Dibi\Connection([
|
|
|
+ 'driver' => 'sqlite3',
|
|
|
+ 'database' => $GLOBALS['dbLocation'] . $GLOBALS['dbName'],]);
|
|
|
+ $row = $connect->fetch('SELECT group_id FROM tabs WHERE name LIKE %~like~', $tab);
|
|
|
+ return $row ? $row['group_id'] : 0;
|
|
|
+ } catch (\Dibi\Exception $e) {
|
|
|
+ writeLog('error', 'Tab Group Function - Error Fetching Tab Group', $tab);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
function logoOrText()
|
|
|
{
|
|
|
if ($GLOBALS['useLogo'] == false) {
|