X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Fbriskin5%2FObj%2Fplacing.phh;h=01ee1682dfa2d38db0c6e8b42954598c66929e6f;hb=44f4d1b333ecb3cc3c3666cc5acb2422edcf029d;hp=31b97a32bc3f83c677b346179ce3ef2628500112;hpb=07070d61b51e6521b1a93ecedeb2e694467d9c60;p=brisk.git diff --git a/web/briskin5/Obj/placing.phh b/web/briskin5/Obj/placing.phh index 31b97a3..01ee168 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); @@ -105,7 +105,7 @@ define(SUBTY_FREQ_LO, 0); define(SUBTY_FREQ_HI, 1); -function placings_show(&$user) +function placings_show($user) { $mtime = placing_time(); $tm = placing_date($mtime); @@ -142,7 +142,11 @@ function placing_time_file() function placing_time_pgsql() { GLOBAL $G_dbpfx; - $bdb = new BriskDB(); + + 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); @@ -173,7 +177,7 @@ function placing_date($mtime) } -function placing_show_file(&$user, $ty, $subty) +function placing_show_file($user, $ty, $subty) { $tail = FALSE; @@ -247,11 +251,14 @@ function placing_show_file(&$user, $ty, $subty) // // -function placing_show_pgsql(&$user, $ty, $subty) +function placing_show_pgsql($user, $ty, $subty) { GLOBAL $G_dbpfx; - - $bdb = new BriskDB(); + + 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');", @@ -297,7 +304,7 @@ function placing_show_pgsql(&$user, $ty, $subty) return ($ret); } -function placing_show(&$user, $ty, $subty) +function placing_show($user, $ty, $subty) { GLOBAL $G_dbasetype;