indicate successful updates
This commit is contained in:
parent
920d40acf4
commit
b3a71e4327
1 changed files with 8 additions and 4 deletions
10
boot.php
10
boot.php
|
@ -671,7 +671,7 @@ if(! function_exists('check_config')) {
|
||||||
if($retval) {
|
if($retval) {
|
||||||
//send the administrator an e-mail
|
//send the administrator an e-mail
|
||||||
$email_tpl = get_intltext_template("update_fail_eml.tpl");
|
$email_tpl = get_intltext_template("update_fail_eml.tpl");
|
||||||
$email_tpl = replace_macros($email_tpl, array(
|
$email_msg = replace_macros($email_tpl, array(
|
||||||
'$sitename' => $a->config['sitename'],
|
'$sitename' => $a->config['sitename'],
|
||||||
'$siteurl' => $a->get_baseurl(),
|
'$siteurl' => $a->get_baseurl(),
|
||||||
'$update' => $x,
|
'$update' => $x,
|
||||||
|
@ -679,13 +679,16 @@ if(! function_exists('check_config')) {
|
||||||
));
|
));
|
||||||
$subject=sprintf(t('Update Error at %s'), $a->get_baseurl());
|
$subject=sprintf(t('Update Error at %s'), $a->get_baseurl());
|
||||||
|
|
||||||
mail($a->config['admin_email'], $subject, $text,
|
mail($a->config['admin_email'], $subject, $email_msg,
|
||||||
'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n"
|
'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n"
|
||||||
. 'Content-type: text/plain; charset=UTF-8' . "\n"
|
. 'Content-type: text/plain; charset=UTF-8' . "\n"
|
||||||
. 'Content-transfer-encoding: 8bit' );
|
. 'Content-transfer-encoding: 8bit' );
|
||||||
//try the logger
|
//try the logger
|
||||||
logger('CRITICAL: Update Failed: '. $x);
|
logger('CRITICAL: Update Failed: '. $x);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
set_config('database','update_' . $x, 'success');
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
set_config('system','build', DB_UPDATE_VERSION);
|
set_config('system','build', DB_UPDATE_VERSION);
|
||||||
|
@ -728,10 +731,11 @@ if(! function_exists('check_config')) {
|
||||||
if(! in_array($i['name'],$plugins_arr)) {
|
if(! in_array($i['name'],$plugins_arr)) {
|
||||||
uninstall_plugin($i['name']);
|
uninstall_plugin($i['name']);
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
$installed_arr[] = $i['name'];
|
$installed_arr[] = $i['name'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(count($plugins_arr)) {
|
if(count($plugins_arr)) {
|
||||||
foreach($plugins_arr as $p) {
|
foreach($plugins_arr as $p) {
|
||||||
|
|
Loading…
Reference in a new issue