Db/IniUserGroupBackend: Drop column parent_name, it's not a name anymore

refs #8826
This commit is contained in:
Johannes Meyer 2015-05-29 08:56:58 +02:00
parent 9fcebb0014
commit c94e6a3292
4 changed files with 5 additions and 20 deletions

View File

@ -75,7 +75,6 @@ class GroupController extends AuthBackendController
$this->setupSortControl(
array(
'group_name' => $this->translate('Group'),
'parent_name' => $this->translate('Parent'),
'created_at' => $this->translate('Created at'),
'last_modified' => $this->translate('Last modified')
),
@ -94,7 +93,6 @@ class GroupController extends AuthBackendController
$group = $backend->select(array(
'group_name',
'parent_name',
'created_at',
'last_modified'
))->where('group_name', $groupName)->fetchRow();

View File

@ -29,17 +29,6 @@ if ($this->hasPermission('config/application/groups/edit') && $backend instanceo
<?php endif ?>
<div class="group-header">
<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-modified"><strong><?= $this->translate('Last modified'); ?>:</strong> <?= $group->last_modified === null ? '-' : $this->formatDateTime($group->last_modified); ?></p>
</div>

View File

@ -20,8 +20,7 @@ class DbUserGroupBackend extends DbRepository implements UserGroupBackendInterfa
'group_id' => 'g.id',
'group' => 'g.name COLLATE utf8_general_ci',
'group_name' => 'g.name',
'parent' => 'g.parent COLLATE utf8_general_ci',
'parent_name' => 'g.parent',
'parent' => 'g.parent',
'created_at' => 'UNIX_TIMESTAMP(g.ctime)',
'last_modified' => 'UNIX_TIMESTAMP(g.mtime)'
),
@ -53,7 +52,7 @@ class DbUserGroupBackend extends DbRepository implements UserGroupBackendInterfa
'group' => array(
'group_id' => 'id',
'group_name' => 'name',
'parent_name' => 'parent',
'parent' => 'parent',
'created_at' => 'ctime',
'last_modified' => 'mtime'
),
@ -70,7 +69,7 @@ class DbUserGroupBackend extends DbRepository implements UserGroupBackendInterfa
*
* @var array
*/
protected $filterColumns = array('group', 'parent', 'user');
protected $filterColumns = array('group', 'user');
/**
* Initialize this database user group backend

View File

@ -21,7 +21,6 @@ class IniUserGroupBackend extends IniRepository implements UserGroupBackendInter
'group' => 'name',
'group_name' => 'name',
'parent' => 'parent',
'parent_name' => 'parent',
'created_at' => 'ctime',
'last_modified' => 'mtime',
'users'
@ -33,7 +32,7 @@ class IniUserGroupBackend extends IniRepository implements UserGroupBackendInter
*
* @var array
*/
protected $filterColumns = array('group', 'parent');
protected $filterColumns = array('group');
/**
* The value conversion rules to apply on a query
@ -96,7 +95,7 @@ class IniUserGroupBackend extends IniRepository implements UserGroupBackendInter
$groups = array();
foreach ($result as $group) {
$groups[$group->group_name] = $group->parent_name;
$groups[$group->group_name] = $group->parent;
}
$username = strtolower($user->getUsername());