diff --git a/admin/settings/security.php b/admin/settings/security.php index ca95a478187..d9541b9f5b6 100644 --- a/admin/settings/security.php +++ b/admin/settings/security.php @@ -81,7 +81,6 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page $temp->add(new admin_setting_configcheckbox('loginhttps', get_string('loginhttps', 'admin'), get_string('configloginhttps', 'admin'), 0)); $temp->add(new admin_setting_configcheckbox('cookiesecure', get_string('cookiesecure', 'admin'), get_string('configcookiesecure', 'admin'), 0)); $temp->add(new admin_setting_configcheckbox('cookiehttponly', get_string('cookiehttponly', 'admin'), get_string('configcookiehttponly', 'admin'), 0)); - $temp->add(new admin_setting_configtext('excludeoldflashclients', get_string('excludeoldflashclients', 'admin'), get_string('configexcludeoldflashclients', 'admin'), '10.0.12', PARAM_TEXT)); $ADMIN->add('security', $temp); diff --git a/lang/en/admin.php b/lang/en/admin.php index e967be0f496..a6e165ffa24 100644 --- a/lang/en/admin.php +++ b/lang/en/admin.php @@ -207,7 +207,6 @@ $string['configenabletrusttext'] = 'By default Moodle will always thoroughly cle $string['configenablewebservices'] = 'Web services enable other systems to log in to this Moodle and perform operations. For extra security this feature should be disabled unless you are really using it.'; $string['configenablewsdocumentation'] = 'Enable auto-generation of web services documentation. A user can access to his own documentation on his security keys page {$a}. It displays the documentation for the enabled protocols only.'; $string['configerrorlevel'] = 'Choose the amount of PHP warnings that you want to be displayed. Normal is usually the best choice.'; -$string['configexcludeoldflashclients'] = 'Some versions of the Adobe Flash plugin are known to be vulnerable to attacks from malicious Flash content. You can specify a minimum supported version here, and Moodle will not show Flash files to users with lower versions. Instead they will see an alternate Flash file telling them how to upgrade. Leave this empty to disable all checks.'; $string['configextendedusernamechars'] = 'Enable this setting to allow students to use any characters in their usernames (note this does not affect their actual names). The default is "false" which restricts usernames to be alphanumeric lowercase characters, underscore (_), hyphen (-), period (.) or at symbol (@).'; $string['configextramemorylimit'] = 'Some scripts like search, backup/restore or cron require more memory. Set higher values for large sites.'; $string['configextrauserselectorfields'] = 'Select which fields are searched and displayed, in addition to full names, when selecting users, for example when assigning roles or when adding users to a group. For security reasons, it is recommended that the username field is NOT selected.'; @@ -514,7 +513,6 @@ $string['errorsetting'] = 'Could not save setting:'; $string['errorwithsettings'] = 'Some settings were not changed due to an error.'; $string['everyonewhocan'] = 'Everyone who can \'{$a}\''; $string['exceptions'] = 'exceptions'; -$string['excludeoldflashclients'] = 'Required Flash player version'; $string['experimental'] = 'Experimental'; $string['experimentalsettings'] = 'Experimental settings'; $string['extendedusernamechars'] = 'Allow extended characters in usernames'; diff --git a/lang/en/moodle.php b/lang/en/moodle.php index f97e4bd8b04..50f5ebccd28 100644 --- a/lang/en/moodle.php +++ b/lang/en/moodle.php @@ -663,10 +663,6 @@ $string['findmorecourses'] = 'Find more courses...'; $string['firstaccess'] = 'First access'; $string['firstname'] = 'First name'; $string['firsttime'] = 'Is this your first time here?'; -$string['flashlinkmessage'] = 'Please upgrade your Flash player now:'; -$string['flashupgrademessage'] = 'The Flash plugin is required to play this content, but the version you have is too old. - - You may need to log out and log in back after upgrade.'; $string['folder'] = 'Folder'; $string['folderclosed'] = 'Closed folder'; $string['folderopened'] = 'Opened folder'; diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index 4340a586ff6..f823295d141 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -6637,6 +6637,13 @@ FROM // Moodle v2.1.0 release upgrade line // Put any upgrade step following this + if ($oldversion < 2011070800.01) { + // remove unused config options + unset_config('excludeoldflashclients'); + upgrade_main_savepoint(true, 2011070800.01); + } + + return true; } diff --git a/lib/flashdetect/flashdetect.js b/lib/flashdetect/flashdetect.js deleted file mode 100644 index ed9f7c36c91..00000000000 --- a/lib/flashdetect/flashdetect.js +++ /dev/null @@ -1,30 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// // -// This file is part of Moodle - http://moodle.org/ // -// Moodle - Modular Object-Oriented Dynamic Learning Environment // -// // -// Moodle is free software: you can redistribute it and/or modify // -// it under the terms of the GNU General Public License as published by // -// the Free Software Foundation, either version 3 of the License, or // -// (at your option) any later version. // -// // -// Moodle is distributed in the hope that it will be useful, // -// but WITHOUT ANY WARRANTY; without even the implied warranty of // -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // -// GNU General Public License for more details. // -// // -// You should have received a copy of the GNU General Public License // -// along with Moodle. If not, see . // -// // -/////////////////////////////////////////////////////////////////////////// - -/* - * Library for flash player version detection - */ - -M.core_flashdetect = {}; - -M.core_flashdetect.init = function(Y) { - var flashversion = swfobject.getFlashPlayerVersion(); - Y.io(M.cfg.wwwroot+'/login/environment.php?sesskey='+M.cfg.sesskey+'&flashversion='+flashversion.major+'.'+flashversion.minor+'.'+flashversion.release, {method: "POST"}); -}; \ No newline at end of file diff --git a/lib/flashdetect/flashupgrade.fla b/lib/flashdetect/flashupgrade.fla deleted file mode 100644 index 9ca926447c1..00000000000 Binary files a/lib/flashdetect/flashupgrade.fla and /dev/null differ diff --git a/lib/flashdetect/flashupgrade.swf b/lib/flashdetect/flashupgrade.swf deleted file mode 100644 index c56478a624f..00000000000 Binary files a/lib/flashdetect/flashupgrade.swf and /dev/null differ diff --git a/lib/flashdetect/message.php b/lib/flashdetect/message.php deleted file mode 100644 index 54f3701a5f0..00000000000 --- a/lib/flashdetect/message.php +++ /dev/null @@ -1,30 +0,0 @@ -. // -// // -/////////////////////////////////////////////////////////////////////////// - -/* - * This file displays some variable for the flashupgrade.swf - * the variable contain the translated message to displayed into the flashupgrade.swf ("Please update you flash ...") - * NOTE: flash can load variable from html (variable1=value&variable2=value2) - */ -require('../../config.php'); -require_login(); -echo 'alertmessage='.get_string('flashupgrademessage').'&linkmessage='.get_string('flashlinkmessage'); -?> diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 4eca02dc646..f65e511d153 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -7035,7 +7035,6 @@ function get_core_subsystems() { 'filepicker' => NULL, 'files' => 'files', 'filters' => NULL, - 'flashdetect' => NULL, 'fonts' => NULL, 'form' => 'lib/form', 'grades' => 'grade', diff --git a/lib/outputrenderers.php b/lib/outputrenderers.php index 1f00572bdc6..be7eba72083 100644 --- a/lib/outputrenderers.php +++ b/lib/outputrenderers.php @@ -313,12 +313,6 @@ class core_renderer extends renderer_base { $jsurl = $this->page->theme->javascript_url(false); $this->page->requires->js($jsurl); - // Perform a browser environment check for the flash version. Should only run once per login session. - if (!NO_MOODLE_COOKIES && isloggedin() && !empty($CFG->excludeoldflashclients) && empty($SESSION->flashversion)) { - $this->page->requires->js('/lib/swfobject/swfobject.js'); - $this->page->requires->js_init_call('M.core_flashdetect.init'); - } - // Get any HTML from the page_requirements_manager. $output .= $this->page->requires->get_head_code($this->page, $this); diff --git a/lib/outputrequirementslib.php b/lib/outputrequirementslib.php index 336f36e6a81..bdd635fa7a1 100644 --- a/lib/outputrequirementslib.php +++ b/lib/outputrequirementslib.php @@ -448,11 +448,6 @@ class page_requirements_manager { 'requires' => array('base', 'node', 'event', 'node-event-simulate'), 'fullpath' => '/message/module.js'); break; - case 'core_flashdetect': - $module = array('name' => 'core_flashdetect', - 'fullpath' => '/lib/flashdetect/flashdetect.js', - 'requires' => array('io')); - break; case 'core_group': $module = array('name' => 'core_group', 'fullpath' => '/group/module.js', diff --git a/login/environment.php b/login/environment.php deleted file mode 100644 index 07a0e99cac5..00000000000 --- a/login/environment.php +++ /dev/null @@ -1,35 +0,0 @@ -. - -/** - * This script can set environment variables in the current session - * - * @package core - * @subpackage auth - * @copyright 2009 onwards Martin Dougiamas http://dougiamas.com - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - */ - -require('../config.php'); - -require_sesskey(); - -if (!empty($SESSION)) { - if ($flashversion = optional_param('flashversion', false, PARAM_TEXT)) { // eg 10.0.32 - $SESSION->flashversion = $flashversion; - } -} diff --git a/pluginfile.php b/pluginfile.php index cc855cc32bf..e9e83db506b 100644 --- a/pluginfile.php +++ b/pluginfile.php @@ -56,21 +56,6 @@ list($context, $course, $cm) = get_context_info_array($contextid); $fs = get_file_storage(); -// If the file is a Flash file and that the user flash player is outdated return a flash upgrader MDL-20841 -$mimetype = mimeinfo('type', $args[count($args)-1]); -if (!empty($CFG->excludeoldflashclients) && $mimetype == 'application/x-shockwave-flash'&& !empty($SESSION->flashversion)) { - $userplayerversion = explode('.', $SESSION->flashversion); - $requiredplayerversion = explode('.', $CFG->excludeoldflashclients); - if (($userplayerversion[0] < $requiredplayerversion[0]) || - ($userplayerversion[0] == $requiredplayerversion[0] && $userplayerversion[1] < $requiredplayerversion[1]) || - ($userplayerversion[0] == $requiredplayerversion[0] && $userplayerversion[1] == $requiredplayerversion[1] - && $userplayerversion[2] < $requiredplayerversion[2])) { - $path = $CFG->dirroot."/lib/flashdetect/flashupgrade.swf"; // Alternate content asking user to upgrade Flash - $filename = "flashupgrade.swf"; - send_file($path, $filename, O, 0, false, false, 'application/x-shockwave-flash'); // Do not cache - } -} - // ======================================================================================================================== if ($component === 'blog') { // Blog file serving diff --git a/version.php b/version.php index 2ce7b6fbf4e..298bf23c35a 100644 --- a/version.php +++ b/version.php @@ -31,7 +31,7 @@ defined('MOODLE_INTERNAL') || die(); -$version = 2011070800.00; // YYYYMMDD = weekly release date of this DEV branch +$version = 2011070800.01; // YYYYMMDD = weekly release date of this DEV branch // RR = release increments - 00 in DEV branches // .XX = incremental changes