Permalink
Browse files

Added check for gettext before installation. Fixes #99

  • Loading branch information...
1 parent fe1c9a3 commit 96256c545d566b246e5393c3708e3ec4b5a696d8 @soonick committed Jan 8, 2013
Showing with 10 additions and 4 deletions.
  1. +10 −4 index.php
View
@@ -37,17 +37,23 @@
require_once(Pommo::$_baseDir.'classes/Pommo_Template.php');
$view = new Pommo_Template();
+$fatal_error = null;
// Check we have the mysql module installed
if (!extension_loaded('mysql')) {
$fatal_error[] = "Php mysql module is not installed.";
- $view->assign('errors', $fatal_error);
- $view->display('message');
- exit();
+}
+
+// Check if module is installed
+if (!extension_loaded('gettext')) {
+ $fatal_error[] = "Php gettext module is not installed.";
}
//Check write permission to the cache directory
-if (!is_writable (dirname(__FILE__).'/cache')) {
+if (!is_writable(dirname(__FILE__).'/cache')) {
$fatal_error[] = "The cache directory needs to be writable";
+}
+
+if ($fatal_error) {
$view->assign('errors', $fatal_error);
$view->display('message');
exit();

0 comments on commit 96256c5

Please sign in to comment.