forked from extern/egroupware
"allow apps to specify there own php.ini checks, which get comulated by check_install, eg. to check for magic_quotes_gpc Off for fmail"
This commit is contained in:
parent
bf639103fc
commit
a7cecfe600
@ -174,13 +174,14 @@
|
||||
{
|
||||
if ($checks[$name] == $data) continue; // identical check --> ignore it
|
||||
|
||||
if ($data['func'] == 'pear_check' || $data['func'] == 'extension_check' && !isset($args['warning']))
|
||||
if ($data['func'] == 'pear_check' || in_array($data['func'],array('extension_check','php_ini_check')) && !isset($data['warning']))
|
||||
{
|
||||
if ($checks[$name]['from'] && !is_array($checks[$name]['from']))
|
||||
{
|
||||
$checks[$name]['from'] = array($checks[$name]['from']);
|
||||
}
|
||||
$checks[$name]['from'][] = $data['from'] ? $data['from'] : $app;
|
||||
if (!isset($data['from'])) $data['from'] = $app;
|
||||
if (!in_array($data['from'],$checks[$name]['from'])) $checks[$name]['from'][] = $data['from'];
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -189,6 +190,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!isset($data['from'])) $data['from'] = $app;
|
||||
$checks[$name] = $data;
|
||||
}
|
||||
//echo "added check $data[func]($name) for $app"; _debug_array($data);
|
||||
@ -364,6 +366,7 @@
|
||||
|
||||
function extension_check($name,$args)
|
||||
{
|
||||
//echo "<p>extension_check($name,".print_r($args,true).")</p>\n";
|
||||
global $passed_icon, $error_icon, $warning_icon, $is_windows;
|
||||
|
||||
if (isset($args['win_only']) && $args['win_only'] && !$is_windows)
|
||||
@ -641,14 +644,20 @@
|
||||
}
|
||||
if (!$result)
|
||||
{
|
||||
if (isset($args['warning']))
|
||||
{
|
||||
echo "<div>".$warning_icon.' <span class="setup_warning">'.$msg.'</span><div class="setup_info">'.$args['warning']."</div></div>\n";
|
||||
}
|
||||
if (isset($args['error']))
|
||||
{
|
||||
echo "<div>".$error_icon.' <span class="setup_error">'.$msg.'</span><div class="setup_info">'.$args['error']."</div></div>\n";
|
||||
}
|
||||
elseif (isset($args['warning']))
|
||||
{
|
||||
echo "<div>".$warning_icon.' <span class="setup_warning">'.$msg.'</span><div class="setup_info">'.$args['warning']."</div></div>\n";
|
||||
}
|
||||
elseif (!isset($args['safe_mode']))
|
||||
{
|
||||
echo "<div>".$warning_icon.' <span class="setup_warning">'.$msg.'</span><div class="setup_info">'.
|
||||
lang('%1 is needed by: %2.',$name,is_array($args['from']) ? implode(', ',$args['from']) : $args['from'])
|
||||
."</div></div>\n";
|
||||
}
|
||||
if (isset($args['safe_mode']) && $safe_mode || @$args['change'])
|
||||
{
|
||||
if (!isset($args['warning']) && !isset($args['error']))
|
||||
|
Loading…
Reference in New Issue
Block a user