X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Fbriskin5%2FObj%2Fplacing.phh;h=d6d65475b0d3ee1f3b65f0d79c7eda9704f622e8;hb=9cbf3bfaad0cad7feaf6413eb53df0a1475c6303;hp=5e1144aeeecfd24b420d429c81203f774703893c;hpb=a3111de89c89bb1a3a81e748592d26d85e4fd79d;p=brisk.git diff --git a/web/briskin5/Obj/placing.phh b/web/briskin5/Obj/placing.phh index 5e1144a..d6d6547 100644 --- a/web/briskin5/Obj/placing.phh +++ b/web/briskin5/Obj/placing.phh @@ -49,7 +49,7 @@ class Ptsgam { $this->gam = $gam; } - function &myclone() + function myclone() { $ret = new Ptsgam($this->username, $this->pts, $this->gam); @@ -142,8 +142,11 @@ function placing_time_file() function placing_time_pgsql() { GLOBAL $G_dbpfx; - // FIXME: now create can return FALSE - $bdb = BriskDB::create(); + + if (($bdb = BriskDB::create()) == FALSE) { + log_crit("placing: database connection failed"); + return (FALSE); + } $mti_sql = sprintf("SELECT CAST(EXTRACT(EPOCH FROM mtime) AS INTEGER) as mtime FROM %sbin5_places_mtime WHERE code = 0;", $G_dbpfx); @@ -174,7 +177,7 @@ function placing_date($mtime) } -function placing_show_file(&$user, $ty, $subty) +function placing_show_file($user, $ty, $subty) { $tail = FALSE; @@ -252,8 +255,10 @@ function placing_show_pgsql(&$user, $ty, $subty) { GLOBAL $G_dbpfx; - // FIXME: now create can return FALSE - $bdb = BriskDB::create(); + if (($bdb = BriskDB::create()) == FALSE) { + log_crit("placing: database connection failed"); + return (""); + } if ($user != FALSE) { $pla_sql = sprintf("SELECT * from %sbin5_places where type = %d AND (rank <= %d OR ucode = '%s');",