aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xboot.php6
-rw-r--r--include/ItemObject.php2
-rw-r--r--include/account.php7
-rw-r--r--include/conversation.php2
-rw-r--r--include/datetime.php2
-rwxr-xr-xinclude/diaspora.php2
-rw-r--r--include/dir_fns.php4
-rw-r--r--include/externals.php2
-rw-r--r--include/identity.php2
-rwxr-xr-xinclude/items.php28
-rw-r--r--include/message.php2
-rw-r--r--include/onepoll.php2
-rw-r--r--include/poller.php10
-rw-r--r--include/zot.php2
-rwxr-xr-xmod/events.php2
-rw-r--r--mod/feed.php2
-rw-r--r--mod/import.php2
-rw-r--r--mod/item.php4
-rw-r--r--mod/mail.php2
-rw-r--r--mod/profiles.php4
-rw-r--r--mod/removeaccount.php2
-rw-r--r--mod/removeme.php2
22 files changed, 47 insertions, 46 deletions
diff --git a/boot.php b/boot.php
index 941d6f6f3..4223a57f3 100755
--- a/boot.php
+++ b/boot.php
@@ -50,9 +50,9 @@ define ( 'ZOT_REVISION', 1 );
define ( 'DB_UPDATE_VERSION', 1129 );
-define ( 'EOL', '<br />' . "\r\n" );
-define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
-
+define ( 'EOL', '<br />' . "\r\n" );
+define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
+define ( 'NULL_DATE', '0000-00-00 00:00:00' );
define ( 'TEMPLATE_BUILD_PATH', 'store/[data]/smarty3' );
define ( 'DIRECTORY_MODE_NORMAL', 0x0000); // This is technically DIRECTORY_MODE_TERTIARY, but it's the default, hence 0x0000
diff --git a/include/ItemObject.php b/include/ItemObject.php
index b4a60762b..451e369b0 100644
--- a/include/ItemObject.php
+++ b/include/ItemObject.php
@@ -256,7 +256,7 @@ class Item extends BaseObject {
'isotime' => datetime_convert('UTC', date_default_timezone_get(), $item['created'], 'c'),
'localtime' => datetime_convert('UTC', date_default_timezone_get(), $item['created'], 'r'),
'editedtime' => (($item['edited'] != $item['created']) ? sprintf( t('last edited: %s'), datetime_convert('UTC', date_default_timezone_get(), $item['edited'], 'r')) : ''),
- 'expiretime' => (($item['expires'] !== '0000-00-00 00:00:00') ? sprintf( t('Expires: %s'), datetime_convert('UTC', date_default_timezone_get(), $item['expires'], 'r')):''),
+ 'expiretime' => (($item['expires'] !== NULL_DATE) ? sprintf( t('Expires: %s'), datetime_convert('UTC', date_default_timezone_get(), $item['expires'], 'r')):''),
'lock' => $lock,
'verified' => $verified,
'unverified' => $unverified,
diff --git a/include/account.php b/include/account.php
index 6cc203dc8..9b4dc409c 100644
--- a/include/account.php
+++ b/include/account.php
@@ -108,7 +108,7 @@ function create_account($arr) {
$parent = ((x($arr,'parent')) ? intval($arr['parent']) : 0 );
$flags = ((x($arr,'account_flags')) ? intval($arr['account_flags']) : ACCOUNT_OK);
$roles = ((x($arr,'account_roles')) ? intval($arr['account_roles']) : 0 );
- $expires = ((x($arr,'expires')) ? intval($arr['expires']) : '0000-00-00 00:00:00');
+ $expires = ((x($arr,'expires')) ? intval($arr['expires']) : NULL_DATE);
$default_service_class = get_config('system','default_service_class');
@@ -511,8 +511,9 @@ function user_approve($hash) {
function downgrade_accounts() {
$r = q("select * from account where not ( account_flags & %d )
- and account_expires != '0000-00-00 00:00:00'
+ and account_expires != '%s'
and account_expires < UTC_TIMESTAMP() ",
+ dbesc(NULL_DATE),
intval(ACCOUNT_EXPIRED)
);
@@ -528,7 +529,7 @@ function downgrade_accounts() {
$x = q("UPDATE account set account_service_class = '%s', account_expires = '%s'
where account_id = %d limit 1",
dbesc($basic),
- dbesc('0000-00-00 00:00:00'),
+ dbesc(NULL_DATE),
intval($rr['account_id'])
);
$ret = array('account' => $rr);
diff --git a/include/conversation.php b/include/conversation.php
index c346a204c..05ae72d61 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -707,7 +707,7 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional', $
'isotime' => datetime_convert('UTC', date_default_timezone_get(), $item['created'], 'c'),
'localtime' => datetime_convert('UTC', date_default_timezone_get(), $item['created'], 'r'),
'editedtime' => (($item['edited'] != $item['created']) ? sprintf( t('last edited: %s'), datetime_convert('UTC', date_default_timezone_get(), $item['edited'], 'r')) : ''),
- 'expiretime' => (($item['expires'] !== '0000-00-00 00:00:00') ? sprintf( t('Expires: %s'), datetime_convert('UTC', date_default_timezone_get(), $item['expires'], 'r')):''),
+ 'expiretime' => (($item['expires'] !== NULL_DATE) ? sprintf( t('Expires: %s'), datetime_convert('UTC', date_default_timezone_get(), $item['expires'], 'r')):''),
'location' => $location,
'indent' => '',
'owner_name' => $owner_name,
diff --git a/include/datetime.php b/include/datetime.php
index 0214b9e4c..84ab1e2fa 100644
--- a/include/datetime.php
+++ b/include/datetime.php
@@ -271,7 +271,7 @@ function relative_date($posted_date,$format = null) {
$abs = strtotime($localtime);
- if (is_null($posted_date) || $posted_date === '0000-00-00 00:00:00' || $abs === False) {
+ if (is_null($posted_date) || $posted_date === NULL_DATE || $abs === False) {
return t('never');
}
diff --git a/include/diaspora.php b/include/diaspora.php
index 27843e4c7..0d797d915 100755
--- a/include/diaspora.php
+++ b/include/diaspora.php
@@ -700,7 +700,7 @@ function diaspora_request($importer,$xml) {
dbesc(datetime_convert()),
dbesc(datetime_convert()),
dbesc(datetime_convert()),
- dbesc('0000-00-00 00:00:00'),
+ dbesc(NULL_DATE),
intval(($default_perms) ? 0 : ABOOK_FLAG_PENDING)
);
diff --git a/include/dir_fns.php b/include/dir_fns.php
index 5fad6567e..f58e7c307 100644
--- a/include/dir_fns.php
+++ b/include/dir_fns.php
@@ -107,7 +107,7 @@ function sync_directories($dirmode) {
$r = array(
'site_url' => DIRECTORY_FALLBACK_MASTER,
'site_flags' => DIRECTORY_MODE_PRIMARY,
- 'site_update' => '0000-00-00 00:00:00',
+ 'site_update' => NULL_DATE,
'site_directory' => DIRECTORY_FALLBACK_MASTER . '/dirsearch',
'site_realm' => DIRECTORY_REALM
);
@@ -137,7 +137,7 @@ function sync_directories($dirmode) {
// for brand new directory servers, only load the last couple of days. Everything before that will be repeats.
- $syncdate = (($rr['site_sync'] === '0000-00-00 00:00:00') ? datetime_convert('UTC','UTC','now - 2 days') : $rr['site_sync']);
+ $syncdate = (($rr['site_sync'] === NULL_DATE) ? datetime_convert('UTC','UTC','now - 2 days') : $rr['site_sync']);
$x = z_fetch_url($rr['site_directory'] . '?f=&sync=' . urlencode($syncdate));
if(! $x['success'])
diff --git a/include/externals.php b/include/externals.php
index ad2c71ac9..acfaae3b6 100644
--- a/include/externals.php
+++ b/include/externals.php
@@ -60,7 +60,7 @@ function externals_run($argv, $argc){
}
if($url) {
- if($r[0]['site_pull'] !== '0000-00-00 00:00:00')
+ if($r[0]['site_pull'] !== NULL_DATE)
$mindate = urlencode(datetime_convert('','',$r[0]['site_pull'] . ' - 1 day'));
else {
$days = get_config('externals','since_days');
diff --git a/include/identity.php b/include/identity.php
index 282d323be..d8f59e56c 100644
--- a/include/identity.php
+++ b/include/identity.php
@@ -1042,7 +1042,7 @@ function advanced_profile(&$a) {
if($a->profile['with']) $profile['marital']['with'] = bbcode($a->profile['with']);
- if(strlen($a->profile['howlong']) && $a->profile['howlong'] !== '0000-00-00 00:00:00') {
+ if(strlen($a->profile['howlong']) && $a->profile['howlong'] !== NULL_DATE) {
$profile['howlong'] = relative_date($a->profile['howlong'], t('for %1$d %2$s'));
}
diff --git a/include/items.php b/include/items.php
index a0a19be1f..b93bf05ee 100755
--- a/include/items.php
+++ b/include/items.php
@@ -144,7 +144,7 @@ function filter_insecure($channel_id,$arr) {
function comments_are_now_closed($item) {
- if($item['comments_closed'] !== '0000-00-00 00:00:00') {
+ if($item['comments_closed'] !== NULL_DATE) {
$d = datetime_convert();
if($d > $item['comments_closed'])
return true;
@@ -448,7 +448,7 @@ function post_activity_item($arr) {
function get_public_feed($channel,$params) {
$type = 'xml';
- $begin = '0000-00-00 00:00:00';
+ $begin = NULL_DATE;
$end = '';
$start = 0;
$records = 40;
@@ -459,7 +459,7 @@ function get_public_feed($channel,$params) {
$params = array();
$params['type'] = ((x($params,'type')) ? $params['type'] : 'xml');
- $params['begin'] = ((x($params,'begin')) ? $params['begin'] : '0000-00-00 00:00:00');
+ $params['begin'] = ((x($params,'begin')) ? $params['begin'] : NULL_DATE);
$params['end'] = ((x($params,'end')) ? $params['end'] : datetime_convert('UTC','UTC','now'));
$params['start'] = ((x($params,'start')) ? $params['start'] : 0);
$params['records'] = ((x($params,'records')) ? $params['records'] : 40);
@@ -758,14 +758,14 @@ function get_item_elements($x) {
$arr['expires'] = ((x($x,'expires') && $x['expires'])
? datetime_convert('UTC','UTC',$x['expires'])
- : '0000-00-00 00:00:00');
+ : NULL_DATE);
$arr['commented'] = ((x($x,'commented') && $x['commented'])
? datetime_convert('UTC','UTC',$x['commented'])
: $arr['created']);
$arr['comments_closed'] = ((x($x,'comments_closed') && $x['comments_closed'])
? datetime_convert('UTC','UTC',$x['comments_closed'])
- : '0000-00-00 00:00:00');
+ : NULL_DATE);
$arr['title'] = (($x['title']) ? htmlspecialchars($x['title'], ENT_COMPAT,'UTF-8',false) : '');
@@ -1003,7 +1003,7 @@ function encode_item($item) {
if($y = encode_item_flags($item))
$x['flags'] = $y;
- if($item['comments_closed'] !== '0000-00-00 00:00:00')
+ if($item['comments_closed'] !== NULL_DATE)
$x['comments_closed'] = $item['comments_closed'];
$x['public_scope'] = $scope;
@@ -1242,8 +1242,8 @@ function get_mail_elements($x) {
$arr['title'] = (($x['title'])? htmlspecialchars($x['title'],ENT_COMPAT,'UTF-8',false) : '');
$arr['created'] = datetime_convert('UTC','UTC',$x['created']);
- if((! array_key_exists('expires',$x)) || ($x['expires'] === '0000-00-00 00:00:00'))
- $arr['expires'] = '0000-00-00 00:00:00';
+ if((! array_key_exists('expires',$x)) || ($x['expires'] === NULL_DATE))
+ $arr['expires'] = NULL_DATE;
else
$arr['expires'] = datetime_convert('UTC','UTC',$x['expires']);
@@ -1839,9 +1839,9 @@ function item_store($arr,$allow_exec = false) {
$arr['owner_xchan'] = ((x($arr,'owner_xchan')) ? notags(trim($arr['owner_xchan'])) : '');
$arr['created'] = ((x($arr,'created') !== false) ? datetime_convert('UTC','UTC',$arr['created']) : datetime_convert());
$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']) : '0000-00-00 00:00:00');
+ $arr['expires'] = ((x($arr,'expires') !== false) ? datetime_convert('UTC','UTC',$arr['expires']) : NULL_DATE);
$arr['commented'] = ((x($arr,'commented') !== false) ? datetime_convert('UTC','UTC',$arr['commented']) : datetime_convert());
- $arr['comments_closed'] = ((x($arr,'comments_closed') !== false) ? datetime_convert('UTC','UTC',$arr['comments_closed']) : '0000-00-00 00:00:00');
+ $arr['comments_closed'] = ((x($arr,'comments_closed') !== false) ? datetime_convert('UTC','UTC',$arr['comments_closed']) : NULL_DATE);
$arr['received'] = datetime_convert();
$arr['changed'] = datetime_convert();
@@ -2248,7 +2248,7 @@ function item_store_update($arr,$allow_exec = false) {
$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'] != '0000-00-00 00:00:00')
+ 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'];
@@ -3018,7 +3018,7 @@ function mail_store($arr) {
$arr['from_xchan'] = ((x($arr,'from_xchan')) ? notags(trim($arr['from_xchan'])) : '');
$arr['to_xchan'] = ((x($arr,'to_xchan')) ? notags(trim($arr['to_xchan'])) : '');
$arr['created'] = ((x($arr,'created') !== false) ? datetime_convert('UTC','UTC',$arr['created']) : datetime_convert());
- $arr['expires'] = ((x($arr,'expires') !== false) ? datetime_convert('UTC','UTC',$arr['expires']) : '0000-00-00 00:00:00');
+ $arr['expires'] = ((x($arr,'expires') !== false) ? datetime_convert('UTC','UTC',$arr['expires']) : NULL_DATE);
$arr['title'] = ((x($arr,'title')) ? notags(trim($arr['title'])) : '');
$arr['parent_mid'] = ((x($arr,'parent_mid')) ? notags(trim($arr['parent_mid'])) : '');
$arr['body'] = ((x($arr,'body')) ? trim($arr['body']) : '');
@@ -4076,7 +4076,7 @@ function zot_feed($uid,$observer_xchan,$mindate) {
$result = array();
$mindate = datetime_convert('UTC','UTC',$mindate);
if(! $mindate)
- $mindate = '0000-00-00 00:00:00';
+ $mindate = NULL_DATE;
$mindate = dbesc($mindate);
@@ -4092,7 +4092,7 @@ function zot_feed($uid,$observer_xchan,$mindate) {
$sql_extra = item_permissions_sql($uid);
}
- if($mindate != '0000-00-00 00:00:00') {
+ if($mindate != NULL_DATE) {
$sql_extra .= " and ( created > '$mindate' or edited > '$mindate' ) ";
$limit = "";
}
diff --git a/include/message.php b/include/message.php
index 607166ec9..96c3532c1 100644
--- a/include/message.php
+++ b/include/message.php
@@ -23,7 +23,7 @@ function send_message($uid = 0, $recipient='', $body='', $subject='', $replyto='
$subject = t('[no subject]');
// if(! $expires)
-// $expires = '0000-00-00 00:00:00';
+// $expires = NULL_DATE;
// else
// $expires = datetime_convert(date_default_timezone_get(),'UTC',$expires);
diff --git a/include/onepoll.php b/include/onepoll.php
index d64785f92..1f28852e9 100644
--- a/include/onepoll.php
+++ b/include/onepoll.php
@@ -67,7 +67,7 @@ function onepoll_run($argv, $argc){
logger("onepoll: poll: ({$contact['id']}) IMPORTER: {$importer['xchan_name']}, CONTACT: {$contact['xchan_name']}");
- $last_update = ((($contact['abook_updated'] === $contact['abook_created']) || ($contact['abook_updated'] === '0000-00-00 00:00:00'))
+ $last_update = ((($contact['abook_updated'] === $contact['abook_created']) || ($contact['abook_updated'] === NULL_DATE))
? datetime_convert('UTC','UTC','now - 7 days')
: datetime_convert('UTC','UTC',$contact['abook_updated'] . ' - 2 days')
);
diff --git a/include/poller.php b/include/poller.php
index b26b9e696..fe242d659 100644
--- a/include/poller.php
+++ b/include/poller.php
@@ -35,11 +35,11 @@ function poller_run($argv, $argc){
// expire any expired mail
- q("delete from mail where expires != '0000-00-00 00:00:00' and expires < UTC_TIMESTAMP() ");
+ q("delete from mail where expires != NULL_DATE and expires < UTC_TIMESTAMP() ");
// expire any expired items
- $r = q("select id from item where expires != '0000-00-00 00:00:00' and expires < UTC_TIMESTAMP()
+ $r = q("select id from item where expires != NULL_DATE and expires < UTC_TIMESTAMP()
and not ( item_restrict & %d ) ",
intval(ITEM_DELETED)
);
@@ -285,7 +285,7 @@ function poller_run($argv, $argc){
else {
// if we've never connected with them, start the mark for death countdown from now
- if($c == '0000-00-00 00:00:00') {
+ if($c == NULL_DATE) {
$r = q("update abook set abook_connected = '%s' where abook_id = %d limit 1",
dbesc(datetime_convert()),
intval($contact['abook_id'])
@@ -338,7 +338,7 @@ function poller_run($argv, $argc){
}
if($dirmode == DIRECTORY_MODE_SECONDARY || $dirmode == DIRECTORY_MODE_PRIMARY) {
- $r = q("select distinct ud_addr, updates.* from updates where not ( ud_flags & %d ) and ud_addr != '' and ( ud_last = '0000-00-00 00:00:00' OR ud_last > UTC_TIMESTAMP() - INTERVAL 7 DAY ) group by ud_addr ",
+ $r = q("select distinct ud_addr, updates.* from updates where not ( ud_flags & %d ) and ud_addr != '' and ( ud_last = NULL_DATE OR ud_last > UTC_TIMESTAMP() - INTERVAL 7 DAY ) group by ud_addr ",
intval(UPDATE_FLAGS_UPDATED)
);
if($r) {
@@ -347,7 +347,7 @@ function poller_run($argv, $argc){
// If they didn't respond when we attempted before, back off to once a day
// After 7 days we won't bother anymore
- if($rr['ud_last'] != '0000-00-00 00:00:00')
+ if($rr['ud_last'] != NULL_DATE)
if($rr['ud_last'] > datetime_convert('UTC','UTC', 'now - 1 day'))
continue;
proc_run('php','include/onedirsync.php',$rr['ud_id']);
diff --git a/include/zot.php b/include/zot.php
index a53b39663..f5099df8c 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -384,7 +384,7 @@ function zot_refresh($them,$channel = null, $force = false) {
$next_birthday = datetime_convert('UTC','UTC',$j['profile']['next_birthday']);
}
else {
- $next_birthday = '0000-00-00 00:00:00';
+ $next_birthday = NULL_DATE;
}
if($r) {
diff --git a/mod/events.php b/mod/events.php
index 195dcb0ff..c80d1dd39 100755
--- a/mod/events.php
+++ b/mod/events.php
@@ -53,7 +53,7 @@ function events_post(&$a) {
}
if($nofinish) {
- $finish = '0000-00-00 00:00:00';
+ $finish = NULL_DATE;
}
if($finish_text) {
diff --git a/mod/feed.php b/mod/feed.php
index fdbe4db8c..776f9787f 100644
--- a/mod/feed.php
+++ b/mod/feed.php
@@ -7,7 +7,7 @@ function feed_init(&$a) {
$params = array();
- $params['begin'] = ((x($_REQUEST,'date_begin')) ? $_REQUEST['date_begin'] : '0000-00-00 00:00:00');
+ $params['begin'] = ((x($_REQUEST,'date_begin')) ? $_REQUEST['date_begin'] : NULL_DATE);
$params['end'] = ((x($_REQUEST,'date_end')) ? $_REQUEST['date_end'] : '');
$params['type'] = ((stristr(argv(0),'json')) ? 'json' : 'xml');
$params['pages'] = ((x($_REQUEST,'pages')) ? intval($_REQUEST['pages']) : 0);
diff --git a/mod/import.php b/mod/import.php
index e732c3c06..7452bcdc9 100644
--- a/mod/import.php
+++ b/mod/import.php
@@ -256,7 +256,7 @@ function import_post(&$a) {
require_once('include/photo/photo_driver.php');
$photos = import_profile_photo($xchan['xchan_photo_l'],$xchan['xchan_hash']);
if($photos[4])
- $photodate = '0000-00-00 00:00:00';
+ $photodate = NULL_DATE;
else
$photodate = $xchan['xchan_photo_date'];
diff --git a/mod/item.php b/mod/item.php
index 9338cf401..23d39a62c 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -384,13 +384,13 @@ function item_post(&$a) {
}
- $expires = '0000-00-00 00:00:00';
+ $expires = NULL_DATE;
if(feature_enabled($profile_uid,'content_expire')) {
if(x($_REQUEST,'expire')) {
$expires = datetime_convert(date_default_timezone_get(),'UTC', $_REQUEST['expire']);
if($expires <= datetime_convert())
- $expires = '0000-00-00 00:00:00';
+ $expires = NULL_DATE;
}
}
diff --git a/mod/mail.php b/mod/mail.php
index b7297443c..d6d802fe7 100644
--- a/mod/mail.php
+++ b/mod/mail.php
@@ -17,7 +17,7 @@ function mail_post(&$a) {
$body = ((x($_REQUEST,'body')) ? escape_tags(trim($_REQUEST['body'])) : '');
$recipient = ((x($_REQUEST,'messageto')) ? notags(trim($_REQUEST['messageto'])) : '');
$rstr = ((x($_REQUEST,'messagerecip')) ? notags(trim($_REQUEST['messagerecip'])) : '');
- $expires = ((x($_REQUEST,'expires')) ? datetime_convert(date_default_timezone_get(),'UTC', $_REQUEST['expires']) : '0000-00-00 00:00:00');
+ $expires = ((x($_REQUEST,'expires')) ? datetime_convert(date_default_timezone_get(),'UTC', $_REQUEST['expires']) : NULL_DATE);
// If we have a raw string for a recipient which hasn't been auto-filled,
// it means they probably aren't in our address book, hence we don't know
diff --git a/mod/profiles.php b/mod/profiles.php
index 6361f56a3..063e714e7 100644
--- a/mod/profiles.php
+++ b/mod/profiles.php
@@ -304,7 +304,7 @@ function profiles_post(&$a) {
$with = ((x($_POST,'with')) ? escape_tags(trim($_POST['with'])) : '');
if(! strlen($howlong))
- $howlong = '0000-00-00 00:00:00';
+ $howlong = NULL_DATE;
else
$howlong = datetime_convert(date_default_timezone_get(),'UTC',$howlong);
@@ -707,7 +707,7 @@ logger('extra_fields: ' . print_r($extra_fields,true));
'$marital' => marital_selector($r[0]['marital']),
'$marital_min' => marital_selector_min($r[0]['marital']),
'$with' => $r[0]['with'],
- '$howlong' => ($r[0]['howlong'] === '0000-00-00 00:00:00' ? '' : datetime_convert('UTC',date_default_timezone_get(),$r[0]['howlong'])),
+ '$howlong' => ($r[0]['howlong'] === NULL_DATE ? '' : datetime_convert('UTC',date_default_timezone_get(),$r[0]['howlong'])),
'$sexual' => sexpref_selector($r[0]['sexual']),
'$sexual_min' => sexpref_selector_min($r[0]['sexual']),
'$about' => $r[0]['about'],
diff --git a/mod/removeaccount.php b/mod/removeaccount.php
index 1f9dbcafa..70979c07d 100644
--- a/mod/removeaccount.php
+++ b/mod/removeaccount.php
@@ -24,7 +24,7 @@ function removeaccount_post(&$a) {
if(! account_verify_password($account['account_email'],$_POST['qxz_password']))
return;
- if($account['account_password_changed'] != '0000-00-00 00:00:00') {
+ if($account['account_password_changed'] != NULL_DATE) {
$d1 = datetime_convert('UTC','UTC','now - 48 hours');
if($account['account_password_changed'] > d1) {
notice( t('Account removals are not allowed within 48 hours of changing the account password.') . EOL);
diff --git a/mod/removeme.php b/mod/removeme.php
index 13bf6cf63..d2ff013b8 100644
--- a/mod/removeme.php
+++ b/mod/removeme.php
@@ -23,7 +23,7 @@ function removeme_post(&$a) {
if(! account_verify_password($account['account_email'],$_POST['qxz_password']))
return;
- if($account['account_password_changed'] != '0000-00-00 00:00:00') {
+ if($account['account_password_changed'] != NULL_DATE) {
$d1 = datetime_convert('UTC','UTC','now - 48 hours');
if($account['account_password_changed'] > d1) {
notice( t('Channel removals are not allowed within 48 hours of changing the account password.') . EOL);