From a6170dc065856c6c4b6f69a4571fe19dee87d0ee Mon Sep 17 00:00:00 2001 From: Andy Staudacher Date: Sat, 6 Feb 2010 18:37:25 -0800 Subject: Fix maintenance view for the case when g2_import is configured and the user replaced the original g2 directory with the .htaccess file only. --- modules/g2_import/helpers/g2_import_task.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'modules/g2_import/helpers/g2_import_task.php') diff --git a/modules/g2_import/helpers/g2_import_task.php b/modules/g2_import/helpers/g2_import_task.php index 2e81adef..1ec6870e 100644 --- a/modules/g2_import/helpers/g2_import_task.php +++ b/modules/g2_import/helpers/g2_import_task.php @@ -23,7 +23,11 @@ class g2_import_task_Core { g2_import::lower_error_reporting(); if (g2_import::is_configured()) { g2_import::init(); - $version = g2_import::version(); + // Guard from common case where the import has been + // completed and the original files have been removed. + if (class_exists("GalleryCoreApi")) { + $version = g2_import::version(); + } } g2_import::restore_error_reporting(); -- cgit v1.2.3