aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-06-02 17:47:47 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-06-02 17:47:47 -0700
commit7cbc5048743bc5976e48cd3f81801550c0b7f52f (patch)
treef9effa684ef44298d1922bd715d7b1ca9823374d /mod
parentf3b95f591a7ec49b6fc148913861bae2bb6aa6c7 (diff)
parent86ff31f5003312a6c1bcb65c7aa25ad001f542d4 (diff)
downloadvolse-hubzilla-7cbc5048743bc5976e48cd3f81801550c0b7f52f.tar.gz
volse-hubzilla-7cbc5048743bc5976e48cd3f81801550c0b7f52f.tar.bz2
volse-hubzilla-7cbc5048743bc5976e48cd3f81801550c0b7f52f.zip
Merge branch 'master' of https://github.com/redmatrix/redmatrix
Diffstat (limited to 'mod')
-rw-r--r--mod/item.php70
-rw-r--r--mod/layouts.php2
-rw-r--r--mod/network.php1
3 files changed, 37 insertions, 36 deletions
diff --git a/mod/item.php b/mod/item.php
index 8365aefb0..94b32d01c 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -544,40 +544,6 @@ function item_post(&$a) {
$body = preg_replace_callback('/\[img(.*?)\](.*?)\[\/img\]/ism','red_zrlify_img_callback',$body);
- /**
- *
- * When a photo was uploaded into the message using the (profile wall) ajax
- * uploader, The permissions are initially set to disallow anybody but the
- * owner from seeing it. This is because the permissions may not yet have been
- * set for the post. If it's private, the photo permissions should be set
- * appropriately. But we didn't know the final permissions on the post until
- * now. So now we'll look for links of uploaded photos and attachments that are in the
- * post and set them to the same permissions as the post itself.
- *
- * If the post was end-to-end encrypted we can't find images and attachments in the body,
- * use our media_str input instead which only contains these elements - but only do this
- * when encrypted content exists because the photo/attachment may have been removed from
- * the post and we should keep it private. If it's encrypted we have no way of knowing
- * so we'll set the permissions regardless and realise that the media may not be
- * referenced in the post.
- *
- * What is preventing us from being able to upload photos into comments is dealing with
- * the photo and attachment permissions, since we don't always know who was in the
- * distribution for the top level post.
- *
- * We might be able to provide this functionality with a lot of fiddling:
- * - if the top level post is public (make the photo public)
- * - if the top level post was written by us or a wall post that belongs to us (match the top level post)
- * - if the top level post has privacy mentions, add those to the permissions.
- * - otherwise disallow the photo *or* make the photo public. This is the part that gets messy.
- */
-
- if(! $preview) {
- fix_attached_photo_permissions($profile_uid,$owner_xchan['xchan_hash'],((strpos($body,'[/crypt]')) ? $_POST['media_str'] : $body),$str_contact_allow,$str_group_allow,$str_contact_deny,$str_group_deny);
-
- fix_attached_file_permissions($channel,$observer['xchan_hash'],((strpos($body,'[/crypt]')) ? $_POST['media_str'] : $body),$str_contact_allow,$str_group_allow,$str_contact_deny,$str_group_deny);
-
- }
@@ -636,6 +602,42 @@ function item_post(&$a) {
$body = str_replace($match[1],'',$body);
}
}
+
+ /**
+ *
+ * When a photo was uploaded into the message using the (profile wall) ajax
+ * uploader, The permissions are initially set to disallow anybody but the
+ * owner from seeing it. This is because the permissions may not yet have been
+ * set for the post. If it's private, the photo permissions should be set
+ * appropriately. But we didn't know the final permissions on the post until
+ * now. So now we'll look for links of uploaded photos and attachments that are in the
+ * post and set them to the same permissions as the post itself.
+ *
+ * If the post was end-to-end encrypted we can't find images and attachments in the body,
+ * use our media_str input instead which only contains these elements - but only do this
+ * when encrypted content exists because the photo/attachment may have been removed from
+ * the post and we should keep it private. If it's encrypted we have no way of knowing
+ * so we'll set the permissions regardless and realise that the media may not be
+ * referenced in the post.
+ *
+ * What is preventing us from being able to upload photos into comments is dealing with
+ * the photo and attachment permissions, since we don't always know who was in the
+ * distribution for the top level post.
+ *
+ * We might be able to provide this functionality with a lot of fiddling:
+ * - if the top level post is public (make the photo public)
+ * - if the top level post was written by us or a wall post that belongs to us (match the top level post)
+ * - if the top level post has privacy mentions, add those to the permissions.
+ * - otherwise disallow the photo *or* make the photo public. This is the part that gets messy.
+ */
+
+ if(! $preview) {
+ fix_attached_photo_permissions($profile_uid,$owner_xchan['xchan_hash'],((strpos($body,'[/crypt]')) ? $_POST['media_str'] : $body),$str_contact_allow,$str_group_allow,$str_contact_deny,$str_group_deny);
+
+ fix_attached_file_permissions($channel,$observer['xchan_hash'],((strpos($body,'[/crypt]')) ? $_POST['media_str'] : $body),$str_contact_allow,$str_group_allow,$str_contact_deny,$str_group_deny);
+
+ }
+
}
// BBCODE end alert
diff --git a/mod/layouts.php b/mod/layouts.php
index daae1ba5a..fd77cfc37 100644
--- a/mod/layouts.php
+++ b/mod/layouts.php
@@ -173,7 +173,7 @@ function layouts_content(&$a) {
$o .= replace_macros(get_markup_template('layoutlist.tpl'), array(
'$title' => t('Layouts'),
'$create' => t('Create'),
- '$help' => array('text' => t('Help'), 'url' => 'help/Comanche', 'title' => t('Comanche page description language help')),
+ '$help' => array('text' => t('Help'), 'url' => 'help/comanche', 'title' => t('Comanche page description language help')),
'$editor' => $editor,
'$baseurl' => $url,
'$name' => t('Layout Name'),
diff --git a/mod/network.php b/mod/network.php
index 9ebdf7198..6431883d5 100644
--- a/mod/network.php
+++ b/mod/network.php
@@ -505,7 +505,6 @@ function network_content(&$a, $update = 0, $load = false) {
$mode = (($nouveau) ? 'network-new' : 'network');
-
$o .= conversation($a,$items,$mode,$update,$page_mode);
if(($items) && (! $update))