From 782c1e0ae0bc597629abcd88f844d863da45901a Mon Sep 17 00:00:00 2001 From: ckieffer Date: Mon, 14 Jun 2010 13:50:02 -0400 Subject: Removed self-closing slash from opening
  • tag. --- modules/user/views/admin_users.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/user/views/admin_users.html.php b/modules/user/views/admin_users.html.php index 270a7207..b2526bd8 100644 --- a/modules/user/views/admin_users.html.php +++ b/modules/user/views/admin_users.html.php @@ -120,7 +120,7 @@
      $group): ?> -
    • " /> +
    • "> group = $group; ?>
    • -- cgit v1.2.3 From 4ed60d6755944923ace336ffc3e61881ce14411f Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 14 Jun 2010 21:20:33 -0700 Subject: 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. --- modules/g2_import/controllers/admin_g2_import.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3 From 22470d98e7a4cbe1a78898e56e4e201948f94122 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 14 Jun 2010 22:42:32 -0700 Subject: Add a simple/cheap test to make sure that the database config is ok. Fixes ticket #1029. --- modules/gallery/hooks/init_gallery.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/gallery/hooks/init_gallery.php b/modules/gallery/hooks/init_gallery.php index 10383e9a..64e44b56 100644 --- a/modules/gallery/hooks/init_gallery.php +++ b/modules/gallery/hooks/init_gallery.php @@ -24,6 +24,15 @@ if (!file_exists(VARPATH . "database.php")) { url::redirect(url::abs_file("installer")); } +// Simple and cheap test to make sure that the database config is ok. Do this before we do +// anything else database related. +try { + Database::instance()->connect(); +} catch (Kohana_PHP_Exception $e) { + print "Database configuration error. Please check var/database.php"; + exit; +} + Event::add("system.ready", array("Gallery_I18n", "instance")); Event::add("system.ready", array("module", "load_modules")); Event::add("system.ready", array("gallery", "ready")); -- cgit v1.2.3