From 7b9c18ecaec4efb365366e606b746e8d47f29b25 Mon Sep 17 00:00:00 2001
From: Marius Cramer <m.cramer@pixcept.de>
Date: Sat, 25 Jan 2014 14:33:33 -0500
Subject: [PATCH] Added script to remove all files that are no longer contained in the installation package - Important for plugin files!

---
 install/lib/update.lib.php |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/install/lib/update.lib.php b/install/lib/update.lib.php
index bc0453f..61f400b 100644
--- a/install/lib/update.lib.php
+++ b/install/lib/update.lib.php
@@ -179,7 +179,7 @@
 				}
 
 				//* Exec onBeforeSQL function
-				if(isset($php_patch) && is_object($php_patch)) {
+				if(isset($php_patch) && is_object($php_patch) && method_exists($php_patch, 'onBeforeSQL')) {
 					$php_patch->onBeforeSQL();
 					swriteln($inst->lng('Executing PHP patch file').': '.$php_patch_filename);
 				}
@@ -193,7 +193,7 @@
 				swriteln($inst->lng('Loading SQL patch file').': '.$sql_patch_filename);
 
 				//* Exec onAfterSQL function
-				if(isset($php_patch) && is_object($php_patch)) {
+				if(isset($php_patch) && is_object($php_patch) && method_exists($php_patch, 'onAfterSQL')) {
 					$php_patch->onAfterSQL();
 				}
 

--
Gitblit v1.9.1