diff options
Diffstat (limited to 'mod')
-rw-r--r-- | mod/channel.php | 2 | ||||
-rw-r--r-- | mod/editpost.php | 1 | ||||
-rw-r--r-- | mod/impel.php | 17 | ||||
-rw-r--r-- | mod/item.php | 15 |
4 files changed, 24 insertions, 11 deletions
diff --git a/mod/channel.php b/mod/channel.php index 5f825fe37..65af36b59 100644 --- a/mod/channel.php +++ b/mod/channel.php @@ -146,7 +146,7 @@ function channel_content(&$a, $update = 0, $load = false) { */ - $sql_extra = item_permissions_sql($a->profile['profile_uid'],$remote_contact,$groups); + $sql_extra = item_permissions_sql($a->profile['profile_uid']); if(get_pconfig($a->profile['profile_uid'],'system','channel_list_mode') && (! $mid)) $page_mode = 'list'; diff --git a/mod/editpost.php b/mod/editpost.php index 0103e513c..66196b2d2 100644 --- a/mod/editpost.php +++ b/mod/editpost.php @@ -132,6 +132,7 @@ function editpost_content(&$a) { '$ptyp' => $itm[0]['type'], '$content' => undo_post_tagging($itm[0]['body']), '$post_id' => $post_id, + '$parent' => (($itm[0]['parent'] != $itm[0]['id']) ? $itm[0]['parent'] : ''), '$baseurl' => $a->get_baseurl(), '$defloc' => $channel['channel_location'], '$visitor' => false, diff --git a/mod/impel.php b/mod/impel.php index 4700aaec5..494a3a5c2 100644 --- a/mod/impel.php +++ b/mod/impel.php @@ -113,17 +113,18 @@ function impel_init(&$a) { } $x = item_store($arr,$execflag); } - if($x['success']) + if($x['success']) { $item_id = $x['item_id']; + update_remote_id($channel,$item_id,$arr['item_restrict'],$pagetitle,$namespace,$remote_id,$arr['mid']); + $ret['success'] = true; + info( sprintf( t('%s element installed'), $installed_type)); + } + else { + notice( sprintf( t('%s element installation failed'), $installed_type)); + } - update_remote_id($channel,$item_id,$arr['item_restrict'],$pagetitle,$namespace,$remote_id,$arr['mid']); - - - $ret['success'] = true; - - info( sprintf( t('%s element installed'), $installed_type)); - +//??? should perhaps return ret? json_return_and_die(true); } diff --git a/mod/item.php b/mod/item.php index 36cbaff6c..bc637debf 100644 --- a/mod/item.php +++ b/mod/item.php @@ -447,8 +447,6 @@ function item_post(&$a) { } } - $post_type = notags(trim($_REQUEST['type'])); - $mimetype = notags(trim($_REQUEST['mimetype'])); if(! $mimetype) $mimetype = 'text/bbcode'; @@ -657,6 +655,19 @@ function item_post(&$a) { $item_wall = (($post_type === 'wall' || $post_type === 'wall-comment') ? 1 : 0); $item_origin = (($origin) ? 1 : 0); + + // determine if this is a wall post + + if($parent) { + $item_wall = $parent_item['item_wall']; + } + else { + if(! $webpage) { + $item_wall = 1; + } + } + + if($moderated) $item_restrict = $item_restrict | ITEM_MODERATED; |