]> git.sur5r.net Git - bacula/bacula/commitdiff
bacula-web: php version check added to test page
authorDavide Franco <bacula-dev@dflc.ch>
Wed, 22 Jun 2011 11:28:23 +0000 (13:28 +0200)
committerEric Bollengier <eric@eb.homelinux.org>
Tue, 2 Aug 2011 09:56:17 +0000 (11:56 +0200)
gui/bacula-web/test.php

index 16e2bace2010b514873e073e9000a4d65a71e5e2..139031a45e818b9f37725044a96f1c94f7649d6a 100644 (file)
                                                         'check_descr'          => 'PHP PostgreSQL support must be installed in order to run bacula-web with PostgreSQL bacula catalog'),                                                               
                                          array( 'check_cmd'            => 'smarty-cache',
                                                         'check_label'          => 'Smarty cache folder write permission',
-                                                        'check_descr'          => 'Smarty template engine need write permissions to templates_c folder')
+                                                        'check_descr'          => 'Smarty template engine need write permissions to templates_c folder'),
+                                     array( 'check_cmd'                => 'php-version',
+                                                        'check_label'          => 'PHP version',
+                                                        'check_descr'          => 'PHP version must be at least 5.0.0 (current = ' . PHP_VERSION . ')' )
                                        );
 
  // Doing all checks
                 case 'smarty-cache':
                         $check['check_result'] = $check_result[ is_writable( "./templates_c" ) ];
                 break;
+                case 'php-version':
+                        $phpversion = explode( '.', PHP_VERSION );
+                        $phpversion = $phpversion[0];
+                        $check['check_result'] = $check_result[ $phpversion >= 5 ];
+                break;
         }
  }