* Fix bug of task #89846.
This commit is contained in:
@@ -1522,7 +1522,7 @@ class groupModel extends model
|
||||
$modules = array_keys($modules);
|
||||
$modules = implode(',', $modules);
|
||||
|
||||
$privs = $this->dao->select("t1.id, t1.module, t1.method, CONCAT(t1.module, '-', t1.method) AS action, IF(t3.type = 'module', 0, t1.parent) as parent, t1.order, t2.`key`, t2.`value`, t2.desc, IF(t3.type = 'module', t3.code, t4.code) as parentCode, IF(t3.type = 'module', 0, INSTR('$modules', t4.code)) as moduleOrder")->from(TABLE_PRIV)->alias('t1')
|
||||
$privs = $this->dao->select("t1.id, t1.module, t1.method, CONCAT(t1.module, '-', t1.method) AS action, IF(t3.type = 'module', 0, t1.parent) as parent, t1.order, t2.`key`, t2.`value`, t2.desc, IF(t3.type = 'module', t3.code, t4.code) as parentCode, IF(t3.type = 'module', 999, INSTR('$modules', t4.code)) as moduleOrder")->from(TABLE_PRIV)->alias('t1')
|
||||
->leftJoin(TABLE_PRIVLANG)->alias('t2')->on('t1.id=t2.objectID')
|
||||
->leftJoin(TABLE_PRIVMANAGER)->alias('t3')->on('t1.parent=t3.id')
|
||||
->leftJoin(TABLE_PRIVMANAGER)->alias('t4')->on('t3.parent=t4.id')
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
<thead>
|
||||
<tr class='text-center'>
|
||||
<th class='module'><?php echo $lang->group->module;?></th>
|
||||
<th class='package'><?php echo '权限包';?></th>
|
||||
<th class='package'><?php echo $lang->privpackage->common;?></th>
|
||||
<th class='method' colspan='2'><?php echo $lang->group->method;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -147,7 +147,7 @@
|
||||
<?php foreach($privs as $privID => $priv):?>
|
||||
<div class="group-item" data-module='<?php echo $moduleName;?>' data-package='<?php echo $packageID;?>' data-id='<?php echo zget($priv, 'id', 0);?>'>
|
||||
<div class="checkbox-primary">
|
||||
<?php echo html::checkbox("actions[$priv->module]", array($priv->method => $priv->name), isset($groupPrivs[$priv->module][$priv->method]) ? $priv->method : '', "title='{$priv->name}' id='actions[$priv->module]$priv->method' data-id='$privID'");?>
|
||||
<?php echo html::checkbox("actions[$priv->module]", array($priv->method => $priv->name), isset($groupPrivs[$priv->module][$priv->method]) ? $priv->method : '', "title='{$priv->name}' id='actions[$priv->module]$priv->method' data-id='$priv->action'");?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
|
||||
Reference in New Issue
Block a user