From 7ee4196b4f8f15759d1833f758eec8b98f03c63d Mon Sep 17 00:00:00 2001 From: Marabar Date: Thu, 28 Mar 2019 22:09:17 +0500 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B0=20?= =?UTF-8?q?=D0=BC=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=D0=B0=D0=BB=D1=8C=D0=BD?= =?UTF-8?q?=D0=BE=D0=B9=20=D0=B2=D0=BB=D0=BE=D0=B6=D0=B5=D0=BD=D0=BD=D0=BE?= =?UTF-8?q?=D1=81=D1=82=D0=B8=20=D1=84=D1=83=D0=BD=D0=BA=D1=86=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tickets/model/tickets/ticket.class.php | 6 ++++-- .../model/tickets/ticketssection.class.php | 6 ++++-- .../tickets/model/tickets/tickettotal.class.php | 15 --------------- 3 files changed, 8 insertions(+), 19 deletions(-) diff --git a/core/components/tickets/model/tickets/ticket.class.php b/core/components/tickets/model/tickets/ticket.class.php index b672b87..0c2b5dd 100644 --- a/core/components/tickets/model/tickets/ticket.class.php +++ b/core/components/tickets/model/tickets/ticket.class.php @@ -321,8 +321,10 @@ protected function _getVirtualFields() 'id' => $this->id, 'class' => 'Ticket', ), '', true, true); - $total->fetchValues(); - $total->save(); + if ($total->save()) { + $total->fetchValues(); + $total->save(); + } } return $total->get(array( diff --git a/core/components/tickets/model/tickets/ticketssection.class.php b/core/components/tickets/model/tickets/ticketssection.class.php index 18c7bd5..37f6e86 100644 --- a/core/components/tickets/model/tickets/ticketssection.class.php +++ b/core/components/tickets/model/tickets/ticketssection.class.php @@ -231,8 +231,10 @@ protected function _getVirtualFields() 'id' => $this->id, 'class' => 'TicketsSection', ), '', true, true); - $total->fetchValues(); - $total->save(); + if ($total->save()) { + $total->fetchValues(); + $total->save(); + } } return $total->get(array( diff --git a/core/components/tickets/model/tickets/tickettotal.class.php b/core/components/tickets/model/tickets/tickettotal.class.php index 2bec1cd..aae7d27 100644 --- a/core/components/tickets/model/tickets/tickettotal.class.php +++ b/core/components/tickets/model/tickets/tickettotal.class.php @@ -2,21 +2,6 @@ class TicketTotal extends xPDOObject { - /** - * @param null $cacheFlag - * - * @return bool - */ - public function save($cacheFlag = null) - { - if ($this->isNew()) { - $this->fromArray($this->fetchValues(), '', false, true); - } - - return parent::save($cacheFlag); - } - - /** * Get values from database */