aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
authorredmatrix <mike@macgirvin.com>2016-09-26 18:17:38 -0700
committerredmatrix <mike@macgirvin.com>2016-09-26 18:17:38 -0700
commit4663278f52fd11c1014d13151af2bc6ef1392c7d (patch)
tree5ea36ed7db723a1d0abfd99c5e7d21f9e72cf12a /Zotlabs/Module
parent5716556766eb4e329f0c6c1bc899a7621cbcd5a5 (diff)
parentcacdac16aa104eb1308f69f24fef31f682934fca (diff)
downloadvolse-hubzilla-4663278f52fd11c1014d13151af2bc6ef1392c7d.tar.gz
volse-hubzilla-4663278f52fd11c1014d13151af2bc6ef1392c7d.tar.bz2
volse-hubzilla-4663278f52fd11c1014d13151af2bc6ef1392c7d.zip
Merge branch 'nulldate' into dev
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Admin.php2
-rw-r--r--Zotlabs/Module/Profiles.php2
-rw-r--r--Zotlabs/Module/Removeaccount.php2
-rw-r--r--Zotlabs/Module/Removeme.php2
-rw-r--r--Zotlabs/Module/Settings/Tokens.php2
5 files changed, 5 insertions, 5 deletions
diff --git a/Zotlabs/Module/Admin.php b/Zotlabs/Module/Admin.php
index e6a29fd8d..e3702992f 100644
--- a/Zotlabs/Module/Admin.php
+++ b/Zotlabs/Module/Admin.php
@@ -87,7 +87,7 @@ class Admin extends \Zotlabs\Web\Controller {
// list total user accounts, expirations etc.
$accounts = array();
- $r = q("SELECT COUNT(*) AS total, COUNT(CASE WHEN account_expires > %s THEN 1 ELSE NULL END) AS expiring, COUNT(CASE WHEN account_expires < %s AND account_expires != '%s' THEN 1 ELSE NULL END) AS expired, COUNT(CASE WHEN (account_flags & %d)>0 THEN 1 ELSE NULL END) AS blocked FROM account",
+ $r = q("SELECT COUNT(*) AS total, COUNT(CASE WHEN account_expires > %s THEN 1 ELSE NULL END) AS expiring, COUNT(CASE WHEN account_expires < %s AND account_expires > '%s' THEN 1 ELSE NULL END) AS expired, COUNT(CASE WHEN (account_flags & %d)>0 THEN 1 ELSE NULL END) AS blocked FROM account",
db_utcnow(),
db_utcnow(),
dbesc(NULL_DATE),
diff --git a/Zotlabs/Module/Profiles.php b/Zotlabs/Module/Profiles.php
index 4b05182c2..788673296 100644
--- a/Zotlabs/Module/Profiles.php
+++ b/Zotlabs/Module/Profiles.php
@@ -724,7 +724,7 @@ class Profiles extends \Zotlabs\Web\Controller {
'$marital' => marital_selector($r[0]['marital']),
'$marital_min' => marital_selector_min($r[0]['marital']),
'$with' => array('with', t("Who (if applicable)"), $r[0]['partner'], t('Examples: cathy123, Cathy Williams, cathy@example.com')),
- '$howlong' => array('howlong', t('Since (date)'), ($r[0]['howlong'] === NULL_DATE ? '' : datetime_convert('UTC',date_default_timezone_get(),$r[0]['howlong']))),
+ '$howlong' => array('howlong', t('Since (date)'), ($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' => array('about', t('Tell us about yourself'), $r[0]['about']),
diff --git a/Zotlabs/Module/Removeaccount.php b/Zotlabs/Module/Removeaccount.php
index 9fac7838e..9d2bbd0de 100644
--- a/Zotlabs/Module/Removeaccount.php
+++ b/Zotlabs/Module/Removeaccount.php
@@ -29,7 +29,7 @@ class Removeaccount extends \Zotlabs\Web\Controller {
if(! ($x && $x['account']))
return;
- if($account['account_password_changed'] != NULL_DATE) {
+ 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/Zotlabs/Module/Removeme.php b/Zotlabs/Module/Removeme.php
index bc18fe0f8..ca2080e83 100644
--- a/Zotlabs/Module/Removeme.php
+++ b/Zotlabs/Module/Removeme.php
@@ -29,7 +29,7 @@ class Removeme extends \Zotlabs\Web\Controller {
if(! ($x && $x['account']))
return;
- if($account['account_password_changed'] != NULL_DATE) {
+ 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);
diff --git a/Zotlabs/Module/Settings/Tokens.php b/Zotlabs/Module/Settings/Tokens.php
index 0ae960785..e63fed128 100644
--- a/Zotlabs/Module/Settings/Tokens.php
+++ b/Zotlabs/Module/Settings/Tokens.php
@@ -156,7 +156,7 @@ class Tokens {
'$url2' => z_root() . '/photos/' . $channel['channel_address'],
'$name' => array('name', t('Login Name') . ' <span class="required">*</span>', (($atoken) ? $atoken['atoken_name'] : ''),''),
'$token'=> array('token', t('Login Password') . ' <span class="required">*</span>',(($atoken) ? $atoken['atoken_token'] : autoname(8)), ''),
- '$expires'=> array('expires', t('Expires (yyyy-mm-dd)'), (($atoken['atoken_expires'] && $atoken['atoken_expires'] != NULL_DATE) ? datetime_convert('UTC',date_default_timezone_get(),$atoken['atoken_expires']) : ''), ''),
+ '$expires'=> array('expires', t('Expires (yyyy-mm-dd)'), (($atoken['atoken_expires'] && $atoken['atoken_expires'] > NULL_DATE) ? datetime_convert('UTC',date_default_timezone_get(),$atoken['atoken_expires']) : ''), ''),
'$them' => t('Their Settings'),
'$me' => t('My Settings'),
'$perms' => $perms,