aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-01-24 14:31:57 -0800
committerfriendica <info@friendica.com>2013-01-24 14:31:57 -0800
commit4f7f547190f5ec2557739aad6b2c09e3f45cdc76 (patch)
tree279db2a4d10442f39a284cdf8894a32f2b05263f /include
parent5da1948ede2f88736e8689c530d6430d56965056 (diff)
downloadvolse-hubzilla-4f7f547190f5ec2557739aad6b2c09e3f45cdc76.tar.gz
volse-hubzilla-4f7f547190f5ec2557739aad6b2c09e3f45cdc76.tar.bz2
volse-hubzilla-4f7f547190f5ec2557739aad6b2c09e3f45cdc76.zip
why oh why is poco_load not getting called? oh - that's why.
Diffstat (limited to 'include')
-rwxr-xr-xinclude/items.php4
-rw-r--r--include/onepoll.php4
-rw-r--r--include/permissions.php32
3 files changed, 20 insertions, 20 deletions
diff --git a/include/items.php b/include/items.php
index 4832c2916..04d088d44 100755
--- a/include/items.php
+++ b/include/items.php
@@ -4282,14 +4282,14 @@ function fetch_post_tags($items) {
-function zot_feed($uid,$observer,$mindate) {
+function zot_feed($uid,$observer_xchan,$mindate) {
$result = array();
$mindate = datetime_convert('UTC','UTC',$mindate);
if(! $mindate)
$mindate = '0000-00-00 00:00:00';
- if(! perm_is_allowed($uid,$observer,'view_stream')) {
+ if(! perm_is_allowed($uid,$observer_xchan,'view_stream')) {
return $result;
}
diff --git a/include/onepoll.php b/include/onepoll.php
index 019fe8ed3..bb8c91dd7 100644
--- a/include/onepoll.php
+++ b/include/onepoll.php
@@ -115,10 +115,10 @@ function onepoll_run($argv, $argc){
if($contact['xchan_connurl']) {
$r = q("SELECT xlink_id from xlink
- where xlink_xchan = '%s' and xlink_updated > UTC_TIMESTAMP() - INTERVAL 1 DAY",
+ where xlink_xchan = '%s' and xlink_updated > UTC_TIMESTAMP() - INTERVAL 1 DAY limit 1",
intval($contact['xchan_hash'])
);
- if($r) {
+ if(! $r) {
poco_load($contact['xchan_hash'],$contact['xchan_connurl']);
}
}
diff --git a/include/permissions.php b/include/permissions.php
index ab40a7017..55fa626a9 100644
--- a/include/permissions.php
+++ b/include/permissions.php
@@ -35,15 +35,15 @@ function get_perms() {
/**
- * get_all_perms($uid,$observer)
+ * get_all_perms($uid,$observer_xchan)
*
* @param $uid : The channel_id associated with the resource owner
- * @param $observer: The xchan_hash representing the observer
+ * @param $observer_xchan: The xchan_hash representing the observer
*
* @returns: array of all permissions, key is permission name, value is true or false
*/
-function get_all_perms($uid,$observer,$internal_use = true) {
+function get_all_perms($uid,$observer_xchan,$internal_use = true) {
$global_perms = get_perms();
@@ -83,12 +83,12 @@ function get_all_perms($uid,$observer,$internal_use = true) {
// Next we're going to check for blocked or ignored contacts.
// These take priority over all other settings.
- if($observer) {
+ if($observer_xchan) {
if(! $abook_checked) {
$x = q("select abook_my_perms, abook_flags from abook
where abook_channel = %d and abook_xchan = '%s' and not ( abook_flags & %d ) limit 1",
intval($uid),
- dbesc($observer),
+ dbesc($observer_xchan),
intval(ABOOK_FLAG_SELF)
);
$abook_checked = true;
@@ -110,10 +110,10 @@ function get_all_perms($uid,$observer,$internal_use = true) {
}
}
- // Check if this $uid is actually the $observer - if it's your content
+ // Check if this $uid is actually the $observer_xchan - if it's your content
// you always have permission to do anything
- if(($observer) && ($r[0]['channel_hash'] === $observer)) {
+ if(($observer_xchan) && ($r[0]['channel_hash'] === $observer_xchan)) {
$ret[$perm_name] = true;
continue;
}
@@ -128,7 +128,7 @@ function get_all_perms($uid,$observer,$internal_use = true) {
// From here on out, we need to know who they are. If we can't figure it
// out, permission is denied.
- if(! $observer) {
+ if(! $observer_xchan) {
$ret[$perm_name] = false;
continue;
}
@@ -145,7 +145,7 @@ function get_all_perms($uid,$observer,$internal_use = true) {
if($r[0][$channel_perm] & PERMS_SITE) {
if(! $onsite_checked) {
$c = q("select channel_hash from channel where channel_hash = '%s' limit 1",
- dbesc($observer)
+ dbesc($observer_xchan)
);
$onsite_checked = true;
@@ -195,7 +195,7 @@ function get_all_perms($uid,$observer,$internal_use = true) {
}
-function perm_is_allowed($uid,$observer,$permission) {
+function perm_is_allowed($uid,$observer_xchan,$permission) {
$global_perms = get_perms();
@@ -210,10 +210,10 @@ function perm_is_allowed($uid,$observer,$permission) {
if(! $r)
return false;
- if($observer) {
+ if($observer_xchan) {
$x = q("select abook_my_perms, abook_flags from abook where abook_channel = %d and abook_xchan = '%s' and not ( abook_flags & %d ) limit 1",
intval($uid),
- dbesc($observer),
+ dbesc($observer_xchan),
intval(ABOOK_FLAG_SELF)
);
@@ -228,9 +228,9 @@ function perm_is_allowed($uid,$observer,$permission) {
}
- // Check if this $uid is actually the $observer
+ // Check if this $uid is actually the $observer_xchan
- if($r[0]['channel_hash'] === $observer)
+ if($r[0]['channel_hash'] === $observer_xchan)
return true;
@@ -239,7 +239,7 @@ function perm_is_allowed($uid,$observer,$permission) {
// If it's an unauthenticated observer, we only need to see if PERMS_PUBLIC is set
- if(! $observer) {
+ if(! $observer_xchan) {
return false;
}
@@ -253,7 +253,7 @@ function perm_is_allowed($uid,$observer,$permission) {
if($r[0][$channel_perm] & PERMS_SITE) {
$c = q("select channel_hash from channel where channel_hash = '%s' limit 1",
- dbesc($observer)
+ dbesc($observer_xchan)
);
if($c)
return true;