From 9d168fc6598cbf538e7ad791ef0f431aee4d903d Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 29 Mar 2007 10:21:07 +0000 Subject: [PATCH] Fixed error 'calling function on non object' if we use the browser back button after saving a script. Fixed vacation address loading git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5928 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/sieve/class_sieveElement_Vacation.inc | 2 +- include/sieve/class_sieveManagement.inc | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/sieve/class_sieveElement_Vacation.inc b/include/sieve/class_sieveElement_Vacation.inc index 3cb1b3929..91d231066 100644 --- a/include/sieve/class_sieveElement_Vacation.inc +++ b/include/sieve/class_sieveElement_Vacation.inc @@ -57,7 +57,7 @@ class sieve_vacation } } }else{ - $this->addresses[] = $data['ELEMENTS'][$i]['text'] ; + $this->addresses[] = preg_replace("/\"/i","",$data['ELEMENTS'][$i]['text']); } } diff --git a/include/sieve/class_sieveManagement.inc b/include/sieve/class_sieveManagement.inc index cde2d8540..0c58e79c5 100644 --- a/include/sieve/class_sieveManagement.inc +++ b/include/sieve/class_sieveManagement.inc @@ -378,7 +378,9 @@ class sieveManagement extends plugin } /* Save currently edited sieve script. */ - if($this->parent->acl_is_writeable("sieveManagement") && isset($_POST['save_sieve_changes'])){ + if($this->parent->acl_is_writeable("sieveManagement") && + isset($_POST['save_sieve_changes']) && + is_object($this->current_handler)){ $chk = $this->current_handler->check(); if(!count($chk)){ -- 2.30.2