sources cleanup
[brisk.git] / web / index.php
index ee4e791..ee5942e 100644 (file)
@@ -28,7 +28,6 @@ require_once("Obj/brisk.phh");
 require_once("Obj/auth.phh");
 require_once("Obj/proxyscan.phh");
 
-
 $mlang_room = array( 'userpasserr'  => array('it' => 'Utente e/o password errati.',
                                              'en' => 'Wrong user and/or password.'),
                      'userpassmust' => array('it' => 'Il nickname deve contenere almeno una lettera o una cifra.',
@@ -236,9 +235,12 @@ function main()
   
   if (isset($BRISK_SHOWHTML) == FALSE) {
       $is_table = FALSE;
-      $sem = Room::lock_data();
+      $sem = Room::lock_data(TRUE);
       log_main("lock Room");
-      $room = Room::load_data();
+      if (($room = Room::load_data()) == FALSE) {
+          log_crit("load_data failed");
+          exit();
+      }
       $curtime = time();
       
       /* Actions */