aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorredmatrix <mike@macgirvin.com>2016-09-25 17:06:13 -0700
committerredmatrix <mike@macgirvin.com>2016-09-25 17:06:13 -0700
commitfb9544badd66043bf7ee5a7566ba288ad7da29fa (patch)
tree3bdb33ed9eef9101f1d6d6972ac9411051b988ce /include/items.php
parent4e85bc66b8a5f5347ae15dda229f028d31b58469 (diff)
downloadvolse-hubzilla-fb9544badd66043bf7ee5a7566ba288ad7da29fa.tar.gz
volse-hubzilla-fb9544badd66043bf7ee5a7566ba288ad7da29fa.tar.bz2
volse-hubzilla-fb9544badd66043bf7ee5a7566ba288ad7da29fa.zip
null_date conversion; phase 1
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/items.php b/include/items.php
index ba39fd7ac..fd9fc05ff 100755
--- a/include/items.php
+++ b/include/items.php
@@ -163,7 +163,7 @@ function collect_recipients($item, &$private_envelope) {
}
function comments_are_now_closed($item) {
- if($item['comments_closed'] !== NULL_DATE) {
+ if($item['comments_closed'] > NULL_DATE) {
$d = datetime_convert();
if($d > $item['comments_closed'])
return true;
@@ -1090,7 +1090,7 @@ function encode_item($item,$mirror = false) {
if($y = encode_item_flags($item))
$x['flags'] = $y;
- if($item['comments_closed'] !== NULL_DATE)
+ if($item['comments_closed'] > NULL_DATE)
$x['comments_closed'] = $item['comments_closed'];
$x['public_scope'] = $scope;
@@ -1439,7 +1439,7 @@ function get_mail_elements($x) {
$arr['conv_guid'] = (($x['conv_guid'])? htmlspecialchars($x['conv_guid'],ENT_COMPAT,'UTF-8',false) : '');
$arr['created'] = datetime_convert('UTC','UTC',$x['created']);
- if((! array_key_exists('expires',$x)) || ($x['expires'] === NULL_DATE))
+ if((! array_key_exists('expires',$x)) || ($x['expires'] <= NULL_DATE))
$arr['expires'] = NULL_DATE;
else
$arr['expires'] = datetime_convert('UTC','UTC',$x['expires']);
@@ -2062,7 +2062,7 @@ function item_store_update($arr,$allow_exec = false, $deliver = true) {
$arr['edited'] = ((x($arr,'edited') !== false) ? datetime_convert('UTC','UTC',$arr['edited']) : datetime_convert());
$arr['expires'] = ((x($arr,'expires') !== false) ? datetime_convert('UTC','UTC',$arr['expires']) : $orig[0]['expires']);
- if(array_key_exists('comments_closed',$arr) && $arr['comments_closed'] != NULL_DATE)
+ if(array_key_exists('comments_closed',$arr) && $arr['comments_closed'] > NULL_DATE)
$arr['comments_closed'] = datetime_convert('UTC','UTC',$arr['comments_closed']);
else
$arr['comments_closed'] = $orig[0]['comments_closed'];
@@ -3829,7 +3829,7 @@ function zot_feed($uid,$observer_hash,$arr) {
$limit = " LIMIT 100 ";
- if($mindate != NULL_DATE) {
+ if($mindate > NULL_DATE) {
$sql_extra .= " and ( created > '$mindate' or changed > '$mindate' ) ";
}