This is long overdue - use a symblic constant NULL_DATE instead of the easily mis-typed sequence '0000-00-00 00:00:00'
This commit is contained in:
parent
8fbeb370db
commit
c6d07feff5
6
boot.php
6
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
|
||||
|
@ -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,
|
||||
|
@ -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);
|
||||
|
@ -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,
|
||||
|
@ -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');
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
);
|
||||
|
||||
|
@ -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'])
|
||||
|
@ -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');
|
||||
|
@ -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'));
|
||||
}
|
||||
|
||||
|
@ -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 = "";
|
||||
}
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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')
|
||||
);
|
||||
|
@ -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']);
|
||||
|
@ -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) {
|
||||
|
@ -53,7 +53,7 @@ function events_post(&$a) {
|
||||
}
|
||||
|
||||
if($nofinish) {
|
||||
$finish = '0000-00-00 00:00:00';
|
||||
$finish = NULL_DATE;
|
||||
}
|
||||
|
||||
if($finish_text) {
|
||||
|
@ -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);
|
||||
|
@ -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'];
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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'],
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user