From e8b77fbdff6cfd9455db378b5edb00fece74fea2 Mon Sep 17 00:00:00 2001 From: Klaus Weidenbach Date: Fri, 14 Nov 2014 00:45:25 +0100 Subject: Fixed a variable conflict in mod/xchan.php. A variable $rr inside the foreachs was used twice. Add translation to mod/xchan.php. --- mod/xchan.php | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'mod/xchan.php') diff --git a/mod/xchan.php b/mod/xchan.php index 714603f6e..69fbdb77d 100644 --- a/mod/xchan.php +++ b/mod/xchan.php @@ -3,16 +3,15 @@ function xchan_content(&$a) { - - $o .= '

Xchan Lookup

'; + $o = '

' . t('Xchan Lookup') . '

'; $o .= '
'; - $o .= 'Lookup xchan beginning with (or webbie): '; - $o .= '
'; - - $o .= '

'; + $o .= t('Lookup xchan beginning with (or webbie): '); + $o .= ''; + $o .= ''; + $o .= '

'; - if(x($_GET,'addr')) { + if(x($_GET, 'addr')) { $addr = trim($_GET['addr']); $r = q("select * from xchan where xchan_hash like '%s%%' or xchan_addr = '%s' group by xchan_hash", @@ -22,15 +21,15 @@ function xchan_content(&$a) { if($r) { foreach($r as $rr) { - $o .= str_replace(array("\n"," "),array("
"," "),print_r($rr,true)) . EOL; + $o .= str_replace(array("\n", " "), array("
", " "), print_r($rr, true)) . EOL; $s = q("select * from hubloc where hubloc_hash like '%s'", dbesc($r[0]['xchan_hash']) ); if($s) { - foreach($s as $rr) - $o .= str_replace(array("\n"," "),array("
"," "),print_r($rr,true)) . EOL; + foreach($s as $rrr) + $o .= str_replace(array("\n", " "), array("
", " "), print_r($rrr, true)) . EOL; } } } -- cgit v1.2.3