Merge branch 'sabre32' of https://github.com/redmatrix/hubzilla into sabre32

This commit is contained in:
Mario Vavti 2016-06-09 09:10:46 +02:00
commit 9b96fe66a6
2 changed files with 12 additions and 0 deletions

View File

@ -1466,6 +1466,12 @@ function check_config(&$a) {
//send the administrator an e-mail
file_put_contents($lockfile, $x);
$r = q("select account_language from account where account_email = '%s' limit 1",
dbesc(App::$config['system']['admin_email'])
);
push_lang(($r) ? $r[0]['account_language'] : 'en');
$email_tpl = get_intltext_template("update_fail_eml.tpl");
$email_msg = replace_macros($email_tpl, array(
'$sitename' => App::$config['system']['sitename'],
@ -1482,6 +1488,7 @@ function check_config(&$a) {
. 'Content-transfer-encoding: 8bit' );
//try the logger
logger('CRITICAL: Update Failed: ' . $x);
pop_lang();
}
else
set_config('database','update_r' . $x, 'success');

View File

@ -1904,10 +1904,15 @@ require_once('include/api_auth.php');
$ret = array();
$x = array('items' => $r,'api_user' => api_user(),'user_info' => $user_info);
call_hooks('api_format_items',$x);
$r = $x['items'];
if(! $r)
return $ret;
foreach($r as $item) {
localize_item($item);
$status_user = (($item['author_xchan']==$user_info['guid'])?$user_info: api_item_get_user($a,$item));