summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-03-11 14:38:52 +0000
committerTim Almdal <tnalmdal@shaw.ca>2009-03-11 14:38:52 +0000
commit4dfc5435ef8673d0639c16375980426809599c99 (patch)
tree02b35298bf2fe7f4d8288600ae2c44f47eb63fec
parenta521d9177f5e299d2ff25cc288e59e4bf1398a1b (diff)
Fix ticket #69. Rather than giving a better error message when the
gallery3 database is not setup. Just redirect to the installer.
-rw-r--r--core/hooks/init_gallery.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/hooks/init_gallery.php b/core/hooks/init_gallery.php
index 13c61256..56c19f04 100644
--- a/core/hooks/init_gallery.php
+++ b/core/hooks/init_gallery.php
@@ -17,6 +17,12 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
+
+if (!file_exists(VARPATH . "database.php")) {
+ header("Location: ../installer");
+ exit();
+}
+
Event::add("system.ready", array("I18n", "instance"));
Event::add("system.post_routing", array("theme", "load_themes"));
Event::add("system.ready", array("module", "load_modules"));