projects
/
brisk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
create static method in BriskDB function to allow constructor fail and manage of...
[brisk.git]
/
web
/
briskin5
/
statadm.php
diff --git
a/web/briskin5/statadm.php
b/web/briskin5/statadm.php
index
15fd27c
..
07b847e
100644
(file)
--- a/
web/briskin5/statadm.php
+++ b/
web/briskin5/statadm.php
@@
-58,8
+58,11
@@
function main_file($curtime)
fclose($fp_start);
}
fclose($fp_start);
}
- // FIXME: now create can return FALSE
- $bdb = BriskDB::create();
+ if (($bdb = BriskDB::create()) == FALSE) {
+ echo "database connection failed";
+ exit;
+ }
+
$bdb->users_load();
for ($i = 0 ; $i < $bdb->count() ; $i++) {
$bdb->users_load();
for ($i = 0 ; $i < $bdb->count() ; $i++) {
@@
-211,8
+214,10
@@
function main_pgsql($curtime)
{
GLOBAL $G_dbpfx;
{
GLOBAL $G_dbpfx;
- // FIXME: now create can return FALSE
- $bdb = BriskDB::create();
+ if (($bdb = BriskDB::create()) == FALSE) {
+ echo "database connection failed";
+ exit;
+ }
$limi = array( TRI_LIMIT, MON_LIMIT, WEE_LIMIT );
$ming = array( TRI_MIN_GAMES, MON_MIN_GAMES, WEE_MIN_GAMES );
$limi = array( TRI_LIMIT, MON_LIMIT, WEE_LIMIT );
$ming = array( TRI_MIN_GAMES, MON_MIN_GAMES, WEE_MIN_GAMES );