diff --git a/include/class.dept.php b/include/class.dept.php index cc16d9578e8ca86e58a6b5a2f4e707321f795a29..d33b1bb1289ea917043017c3e18e8eba97857a3d 100644 --- a/include/class.dept.php +++ b/include/class.dept.php @@ -530,7 +530,7 @@ implements TemplateVariable { } static function __create($vars, &$errors) { - $dept = self::create(); + $dept = self::create($vars); $dept->update($vars, $errors); return isset($dept->id) ? $dept : null; diff --git a/include/class.i18n.php b/include/class.i18n.php index 3c0da2b24b7fd5cebfc67dad996f2cbfb95c776e..9163f6cf0d4bfdd4c687f3d54f9faa015b5d0087 100644 --- a/include/class.i18n.php +++ b/include/class.i18n.php @@ -64,8 +64,6 @@ class Internationalization { 'ticket_status.yaml' => 'TicketStatus::__create', // Role 'role.yaml' => 'Role::__create', - // Note that group requires department - 'group.yaml' => 'Group::__create', 'file.yaml' => 'AttachmentFile::__create', 'sequence.yaml' => 'Sequence::__create', ); diff --git a/include/class.topic.php b/include/class.topic.php index b97513636e4f5ca935a206e0b4a662491610d049..140be92151c4a2ba6c0b7477da6a2ff6a3fbd5af 100644 --- a/include/class.topic.php +++ b/include/class.topic.php @@ -281,7 +281,9 @@ implements TemplateVariable { } static function __create($vars, &$errors) { - $topic = self::create(); + $topic = self::create($vars); + if (!isset($vars['dept_id'])) + $vars['dept_id'] = 0; $topic->update($vars, $errors); return $topic; } diff --git a/include/i18n/en_US/help_topic.yaml b/include/i18n/en_US/help_topic.yaml index ab9c195eb21cf4b828f1d37f4d30c02a782eae84..76faba0c0e3638a0dc4b4b6b8b8f6deb9262dc70 100644 --- a/include/i18n/en_US/help_topic.yaml +++ b/include/i18n/en_US/help_topic.yaml @@ -21,7 +21,6 @@ - topic_id: 1 isactive: 1 ispublic: 1 - dept_id: 1 priority_id: 2 forms: [2] topic: General Inquiry @@ -30,7 +29,6 @@ - isactive: 1 ispublic: 1 - dept_id: 1 priority_id: 1 forms: [2] topic: Feedback @@ -40,7 +38,7 @@ - topic_id: 10 isactive: 1 ispublic: 1 - dept_id: 1 + dept_id: 3 priority_id: 2 forms: [2] topic: Report a Problem @@ -50,7 +48,6 @@ - topic_pid: 10 isactive: 1 ispublic: 1 - dept_id: 1 sla_id: 1 priority_id: 3 forms: [2]