aboutsummaryrefslogtreecommitdiffstats
path: root/include/identity.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-04-05 02:32:07 -0700
committerfriendica <info@friendica.com>2014-04-05 02:32:07 -0700
commit4901ef8faf743fd7fef97fc75a1c727804bf3df5 (patch)
treeed0c0f6450b81e9f4bcb1c1f2d3727653e4310f5 /include/identity.php
parent32e71cf06b7471923dec37b613da3a044f51f28d (diff)
downloadvolse-hubzilla-4901ef8faf743fd7fef97fc75a1c727804bf3df5.tar.gz
volse-hubzilla-4901ef8faf743fd7fef97fc75a1c727804bf3df5.tar.bz2
volse-hubzilla-4901ef8faf743fd7fef97fc75a1c727804bf3df5.zip
provide the ability for rpost to post as another of your channels. This does not yet work, so the functionality has not been enabled.
Diffstat (limited to 'include/identity.php')
-rw-r--r--include/identity.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/identity.php b/include/identity.php
index d15f3861e..e773bb314 100644
--- a/include/identity.php
+++ b/include/identity.php
@@ -1257,3 +1257,24 @@ function get_channel_by_nick($nick) {
return(($r) ? $r[0] : false);
}
+
+
+function identity_selector() {
+ if(local_user()) {
+ $r = q("select channel.*, xchan.* from channel left join xchan on channel.channel_hash = xchan.xchan_hash where channel.channel_account_id = %d and not ( channel_pageflags & %d ) order by channel_name ",
+ intval(get_account_id()),
+ intval(PAGE_REMOVED)
+ );
+ if(count($r) > 1) {
+ $selected_channel = null;
+ $account = get_app()->get_account();
+ $o = replace_macros(get_markup_template('channel_id_select.tpl'),array(
+ '$channels' => $r,
+ '$selected' => local_user()
+ ));
+ return $o;
+ }
+ }
+
+ return '';
+} \ No newline at end of file