Skip to content

Commit

Permalink
The fact that we have a path to a G2 embed file doesn't mean that it'…
Browse files Browse the repository at this point in the history
…s still

valid so check to see that it's ok before proceeding.  This should resolve #458.
  • Loading branch information
bharat committed Jun 15, 2010
1 parent 3c6e710 commit 4ed60d6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/g2_import/controllers/admin_g2_import.php
Expand Up @@ -33,14 +33,16 @@ public function index() {
$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;
$view->content->g2_sizes = $g2_sizes;
$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;
Expand Down

0 comments on commit 4ed60d6

Please sign in to comment.