From 024e6a8ad769eca3cc6d558f7541a9ed01cfd654 Mon Sep 17 00:00:00 2001 From: Peter Rotich <peter@osticket.com> Date: Tue, 9 Dec 2014 05:02:24 +0000 Subject: [PATCH] oops: Fixes --- include/class.staff.php | 65 ------------------------------ include/class.ticket.php | 2 +- include/i18n/en_US/department.yaml | 2 +- include/i18n/en_US/group.yaml | 2 +- setup/inc/class.installer.php | 8 ++-- setup/test/tests/stubs.php | 1 + 6 files changed, 8 insertions(+), 72 deletions(-) diff --git a/include/class.staff.php b/include/class.staff.php index d420ca6da..63b87d988 100644 --- a/include/class.staff.php +++ b/include/class.staff.php @@ -368,71 +368,6 @@ implements AuthenticatedUser { return ($deptId && in_array($deptId, $this->getDepts()) && !$this->isAccessLimited()); } -<<<<<<< HEAD - function canCreateTickets() { - return $this->group->can_create_tickets; - } - - function canEditTickets() { - return $this->group->can_edit_tickets; - } - - function canDeleteTickets() { - return $this->group->can_delete_tickets; - } - - function canCloseTickets() { - return $this->group->can_close_tickets; - } - - function canPostReply() { - return $this->group->can_post_ticket_reply; - } - - function canViewStaffStats() { - return $this->group->can_view_staff_stats; - } - - function canAssignTickets() { - return $this->group->can_assign_tickets; - } - - function canTransferTickets() { - return $this->group->can_transfer_tickets; - } - - function canBanEmails() { - return $this->group->can_ban_emails; - } - - function canManageTickets() { - return ($this->isAdmin() - || $this->canDeleteTickets() - || $this->canCloseTickets()); - } - - function canManagePremade() { - return $this->group->can_manage_premade; - } - - function canManageCannedResponses() { - return $this->canManagePremade(); - } - - function canManageFAQ() { - return $this->group->can_manage_faq; - } - - function canManageFAQs() { - return $this->canManageFAQ(); - } - - function showAssignedTickets() { - return $this->show_assigned_tickets; - } - -======= ->>>>>>> 5847307... roles : Implement role-based access system-wide function getTeams() { if (!isset($this->_teams)) { diff --git a/include/class.ticket.php b/include/class.ticket.php index 38f751a15..a7722507c 100644 --- a/include/class.ticket.php +++ b/include/class.ticket.php @@ -2891,7 +2891,7 @@ class Ticket { } // Update the estimated due date in the database - $this->updateEstDueDate(); + $ticket->updateEstDueDate(); /********** double check auto-response ************/ //Override auto responder if the FROM email is one of the internal emails...loop control. diff --git a/include/i18n/en_US/department.yaml b/include/i18n/en_US/department.yaml index 1ad9aa4c9..3de7de70b 100644 --- a/include/i18n/en_US/department.yaml +++ b/include/i18n/en_US/department.yaml @@ -29,7 +29,7 @@ - id: 3 name: Maintenance - dept_signature: | + signature: | Maintenance Department ispublic: 0 group_membership: 0 diff --git a/include/i18n/en_US/group.yaml b/include/i18n/en_US/group.yaml index 9354e343e..c48f1c2e5 100644 --- a/include/i18n/en_US/group.yaml +++ b/include/i18n/en_US/group.yaml @@ -34,7 +34,7 @@ depts: [1, 2, 3] - id: 3 - role_id: 3 + role_id: 2 flags: 1 name: Flea Trainers notes: | diff --git a/setup/inc/class.installer.php b/setup/inc/class.installer.php index 153c5c601..7831cb65d 100644 --- a/setup/inc/class.installer.php +++ b/setup/inc/class.installer.php @@ -159,16 +159,16 @@ class Installer extends SetupWizard { Signal::send('system.install', $this); - $sql='SELECT `id` FROM '.TABLE_PREFIX.'sla ORDER BY `id` LIMIT 1'; + $sql='SELECT `id` FROM `'.TABLE_PREFIX.'sla` ORDER BY `id` LIMIT 1'; $sla_id_1 = db_result(db_query($sql, false)); - $sql='SELECT `dept_id` FROM '.TABLE_PREFIX.'department ORDER BY `dept_id` LIMIT 1'; + $sql='SELECT `id` FROM `'.TABLE_PREFIX.'department` ORDER BY `id` LIMIT 1'; $dept_id_1 = db_result(db_query($sql, false)); - $sql='SELECT `tpl_id` FROM '.TABLE_PREFIX.'email_template_group ORDER BY `tpl_id` LIMIT 1'; + $sql='SELECT `tpl_id` FROM `'.TABLE_PREFIX.'email_template_group` ORDER BY `tpl_id` LIMIT 1'; $template_id_1 = db_result(db_query($sql, false)); - $sql='SELECT `group_id` FROM '.TABLE_PREFIX.'groups ORDER BY `group_id` LIMIT 1'; + $sql='SELECT `id` FROM `'.TABLE_PREFIX.'group` ORDER BY `id` LIMIT 1'; $group_id_1 = db_result(db_query($sql, false)); //Create admin user. diff --git a/setup/test/tests/stubs.php b/setup/test/tests/stubs.php index 4a1f8db34..dbd057d51 100644 --- a/setup/test/tests/stubs.php +++ b/setup/test/tests/stubs.php @@ -126,6 +126,7 @@ class SqlFunction { class SqlExpression { static function plus() {} + static function times() {} static function bitor() {} static function bitand() {} } -- GitLab