Db/IniUserGroupBackend: Drop column parent_name, it's not a name anymore
refs #8826
This commit is contained in:
parent
9fcebb0014
commit
c94e6a3292
|
@ -75,7 +75,6 @@ class GroupController extends AuthBackendController
|
||||||
$this->setupSortControl(
|
$this->setupSortControl(
|
||||||
array(
|
array(
|
||||||
'group_name' => $this->translate('Group'),
|
'group_name' => $this->translate('Group'),
|
||||||
'parent_name' => $this->translate('Parent'),
|
|
||||||
'created_at' => $this->translate('Created at'),
|
'created_at' => $this->translate('Created at'),
|
||||||
'last_modified' => $this->translate('Last modified')
|
'last_modified' => $this->translate('Last modified')
|
||||||
),
|
),
|
||||||
|
@ -94,7 +93,6 @@ class GroupController extends AuthBackendController
|
||||||
|
|
||||||
$group = $backend->select(array(
|
$group = $backend->select(array(
|
||||||
'group_name',
|
'group_name',
|
||||||
'parent_name',
|
|
||||||
'created_at',
|
'created_at',
|
||||||
'last_modified'
|
'last_modified'
|
||||||
))->where('group_name', $groupName)->fetchRow();
|
))->where('group_name', $groupName)->fetchRow();
|
||||||
|
|
|
@ -29,17 +29,6 @@ if ($this->hasPermission('config/application/groups/edit') && $backend instanceo
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
<div class="group-header">
|
<div class="group-header">
|
||||||
<p class="group-name"><strong><?= $this->escape($group->group_name); ?></strong></p> <?= $editLink; ?>
|
<p class="group-name"><strong><?= $this->escape($group->group_name); ?></strong></p> <?= $editLink; ?>
|
||||||
<p class="group-parent"><strong><?= $this->translate('Parent'); ?>:</strong> <?= $group->parent_name === null ? '-' : $this->qlink(
|
|
||||||
$group->parent_name,
|
|
||||||
'group/show',
|
|
||||||
array(
|
|
||||||
'backend' => $backend->getName(),
|
|
||||||
'group' => $group->parent_name
|
|
||||||
),
|
|
||||||
array(
|
|
||||||
'title' => sprintf($this->translate('Show detailed information for group %s'), $group->parent_name)
|
|
||||||
)
|
|
||||||
); ?></p>
|
|
||||||
<p class="group-created"><strong><?= $this->translate('Created at'); ?>:</strong> <?= $group->created_at === null ? '-' : $this->formatDateTime($group->created_at); ?></p>
|
<p class="group-created"><strong><?= $this->translate('Created at'); ?>:</strong> <?= $group->created_at === null ? '-' : $this->formatDateTime($group->created_at); ?></p>
|
||||||
<p class="group-modified"><strong><?= $this->translate('Last modified'); ?>:</strong> <?= $group->last_modified === null ? '-' : $this->formatDateTime($group->last_modified); ?></p>
|
<p class="group-modified"><strong><?= $this->translate('Last modified'); ?>:</strong> <?= $group->last_modified === null ? '-' : $this->formatDateTime($group->last_modified); ?></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -20,8 +20,7 @@ class DbUserGroupBackend extends DbRepository implements UserGroupBackendInterfa
|
||||||
'group_id' => 'g.id',
|
'group_id' => 'g.id',
|
||||||
'group' => 'g.name COLLATE utf8_general_ci',
|
'group' => 'g.name COLLATE utf8_general_ci',
|
||||||
'group_name' => 'g.name',
|
'group_name' => 'g.name',
|
||||||
'parent' => 'g.parent COLLATE utf8_general_ci',
|
'parent' => 'g.parent',
|
||||||
'parent_name' => 'g.parent',
|
|
||||||
'created_at' => 'UNIX_TIMESTAMP(g.ctime)',
|
'created_at' => 'UNIX_TIMESTAMP(g.ctime)',
|
||||||
'last_modified' => 'UNIX_TIMESTAMP(g.mtime)'
|
'last_modified' => 'UNIX_TIMESTAMP(g.mtime)'
|
||||||
),
|
),
|
||||||
|
@ -53,7 +52,7 @@ class DbUserGroupBackend extends DbRepository implements UserGroupBackendInterfa
|
||||||
'group' => array(
|
'group' => array(
|
||||||
'group_id' => 'id',
|
'group_id' => 'id',
|
||||||
'group_name' => 'name',
|
'group_name' => 'name',
|
||||||
'parent_name' => 'parent',
|
'parent' => 'parent',
|
||||||
'created_at' => 'ctime',
|
'created_at' => 'ctime',
|
||||||
'last_modified' => 'mtime'
|
'last_modified' => 'mtime'
|
||||||
),
|
),
|
||||||
|
@ -70,7 +69,7 @@ class DbUserGroupBackend extends DbRepository implements UserGroupBackendInterfa
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $filterColumns = array('group', 'parent', 'user');
|
protected $filterColumns = array('group', 'user');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize this database user group backend
|
* Initialize this database user group backend
|
||||||
|
|
|
@ -21,7 +21,6 @@ class IniUserGroupBackend extends IniRepository implements UserGroupBackendInter
|
||||||
'group' => 'name',
|
'group' => 'name',
|
||||||
'group_name' => 'name',
|
'group_name' => 'name',
|
||||||
'parent' => 'parent',
|
'parent' => 'parent',
|
||||||
'parent_name' => 'parent',
|
|
||||||
'created_at' => 'ctime',
|
'created_at' => 'ctime',
|
||||||
'last_modified' => 'mtime',
|
'last_modified' => 'mtime',
|
||||||
'users'
|
'users'
|
||||||
|
@ -33,7 +32,7 @@ class IniUserGroupBackend extends IniRepository implements UserGroupBackendInter
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $filterColumns = array('group', 'parent');
|
protected $filterColumns = array('group');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The value conversion rules to apply on a query
|
* The value conversion rules to apply on a query
|
||||||
|
@ -96,7 +95,7 @@ class IniUserGroupBackend extends IniRepository implements UserGroupBackendInter
|
||||||
|
|
||||||
$groups = array();
|
$groups = array();
|
||||||
foreach ($result as $group) {
|
foreach ($result as $group) {
|
||||||
$groups[$group->group_name] = $group->parent_name;
|
$groups[$group->group_name] = $group->parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
$username = strtolower($user->getUsername());
|
$username = strtolower($user->getUsername());
|
||||||
|
|
Loading…
Reference in New Issue