/** * This function runs all the table that uses the system default language * Particular for 1.6.1, since 1.6 didn't convret all table */ function convertTableBySysDefault_161(){ global $errors; $temp_table = new AdminsTable($this->table_prefix, 'admins', $this->sys_default_lang); if (!$temp_table->convert()){ $errors[]= $this->table_prefix.'admins was not converted.'; $_SESSION['redo_conversion'][$course_title]['AdminsTable'] = array($this->table_prefix, 'admins', $this->sys_default_lang, $course_id); } $temp_table = new AdminLogTable($this->table_prefix, 'admin_log', $this->sys_default_lang); if (!$temp_table->convert()){ $errors[]= $this->table_prefix.'admin_log was not converted.'; $_SESSION['redo_conversion'][$course_title]['AdminLogTable'] = array($this->table_prefix, 'admin_log', $this->sys_default_lang, $course_id); } $temp_table = new AutoEnrollTable($this->table_prefix, 'auto_enroll', $this->sys_default_lang); if (!$temp_table->convert()){ $errors[]= $this->table_prefix.'auto_enroll was not converted.'; $_SESSION['redo_conversion'][$course_title]['AutoEnrollTable'] = array($this->table_prefix, 'auto_enroll', $this->sys_default_lang, $course_id); } $temp_table = new AutoEnrollCoursesTable($this->table_prefix, 'auto_enroll_courses', $this->sys_default_lang); if (!$temp_table->convert()){ $errors[]= $this->table_prefix.'auto_enroll_courses was not converted.'; $_SESSION['redo_conversion'][$course_title]['AutoEnrollCourses'] = array($this->table_prefix, 'auto_enroll_courses', $this->sys_default_lang, $course_id); } $temp_table = new ConfigTable($this->table_prefix, 'config', $this->sys_default_lang); if (!$temp_table->convert()){ $errors[]= $this->table_prefix.'config was not converted.'; $_SESSION['redo_conversion'][$course_title]['ConfigTable'] = array($this->table_prefix, 'config', $this->sys_default_lang, $course_id); } $temp_table = new CourseAccessTable($this->table_prefix, 'course_access', $this->sys_default_lang); if (!$temp_table->convert()){ $errors[]= $this->table_prefix.'course_access was not converted.'; $_SESSION['redo_conversion'][$course_title]['CourseAccessTable'] = array($this->table_prefix, 'course_access', $this->sys_default_lang, $course_id); } $temp_table = new CourseStatsTable($this->table_prefix, 'course_stats', $this->sys_default_lang); if (!$temp_table->convert()){ $errors[]= $this->table_prefix.'course_stats was not converted.'; $_SESSION['redo_conversion'][$course_title]['CourseStatsTable'] = array($this->table_prefix, 'course_stats', $this->sys_default_lang, $course_id); } $temp_table = new FeedsTable($this->table_prefix, 'feeds', $this->sys_default_lang); if (!$temp_table->convert()){ $errors[]= $this->table_prefix.'feeds was not converted.'; $_SESSION['redo_conversion'][$course_title]['FeedsTable'] = array($this->table_prefix, 'feeds', $this->sys_default_lang, $course_id); } $temp_table = new FileStorageGroupsTable($this->table_prefix, 'file_storage_groups', $this->sys_default_lang); if (!$temp_table->convert()){ $errors[]= $this->table_prefix.'file_storage_groups was not converted.'; $_SESSION['redo_conversion'][$course_title]['FileStorageGroupsTable'] = array($this->table_prefix, 'file_storage_groups', $this->sys_default_lang, $course_id); } $temp_table = new ForumsAccessedTable($this->table_prefix, 'forums_accessed', $this->sys_default_lang); if (!$temp_table->convert()){ $errors[]= $this->table_prefix.'forums_accessed was not converted.'; $_SESSION['redo_conversion'][$course_title]['ForumsAccessedTable'] = array($this->table_prefix, 'forums_accessed', $this->sys_default_lang, $course_id); } $temp_table = new ForumsCoursesTable($this->table_prefix, 'forums_courses', $this->sys_default_lang); if (!$temp_table->convert()){ $errors[]= $this->table_prefix.'forums_courses was not converted.'; $_SESSION['redo_conversion'][$course_title]['ForumsCoursesTable'] = array($this->table_prefix, 'forums_courses', $this->sys_default_lang, $course_id); } $temp_table = new ForumsGroupsTable($this->table_prefix, 'forums_groups', $this->sys_default_lang); if (!$temp_table->convert()){ $errors[]= $this->table_prefix.'forums_groups was not converted.'; $_SESSION['redo_conversion'][$course_title]['ForumsGroupsTable'] = array($this->table_prefix, 'forums_groups', $this->sys_default_lang, $course_id); } $temp_table = new ForumsSubscriptionsTable($this->table_prefix, 'forums_subscriptions', $this->sys_default_lang); if (!$temp_table->convert()){ $errors[]= $this->table_prefix.'forums_subscriptions was not converted.'; $_SESSION['redo_conversion'][$course_title]['ForumsSubscriptionsTable'] = array($this->table_prefix, 'forums_subscriptions', $this->sys_default_lang, $course_id); } $temp_table = new GroupsMembersTable($this->table_prefix, 'groups_members', $this->sys_default_lang); if (!$temp_table->convert()){ $errors[]= $this->table_prefix.'groups_members was not converted.'; $_SESSION['redo_conversion'][$course_title]['GroupsMembersTable'] = array($this->table_prefix, 'groups_members', $this->sys_default_lang, $course_id); } $temp_table = new HandbookNotesTable($this->table_prefix, 'handbook_notes', $this->sys_default_lang); if (!$temp_table->convert()){ $errors[]= $this->table_prefix.'handbook_notes was not converted.'; $_SESSION['redo_conversion'][$course_title]['HandbookNotesTable'] = array($this->table_prefix, 'handbook_notes', $this->sys_default_lang, $course_id); } $temp_table = new InstructorApprovalsTable($this->table_prefix, 'instructor_approvals', $this->sys_default_lang); if (!$temp_table->convert()){ $errors[]= $this->table_prefix.'instructor_approvals was not converted.'; $_SESSION['redo_conversion'][$course_title]['InstructorApprovalsTable'] = array($this->table_prefix, 'instructor_approvals', $this->sys_default_lang, $course_id); } $temp_table = new LanguagesTable($this->table_prefix, 'languages', $this->sys_default_lang); if (!$temp_table->convert()){ $errors[]= $this->table_prefix.'languages was not converted.'; $_SESSION['redo_conversion'][$course_title]['LanguagesTable'] = array($this->table_prefix, 'languages', $this->sys_default_lang, $course_id); } $temp_table = new LanguagePagesTable($this->table_prefix, 'language_pages', $this->sys_default_lang); if (!$temp_table->convert()){ $errors[]= $this->table_prefix.'language_pages was not converted.'; $_SESSION['redo_conversion'][$course_title]['LanguagePagesTable'] = array($this->table_prefix, 'language_pages', $this->sys_default_lang, $course_id); } $temp_table = new LanguageTextTable($this->table_prefix, 'language_text', $this->sys_default_lang); if (!$temp_table->convert()){ $errors[]= $this->table_prefix.'language_text was not converted.'; $_SESSION['redo_conversion'][$course_title]['LanguageTextTable'] = array($this->table_prefix, 'language_text', $this->sys_default_lang, $course_id); } $temp_table = new MailQueueTable($this->table_prefix, 'mail_queue', $this->sys_default_lang); if (!$temp_table->convert()){ $errors[]= $this->table_prefix.'mail_queue was not converted.'; $_SESSION['redo_conversion'][$course_title]['MailQueueTable'] = array($this->table_prefix, 'mail_queue', $this->sys_default_lang, $course_id); } $temp_table = new MasterListTable($this->table_prefix, 'master_list', $this->sys_default_lang); if (!$temp_table->convert()){ $errors[]= $this->table_prefix.'master_list was not converted.'; $_SESSION['redo_conversion'][$course_title]['MasterListTable'] = array($this->table_prefix, 'master_list', $this->sys_default_lang, $course_id); } $temp_table = new MemberTrackTable($this->table_prefix, 'member_track', $this->sys_default_lang); if (!$temp_table->convert()){ $errors[]= $this->table_prefix.'member_track was not converted.'; $_SESSION['redo_conversion'][$course_title]['MemberTrackTable'] = array($this->table_prefix, 'member_track', $this->sys_default_lang, $course_id); } $temp_table = new ModulesTable($this->table_prefix, 'modules', $this->sys_default_lang); if (!$temp_table->convert()){ $errors[]= $this->table_prefix.'modules was not converted.'; $_SESSION['redo_conversion'][$course_title]['ModulesTable'] = array($this->table_prefix, 'modules', $this->sys_default_lang, $course_id); } $temp_table = new PollsMembersTable($this->table_prefix, 'polls_members', $this->sys_default_lang); if (!$temp_table->convert()){ $errors[]= $this->table_prefix.'polls_members was not converted.'; $_SESSION['redo_conversion'][$course_title]['PollsMembersTable'] = array($this->table_prefix, 'polls_members', $this->sys_default_lang, $course_id); } $temp_table = new RelatedContentTable($this->table_prefix, 'related_content', $this->sys_default_lang); if (!$temp_table->convert()){ $errors[]= $this->table_prefix.'related_content was not converted.'; $_SESSION['redo_conversion'][$course_title]['RelatedContentTable'] = array($this->table_prefix, 'related_content', $this->sys_default_lang, $course_id); } $temp_table = new TestsGroupsTable($this->table_prefix, 'tests_groups', $this->sys_default_lang); if (!$temp_table->convert()){ $errors[]= $this->table_prefix.'tests_groups was not converted.'; $_SESSION['redo_conversion'][$course_title]['TestsGroupsTable'] = array($this->table_prefix, 'tests_groups', $this->sys_default_lang, $course_id); } $temp_table = new TestsQuestionsAssocTable($this->table_prefix, 'tests_questions_assoc', $this->sys_default_lang); if (!$temp_table->convert()){ $errors[]= $this->table_prefix.'tests_questions_assoc was not converted.'; $_SESSION['redo_conversion'][$course_title]['TestsQuestionsAssocTable'] = array($this->table_prefix, 'tests_questions_assoc', $this->sys_default_lang, $course_id); } $temp_table = new TestsResultsTable($this->table_prefix, 'tests_results', $this->sys_default_lang); if (!$temp_table->convert()){ $errors[]= $this->table_prefix.'tests_results was not converted.'; $_SESSION['redo_conversion'][$course_title]['TestsResultsTable'] = array($this->table_prefix, 'tests_results', $this->sys_default_lang, $course_id); } $temp_table = new ThemesTable($this->table_prefix, 'themes', $this->sys_default_lang); if (!$temp_table->convert()){ $errors[]= $this->table_prefix.'themes was not converted.'; $_SESSION['redo_conversion'][$course_title]['ThemesTable'] = array($this->table_prefix, 'themes', $this->sys_default_lang, $course_id); } $temp_table = new UsersOnlineTable($this->table_prefix, 'users_online', $this->sys_default_lang); if (!$temp_table->convert()){ $errors[]= $this->table_prefix.'users_online was not converted.'; $_SESSION['redo_conversion'][$course_title]['UsersOnlineTable'] = array($this->table_prefix, 'users_online', $this->sys_default_lang, $course_id); } }
$manageObj->addColumn("FolderLinks", "url", "varchar(255) default ''"); $manageObj->addColumn("FolderLinks", "notes", "VARCHAR(255) default ''"); $manageObj->addColumn('FolderLinks', 'linkType', "enum ('link','product')"); $manageObj->addColumn('FolderLinks', 'imageUrl', "VARCHAR(255) default '';"); // database updates for alpha v.11 // update newswire table $manageObj->addColumn("Newswire", "feedType", "ENUM ('blog','wire','images','miniblog','bookmarks','allowed','localBlog') default 'wire'"); $manageObj->addColumn("Newswire", "mediaUrl", "VARCHAR(255) default ''"); $manageObj->addColumn("Newswire", "imageUrl", "VARCHAR(255) default ''"); $manageObj->addColumn("Newswire", "embed", "TEXT"); echo 'Completed database initialization<br />'; } if ($manageObj->modifyLibrary(PATH_CORE . '/classes/', 'feed.class.php')) { // create feed tables require_once PATH_CORE . '/classes/feed.class.php'; FeedsTable::createTable($manageObj); FeedMediaTable::createTable($manageObj); } if ($manageObj->modifyLibrary(PATH_CORE . '/classes/', 'notifications.class.php')) { // create Notifications and NotificationMessages Tables require_once PATH_CORE . '/classes/notifications.class.php'; NotificationsTable::createTable($manageObj); NotificationMessagesTable::createTable($manageObj); } // Set up some default SystemStatus variables require_once PATH_CORE . '/classes/systemStatus.class.php'; $ssObj = new systemStatus($manageObj->db); $ssObj->setState('cloudid', SITE_CLOUDID); //$ssObj->name=$this->getState('name'); //$ssObj->permalink=$this->getState('permalink'); $ssObj->setState('max_sessions', MAX_SESSIONS_ACTIVE);