aboutsummaryrefslogtreecommitdiffstats
path: root/mod/locs.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-01-20 15:35:42 -0800
committerfriendica <info@friendica.com>2015-01-20 15:35:42 -0800
commit6f11f20992c88ff48a55929e94d9003fcc437062 (patch)
tree8eecb1327151a63ac6cd0421c56e56bb18009164 /mod/locs.php
parent70fb47248b6579beabc81287750bc18aab2a7ddd (diff)
downloadvolse-hubzilla-6f11f20992c88ff48a55929e94d9003fcc437062.tar.gz
volse-hubzilla-6f11f20992c88ff48a55929e94d9003fcc437062.tar.bz2
volse-hubzilla-6f11f20992c88ff48a55929e94d9003fcc437062.zip
first cut at unpacking bitfields in hubloc, fixed hubloc_error and hubloc_deleted
Diffstat (limited to 'mod/locs.php')
-rw-r--r--mod/locs.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/mod/locs.php b/mod/locs.php
index b1169fcca..352112e3a 100644
--- a/mod/locs.php
+++ b/mod/locs.php
@@ -50,8 +50,7 @@ function locs_post(&$a) {
notice( t('Primary location cannot be removed.') . EOL);
return;
}
- $r = q("update hubloc set hubloc_flags = (hubloc_flags & %d) where hubloc_id = %d and hubloc_hash = '%s'",
- intval(HUBLOC_FLAGS_DELETED),
+ $r = q("update hubloc set hubloc_deleted = 1 where hubloc_id = %d and hubloc_hash = '%s'",
intval($hubloc_id),
dbesc($channel['channel_hash'])
);
@@ -66,7 +65,6 @@ function locs_post(&$a) {
function locs_content(&$a) {
-
if(! local_user()) {
notice( t('Permission denied.') . EOL);
return;
@@ -86,7 +84,7 @@ function locs_content(&$a) {
for($x = 0; $x < count($r); $x ++) {
$r[$x]['primary'] = (($r[$x]['hubloc_flags'] & HUBLOC_FLAGS_PRIMARY) ? true : false);
- $r[$x]['deleted'] = (($r[$x]['hubloc_flags'] & HUBLOC_FLAGS_DELETED) ? true : false);
+ $r[$x]['deleted'] = (intval($r[$x]['hubloc_deleted']) ? true : false);
}