From d5e5be7002c03625407413f36d6ff75887ac0cab Mon Sep 17 00:00:00 2001 From: christianbeeznst Date: Sun, 14 Apr 2024 22:34:18 -0500 Subject: [PATCH] Internal: Clean up duplicated and deprecated settings - refs #5316 --- public/main/admin/update_schema.php | 4 - public/main/admin/user_add.php | 19 +-- public/main/admin/user_edit.php | 5 +- public/main/announcements/announcements.php | 2 +- public/main/auth/profile.php | 13 +- public/main/cron/hosting_total_size_limit.php | 5 - public/main/cron/import_csv.php | 2 +- public/main/cron/update_session_status.php | 6 - .../gradebook/gradebook_display_summary.php | 4 - public/main/gradebook/index.php | 4 - public/main/gradebook/lib/GradebookUtils.php | 4 - .../lib/flatview_data_generator.class.php | 14 +- public/main/inc/ajax/model.ajax.php | 14 +- public/main/inc/ajax/statistics.ajax.php | 5 - public/main/inc/lib/document.lib.php | 2 +- public/main/inc/lib/extra_field.lib.php | 4 +- public/main/inc/lib/message.lib.php | 16 +- public/main/inc/lib/sessionmanager.lib.php | 145 ++++++++---------- public/main/inc/lib/template.lib.php | 9 +- public/main/inc/lib/tracking.lib.php | 8 +- public/main/lp/learnpath.class.php | 2 +- public/main/portfolio/index.php | 4 - public/main/search/load_search.php | 22 ++- public/main/survey/edit_meeting.php | 17 +- public/main/survey/fillsurvey.php | 6 +- public/main/survey/preview.php | 6 +- public/main/survey/survey.lib.php | 77 ++++------ public/main/survey/surveyUtil.class.php | 13 +- public/main/survey/survey_question.php | 13 +- .../Admin/IndexBlocksController.php | 22 ++- .../PlatformConfigurationController.php | 12 -- .../DataFixtures/SettingsCurrentFixtures.php | 7 +- .../Schema/V200/Version20170627122900.php | 3 - .../Schema/V200/Version20230216122900.php | 60 +------- .../Settings/AdminSettingsSchema.php | 2 - .../Settings/AgendaSettingsSchema.php | 10 -- .../Settings/AnnouncementSettingsSchema.php | 6 +- .../Settings/CertificateSettingsSchema.php | 2 - .../Settings/CourseSettingsSchema.php | 17 -- .../Settings/DisplaySettingsSchema.php | 2 - .../Settings/DocumentSettingsSchema.php | 17 -- .../Settings/EditorSettingsSchema.php | 2 - .../Settings/ExerciseSettingsSchema.php | 2 - .../Settings/GradebookSettingsSchema.php | 5 - .../Settings/LearningPathSettingsSchema.php | 18 +-- .../Settings/MailSettingsSchema.php | 17 -- .../Settings/MessageSettingsSchema.php | 2 - .../Settings/PlatformSettingsSchema.php | 77 ---------- .../Settings/ProfileSettingsSchema.php | 2 - .../Settings/SearchSettingsSchema.php | 6 +- .../Settings/SecuritySettingsSchema.php | 3 - .../Settings/SessionSettingsSchema.php | 6 - src/CoreBundle/Settings/SettingsManager.php | 6 +- .../Settings/SurveySettingsSchema.php | 10 -- .../Settings/WebServiceSettingsSchema.php | 3 - .../Component/CourseCopy/CourseBuilder.php | 6 +- .../Component/CourseCopy/CourseRestorer.php | 6 +- .../CourseCopy/Resources/SurveyQuestion.php | 5 +- 58 files changed, 192 insertions(+), 589 deletions(-) diff --git a/public/main/admin/update_schema.php b/public/main/admin/update_schema.php index feabecb45a..30d4ddbd0c 100644 --- a/public/main/admin/update_schema.php +++ b/public/main/admin/update_schema.php @@ -8,10 +8,6 @@ require_once __DIR__.'/../inc/global.inc.php'; // Access restrictions api_protect_admin_script(true); -if ('false' === api_get_setting('platform.sync_db_with_schema')) { - api_not_allowed(true); -} - $em = Database::getManager(); $connection = Database::getManager()->getConnection(); $sm = $connection->createSchemaManager(); diff --git a/public/main/admin/user_add.php b/public/main/admin/user_add.php index 6733f5eeda..54d359bb84 100644 --- a/public/main/admin/user_add.php +++ b/public/main/admin/user_add.php @@ -296,17 +296,14 @@ $returnParams = $extraField->addElements( true ); -$allowEmailTemplate = ('true' === api_get_setting('mail.mail_template_system')); -if ($allowEmailTemplate) { - $form->addEmailTemplate( - [ - 'subject_registration_platform.tpl', - 'content_registration_platform.tpl', - 'new_user_first_email_confirmation.tpl', - 'new_user_second_email_confirmation.tpl', - ] - ); -} +$form->addEmailTemplate( + [ + 'subject_registration_platform.tpl', + 'content_registration_platform.tpl', + 'new_user_first_email_confirmation.tpl', + 'new_user_second_email_confirmation.tpl', + ] +); $jquery_ready_content = $returnParams['jquery_ready_content']; diff --git a/public/main/admin/user_edit.php b/public/main/admin/user_edit.php index 34eb735251..a76d666a77 100644 --- a/public/main/admin/user_edit.php +++ b/public/main/admin/user_edit.php @@ -346,10 +346,7 @@ $returnParams = $extraField->addElements( ); $jqueryReadyContent = $returnParams['jquery_ready_content']; -$allowEmailTemplate = ('true' === api_get_setting('mail.mail_template_system')); -if ($allowEmailTemplate) { - $form->addEmailTemplate(['user_edit_content.tpl']); -} +$form->addEmailTemplate(['user_edit_content.tpl']); // the $jqueryReadyContent variable collects all functions that will be load in the $htmlHeadXtra[] = '