@@ -42,7 +42,7 @@ |
||
42 | 42 | |
43 | 43 | $plugin_info['templates'] = array('template.tpl'); |
44 | 44 | if (file_exists(__DIR__.'/custom.template.tpl')) { |
45 | - $plugin_info['templates'] = array( 'custom.template.tpl'); |
|
45 | + $plugin_info['templates'] = array('custom.template.tpl'); |
|
46 | 46 | } |
47 | 47 | $form->setDefaults($defaults); |
48 | 48 |
@@ -29,7 +29,7 @@ |
||
29 | 29 | |
30 | 30 | $defaults = array(); |
31 | 31 | $defaults['cas_button_label'] = api_get_plugin_setting('add_cas_login_button', 'cas_button_label'); |
32 | -$defaults['cas_button_comment'] = api_get_plugin_setting('add_cas_login_button','cas_button_comment'); |
|
32 | +$defaults['cas_button_comment'] = api_get_plugin_setting('add_cas_login_button', 'cas_button_comment'); |
|
33 | 33 | $defaults['cas_image_url'] = api_get_plugin_setting('add_cas_login_button', 'cas_image_url'); |
34 | 34 | $form->setDefaults($defaults); |
35 | 35 | //display form |
@@ -6,7 +6,7 @@ |
||
6 | 6 | * @package chamilo.plugin.advanced_subscription |
7 | 7 | */ |
8 | 8 | |
9 | -require_once __DIR__ . '/../config.php'; |
|
9 | +require_once __DIR__.'/../config.php'; |
|
10 | 10 | |
11 | 11 | $plugin = AdvancedSubscriptionPlugin::create(); |
12 | 12 | // Get validation hash |
@@ -1,20 +1,20 @@ |
||
1 | 1 | <?php |
2 | 2 | // Show the CAS button to logout to your CAS session |
3 | 3 | $_user = api_get_user_info(); |
4 | -$_template['show_message'] = false; |
|
4 | +$_template['show_message'] = false; |
|
5 | 5 | |
6 | 6 | if (!api_is_anonymous() && |
7 | 7 | api_get_setting('cas_activate') == 'true' && |
8 | 8 | $_user['auth_source'] == CAS_AUTH_SOURCE |
9 | 9 | ) { |
10 | - $_template['show_message'] = true; |
|
10 | + $_template['show_message'] = true; |
|
11 | 11 | // the default title |
12 | 12 | $logout_label = "Deconnexion de CAS"; |
13 | 13 | if (!empty($plugin_info['settings']['add_cas_logout_button_cas_logout_label'])) { |
14 | 14 | $logout_label = api_htmlentities($plugin_info['settings']['add_cas_logout_button_cas_logout_label']); |
15 | 15 | } |
16 | 16 | // the comm |
17 | - $logout_comment = api_htmlentities($plugin_info['settings']['add_cas_logout_button_cas_logout_comment']);; |
|
17 | + $logout_comment = api_htmlentities($plugin_info['settings']['add_cas_logout_button_cas_logout_comment']); ; |
|
18 | 18 | // URL of the image |
19 | 19 | $logout_image_url = $plugin_info['settings']['add_cas_logout_button_cas_logout_image_url']; |
20 | 20 |
@@ -43,8 +43,8 @@ |
||
43 | 43 | 'user_name_order' => '', // ? |
44 | 44 | 'user_name_sort_by' => '', // ? |
45 | 45 | 'use_virtual_keyboard' => '', //? |
46 | - 'disable_copy_paste' => '',//? |
|
47 | - 'breadcrumb_navigation_display' => '',//? |
|
46 | + 'disable_copy_paste' => '', //? |
|
47 | + 'breadcrumb_navigation_display' => '', //? |
|
48 | 48 | 'bug_report_link' => '', //? |
49 | 49 | 'hide_home_top_when_connected' => 'false', |
50 | 50 | 'hide_logout_button' => 'false', |
@@ -209,7 +209,7 @@ |
||
209 | 209 | return [ |
210 | 210 | $this->getNewPageBlock(), |
211 | 211 | ['Undo', 'Redo'], |
212 | - ['Link', 'Image', 'Video', 'Oembed','Flash', 'Youtube', 'Audio', 'Table', 'Asciimath', 'Asciisvg'], |
|
212 | + ['Link', 'Image', 'Video', 'Oembed', 'Flash', 'Youtube', 'Audio', 'Table', 'Asciimath', 'Asciisvg'], |
|
213 | 213 | ['BulletedList', 'NumberedList', 'HorizontalRule'], |
214 | 214 | ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'], |
215 | 215 | ['Styles', 'Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor', 'Source'], |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | $content = '<div class="help">'; |
316 | 316 | $content .= Display::url( |
317 | 317 | Display::return_icon('help.large.png', get_lang('Help')), |
318 | - api_get_path(WEB_CODE_PATH) . 'help/help.php?open=' . $help, |
|
318 | + api_get_path(WEB_CODE_PATH).'help/help.php?open='.$help, |
|
319 | 319 | [ |
320 | 320 | 'class' => 'ajax', |
321 | 321 | 'data-title' => get_lang('Help') |
@@ -637,12 +637,12 @@ discard block |
||
637 | 637 | foreach ($bowerCSSFiles as $file) { |
638 | 638 | $css[] = api_get_path(WEB_PATH).'web/assets/'.$file; |
639 | 639 | } |
640 | - $css[] = api_get_path(WEB_LIBRARY_PATH) . 'javascript/bootstrap-select/css/bootstrap-select.min.css'; |
|
641 | - $css[] = api_get_path(WEB_LIBRARY_PATH) . 'javascript/chosen/chosen.css'; |
|
642 | - $css[] = api_get_path(WEB_LIBRARY_PATH) . 'javascript/tag/style.css'; |
|
640 | + $css[] = api_get_path(WEB_LIBRARY_PATH).'javascript/bootstrap-select/css/bootstrap-select.min.css'; |
|
641 | + $css[] = api_get_path(WEB_LIBRARY_PATH).'javascript/chosen/chosen.css'; |
|
642 | + $css[] = api_get_path(WEB_LIBRARY_PATH).'javascript/tag/style.css'; |
|
643 | 643 | |
644 | 644 | if (api_is_global_chat_enabled()) { |
645 | - $css[] = api_get_path(WEB_LIBRARY_PATH) . 'javascript/chat/css/chat.css'; |
|
645 | + $css[] = api_get_path(WEB_LIBRARY_PATH).'javascript/chat/css/chat.css'; |
|
646 | 646 | } |
647 | 647 | |
648 | 648 | //THEME CSS STYLE |
@@ -694,7 +694,7 @@ discard block |
||
694 | 694 | |
695 | 695 | if (is_file(api_get_path(SYS_CSS_PATH).'themes/'.$this->theme.'/editor.css')) { |
696 | 696 | $css[] = api_get_path(WEB_CSS_PATH).'themes/'.$this->theme.'/editor.css'; |
697 | - }else{ |
|
697 | + } else { |
|
698 | 698 | $css[] = api_get_cdn_path(api_get_path(WEB_CSS_PATH).'editor.css'); |
699 | 699 | } |
700 | 700 | |
@@ -729,7 +729,7 @@ discard block |
||
729 | 729 | |
730 | 730 | $style_print = ''; |
731 | 731 | if (is_readable(api_get_path(SYS_CSS_PATH).$this->theme.'/print.css')) { |
732 | - $style_print = api_get_css(api_get_cdn_path(api_get_path(WEB_CSS_PATH) . $this->theme . '/print.css'), |
|
732 | + $style_print = api_get_css(api_get_cdn_path(api_get_path(WEB_CSS_PATH).$this->theme.'/print.css'), |
|
733 | 733 | 'print'); |
734 | 734 | } |
735 | 735 | $this->assign('css_style_print', $style_print); |
@@ -752,10 +752,10 @@ discard block |
||
752 | 752 | |
753 | 753 | $isoCode = api_get_language_isocode(); |
754 | 754 | |
755 | - $selectLink = 'bootstrap-select/js/i18n/defaults-' . $isoCode . '_' . strtoupper($isoCode) . '.min.js'; |
|
755 | + $selectLink = 'bootstrap-select/js/i18n/defaults-'.$isoCode.'_'.strtoupper($isoCode).'.min.js'; |
|
756 | 756 | |
757 | 757 | if ($isoCode == 'en') { |
758 | - $selectLink = 'bootstrap-select/js/i18n/defaults-' . $isoCode . '_US.min.js'; |
|
758 | + $selectLink = 'bootstrap-select/js/i18n/defaults-'.$isoCode.'_US.min.js'; |
|
759 | 759 | } |
760 | 760 | // JS files |
761 | 761 | $js_files = array( |
@@ -808,8 +808,8 @@ discard block |
||
808 | 808 | } |
809 | 809 | |
810 | 810 | if ($isoCode != 'en') { |
811 | - $bowerJsFiles[] = 'jqueryui-timepicker-addon/dist/i18n/jquery-ui-timepicker-' . $isoCode . '.js'; |
|
812 | - $bowerJsFiles[] = 'jquery-ui/ui/minified/i18n/datepicker-' . $isoCode . '.min.js'; |
|
811 | + $bowerJsFiles[] = 'jqueryui-timepicker-addon/dist/i18n/jquery-ui-timepicker-'.$isoCode.'.js'; |
|
812 | + $bowerJsFiles[] = 'jquery-ui/ui/minified/i18n/datepicker-'.$isoCode.'.min.js'; |
|
813 | 813 | } |
814 | 814 | |
815 | 815 | foreach ($bowerJsFiles as $file) { |
@@ -958,14 +958,14 @@ discard block |
||
958 | 958 | $this->assign('section_name', 'section-'.$this_section); |
959 | 959 | |
960 | 960 | //Defaul root chamilo favicon |
961 | - $favico = '<link rel="shortcut icon" href="' . api_get_path(WEB_PATH) . 'favicon.ico" type="image/x-icon" />'; |
|
961 | + $favico = '<link rel="shortcut icon" href="'.api_get_path(WEB_PATH).'favicon.ico" type="image/x-icon" />'; |
|
962 | 962 | |
963 | 963 | //Added to verify if in the current Chamilo Theme exist a favicon |
964 | - $favicoThemeUrl = api_get_path(SYS_CSS_PATH) . 'themes/' . $this->theme . '/images/'; |
|
964 | + $favicoThemeUrl = api_get_path(SYS_CSS_PATH).'themes/'.$this->theme.'/images/'; |
|
965 | 965 | |
966 | 966 | //If exist pick the current chamilo theme favicon |
967 | - if (is_file($favicoThemeUrl . 'favicon.ico')) { |
|
968 | - $favico = '<link rel="shortcut icon" href="' . api_get_path(WEB_CSS_PATH). 'themes/' . $this->theme . '/images/favicon.ico" type="image/x-icon" />'; |
|
967 | + if (is_file($favicoThemeUrl.'favicon.ico')) { |
|
968 | + $favico = '<link rel="shortcut icon" href="'.api_get_path(WEB_CSS_PATH).'themes/'.$this->theme.'/images/favicon.ico" type="image/x-icon" />'; |
|
969 | 969 | } |
970 | 970 | |
971 | 971 | if (api_is_multiple_url_enabled()) { |
@@ -995,7 +995,7 @@ discard block |
||
995 | 995 | if (api_get_setting('show_link_bug_notification') == 'true' && $this->user_is_logged_in) { |
996 | 996 | $rightFloatMenu = '<div class="report"> |
997 | 997 | <a href="https://github.com/chamilo/chamilo-lms/wiki/How-to-report-issues" target="_blank"> |
998 | - '. $iconBug . ' |
|
998 | + '. $iconBug.' |
|
999 | 999 | </a> |
1000 | 1000 | </div>'; |
1001 | 1001 | } |
@@ -1011,7 +1011,7 @@ discard block |
||
1011 | 1011 | $url = api_get_path(WEB_CODE_PATH).'ticket/tickets.php?project_id=1&'.$courseParams; |
1012 | 1012 | $rightFloatMenu .= '<div class="report"> |
1013 | 1013 | <a href="'.$url.'" target="_blank"> |
1014 | - '. $iconTicket . ' |
|
1014 | + '. $iconTicket.' |
|
1015 | 1015 | </a> |
1016 | 1016 | </div>'; |
1017 | 1017 | } |
@@ -1118,7 +1118,7 @@ discard block |
||
1118 | 1118 | |
1119 | 1119 | // Block Breadcrumb |
1120 | 1120 | //$breadcrumb = return_breadcrumb($interbreadcrumb, $language_file, $nameTools); |
1121 | - $breadcrumb = ''; |
|
1121 | + $breadcrumb = ''; |
|
1122 | 1122 | $this->assign('breadcrumb', $breadcrumb); |
1123 | 1123 | |
1124 | 1124 | //Extra content |
@@ -1138,13 +1138,13 @@ discard block |
||
1138 | 1138 | $socialMeta = ''; |
1139 | 1139 | $metaTitle = api_get_setting('meta_title'); |
1140 | 1140 | if (!empty($metaTitle)) { |
1141 | - $socialMeta .= '<meta name="twitter:card" content="summary" />' . "\n"; |
|
1141 | + $socialMeta .= '<meta name="twitter:card" content="summary" />'."\n"; |
|
1142 | 1142 | $metaSite = api_get_setting('meta_twitter_site'); |
1143 | 1143 | if (!empty($metaSite)) { |
1144 | - $socialMeta .= '<meta name="twitter:site" content="' . $metaSite . '" />' . "\n"; |
|
1144 | + $socialMeta .= '<meta name="twitter:site" content="'.$metaSite.'" />'."\n"; |
|
1145 | 1145 | $metaCreator = api_get_setting('meta_twitter_creator'); |
1146 | 1146 | if (!empty($metaCreator)) { |
1147 | - $socialMeta .= '<meta name="twitter:creator" content="' . $metaCreator . '" />' . "\n"; |
|
1147 | + $socialMeta .= '<meta name="twitter:creator" content="'.$metaCreator.'" />'."\n"; |
|
1148 | 1148 | } |
1149 | 1149 | } |
1150 | 1150 | |
@@ -1156,19 +1156,19 @@ discard block |
||
1156 | 1156 | if (!$userId && !$skillId) { |
1157 | 1157 | // no combination of user and skill ID has been defined, |
1158 | 1158 | // so print the normal OpenGraph meta tags |
1159 | - $socialMeta .= '<meta property="og:title" content="' . $metaTitle . '" />' . "\n"; |
|
1160 | - $socialMeta .= '<meta property="og:url" content="' . api_get_path(WEB_PATH) . '" />' . "\n"; |
|
1159 | + $socialMeta .= '<meta property="og:title" content="'.$metaTitle.'" />'."\n"; |
|
1160 | + $socialMeta .= '<meta property="og:url" content="'.api_get_path(WEB_PATH).'" />'."\n"; |
|
1161 | 1161 | |
1162 | 1162 | $metaDescription = api_get_setting('meta_description'); |
1163 | 1163 | if (!empty($metaDescription)) { |
1164 | - $socialMeta .= '<meta property="og:description" content="' . $metaDescription . '" />' . "\n"; |
|
1164 | + $socialMeta .= '<meta property="og:description" content="'.$metaDescription.'" />'."\n"; |
|
1165 | 1165 | } |
1166 | 1166 | |
1167 | 1167 | $metaImage = api_get_setting('meta_image_path'); |
1168 | 1168 | if (!empty($metaImage)) { |
1169 | - if (is_file(api_get_path(SYS_PATH) . $metaImage)) { |
|
1170 | - $path = api_get_path(WEB_PATH) . $metaImage; |
|
1171 | - $socialMeta .= '<meta property="og:image" content="' . $path . '" />' . "\n"; |
|
1169 | + if (is_file(api_get_path(SYS_PATH).$metaImage)) { |
|
1170 | + $path = api_get_path(WEB_PATH).$metaImage; |
|
1171 | + $socialMeta .= '<meta property="og:image" content="'.$path.'" />'."\n"; |
|
1172 | 1172 | } |
1173 | 1173 | } |
1174 | 1174 | } |
@@ -1202,7 +1202,7 @@ discard block |
||
1202 | 1202 | // Tutor name |
1203 | 1203 | if (api_get_setting('show_tutor_data') == 'true') { |
1204 | 1204 | // Course manager |
1205 | - $courseId = api_get_course_int_id(); |
|
1205 | + $courseId = api_get_course_int_id(); |
|
1206 | 1206 | $id_session = api_get_session_id(); |
1207 | 1207 | if (!empty($courseId)) { |
1208 | 1208 | $tutor_data = ''; |
@@ -1234,7 +1234,7 @@ discard block |
||
1234 | 1234 | $courseId = api_get_course_int_id(); |
1235 | 1235 | if (!empty($courseId)) { |
1236 | 1236 | $teacher_data = ''; |
1237 | - $mail= CourseManager::get_emails_of_tutors_to_course($courseId); |
|
1237 | + $mail = CourseManager::get_emails_of_tutors_to_course($courseId); |
|
1238 | 1238 | if (!empty($mail)) { |
1239 | 1239 | $teachers_parsed = array(); |
1240 | 1240 | foreach ($mail as $value) { |
@@ -1468,7 +1468,7 @@ discard block |
||
1468 | 1468 | 'sessionVar' => basename(__FILE__, '.php'), |
1469 | 1469 | 'imageOptions' => array( |
1470 | 1470 | 'font_size' => 20, |
1471 | - 'font_path' => api_get_path(SYS_FONTS_PATH) . 'opensans/', |
|
1471 | + 'font_path' => api_get_path(SYS_FONTS_PATH).'opensans/', |
|
1472 | 1472 | 'font_file' => 'OpenSans-Regular.ttf', |
1473 | 1473 | //'output' => 'gif' |
1474 | 1474 | ) |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | private $secNode = NULL; |
56 | 56 | public $signAllHeaders = FALSE; |
57 | 57 | |
58 | - private function locateSecurityHeader($setActor=NULL) { |
|
58 | + private function locateSecurityHeader($setActor = NULL) { |
|
59 | 59 | $wsNamespace = NULL; |
60 | 60 | if ($this->secNode == NULL) { |
61 | 61 | $secnode = NULL; |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | $objXMLSecDSig->canonicalizeSignedInfo(); |
110 | 110 | $retVal = $objXMLSecDSig->validateReference(); |
111 | 111 | |
112 | - if (! $retVal) { |
|
112 | + if (!$retVal) { |
|
113 | 113 | throw new Exception("Validation Failed"); |
114 | 114 | } |
115 | 115 | |
@@ -151,9 +151,9 @@ discard block |
||
151 | 151 | } |
152 | 152 | throw new Exception("Error loading key to handle Signature"); |
153 | 153 | } |
154 | - } while(0); |
|
154 | + } while (0); |
|
155 | 155 | |
156 | - if (! $objXMLSecDSig->verify($objKey)) { |
|
156 | + if (!$objXMLSecDSig->verify($objKey)) { |
|
157 | 157 | throw new Exception("Unable to validate Signature"); |
158 | 158 | } |
159 | 159 |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | if ($this->header == NULL) { |
55 | 55 | $headers = $this->SOAPXPath->query('//wssoap:Envelope/wssoap:Header'); |
56 | 56 | $header = $headers->item(0); |
57 | - if (! $header) { |
|
57 | + if (!$header) { |
|
58 | 58 | $header = $this->soapDoc->createElementNS($this->soapNS, $this->soapPFX.':Header'); |
59 | 59 | $this->envelope->insertBefore($header, $this->envelope->firstChild); |
60 | 60 | } |
@@ -94,17 +94,17 @@ discard block |
||
94 | 94 | |
95 | 95 | private function createID() { |
96 | 96 | $uuid = md5(uniqid(rand(), true)); |
97 | - $guid = 'uudi:'.substr($uuid,0,8)."-". |
|
98 | - substr($uuid,8,4)."-". |
|
99 | - substr($uuid,12,4)."-". |
|
100 | - substr($uuid,16,4)."-". |
|
101 | - substr($uuid,20,12); |
|
97 | + $guid = 'uudi:'.substr($uuid, 0, 8)."-". |
|
98 | + substr($uuid, 8, 4)."-". |
|
99 | + substr($uuid, 12, 4)."-". |
|
100 | + substr($uuid, 16, 4)."-". |
|
101 | + substr($uuid, 20, 12); |
|
102 | 102 | return $guid; |
103 | 103 | } |
104 | 104 | |
105 | - public function addMessageID($id=NULL) { |
|
105 | + public function addMessageID($id = NULL) { |
|
106 | 106 | /* Add the WSA MessageID or return existing ID */ |
107 | - if (! is_null($this->messageID)) { |
|
107 | + if (!is_null($this->messageID)) { |
|
108 | 108 | return $this->messageID; |
109 | 109 | } |
110 | 110 |