mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-14 01:34:55 +02:00
* Fixed
* full support for OTHire 0.0.3 * added support for otservers that doesn't use account.name field, instead just account number will be used * (install) moved admin account creation to new step * fixed encryption detection on 0.3 * fixed bug when server_config table doesn't exist * other fixes
This commit is contained in:
@@ -31,9 +31,9 @@ class OTS_Groups_List implements IteratorAggregate, Countable
|
||||
*/
|
||||
public function __construct($file = '')
|
||||
{
|
||||
global $cache;
|
||||
|
||||
if(tableExist('groups')) { // read groups from database
|
||||
global $db;
|
||||
|
||||
foreach($db->query('SELECT `id`, `name`, `access` FROM `groups`;') as $group)
|
||||
{
|
||||
$info = array();
|
||||
@@ -52,6 +52,8 @@ class OTS_Groups_List implements IteratorAggregate, Countable
|
||||
$file = $config['data_path'] . 'XML/groups.xml';
|
||||
}
|
||||
|
||||
global $cache;
|
||||
|
||||
$data = array();
|
||||
if($cache->enabled())
|
||||
{
|
||||
@@ -135,6 +137,17 @@ class OTS_Groups_List implements IteratorAggregate, Countable
|
||||
throw new OutOfBoundsException();
|
||||
}
|
||||
|
||||
public function getHighestId()
|
||||
{
|
||||
$group_id = 0;
|
||||
foreach($this->groups as $id => $group) {
|
||||
if($id > $group_id)
|
||||
$group_id = $id;
|
||||
}
|
||||
|
||||
return $group_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns string representation of object.
|
||||
*
|
||||
|
Reference in New Issue
Block a user