diff --git a/module/common/model.php b/module/common/model.php index 0d16e26c7b..576dcf47cf 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -2357,7 +2357,7 @@ EOF; 'message' => array('ajaxgetmessage'), ); - if(!empty($this->app->user->modifyPassword) and (!isset($beforeValidMethods[$module]) or !in_array($method, $beforeValidMethods[$module]))) return print(js::locate(helper::createLink('my', 'changepassword'))); + if(!empty($this->app->user->modifyPassword) and (!isset($beforeValidMethods[$module]) or !in_array($method, $beforeValidMethods[$module]))) return helper::header('location', helper::createLink('my', 'changePassword')); if(!$this->loadModel('user')->isLogon() and $this->server->php_auth_user) $this->user->identifyByPhpAuth(); if(!$this->loadModel('user')->isLogon() and $this->cookie->za) $this->user->identifyByCookie(); if($this->isOpenMethod($module, $method)) return true; diff --git a/module/company/control.php b/module/company/control.php index 7a601fca05..9975d660d1 100755 --- a/module/company/control.php +++ b/module/company/control.php @@ -46,7 +46,7 @@ class company extends control * @access public * @return void */ - public function browse($browseType = 'inside', $param = 0, $type = 'bydept', $orderBy = 'id', $recTotal = 0, $recPerPage = 20, $pageID = 1) + public function browse($browseType = 'inside', $param = 0, $type = 'bydept', $orderBy = 'id_asc', $recTotal = 0, $recPerPage = 20, $pageID = 1) { $this->lang->navGroup->company = 'admin'; diff --git a/module/company/ui/browse.html.php b/module/company/ui/browse.html.php index b6cb15bcbe..51898ca23f 100644 --- a/module/company/ui/browse.html.php +++ b/module/company/ui/browse.html.php @@ -69,6 +69,8 @@ $tableData = initTableData($users, $this->config->company->user->dtable->fieldLi dtable ( setID('userList'), + set::orderBy($orderBy), + set::sortLink(createLink('company', 'browse', "browseType={$browseType}¶m={$param}&type={$type}&orderBy={name}_{sortType}&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}")), set::cols($this->config->company->user->dtable->fieldList), set::data($tableData), set::checkable(common::hasPriv('user', 'batchEdit')),