aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-11-01 20:47:32 -0700
committerfriendica <info@friendica.com>2012-11-01 20:47:32 -0700
commit5c9a68488a659e26fc7952c6d0addddeaecc2d92 (patch)
tree34abba69f254ced1fd3f7f7555d7b88f2480e380 /include
parentf3ade4b8cf1f4914c28663e18eb09c0f273d6bce (diff)
downloadvolse-hubzilla-5c9a68488a659e26fc7952c6d0addddeaecc2d92.tar.gz
volse-hubzilla-5c9a68488a659e26fc7952c6d0addddeaecc2d92.tar.bz2
volse-hubzilla-5c9a68488a659e26fc7952c6d0addddeaecc2d92.zip
bug in get_all_perms
Diffstat (limited to 'include')
-rw-r--r--include/permissions.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/permissions.php b/include/permissions.php
index 642d2fcc3..0cb5fe9e5 100644
--- a/include/permissions.php
+++ b/include/permissions.php
@@ -1,7 +1,6 @@
<?php
-
$global_perms = array(
// Read only permissions
'view_stream' => array('channel_r_stream', PERMS_R_STREAM, true),
@@ -20,6 +19,9 @@
);
+// Since these include the translation function - they couldn't be included
+// in $global_perms without causing an include dependency, so we provide a parallel
+// array which isn't global.
function perms_text() {
$perms_text = array(
@@ -48,7 +50,7 @@ function perms_text() {
* @param $uid : The channel_id associated with the resource owner
* @param $observer: The xchan_hash representing the observer
*
- * @returns: array of all permissions, key is permission name, value is integer 0 or 1
+ * @returns: array of all permissions, key is permission name, value is true or false
*/
function get_all_perms($uid,$observer,$internal_use = true) {
@@ -74,11 +76,9 @@ function get_all_perms($uid,$observer,$internal_use = true) {
$channel_perm = $permission[0];
if(! $channel_checked) {
- $r = q("select %s, channel_hash from channel where channel_id = %d limit 1",
- dbesc($channel_perm),
+ $r = q("select * from channel where channel_id = %d limit 1",
intval($uid)
);
-
$channel_checked = true;
}