diff options
author | Thomas Willingham <founder@kakste.com> | 2013-08-10 22:06:30 +0100 |
---|---|---|
committer | Thomas Willingham <founder@kakste.com> | 2013-08-10 22:06:30 +0100 |
commit | 94335f237fdadd93b86b271526c25c2a77de9c40 (patch) | |
tree | 8ffaf45c5676d1df0033349cc4c374fda3cd0a49 /mod | |
parent | 4ac5348b3f7cecceee62d92f53df0f4ab6c22074 (diff) | |
download | volse-hubzilla-94335f237fdadd93b86b271526c25c2a77de9c40.tar.gz volse-hubzilla-94335f237fdadd93b86b271526c25c2a77de9c40.tar.bz2 volse-hubzilla-94335f237fdadd93b86b271526c25c2a77de9c40.zip |
Initial shot at write_pages widget
Diffstat (limited to 'mod')
-rw-r--r-- | mod/page.php | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/mod/page.php b/mod/page.php index 51b292f37..1bdc3027a 100644 --- a/mod/page.php +++ b/mod/page.php @@ -2,6 +2,8 @@ require_once('include/items.php'); require_once('include/conversation.php'); +require_once('include/page_widgets.php'); + function page_init(&$a) { // We need this to make sure the channel theme is always loaded. $which = argv(1); @@ -32,7 +34,6 @@ function page_content(&$a) { return; } - if(argc() < 3) { notice( t('Invalid item.') . EOL); return; @@ -57,12 +58,24 @@ function page_content(&$a) { dbesc($page_id), intval(ITEM_WEBPAGE) ); + logger('r: ' . print_r($r,true)); if(! $r) { notice( t('Item not found.') . EOL); return; } +// Use of widgets should be determined by Comanchie, but we don't have it yet, so... + + + if ($perms['write_pages']) { + $who = $channel_address; + $which = $r[0]['id']; + $o .= writepages_widget($who,$which); + } + + + xchan_query($r); $r = fetch_post_tags($r,true); $a->profile = array('profile_uid' => $u[0]['channel_id']); |