From d67d8b6d6e95025525d11ce42892fb9bf40abf28 Mon Sep 17 00:00:00 2001 From: Treer Date: Mon, 25 Apr 2016 19:46:04 +1000 Subject: util/pconfig can list channel IDs --- util/pconfig | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/util/pconfig b/util/pconfig index 802590f7a..77fcd6d38 100755 --- a/util/pconfig +++ b/util/pconfig @@ -13,11 +13,15 @@ if (count($helpArgs) === 1) { echo <<<'EndOfOutput' Gets, sets, or lists personal (per channel) configuration settings. -Usage: util/pconfig +Usage: util/pconfig + util/pconfig util/pconfig util/pconfig util/pconfig + util/pconfig + List all channel IDs + util/pconfig Displays all of the the channel's config entries @@ -68,3 +72,11 @@ if($argc == 2) { } } +if($argc == 1) { + $r = q("select channel_id, channel_name from channel"); + if($r) { + foreach($r as $rr) { + echo sprintf('%4u %s', $rr['channel_id'], $rr['channel_name']) . PHP_EOL; + } + } +} -- cgit v1.2.3