summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 089c8d6)
raw | patch | inline | side by side (parent: 089c8d6)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 7 Feb 2007 12:03:25 +0000 (12:03 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 7 Feb 2007 12:03:25 +0000 (12:03 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5705 594d385d-05f5-0310-b6e9-bd551577e9d8
html/images/setup_step_back.png | [new file with mode: 0644] | patch | blob |
html/images/setup_step_back_gray.png | [new file with mode: 0644] | patch | blob |
html/images/setup_step_forward.png | [new file with mode: 0644] | patch | blob |
html/images/setup_step_forward_gray.png | [new file with mode: 0644] | patch | blob |
setup/class_setup.inc | patch | blob | history | |
setup/class_setupStep2.inc | patch | blob | history | |
setup/setup_step2.tpl | patch | blob | history |
diff --git a/html/images/setup_step_back.png b/html/images/setup_step_back.png
new file mode 100644 (file)
index 0000000..52fa887
Binary files /dev/null and b/html/images/setup_step_back.png differ
index 0000000..52fa887
Binary files /dev/null and b/html/images/setup_step_back.png differ
diff --git a/html/images/setup_step_back_gray.png b/html/images/setup_step_back_gray.png
new file mode 100644 (file)
index 0000000..b209207
Binary files /dev/null and b/html/images/setup_step_back_gray.png differ
index 0000000..b209207
Binary files /dev/null and b/html/images/setup_step_back_gray.png differ
diff --git a/html/images/setup_step_forward.png b/html/images/setup_step_forward.png
new file mode 100644 (file)
index 0000000..e9cbecd
Binary files /dev/null and b/html/images/setup_step_forward.png differ
index 0000000..e9cbecd
Binary files /dev/null and b/html/images/setup_step_forward.png differ
diff --git a/html/images/setup_step_forward_gray.png b/html/images/setup_step_forward_gray.png
new file mode 100644 (file)
index 0000000..33d7c28
Binary files /dev/null and b/html/images/setup_step_forward_gray.png differ
index 0000000..33d7c28
Binary files /dev/null and b/html/images/setup_step_forward_gray.png differ
diff --git a/setup/class_setup.inc b/setup/class_setup.inc
index 13b2c8e94a63f2438402119c27854101e8482e96..8400ce15f30be189206815ba6106bdfd39f20eff 100644 (file)
--- a/setup/class_setup.inc
+++ b/setup/class_setup.inc
}
}
+ /* Check if image button requests next page */
+ foreach($_POST as $name => $value){
+ if(preg_match("/^next_(x|y)/",$name)){
+ $_POST['next'] = TRUE;
+ }
+ if(preg_match("/^last_(x|y)/",$name)){
+ $_POST['last'] = TRUE;
+ }
+ }
+
/* Check if step was selected */
- if(isset($_GET['step']) || isset($_POST['next'])){
+ if(isset($_GET['step']) || isset($_POST['next']) || isset($_POST['last'])){
if(isset($_GET['step'])){
$step = $_GET['step'];
- }else{
+ }elseif(isset($_POST['next'])){
$step = $this->i_current + 1;
+ }elseif(isset($_POST['last'])){
+ $step = $this->i_current - 1;
}
if($this->selectable_step($step)){
/* Create header entry */
function get_header_html()
{
- $str ="<font style='font-size:20px;'>";
+ $str ="";
+ $str.=" <div >";
+ $str.=" <div>";
+ $str.=" <font style='font-size:20px;float:top'>";
$str.= $this->o_steps[$this->i_current]->get_long_title();
- $str.="</font>";
+ $str.=" </font>";
+ $str.=" </div>";
+ $str.=" <div style='text-align:right;float:top;'>";
+ if(isset($this->o_steps[$this->i_current -1]) && $this->o_steps[$this->i_current -1]->is_enabled()){
+ $str.=" <input class='center' type='image' name='last' src='images/setup_step_back.png' title='"._("Last step")."'>";
+ }else{
+ $str.=" <img class='center' src='images/setup_step_back_gray.png' title='"._("Last step")."'>";
+ }
+ if(isset($this->o_steps[$this->i_current +1]) && $this->o_steps[$this->i_current +1]->is_enabled()){
+ $str.=" <input class='center' type='image' name='next' src='images/setup_step_forward.png' title='"._("Next step")."'>";
+ }else{
+ $str.=" <img class='center' src='images/setup_step_forward_gray.png' title='"._("Next step")."'>";
+ }
+ $str.= " </div>";
+ $str.= "</div>";
return ($str);
}
index b1cc05d2e4ab342a8bf17736ed46de7d485c31b4..7c2d3536c63a5b4c0d5628e8b4e4cad674824df7 100644 (file)
{
var $basic_checks = array();
var $config_checks= array();
+ var $is_writeable = array();
+
function setup_step_2()
{
{
$this->run_checks();
$smarty = get_smarty();
- $smarty->assign("basic" ,$this->basic_checks);
- $smarty->assign("config",$this->config_checks);
+ $smarty->assign("basic" ,$this->basic_checks);
+ $smarty->assign("config" ,$this->config_checks);
+ $smarty->assign("is_writeable",$this->is_writeable);
return($smarty->fetch(get_template_path("setup_step2.tpl",TRUE,dirname(__FILE__))));
}
/* Execute all checks */
function run_checks()
{
- $i =0;
$this->basic_checks = array();
$this->config_checks = array();
+ $this->is_writeable = array();
/* PHP version check */
- $i ++;
- $this->basic_checks[$i]['NAME'] = _("Checking PHP version");
- $this->basic_checks[$i]['DESC'] = sprintf(_("PHP must be of version %s or %s or above for some functions."),"4.3.10","5.2.0");
- $this->basic_checks[$i]['RESULT']= $this->check_php_version();
- $this->basic_checks[$i]['SOLUTION'] = _("GOsa requires functions that may not be available in older PHP versions, just update to a supported PHP version.");
+ $N = _("Checking PHP version");
+ $D = sprintf(_("PHP must be of version %s or %s or above for some functions."),"4.3.10","5.2.0");
+ $S = _("GOsa requires functions that may not be available in older PHP versions, just update to a supported PHP version.");
+ $R = $this->check_php_version();
+ $M = TRUE;
+ $this->basic_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M );
/* Checking imap extension */
- $i ++;
- $this->basic_checks[$i]['NAME'] = _("Checking for ldap module");
- $this->basic_checks[$i]['DESC'] = _("This is the main module used by GOsa and therefore really required.");
- $this->basic_checks[$i]['RESULT']= is_callable("ldap_bind");
- $this->basic_checks[$i]['SOLUTION'] = _("The ldap module (PHP4-ldap/PHP5-ldap) is required to communicate with your ldap server.");
+ $N = _("Checking for ldap module");
+ $D = _("This is the main module used by GOsa and therefore really required.");
+ $S = _("The ldap module (PHP4-ldap/PHP5-ldap) is required to communicate with your ldap server.");
+ $R = is_callable("ldap_bind");
+ $M = TRUE;
+ $this->basic_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M );
/* Check for gettext support */
- $i ++;
- $this->basic_checks[$i]['NAME'] = _("Checking for gettext support");
- $this->basic_checks[$i]['DESC'] = _("Gettext support is required for internationalized GOsa.");
- $this->basic_checks[$i]['RESULT']= is_callable("bindtextdomain");
- $this->basic_checks[$i]['SOLUTION'] = _("This should be activated while compiling your PHP. (--with-gettext)");
-
- /* iconv */
- $i ++;
- $this->basic_checks[$i]['NAME'] = _("Checking for iconv support");
- $this->basic_checks[$i]['DESC'] = _("This module is used by GOsa to convert samba munged dial informations and is therefore required.");
- $this->basic_checks[$i]['RESULT']= is_callable("iconv");
- $this->basic_checks[$i]['SOLUTION'] = _("his should be activated while compiling your PHP. (--with-iconv)");
-
- /**/
- $i ++;
- $this->basic_checks[$i]['NAME'] = _("Checking for mhash module");
- $this->basic_checks[$i]['DESC'] = _("To use SSHA encryption, you'll need this module. If you are just using crypt or md5 encryption, ignore this message. GOsa will run without it.");
- $this->basic_checks[$i]['RESULT']= is_callable("mhash");
- $this->basic_checks[$i]['SOLUTION'] = _("The mhash module for PHP 4/5 is not available, please install it. (php4-mhash/php5-mhash)");
-
- /**/
- $i ++;
- $this->basic_checks[$i]['NAME'] = _("Checking for imap module");
- $this->basic_checks[$i]['DESC'] = _("The IMAP module is needed to communicate with the IMAP server. It gets status informations, creates and deletes mail users. ");
- $this->basic_checks[$i]['RESULT']= is_callable("imap_open");
- $this->basic_checks[$i]['SOLUTION'] = _("This module is used to communicate with your mail server. Please install (PHP4-imap PHP5- imap)");
-
- /**/
- $i ++;
- $this->basic_checks[$i]['NAME'] = _("Checking for getacl in imap");
- $this->basic_checks[$i]['DESC'] = _("The getacl support is needed for shared folder permissions. The standard IMAP module is not capable of reading acl's. You need a recend PHP version for this feature.");
- $this->basic_checks[$i]['RESULT']= is_callable("imap_getacl");
- $this->basic_checks[$i]['SOLUTION'] = _("This module is used to communicate with your mail server. Please install (PHP4-imap PHP5- imap)");
-
- /**/
- $i ++;
- $this->basic_checks[$i]['NAME'] = _("Checking for mysql module");
- $this->basic_checks[$i]['DESC'] = _("MySQL support is needed for reading GOfax reports from databases.");
- $this->basic_checks[$i]['RESULT']= is_callable("mysql_query");
- $this->basic_checks[$i]['SOLUTION'] = _("This module is required to communicate with database servers, for example phone and fax addons. Please install (PHP4-mysql PHP5-mysql)");
-
- /**/
- $i ++;
- $this->basic_checks[$i]['NAME'] = _("Checking for kadm5 module");
- $this->basic_checks[$i]['DESC'] = _("Managing users in kerberos requires the kadm5 module which is downloadable via PEAR network.");
- $this->basic_checks[$i]['RESULT']= is_callable("kadm5_init_with_password");
- $this->basic_checks[$i]['SOLUTION'] = _("This module is required to manage user in kerberos, it is downloadable via PEAR network");
-
- /**/
- $i ++;
- $this->basic_checks[$i]['NAME'] = _("Checking for snmp Module");
- $this->basic_checks[$i]['DESC'] = _("Simple Network Management Protocol (SNMP) is required for client monitoring.");
- $this->basic_checks[$i]['RESULT']= is_callable("snmpget");
- $this->basic_checks[$i]['SOLUTION'] = _("This module is required for client monitoring. (PHP4-snmp/PHP5-snmp)");
+ $N = _("Checking for gettext support");
+ $D = _("Gettext support is required for internationalized GOsa.");
+ $S = _("This should be activated while compiling your PHP. (--with-gettext)");
+ $R = is_callable("bindtextdomain");
+ $M = TRUE;
+ $this->basic_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M );
+
+ /* Checing for iconv */
+ $N = _("Checking for iconv support");
+ $D = _("This module is used by GOsa to convert samba munged dial informations and is therefore required. ");
+ $S = _("his should be activated while compiling your PHP. (--with-iconv)");
+ $R = is_callable("iconv");
+ $M = TRUE;
+ $this->basic_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M );
+
+ /* Check for installed mhash module */
+ $N = _("Checking for mhash module");
+ $D = _("To use SSHA encryption, you'll need this module. GOsa will run without it.");
+ $S = _("The mhash module for PHP 4/5 is not available, please install it. (php4-mhash/php5-mhash)");
+ $R = is_callable("mhash");
+ $M = FALSE;
+ $this->basic_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M );
+
+ /* Is imap module available */
+ $N = _("Checking for imap module");
+ $D = _("The IMAP module is needed to communicate with the IMAP server. It gets status informations, creates and deletes mail users.");
+ $S = _("This module is used to communicate with your mail server. Please install (PHP4-imap PHP5-imap)");
+ $R = is_callable("imap_open");
+ $M = TRUE;
+ $this->basic_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M );
+
+ /* Check getacl in imap module */
+ $N = _("Checking for getacl in imap");
+ $D = _("The getacl support is needed for shared folder permissions. The standard IMAP module is not capable of reading acl's. You need a recend PHP version for this feature.");
+ $S = $D;
+ $R = is_callable("imap_getacl");
+ $M = TRUE;
+ $this->basic_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M );
+
+ /* Mysql module loaded ? */
+ $N = _("Checking for mysql module");
+ $D = _("MySQL support is needed for reading GOfax reports from databases.");
+ $S = _("This module is required to communicate with database servers, for example used in phone and fax addons. Please install (PHP4-mysql PHP5-mysql)");
+ $R = is_callable("mysql_query");
+ $M = TRUE;
+ $this->basic_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M );
+
+ /* Checking for kadm5 module */
+ $N = _("Checking for kadm5 module");
+ $D = _("Managing users in kerberos requires the kadm5 module which is downloadable via PEAR network.");
+ $S = _("This module is required to manage user in kerberos, it is downloadable via PEAR network");
+ $R = is_callable("kadm5_init_with_password");
+ $M = FALSE;
+ $this->basic_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M );
+
+ /* Snmp module available ? */
+ $N = _("Checking for snmp Module");
+ $D = _("Simple Network Management Protocol (SNMP) is required for client monitoring.");
+ $S = _("This module is required for client monitoring. (PHP4-snmp/PHP5-snmp)");
+ $R = is_callable("snmpget");
+ $M = FALSE;
+ $this->basic_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M );
/* Checking for Cups module */
- $i ++;
- $this->basic_checks[$i]['NAME'] = _("Checking for cups module");
- $this->basic_checks[$i]['DESC'] = _("In order to read available printers from IPP protocol instead of printcap files, you've to install the CUPS module.");
- $this->basic_checks[$i]['RESULT']= is_callable("cups_get_dest_list");
- $this->basic_checks[$i]['SOLUTION'] = _("In order to read available printers from IPP protocol instead of printcap files, you've to install the CUPS module.");
+ $N = _("Checking for cups module");
+ $D = _("In order to read available printers from IPP protocol instead of printcap files, you've to install the CUPS module.");
+ $S = $D;
+ $R = is_callable("cups_get_dest_list");
+ $M = FALSE;
+ $this->basic_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M );
/* Checking for F ping utility */
- $i ++;
$query= "LC_ALL=C LANG=C fping -v 2>&1";
$output= shell_exec ($query);
-
- $this->basic_checks[$i]['NAME'] = _("Checking for fping utility");
- $this->basic_checks[$i]['DESC'] = _("The fping utility is only used if you've got a thin client based terminal environment running.");
- $this->basic_checks[$i]['RESULT']= preg_match("/^fping:/", $output);
- $this->basic_checks[$i]['SOLUTION'] = _("The fping utility is only used in thin client based terminal environment.");
+ $N = _("Checking for fping utility");
+ $D = _("The fping utility is only used if you've got a thin client based terminal environment running.");
+ $S = _("The fping utility is only used in thin client based terminal environment.");
+ $R = preg_match("/^fping:/", $output);
+ $M = FALSE;
+ $this->basic_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M );
/* Checking generate LM/NT password hashes */
- $i ++;
$query= "mkntpwd 2>&1";
$output= shell_exec ($query);
$have_mkntpwd= preg_match("/^Usage: mkntpwd /", $output);
$have_mkntpwd |= ($ret == 0);
}
- $this->basic_checks[$i]['NAME'] = _("Password hashes");
- $this->basic_checks[$i]['DESC'] = _("In order to use SAMBA 2/3, you've to install some additional packages to generate password hashes.");
- $this->basic_checks[$i]['RESULT']= $have_mkntpwd;
- $this->basic_checks[$i]['SOLUTION'] = _("In order to use samba 2/3 you've to install some additional packages to generate password
-hashes. (e.g. libmhash2)");
-
+ $N = _("Password hashes");
+ $D = _("In order to use SAMBA 2/3, you've to install some additional packages to generate password hashes.");
+ $S = _("In order to use samba 2/3 you've to install some additional packages to generate password hashes. (e.g. libmhash2)");
+ $R = $have_mkntpwd;
+ $M = TRUE;
+ $this->basic_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M );
/* PHP Configuration checks
*/
/* Register_globals off */
- $i = 0;
- $this->config_checks[$i]['NAME'] = _("register_globals"." "."<b>"._("Off")."</b>");
- $this->config_checks[$i]['DESC'] = _("register_globals is a PHP mechanism to register all global varibales to be accessible from scripts without changing the scope. This may be a security risk. GOsa will run in both modes.");
- $this->config_checks[$i]['RESULT']= ini_get("register_globals") == 0;
-
- $i ++;
- $this->config_checks[$i]['NAME'] = _("session.gc_maxlifetime"." "."<b> >= 86400</b>");
- $this->config_checks[$i]['DESC'] = _("PHP uses this value for the garbage collector to delete old sessions, setting this value to one day will prevent loosing session and cookie before they really timeout.");
- $this->config_checks[$i]['RESULT']= ini_get("session.gc_maxlifetime") >= 86400;
-
- $i ++;
+ $N = _("register_globals"." "."<b>"._("Off")."</b>");
+ $D = _("register_globals is a PHP mechanism to register all global varibales to be accessible from scripts without changing the scope. This may be a security risk. GOsa will run in both modes.");
+ $S = _("Search for 'register_globals' in your php.ini and switch it to 'Off'.");
+ $R = ini_get("register_globals") == 0;
+ $M = FALSE;
+ $this->config_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M );
+
+
+ /* session lifetime set to >=86400 seconds ? */
+ $N = ("session.gc_maxlifetime"." "."<b> >= 86400</b>");
+ $D = _("PHP uses this value for the garbage collector to delete old sessions.")." ".
+ _("Setting this value to one day will prevent loosing session and cookie before they really timeout.");
+ $S = _("Serach for 'session.gc_maxlifetime' in your php.ini and set it to 86400 or higher.");
+ $R = ini_get("session.gc_maxlifetime") >= 86400;
+ $M = FALSE;
+ $this->config_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M );
+
+ /* Session auto start must be turned off */
$session_auto_start = ini_get('session.auto_start');
- $this->config_checks[$i]['NAME'] = _("session.auto_start"." "."<b>"._("Off")."</b>");
- $this->config_checks[$i]['DESC'] = _("In Order to use GOsa without any trouble, the session.auto_register option in your php.ini must be set to 'Off'.");
- $this->config_checks[$i]['RESULT']= !$session_auto_start['local_value'];
-
- $i ++;
- $this->config_checks[$i]['NAME'] = _("memory_limit")." "."<b> >= 32</b>";
- $this->config_checks[$i]['DESC'] = _("GOsa needs at least 32MB of memory, less will cause unpredictable errors! Increase it for larger setups.");
- $this->config_checks[$i]['RESULT']= ini_get('memory_limit') >= 32 ;
-
-
- $i ++;
- $this->config_checks[$i]['NAME'] = _("implicit_flush")." "."<b>"._("Off")."</b>";
- $this->config_checks[$i]['DESC'] = _("This option influences the Output handling. Turn this Option off, to increase performance.");
- $this->config_checks[$i]['RESULT']= !ini_get('implicit_flush');
+ $N = _("session.auto_start"." "."<b>"._("Off")."</b>");
+ $D = _("In Order to use GOsa without any trouble, the session.auto_register option in your php.ini must be set to 'Off'.");
+ $S = _("Serach for 'session.auto_start' in your php.ini and set it to 'Off'.");
+ $R = !$session_auto_start['local_value'];
+ $M = TRUE;
+ $this->config_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M );
+
+ /* Check if memory limit is set to 32 or > */
+ $N = _("memory_limit")." "."<b> >= 32</b>";
+ $D = _("GOsa needs at least 32MB of memory, less will cause unpredictable errors! Increase it for larger setups.");
+ $S = _("Search for 'memory_limit' in your php.ini and set it to '32M' or higher.");
+ $R = ini_get('memory_limit') >= 32 ;
+ $M = TRUE;
+ $this->config_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M );
+
+ /* Implicit Flush disabled can increase performance */
+ $N = _("implicit_flush")." "."<b>"._("Off")."</b>";
+ $D = _("This option influences the Output handling. Turn this Option off, to increase performance.");
+ $S = _("Search for 'implicit_flush' in your php.ini and set it to 'Off'.");
+ $R = ini_get('implicit_flush');
+ $M = FALSE;
+ $this->config_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M );
+
+ /* Check if execution time is set to 30 */
+ $N = _("max_execution_time")." "."<b> >= 30</b>";
+ $D = _("The Execution time should be at least 30 seconds, because some actions may consume more time.");
+ $S = _("Search for 'max_execution_time' in your php.ini and set it to '30' or higher.");
+ $R = ini_get("max_execution_time") >= 30 ;
+ $M = TRUE;
+ $this->config_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M );
+
+ /* Expose php should be set to off */
+ $N = _("expose_php")." <b>"._("Off")."</b>";
+ $D = _("Increase the server security by setting expose_php to 'off'. PHP won't send any Information about the server you are running in this case.");
+ $S = _("Search for 'expose_php' in your php.ini and set if to 'Off'.");
+ $R = !ini_get("expose_php");
+ $M = FALSE;
+ $this->config_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M );
+
+ /* Automatic quoting must be turned on */
+ $N = _("magic_quotes_gpc")." <b>"._("On")."</b>";
+ $D = _("Increase your server security by setting magic_quotes_gpc to 'on'. PHP will escape all quotes in strings in this case.");
+ $S = _("Search for 'magic_quotes_gpc' in yout php.ini and set it to 'On'.");
+ $R = ini_get('magic_quotes_gpc');
+ $M = TRUE;
+ $this->config_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M );
+
+
+ /* Automatic quoting must be turned on */
+ $N = _("Configuration file writeable.");
+ $D = _("The Configuration file can't be written");
+ $S = _("Grant write access on '/etc/gosa/gosa.conf' for the webserver or copy the generated gosa.conf on your own.");
+ $R = file_exists("/etc/gosa/gosa.conf") && is_writeable("/etc/gosa/gosa.conf");
+ $M = TRUE;
+ $this->is_writeable[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M );
- $i ++;
- $this->config_checks[$i]['NAME'] = _("max_execution_time")." "."<b> >= 30</b>";
- $this->config_checks[$i]['DESC'] = _("The Execution time should be at least 30 seconds, because some actions may consume more time.");
- $this->config_checks[$i]['RESULT']= ini_get("max_execution_time") >= 30 ;
-
- $i ++;
- $this->config_checks[$i]['NAME'] = _("expose_php")." <b>"._("Off")."</b>";
- $this->config_checks[$i]['DESC'] = _("Increase the server security by setting expose_php to 'off'. PHP won't send any Information about the server you are running in this case.");
- $this->config_checks[$i]['RESULT']= !ini_get("expose_php");
-
-
- $i ++;
- $this->config_checks[$i]['NAME'] = _("magic_quotes_gpc")." <b>"._("On")."</b>";
- $this->config_checks[$i]['DESC'] = _("Increase your server security by setting magic_quotes_gpc to 'on'. PHP will escape all quotes in strings in this case.");
- $this->config_checks[$i]['RESULT']= ini_get('magic_quotes_gpc');
-
-
-
-
- foreach($this->basic_checks as $key => $entry){
- if(!isset($entry['SOLUTION'])){
- $this->basic_checks[$key]['SOLUTION'] = "";
- }
- }
}
diff --git a/setup/setup_step2.tpl b/setup/setup_step2.tpl
index 4413065e722f8b3f65ba4fafa938b652acb4da0d..30984f24d1a398c177ab6f313e892d3cde8707cc 100644 (file)
--- a/setup/setup_step2.tpl
+++ b/setup/setup_step2.tpl
+<!-- Div container with PHP module checks -->
<div style='float:left;'>
+
+ <!-- Set content styles -->
<div class='default' style='margin:10px;'>
-
- <h2>{t}PHP module and extension checks{/t}</h2>
+
+ <!-- Beginning PHP module check output -->
+ <h2 style='background-color:#DDDDDD;border: solid 1px #CCCCCC'>{t}PHP module and extension checks{/t}</h2>
{foreach from=$basic item=val key=key}
+
+ <!-- Entry {$key} -->
+ {if $basic[$key].SOLUTION != "" && !$basic[$key].RESULT}
+
+ <!-- Add ability to display info popup -->
+ <div style='width:300px; cursor:default;'
+ onMouseOver="javascript: display_solution('sol_{$key}');"
+ onMouseOut="javascript: hide_solution('sol_{$key}');" >
+ {else}
- <div style='width:300px;'>
+ <!-- Normal entry everything is fine -->
+ <div style='width:300px; cursor:default;'>
+ {/if}
+
+ <div class='default' style='float:left'>{$basic[$key].NAME}</div>
+ <div class='default' style='none;text-align:right; '>
- {if $basic[$key].SOLUTION != "" && !$basic[$key].RESULT}
- <div class='default' style='float:left'
- onMouseOver="javascript: display_solution('sol_{$key}');"
- onMouseOut="javascript: hide_solution('sol_{$key}');" >
+ {if $basic[$key].RESULT}
+ <font color='green'>{t}Successfull{/t}</font>
+ {else}
+ {if $basic[$key].MUST}
+ <font color='red'>{t}Failed{/t}</font>
{else}
- <div class='default' style='float:left'>
+ <font color='blue'>{t}Failed{/t}</font>
{/if}
-
+ {if $basic[$key].SOLUTION != ""}
- {$basic[$key].NAME}
+ <!-- Inforamtion popup -->
+ <div class='solution_hidden' id='sol_{$key}'>
+ {if $basic[$key].MUST}
+ <div style="background-image: url('images/error.png'); background-repeat: no-repeat; padding-left: 35px;">
+ <b>{t}GOsa will NOT run without fixing this.{/t}</b>
+ {else}
+ <div style="background-image: url('images/warning.png'); background-repeat: no-repeat; padding-left: 35px;">
+ <i>{t}GOsa will run without fixing this.{/t}</i>
+ {/if}
+ <br>
+ {$basic[$key].SOLUTION}
+ </div>
+ </div>
+ {/if}
+ {/if}
+ </div>
</div>
- {if $basic[$key].SOLUTION != "" && !$basic[$key].RESULT}
- <div style='width:60px; float:left;'
- onMouseOver="javascript: display_solution('sol_{$key}');"
- onMouseOut="javascript: hide_solution('sol_{$key}');"></div>
+ {/foreach}
+ </div>
+</div>
+
+
+<!-- Div container with PHP config checks -->
+<div style='float:left;'>
+
+ <!-- Set content styles -->
+ <div class='default' style='margin:10px;'>
+
+ <!-- Beginning PHP config check output -->
+ <h2 style='background-color:#DDDDDD;border: solid 1px #CCCCCC'>{t}PHP setup configuration{/t}</h2>
+
+ {foreach from=$config item=val key=key}
+
+ <!-- Entry {$key} -->
+ {if $config[$key].SOLUTION != "" && !$config[$key].RESULT}
+
+ <!-- Add ability to display info popup -->
+ <div style='width:300px; cursor:default;'
+ onMouseOver="javascript: display_solution('sol_config_{$key}');"
+ onMouseOut="javascript: hide_solution('sol_config_{$key}');" >
+ {else}
+
+ <!-- Normal entry everything is fine -->
+ <div style='width:300px; cursor:default;'>
+ {/if}
+
+
+ <div class='default' style='float:left'>{$config[$key].NAME}</div>
+ <div class='default' style='text-align:right; '>
+ {if $config[$key].RESULT}
+ <font color='green'>{t}Successfull{/t}</font>
+ {else}
+
+ {if $config[$key].MUST}
+ <font color='red'>{t}Failed{/t}</font>
{else}
- <div style='width:60px; float:left;'> </div>
+ <font color='blue'>{t}Failed{/t}</font>
{/if}
- {if $basic[$key].SOLUTION != "" && !$basic[$key].RESULT}
- <div class='default' style='float:none;text-align:right; '
- onMouseOver="javascript: display_solution('sol_{$key}');"
- onMouseOut="javascript: hide_solution('sol_{$key}');" >
- {else}
- <div class='default' style='none;text-align:right; '>
+
+ {if $config[$key].SOLUTION != ""}
+
+ <!-- Inforamtion popup -->
+ <div class='solution_hidden' id='sol_config_{$key}'>
+ {if $config[$key].MUST}
+ <div style="background-image: url('images/error.png'); background-repeat: no-repeat; padding-left: 35px;">
+ <b>{t}GOsa will NOT run without fixing this.{/t}</b>
+ {else}
+ <div style="background-image: url('images/warning.png'); background-repeat: no-repeat; padding-left: 35px;">
+ <i>{t}GOsa will run without fixing this.{/t}</i>
+ {/if}
+ <br>
+ {$config[$key].SOLUTION}
+ </div>
+ </div>
{/if}
- {if $basic[$key].RESULT}
- <font color='green'>{t}Success{/t}</font>
+ {/if}
+ </div>
+ </div>
+ {/foreach}
+
+
+ <!-- Beginning PHP config check output -->
+ <h2 style='background-color:#DDDDDD;border: solid 1px #CCCCCC'>{t}Configuration file writeable{/t}</h2>
+
+ {foreach from=$is_writeable item=val key=key}
+
+ <!-- Entry {$key} -->
+ {if $is_writeable[$key].SOLUTION != "" && !$is_writeable[$key].RESULT}
+
+ <!-- Add ability to display info popup -->
+ <div style='width:300px; cursor:default;'
+ onMouseOver="javascript: display_solution('sol_is_writeable{$key}');"
+ onMouseOut="javascript: hide_solution('sol_is_writeable{$key}');" >
+ {else}
+
+ <!-- Normal entry everything is fine -->
+ <div style='width:300px; cursor:default;'>
+ {/if}
+
+
+ <div class='default' style='float:left'>{$is_writeable[$key].NAME}</div>
+ <div class='default' style='text-align:right; '>
+ {if $is_writeable[$key].RESULT}
+ <font color='green'>{t}Successfull{/t}</font>
{else}
- <font color='red'>{t}Failed{/t}</font>
- {if $basic[$key].SOLUTION != ""}
- <div class='solution_hidden' id='sol_{$key}'>
+
+ {if $is_writeable[$key].MUST}
+ <font color='red'>{t}Failed{/t}</font>
+ {else}
+ <font color='blue'>{t}Failed{/t}</font>
+ {/if}
+
+ {if $is_writeable[$key].SOLUTION != ""}
+
+ <!-- Inforamtion popup -->
+ <div class='solution_hidden' id='sol_is_writeable{$key}'>
+ {if $is_writeable[$key].MUST}
<div style="background-image: url('images/error.png'); background-repeat: no-repeat; padding-left: 35px;">
- {$basic[$key].SOLUTION}
- </div>
+ <b>{t}GOsa will NOT run without fixing this.{/t}</b>
+ {else}
+ <div style="background-image: url('images/warning.png'); background-repeat: no-repeat; padding-left: 35px;">
+ <i>{t}GOsa will run without fixing this.{/t}</i>
+ {/if}
+ <br>
+ {$is_writeable[$key].SOLUTION}
</div>
+ </div>
{/if}
-
{/if}
</div>
- </div>
+ </div>
{/foreach}
+
+
</div>
</div>
-<div class='default' style='margin:10px; float:left;'>
-
- <h2>{t}PHP setup configuration{/t}</h2>
- {foreach from=$config item=val key=key}
- <div class='default' style='float:left'>
- {$config[$key].NAME}
- </div>
- <div style='width:60px; float:left;'> </div>
- <div class='default' style='text-align:right; '>
- {if $config[$key].RESULT}
- <font color='green'>{t}Success{/t}</font>
- {else}
- <font color='red'>{t}Failed{/t}</font>
- {/if}
- </div>
- {/foreach}
-</div>
-<script language='javascript'>
+<script type="text/javascript">
{literal}
function display_solution(str){
obj = document.getElementById(str);