aboutsummaryrefslogtreecommitdiffstats
path: root/mod/post.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/post.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/post.php')
-rw-r--r--mod/post.php13
1 files changed, 5 insertions, 8 deletions
diff --git a/mod/post.php b/mod/post.php
index 9e818a7e2..338cd71c0 100644
--- a/mod/post.php
+++ b/mod/post.php
@@ -666,14 +666,12 @@ function post_post(&$a) {
// a dead hub came back to life - reset any tombstones we might have
- if($hub['hubloc_status'] & HUBLOC_OFFLINE) {
- q("update hubloc set hubloc_status = (hubloc_status & ~%d) where hubloc_id = %d",
- intval(HUBLOC_OFFLINE),
+ if(intval($hub['hubloc_error'])) {
+ q("update hubloc set hubloc_error = 0 where hubloc_id = %d",
intval($hub['hubloc_id'])
);
- if($r[0]['hubloc_flags'] & HUBLOC_FLAGS_ORPHANCHECK) {
- q("update hubloc set hubloc_flags = (hubloc_flags & ~%d) where hubloc_id = %d",
- intval(HUBLOC_FLAGS_ORPHANCHECK),
+ if(intval($r[0]['hubloc_orphancheck'])) {
+ q("update hubloc set hubloc_orhpancheck = 0 where hubloc_id = %d",
intval($hub['hubloc_id'])
);
}
@@ -693,8 +691,7 @@ function post_post(&$a) {
*
*/
- q("update hubloc set hubloc_flags = ( hubloc_flags | %d ) where hubloc_url = '%s' and hubloc_sitekey != '%s' ",
- intval(HUBLOC_FLAGS_DELETED),
+ q("update hubloc set hubloc_deleted = 1 where hubloc_url = '%s' and hubloc_sitekey != '%s' ",
dbesc($hub['hubloc_url']),
dbesc($hub['hubloc_sitekey'])
);