aboutsummaryrefslogtreecommitdiffstats
path: root/include/security.php
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 /include/security.php
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 'include/security.php')
-rw-r--r--include/security.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/security.php b/include/security.php
index c3b0e9763..91683cc98 100644
--- a/include/security.php
+++ b/include/security.php
@@ -148,7 +148,7 @@ function change_channel($change_channel) {
*
* @return string additional SQL where statement
*/
-function permissions_sql($owner_id, $remote_verified = false, $groups = null) {
+function permissions_sql($owner_id, $remote_observer = null) {
$local_channel = local_channel();
@@ -181,7 +181,7 @@ function permissions_sql($owner_id, $remote_verified = false, $groups = null) {
*/
else {
- $observer = get_observer_hash();
+ $observer = (($remote_observer) ? $remote_observer : get_observer_hash());
if($observer) {
$groups = init_groups_visitor($observer);
@@ -217,7 +217,7 @@ function permissions_sql($owner_id, $remote_verified = false, $groups = null) {
*
* @return string additional SQL where statement
*/
-function item_permissions_sql($owner_id, $remote_verified = false, $groups = null) {
+function item_permissions_sql($owner_id, $remote_observer = null) {
$local_channel = local_channel();
@@ -227,7 +227,7 @@ function item_permissions_sql($owner_id, $remote_verified = false, $groups = nul
* default permissions - anonymous user
*/
- $sql = " AND item_private=0 ";
+ $sql = " AND item_private = 0 ";
/**
* Profile owner - everything is visible
@@ -246,7 +246,7 @@ function item_permissions_sql($owner_id, $remote_verified = false, $groups = nul
*/
else {
- $observer = get_observer_hash();
+ $observer = (($remote_observer) ? $remote_observer : get_observer_hash());
if($observer) {
$groups = init_groups_visitor($observer);