BriskDB and DBConn classes now have a static constructor method that can be failed
[brisk.git] / web / briskin5 / Obj / placing.phh
index 31b97a3..5e1144a 100644 (file)
@@ -142,7 +142,8 @@ function placing_time_file()
 function placing_time_pgsql()
 {    
     GLOBAL $G_dbpfx;
-    $bdb = new BriskDB();
+    // FIXME: now create can return FALSE
+    $bdb = BriskDB::create();
     
     $mti_sql = sprintf("SELECT CAST(EXTRACT(EPOCH FROM mtime) AS INTEGER) as mtime 
                         FROM %sbin5_places_mtime WHERE code = 0;", $G_dbpfx);
@@ -250,8 +251,9 @@ function placing_show_file(&$user, $ty, $subty)
 function placing_show_pgsql(&$user, $ty, $subty) 
 {
     GLOBAL $G_dbpfx;
-
-    $bdb = new BriskDB();
+    
+    // FIXME: now create can return FALSE
+    $bdb = BriskDB::create();
       
     if ($user != FALSE) {
         $pla_sql = sprintf("SELECT * from %sbin5_places where type = %d AND (rank <= %d OR ucode = '%s');",