aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Libzot.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2023-04-13 21:25:03 +0200
committerMario Vavti <mario@mariovavti.com>2023-04-13 21:25:03 +0200
commitf1667dbbe62dd0dce95aa36071c00b83b9033f0c (patch)
tree89384beff1f995e39aecb2d40395987675a73799 /Zotlabs/Lib/Libzot.php
parent2bab7e26931d67ed4d63cdbd299b85a05d359813 (diff)
downloadvolse-hubzilla-f1667dbbe62dd0dce95aa36071c00b83b9033f0c.tar.gz
volse-hubzilla-f1667dbbe62dd0dce95aa36071c00b83b9033f0c.tar.bz2
volse-hubzilla-f1667dbbe62dd0dce95aa36071c00b83b9033f0c.zip
zot_info(): improved check for deleted
Diffstat (limited to 'Zotlabs/Lib/Libzot.php')
-rw-r--r--Zotlabs/Lib/Libzot.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php
index b75e4e135..30afab66c 100644
--- a/Zotlabs/Lib/Libzot.php
+++ b/Zotlabs/Lib/Libzot.php
@@ -2724,12 +2724,13 @@ class Libzot {
$e = $r[0];
$id = $e['channel_id'];
- $sys_channel = ((empty($e['channel_system'])) ? false : true);
+ $sys_channel = ((intval($e['channel_system'])) ? true : false);
$special_channel = (($e['channel_pageflags'] & PAGE_PREMIUM) ? true : false);
$adult_channel = (($e['channel_pageflags'] & PAGE_ADULT) ? true : false);
$censored = (($e['channel_pageflags'] & PAGE_CENSORED) ? true : false);
$searchable = (($e['channel_pageflags'] & PAGE_HIDDEN) ? false : true);
- $deleted = ((empty($e['xchan_deleted'])) ? false : true);
+ // if the xchan has been deleted (instead of marked deleted) xchan entries will return null
+ $deleted = ((intval($e['xchan_deleted']) || $e['xchan_hash'] === null) ? true : false);
if ($deleted || $censored || $sys_channel)
$searchable = false;