From 1abce50858542f209f1e869e835cb0892005cf58 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Mon, 21 Dec 2015 16:50:40 +0100 Subject: [PATCH 1/7] Fix PHP warnings --- main/webservices/registration.soap.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/webservices/registration.soap.php b/main/webservices/registration.soap.php index 1b67e4fafb8..4b48dcb79e6 100755 --- a/main/webservices/registration.soap.php +++ b/main/webservices/registration.soap.php @@ -1141,7 +1141,7 @@ function WSCreateUserPasswordCrypted($params) $loginName = $params['loginname']; $official_code = isset($params['official_code']) ? $params['official_code'] : ''; $language = ''; - $phone = $params['phone']; + $phone = isset($params['phone']) ? $params['phone'] : ''; $picture_uri = ''; $auth_source = PLATFORM_AUTH_SOURCE; $expiration_date = ''; @@ -2680,7 +2680,7 @@ function WSCreateCourse($params) foreach ($courses_params as $course_param) { $title = $course_param['title']; - $category_code = $course_param['category_code']; + $category_code = isset($course_param['category_code']) ? $course_param['category_code'] : ''; $wanted_code = $course_param['wanted_code']; $tutor_name = $course_param['tutor_name']; $course_language = 'english'; // TODO: A hard-coded value. From e121e2819151836069fa0ae7bfbf953df8482c79 Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Tue, 22 Dec 2015 00:53:05 -0500 Subject: [PATCH 2/7] Updated release date in changelog --- documentation/changelog.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/changelog.html b/documentation/changelog.html index d68108060db..122b52327ec 100755 --- a/documentation/changelog.html +++ b/documentation/changelog.html @@ -48,7 +48,7 @@

Chamilo Changelog

-

Chamilo 1.10.2 - Alsted, 21st of December 2015

+

Chamilo 1.10.2 - Alsted, 22nd of December 2015

Release notes - summary

Chamilo 1.10.2 is a minor, bugfix version of the 1.10.x branch, with a few new features and bugfixes on top of 1.10.0. Notably, this version enables the migration from 1.9.x to 1.10.2 (many bugs were reported in the migration from 1.9.x to 1.10.0, which were fixed within the 2 months to this minor version).

Release name

From c0908defcd2f450c2881aaa4c3b9403a7e429e42 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Tue, 22 Dec 2015 10:36:06 +0100 Subject: [PATCH 3/7] Fix jplayer --- main/document/showinframes.php | 47 +++++++++++++++++++--------------- main/inc/lib/display.lib.php | 8 +++--- main/inc/lib/document.lib.php | 47 ++++++++++++++++------------------ 3 files changed, 53 insertions(+), 49 deletions(-) diff --git a/main/document/showinframes.php b/main/document/showinframes.php index dce3f188a8f..a1b66d76a70 100755 --- a/main/document/showinframes.php +++ b/main/document/showinframes.php @@ -104,7 +104,7 @@ } $pathinfo = pathinfo($header_file); -$jplayer_supported_files = array('mp4', 'ogv','flv'); +$jplayer_supported_files = array('mp4', 'ogv', 'flv', 'm4v'); $jplayer_supported = false; if (in_array(strtolower($pathinfo['extension']), $jplayer_supported_files)) { @@ -250,33 +250,38 @@ function init() { } $execute_iframe = true; - if ($jplayer_supported) { $extension = api_strtolower($pathinfo['extension']); + if ($extension == 'mp4') { + $extension = 'm4v'; + } $js_path = api_get_path(WEB_LIBRARY_PATH).'javascript/'; $htmlHeadXtra[] = ''; $htmlHeadXtra[] = ''; - $jquery = ' $("#jquery_jplayer_1").jPlayer({ - ready: function() { - $(this).jPlayer("setMedia", { - '.$extension.' : "'.$document_data['direct_url'].'" - }); - }, - errorAlerts: false, - warningAlerts: false, - swfPath: "'.$js_path.'jquery-jplayer/jplayer/", - //supplied: "m4a, oga, mp3, ogg, wav", - supplied: "'.$extension.'", - //wmode: "window", - solution: "flash, html", // Do not change this setting - cssSelectorAncestor: "#jp_container_1", - });'; + $jquery = ' + $("#jquery_jplayer_1").jPlayer({ + ready: function() { + $(this).jPlayer("setMedia", { + '.$extension.' : "'.$document_data['direct_url'].'" + }); + }, + cssSelectorAncestor: "#jp_container_1", + swfPath: "'.$js_path.'jquery-jplayer/jplayer/", + supplied: "'.$extension.'", + useStateClassSkin: true, + autoBlur: false, + smoothPlayBar: true, + keyEnabled: false, + remainingDuration: true, + toggleDuration: true + }); + '; $htmlHeadXtra[] = ''; $execute_iframe = false; @@ -356,9 +361,11 @@ function init() { echo ''; if ($jplayer_supported) { - echo '
'; + echo '
'; echo DocumentManager::generate_video_preview($document_data); echo '
'; + // media_element blocks jplayer disable it + Display::$global_template->assign('show_media_element', 0); } if ($is_freemind_available) { @@ -442,7 +449,7 @@ function getMap(map){ $content = Security::remove_XSS(file_get_contents($file_url_sys)); echo $content; } else { - echo ''; + echo ''; } } Display::display_footer(); diff --git a/main/inc/lib/display.lib.php b/main/inc/lib/display.lib.php index 7c87088dd9f..077449524cb 100755 --- a/main/inc/lib/display.lib.php +++ b/main/inc/lib/display.lib.php @@ -20,7 +20,7 @@ */ class Display { - /* The main template*/ + /** @var Template */ public static $global_template; public static $preview_style = null; @@ -756,12 +756,12 @@ public static function return_icon( } $icon = api_get_cdn_path($icon); - + if ($return_only_path) { return $icon; - + } - + $img = self::img($icon, $alt_text, $additional_attributes); if (SHOW_TEXT_NEAR_ICONS == true and !empty($alt_text)) { if ($show_text) { diff --git a/main/inc/lib/document.lib.php b/main/inc/lib/document.lib.php index 763616cd4d8..8dc4292764b 100755 --- a/main/inc/lib/document.lib.php +++ b/main/inc/lib/document.lib.php @@ -3199,15 +3199,15 @@ static function generate_media_preview($i, $type = 'simple') * @param array $document_data * @return string */ - static function generate_video_preview($document_data = array()) + public static function generate_video_preview($document_data = array()) { $html = ' -