foreach ($class_instances_ids_ar as $id_course_instance) { $chatroom_class = ChatRoom::get_class_chatroomFN($id_course_instance); //vito 9gennaio2009 //if(!is_object($chatroom_class)){ if (!AMA_DataHandler::isError($chatroom_class)) { $class_chatrooms_ar[] = $chatroom_class; } } // merge class chatrooms with the public chatroom //vito 9gennaio2009 if (!AMA_DataHandler::isError($public_chatroom)) { array_push($class_chatrooms_ar, $public_chatroom); } } // get all the private chatrooms of the user $private_chatrooms_ar = ChatRoom::get_all_private_chatroomsFN($sess_id_user); if (is_array($private_chatrooms_ar)) { $all_chatrooms_ar = array_merge($class_chatrooms_ar, $private_chatrooms_ar); } else { $all_chatrooms_ar = $class_chatrooms_ar; } // sort the chatrooms in reverse order, so we can visualize first the most recent chatrooms rsort($all_chatrooms_ar); //initialize the array of the chatrooms to be displayed on the screen $list_chatrooms = array(); // start the construction of the table contaning all the chatrooms foreach ($all_chatrooms_ar as $id_chatroom) { //initialize a chatroom Object $chatroomObj = new ChatRoom($id_chatroom); //get the array with all the current info of the chatoorm $chatroom_ha = $chatroomObj->get_info_chatroomFN($id_chatroom);