|
@@ -1653,13 +1653,13 @@ function auth()
|
|
|
{
|
|
{
|
|
|
try {
|
|
try {
|
|
|
$connect = new Dibi\Connection([
|
|
$connect = new Dibi\Connection([
|
|
|
- 'driver' => 'sqlite3',
|
|
|
|
|
- 'database' => $GLOBALS['dbLocation'] . $GLOBALS['dbName'],
|
|
|
|
|
- ]);
|
|
|
|
|
- $all = $connect->fetch("SELECT group_id FROM tabs WHERE name = '%?%'", $tab);
|
|
|
|
|
- return $all ? $all['group_id'] : 0;
|
|
|
|
|
|
|
+ 'driver' => 'sqlite3',
|
|
|
|
|
+ 'database' => $GLOBALS['dbLocation'] . $GLOBALS['dbName'],
|
|
|
|
|
+ ]);
|
|
|
|
|
+ $row = $connect->fetch('SELECT group_id FROM tabs WHERE name = %~like~', $tab);
|
|
|
|
|
+ return $row ? $row['group_id'] : 0;
|
|
|
} catch (\Dibi\Exception $e) {
|
|
} catch (\Dibi\Exception $e) {
|
|
|
- writeLog('error', 'Tab Group Function - Error Fetching Tab Alias', $tab);
|
|
|
|
|
|
|
+ writeLog('error', 'Tab Group Function - Error Fetching Tab Group', $tab);
|
|
|
return 0;
|
|
return 0;
|
|
|
}
|
|
}
|
|
|
|
|
|