fixes from upstream

This commit is contained in:
zotlabs 2019-02-17 21:45:31 -08:00
parent 4b96c88e50
commit e108b7c223
2 changed files with 2 additions and 2 deletions

View file

@ -28,7 +28,7 @@ class ThreadListener {
}
static public function fetch_by_target($target_id,$ltype = 0) {
$x = q("select * from listeners where target_id = '%s' and ltype = %d limit 1",
$x = q("select * from listeners where target_id = '%s' and ltype = %d",
dbesc($target_id),
intval($ltype)
);

View file

@ -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(CASE WHEN account_id > 0 THEN 1 ELSE NULL END) 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),