Merge remote branch 'upstream/master'

This commit is contained in:
Michael Vogel 2012-09-04 07:22:59 +02:00
commit 59d378913d
6 changed files with 478 additions and 372 deletions

View file

@ -78,7 +78,7 @@ class dba {
$this->error = '';
if ($a->config["system"]["db_log"] != "")
if(x($a->config,'system') && x($a->config['system'],'db_log'))
$stamp1 = microtime(true);
if($this->mysqli)
@ -86,7 +86,7 @@ class dba {
else
$result = @mysql_query($sql,$this->db);
if ($a->config["system"]["db_log"] != "") {
if(x($a->config,'system') && x($a->config['system'],'db_log')) {
$stamp2 = microtime(true);
$duration = round($stamp2-$stamp1, 3);
if ($duration > $a->config["system"]["db_loglimit"]) {

View file

@ -1005,7 +1005,7 @@ function prepare_body($item,$attach = false) {
}
$title = ((strlen(trim($mtch[4]))) ? escape_tags(trim($mtch[4])) : escape_tags($mtch[1]));
$title .= ' ' . $mtch[2] . ' ' . t('bytes');
if((local_user() == $item['uid']) && $item['contact-id'] != $a->contact['id'])
if((local_user() == $item['uid']) && ($item['contact-id'] != $a->contact['id']) && ($item['network'] == NETWORK_DFRN))
$the_url = $a->get_baseurl() . '/redir/' . $item['contact-id'] . '?f=1&url=' . $mtch[1];
else
$the_url = $mtch[1];