summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-06-14 21:20:33 -0700
committerTim Almdal <tnalmdal@shaw.ca>2010-06-15 09:14:10 -0700
commitb2afba1db1184fcf491bbdf7f0a50ddb5615e26f (patch)
tree00de1771e70d3cc5af04d17ef20763289c37dbc0
parentf5eb5d5d7014e1d09194803d3839f0077bc9f890 (diff)
The fact that we have a path to a G2 embed file doesn't mean that it's still
valid so check to see that it's ok before proceeding. This should resolve #458.
-rw-r--r--modules/g2_import/controllers/admin_g2_import.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/g2_import/controllers/admin_g2_import.php b/modules/g2_import/controllers/admin_g2_import.php
index b1018560..cc60f757 100644
--- a/modules/g2_import/controllers/admin_g2_import.php
+++ b/modules/g2_import/controllers/admin_g2_import.php
@@ -33,7 +33,7 @@ class Admin_g2_import_Controller extends Admin_Controller {
$view->page_title = t("Gallery 2 import");
$view->content = new View("admin_g2_import.html");
$view->content->form = $this->_get_import_form();
- $view->content->version = '';
+ $view->content->version = "";
if (g2_import::is_initialized()) {
$view->content->g2_stats = $g2_stats;
@@ -41,6 +41,8 @@ class Admin_g2_import_Controller extends Admin_Controller {
$view->content->thumb_size = module::get_var("gallery", "thumb_size");
$view->content->resize_size = module::get_var("gallery", "resize_size");
$view->content->version = g2_import::version();
+ } else if (g2_import::is_configured()) {
+ $view->content->form->configure_g2_import->embed_path->add_error("invalid", 1);
}
g2_import::restore_error_reporting();
print $view;