projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Uses new dynamic config to store number of subscribers so we don't
[platal.git]
/
plugins
/
insert.getNbIns.php
diff --git
a/plugins/insert.getNbIns.php
b/plugins/insert.getNbIns.php
index
f19ff89
..
b12c73f
100644
(file)
--- a/
plugins/insert.getNbIns.php
+++ b/
plugins/insert.getNbIns.php
@@
-28,10
+28,15
@@
* Purpose:
* -------------------------------------------------------------
*/
* Purpose:
* -------------------------------------------------------------
*/
+
function smarty_insert_getNbIns($params, &$smarty)
{
function smarty_insert_getNbIns($params, &$smarty)
{
- $res = XDB::query("SELECT COUNT(*) FROM auth_user_md5 WHERE perms IN ('admin','user') AND deces=0");
- $cnt = $res->fetchOneCell();
+ global $globals;
+ $cnt = $globals->core->NbIns;
+ if ($cnt == 0) {
+ update_NbIns();
+ $cnt = $globals->core->NbIns;
+ }
return number_format($cnt, 0, ",", ".");
}
// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
return number_format($cnt, 0, ",", ".");
}
// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: