소스 검색

More improvements to BBB plugin install procedure

Yannick Warnier 14 년 전
부모
커밋
2f11407783
2개의 변경된 파일15개의 추가작업 그리고 0개의 파일을 삭제
  1. 13 0
      plugin/bbb/install.php
  2. 2 0
      plugin/bbb/uninstall.php

+ 13 - 0
plugin/bbb/install.php

@@ -24,6 +24,19 @@ $sql = "INSERT INTO $t_settings
     VALUES
     ('bbb_plugin_salt', '', 'textfield', 'Extra', '', 'BigBlueButtonSecuritySaltTitle','BigBlueButtonSecuritySaltComment',NULL,NULL, 1)";
 Database::query($sql);
+$table = Database::get_main_table('plugin_bbb');
+$sql = "CREATE TABLE $table ( " .
+        "id BIGINT unsigned NOT NULL auto_increment PRIMARY KEY, " .
+        "course_id INT unsigned NOT NULL DEFAULT 0, " .
+        "name VARCHAR(255) NOT NULL DEFAULT '', " .
+        "meetingname VARCHAR(255) NOT NULL DEFAULT '', " .
+        "meetingid VARCHAR(255) NOT NULL DEFAULT '', " .
+        "attendeepw VARCHAR(255) NOT NULL DEFAULT '', " .
+        "moderatorpw VARCHAR(255) NOT NULL DEFAULT '', " .
+        "autologin VARCHAR(255) NOT NULL DEFAULT '', " .
+        "newwindow VARCHAR(255) NOT NULL DEFAULT '', " .
+        "welcomemsg VARCHAR(255) NOT NULL DEFAULT '')";
+Database::query($sql);
 // update existing courses to add conference settings
 $t_courses = Database::get_main_table(TABLE_MAIN_COURSE);
 $sql = "SELECT id, code, db_name FROM $t_courses ORDER BY id";

+ 2 - 0
plugin/bbb/uninstall.php

@@ -14,6 +14,8 @@ $sql = "DELETE FROM $t_settings WHERE variable = 'bbb_plugin_host'";
 Database::query($sql);
 $sql = "DELETE FROM $t_settings WHERE variable = 'bbb_plugin_salt'";
 Database::query($sql);
+$sql = "DROP TABLE plugin_bbb";
+Database::query($sql);
 // update existing courses to add conference settings
 $t_courses = Database::get_main_table(TABLE_MAIN_COURSE);
 $sql = "SELECT id, code, db_name FROM $t_courses ORDER BY id";