fix sorting by name in getInstanceBy(), init _dms to null

This commit is contained in:
Uwe Steinmann 2020-06-16 08:29:33 +02:00
parent 550f0ee1f1
commit 5bb78b6468

View File

@ -67,7 +67,7 @@ class SeedDMS_Core_Role { /* {{{ */
$this->_name = $name;
$this->_role = $role;
$this->_noaccess = $noaccess;
$this->_dms = $role;
$this->_dms = null;
} /* }}} */
/**
@ -107,7 +107,7 @@ class SeedDMS_Core_Role { /* {{{ */
public static function getAllInstances($orderby, $dms) { /* {{{ */
$db = $dms->getDB();
if($orderby == 'ame')
if($orderby == 'name')
$queryStr = "SELECT * FROM `tblRoles` ORDER BY `name`";
else
$queryStr = "SELECT * FROM `tblRoles` ORDER BY `id`";