aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-01-28 20:56:04 -0800
committerfriendica <info@friendica.com>2015-01-28 20:56:04 -0800
commita4960360669daa0a0c842427185ce1ada3b4ab97 (patch)
tree53feb1009266a77ee5338cc49919e45cca4b5ca6 /include/items.php
parent54fd8b21db2d8f3841cf590f88611a1d4f44ce48 (diff)
downloadvolse-hubzilla-a4960360669daa0a0c842427185ce1ada3b4ab97.tar.gz
volse-hubzilla-a4960360669daa0a0c842427185ce1ada3b4ab97.tar.bz2
volse-hubzilla-a4960360669daa0a0c842427185ce1ada3b4ab97.zip
local_user => local_channel
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/items.php b/include/items.php
index 756625d85..a5a42d23b 100755
--- a/include/items.php
+++ b/include/items.php
@@ -1967,7 +1967,7 @@ function item_store($arr,$allow_exec = false) {
$arr['body'] = z_input_filter($arr['uid'],$arr['body'],$arr['mimetype']);
- if(local_user() && (! $arr['sig'])) {
+ if(local_channel() && (! $arr['sig'])) {
$channel = get_app()->get_channel();
if($channel['channel_hash'] === $arr['author_xchan']) {
$arr['sig'] = base64url_encode(rsa_sign($arr['body'],$channel['channel_prvkey']));
@@ -2355,7 +2355,7 @@ function item_store_update($arr,$allow_exec = false) {
// apply the input filter here - if it is obscured it has been filtered already
$arr['body'] = z_input_filter($arr['uid'],$arr['body'],$arr['mimetype']);
- if(local_user() && (! $arr['sig'])) {
+ if(local_channel() && (! $arr['sig'])) {
$channel = get_app()->get_channel();
if($channel['channel_hash'] === $arr['author_xchan']) {
$arr['sig'] = base64url_encode(rsa_sign($arr['body'],$channel['channel_prvkey']));
@@ -3949,7 +3949,7 @@ function retain_item($id) {
function drop_items($items) {
$uid = 0;
- if(! local_user() && ! remote_user())
+ if(! local_channel() && ! remote_user())
return;
if(count($items)) {
@@ -4005,7 +4005,7 @@ function drop_item($id,$interactive = true,$stage = DROPITEM_NORMAL,$force = fal
$ok_to_delete = true;
// owner deletion
- if(local_user() && local_user() == $item['uid'])
+ if(local_channel() && local_channel() == $item['uid'])
$ok_to_delete = true;
// author deletion
@@ -4472,7 +4472,7 @@ function items_fetch($arr,$channel = null,$observer_hash = null,$client_mode = C
$r = q("SELECT abook.*, xchan.* from abook left join xchan on abook_xchan = xchan_hash where abook_id = %d and abook_channel = %d and not ( abook_flags & " . intval(ABOOK_FLAG_BLOCKED) . ")>0 limit 1",
intval($arr['cid']),
- intval(local_user())
+ intval(local_channel())
);
if($r) {
$sql_extra = " AND item.parent IN ( SELECT DISTINCT parent FROM item WHERE true $sql_options AND uid = " . intval($arr['uid']) . " AND ( author_xchan = '" . dbesc($r[0]['abook_xchan']) . "' or owner_xchan = '" . dbesc($r[0]['abook_xchan']) . "' ) and item_restrict = 0 ) ";