From cf5dbf0f23ad442f8f2ba9075cbc8f73f208f0e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=B9=BF=E6=98=8E?= Date: Thu, 2 Jun 2022 14:53:51 +0800 Subject: [PATCH] * Remove unused code. --- module/company/view/browse.html.php | 2 +- module/user/control.php | 53 ----------------------------- 2 files changed, 1 insertion(+), 54 deletions(-) diff --git a/module/company/view/browse.html.php b/module/company/view/browse.html.php index 432d0eae69..1dbbf15f06 100755 --- a/module/company/view/browse.html.php +++ b/module/company/view/browse.html.php @@ -68,7 +68,7 @@ js::set('confirmDelete', $lang->user->confirmDelete);
-
' method='post' id='userListForm'> + ' method='post' id='userListForm'> diff --git a/module/user/control.php b/module/user/control.php index 8dd068894c..13bb2654cb 100755 --- a/module/user/control.php +++ b/module/user/control.php @@ -1076,59 +1076,6 @@ class user extends control $this->display(); } - public function export($browseType, $param, $type, $orderBy) - { - if($_POST) - { - $this->loadModel('file'); - $this->user->setListValue(); - $userLang = $this->lang->user; - $userConfig = $this->config->user; - - /* Create field lists. */ - $fields = $this->post->exportFields ? $this->post->exportFields : explode(',', $userConfig->list->exportFields); - foreach($fields as $key => $fieldName) - { - $fieldName = trim($fieldName); - $fields[$fieldName] = isset($userLang->$fieldName) ? $userLang->$fieldName : $fieldName; - unset($fields[$key]); - } - - /* Get users. */ - $users = $this->dao->select('*')->from(TABLE_USER)->where($this->session->userQueryCondition) - ->beginIF($this->post->exportType == 'selected')->andWhere('id')->in($this->cookie->checkedItem)->fi() - ->orderBy($orderBy)->fetchAll('id'); - - /* Get role, products and executions. */ - $roleList = $this->lang->user->roleList; - $genderList = $this->lang->user->genderList; - $typeList = $this->lang->user->typeList; - - $depts = $this->loadModel('dept')->getOptionMenu(); - foreach($depts as $id => $dept) $depts[$id] = "$dept(#$id)"; - - foreach($users as $user) - { - if(isset($userLang->roleList[$user->role])) $user->role = $userLang->roleList[$user->role]; - if(isset($userLang->genderList[$user->gender])) $user->gender = $userLang->genderList[$user->gender]; - if(isset($userLang->typeList[$user->type])) $user->type = $userLang->typeList[$user->type]; - if(isset($depts[$user->dept])) $depts = $depts[$user->dept]; - } - - $this->post->set('fields', $fields); - $this->post->set('rows', $users); - $this->post->set('kind', 'user'); - $this->fetch('file', 'export2' . $this->post->fileType, $_POST); - } - - $fileName = $this->lang->user->common; - - $this->view->fileName = $fileName; - $this->view->allExportFields = $this->config->user->list->exportFields; - $this->view->customExport = true; - $this->display(); - } - /** * User dynamic. *