aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-05-20 20:49:06 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-05-20 20:49:06 -0700
commit3763f74a104d5a9b91b3ddba5dd091640672e9bf (patch)
tree90883fc46613327fd17ebb19912d270e51664a2b /mod
parentc10a4ca9c7422e2d68b3222e5c1a605ff6f456d6 (diff)
parent62df06b3d6b2e56d271b69bebf8427caa715dd16 (diff)
downloadvolse-hubzilla-3763f74a104d5a9b91b3ddba5dd091640672e9bf.tar.gz
volse-hubzilla-3763f74a104d5a9b91b3ddba5dd091640672e9bf.tar.bz2
volse-hubzilla-3763f74a104d5a9b91b3ddba5dd091640672e9bf.zip
Merge branch 'master' of https://github.com/redmatrix/redmatrix
Conflicts: include/items.php include/text.php mod/item.php view/nl/messages.po
Diffstat (limited to 'mod')
-rw-r--r--mod/channel.php2
-rw-r--r--mod/editpost.php1
-rw-r--r--mod/impel.php17
-rw-r--r--mod/item.php15
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;