Added auto-fetching of data in room constructor in OpenMeetings plugin - refs BT#7046 refs #5491

1.9.x
Yannick Warnier 11 years ago
parent 5e9d29dadd
commit 63ce207bd3
  1. 13
      plugin/openmeetings/lib/room.class.php

@ -21,9 +21,18 @@ class Room
public $isDemoRoom;
public $demoTime;
public $isModeratedRoom;
public $externalRoomType;
public $externalRoomType = 'chamilolms';
private $table;
public function __construct()
public function __construct($id)
{
$this->table = Database::get_main_table('plugin_openmeetings');
if (!empty($id)) {
$roomData = Database::select('*', $this->table, array('where' => array('id = ?' => $id)), 'first');
$this->rooms_id = $roomData['room_id'];
$this->status = $roomData['status'];
$this->name = $roomData['meeting_name'];
$this->comment = $roomData['welcome_msg'];
}
}
}
Loading…
Cancel
Save