aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-01-12 22:53:26 -0800
committerfriendica <info@friendica.com>2013-01-12 22:53:26 -0800
commit740edcfdb64f81265b523832ce14e9a11f693939 (patch)
treeaf242402a103bfdaf67d5562f83f555a6a080b5b /util
parentc0c5252b57fdd6a7687aec02411a899a54021af6 (diff)
downloadvolse-hubzilla-740edcfdb64f81265b523832ce14e9a11f693939.tar.gz
volse-hubzilla-740edcfdb64f81265b523832ce14e9a11f693939.tar.bz2
volse-hubzilla-740edcfdb64f81265b523832ce14e9a11f693939.zip
add connection list and connection detail to fresh
Diffstat (limited to 'util')
-rwxr-xr-xutil/fresh24
1 files changed, 24 insertions, 0 deletions
diff --git a/util/fresh b/util/fresh
index 2314796bb..edcab2eb7 100755
--- a/util/fresh
+++ b/util/fresh
@@ -109,6 +109,30 @@ function process_command($line) {
echo 'Channel not found.';
}
break;
+ case 'conn':
+ if(! local_user()) {
+ echo "Permission denied.";
+ break;
+ }
+ if(argc > 1) {
+ for($x = 1; $x < argc; $x ++) {
+ $r = q("select * from abook left join xchan on abook_xchan = xchan_hash where abook_id = %d and abook_channel = %d",
+ intval(argv($x)),
+ intval(local_user())
+ );
+ if($r) echo jindent(json_encode($r[0]));
+ }
+ }
+ else {
+ $r = q("select * from abook left join xchan on abook_xchan = xchan_hash where abook_channel = %d",
+ intval(local_user())
+ );
+ if($r) {
+ foreach($r as $rr)
+ echo $rr['abook_id'] . "\t" . $rr['xchan_name'] . "\n";
+ }
+ }
+ break;
default:
break;