@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | |
| 36 | 36 | if ($geolocalization) { |
| 37 | 37 | $gmapsApiKey = $gMapsPlugin->get('api_key'); |
| 38 | - $htmlHeadXtra[] = '<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?sensor=true&key='. $gmapsApiKey . '" ></script>'; |
|
| 38 | + $htmlHeadXtra[] = '<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?sensor=true&key='.$gmapsApiKey.'" ></script>'; |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | $htmlHeadXtra[] = api_get_password_checker_js('#username', '#pass1'); |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | if (api_get_setting('registration', 'email') != 'true') { |
| 112 | 112 | $form->addRule('email', get_lang('ThisFieldIsRequired'), 'required'); |
| 113 | 113 | } |
| 114 | - $form->addRule('email', sprintf(get_lang('UsernameMaxXCharacters'), (string)USERNAME_MAX_LENGTH), 'maxlength', USERNAME_MAX_LENGTH); |
|
| 114 | + $form->addRule('email', sprintf(get_lang('UsernameMaxXCharacters'), (string) USERNAME_MAX_LENGTH), 'maxlength', USERNAME_MAX_LENGTH); |
|
| 115 | 115 | $form->addRule('email', get_lang('UserTaken'), 'username_available'); |
| 116 | 116 | } |
| 117 | 117 | |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | ); |
| 153 | 153 | $form->applyFilter('username', 'trim'); |
| 154 | 154 | $form->addRule('username', get_lang('ThisFieldIsRequired'), 'required'); |
| 155 | - $form->addRule('username', sprintf(get_lang('UsernameMaxXCharacters'), (string)USERNAME_MAX_LENGTH), 'maxlength', USERNAME_MAX_LENGTH); |
|
| 155 | + $form->addRule('username', sprintf(get_lang('UsernameMaxXCharacters'), (string) USERNAME_MAX_LENGTH), 'maxlength', USERNAME_MAX_LENGTH); |
|
| 156 | 156 | $form->addRule('username', get_lang('UsernameWrong'), 'username'); |
| 157 | 157 | $form->addRule('username', get_lang('UserTaken'), 'username_available'); |
| 158 | 158 | } |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | if (CHECK_PASS_EASY_TO_FIND) { |
| 184 | 184 | $form->addRule( |
| 185 | 185 | 'pass1', |
| 186 | - get_lang('PassTooEasy') . ': ' . api_generate_password(), |
|
| 186 | + get_lang('PassTooEasy').': '.api_generate_password(), |
|
| 187 | 187 | 'callback', |
| 188 | 188 | 'api_check_password' |
| 189 | 189 | ); |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | ) |
| 255 | 255 | ); |
| 256 | 256 | |
| 257 | - $captcha_question = $form->addElement('CAPTCHA_Image', 'captcha_question', '', $options); |
|
| 257 | + $captcha_question = $form->addElement('CAPTCHA_Image', 'captcha_question', '', $options); |
|
| 258 | 258 | $form->addElement('static', null, null, get_lang('ClickOnTheImageForANewOne')); |
| 259 | 259 | |
| 260 | 260 | $form->addElement('text', 'captcha', get_lang('EnterTheLettersYouSee'), array('size' => 40)); |
@@ -397,7 +397,7 @@ discard block |
||
| 397 | 397 | } |
| 398 | 398 | } |
| 399 | 399 | |
| 400 | - $tool_name = get_lang('Registration', null, (!empty($_POST['language'])?$_POST['language']: $_user['language'])); |
|
| 400 | + $tool_name = get_lang('Registration', null, (!empty($_POST['language']) ? $_POST['language'] : $_user['language'])); |
|
| 401 | 401 | |
| 402 | 402 | if (api_get_setting('allow_terms_conditions') === 'true' && $user_already_registered_show_terms) { |
| 403 | 403 | $tool_name = get_lang('TermsAndConditions'); |
@@ -418,7 +418,7 @@ discard block |
||
| 418 | 418 | } |
| 419 | 419 | |
| 420 | 420 | if (file_exists($home.'register_top_'.$user_selected_language.'.html')) { |
| 421 | - $home_top_temp = @(string)file_get_contents($home.'register_top_'.$user_selected_language.'.html'); |
|
| 421 | + $home_top_temp = @(string) file_get_contents($home.'register_top_'.$user_selected_language.'.html'); |
|
| 422 | 422 | $open = str_replace('{rel_path}', api_get_path(REL_PATH), $home_top_temp); |
| 423 | 423 | $open = api_to_system_encoding($open, api_detect_encoding(strip_tags($open))); |
| 424 | 424 | if (!empty($open)) { |
@@ -447,7 +447,7 @@ discard block |
||
| 447 | 447 | if (api_get_setting('show_terms_if_profile_completed') === 'true') { |
| 448 | 448 | $userInfo = api_get_user_info(); |
| 449 | 449 | if ($userInfo && $userInfo['status'] != ANONYMOUS) { |
| 450 | - if ((int)$userInfo['profile_completed'] !== 1) { |
|
| 450 | + if ((int) $userInfo['profile_completed'] !== 1) { |
|
| 451 | 451 | api_not_allowed(true); |
| 452 | 452 | } |
| 453 | 453 | } |
@@ -674,7 +674,7 @@ discard block |
||
| 674 | 674 | Database::query($sql); |
| 675 | 675 | |
| 676 | 676 | // 2. Send mail to all platform admin |
| 677 | - $emailsubject = get_lang('ApprovalForNewAccount', null, $values['language']).': '.$values['username']; |
|
| 677 | + $emailsubject = get_lang('ApprovalForNewAccount', null, $values['language']).': '.$values['username']; |
|
| 678 | 678 | $emailbody = get_lang('ApprovalForNewAccount', null, $values['language'])."\n"; |
| 679 | 679 | $emailbody .= get_lang('UserName', null, $values['language']).': '.$values['username']."\n"; |
| 680 | 680 | |
@@ -814,14 +814,14 @@ discard block |
||
| 814 | 814 | } |
| 815 | 815 | } else { |
| 816 | 816 | if (!empty($values['email'])) { |
| 817 | - $text_after_registration.= '<p>'.get_lang('MailHasBeenSent', null, $_user['language']).'.</p>'; |
|
| 817 | + $text_after_registration .= '<p>'.get_lang('MailHasBeenSent', null, $_user['language']).'.</p>'; |
|
| 818 | 818 | } |
| 819 | 819 | |
| 820 | 820 | if ($is_allowedCreateCourse) { |
| 821 | 821 | if ($usersCanCreateCourse) { |
| 822 | - $form_data['message'] = '<p>'. get_lang('NowGoCreateYourCourse', null, $_user['language']). "</p>"; |
|
| 822 | + $form_data['message'] = '<p>'.get_lang('NowGoCreateYourCourse', null, $_user['language'])."</p>"; |
|
| 823 | 823 | } |
| 824 | - $form_data['action'] = api_get_path(WEB_CODE_PATH).'create_course/add_course.php'; |
|
| 824 | + $form_data['action'] = api_get_path(WEB_CODE_PATH).'create_course/add_course.php'; |
|
| 825 | 825 | |
| 826 | 826 | if (api_get_setting('course_validation') === 'true') { |
| 827 | 827 | $form_data['button'] = Display::button( |
@@ -844,7 +844,7 @@ discard block |
||
| 844 | 844 | } else { |
| 845 | 845 | if (api_get_setting('allow_students_to_browse_courses') == 'true') { |
| 846 | 846 | $form_data['action'] = 'courses.php?action=subscribe'; |
| 847 | - $form_data['message'] = '<p>'. get_lang('NowGoChooseYourCourses', null, $_user['language']). ".</p>"; |
|
| 847 | + $form_data['message'] = '<p>'.get_lang('NowGoChooseYourCourses', null, $_user['language']).".</p>"; |
|
| 848 | 848 | } else { |
| 849 | 849 | $form_data['action'] = api_get_path(WEB_PATH).'user_portal.php'; |
| 850 | 850 | } |
@@ -857,7 +857,7 @@ discard block |
||
| 857 | 857 | } |
| 858 | 858 | |
| 859 | 859 | if ($sessionPremiumChecker && $sessionId) { |
| 860 | - header('Location:' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/process.php?i=' . $sessionId . '&t=2'); |
|
| 860 | + header('Location:'.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/process.php?i='.$sessionId.'&t=2'); |
|
| 861 | 861 | Session::erase('SessionIsPremium'); |
| 862 | 862 | Session::erase('sessionId'); |
| 863 | 863 | exit; |
@@ -163,8 +163,8 @@ discard block |
||
| 163 | 163 | |
| 164 | 164 | /* View */ |
| 165 | 165 | $template = new Template($session->getName(), true, true, false, true, false); |
| 166 | -$template->assign('show_tutor', (api_get_setting('show_session_coach')==='true' ? true : false)); |
|
| 167 | -$template->assign('page_url', api_get_path(WEB_PATH) . "session/{$session->getId()}/about/"); |
|
| 166 | +$template->assign('show_tutor', (api_get_setting('show_session_coach') === 'true' ? true : false)); |
|
| 167 | +$template->assign('page_url', api_get_path(WEB_PATH)."session/{$session->getId()}/about/"); |
|
| 168 | 168 | $template->assign('session', $session); |
| 169 | 169 | $template->assign('session_date', $sessionDates); |
| 170 | 170 | $template->assign( |
@@ -203,15 +203,15 @@ discard block |
||
| 203 | 203 | } |
| 204 | 204 | |
| 205 | 205 | $redirectToSession = api_get_configuration_value('allow_redirect_to_session_after_inscription_about'); |
| 206 | -$redirectToSession = $redirectToSession ? '?s=' . $sessionId : false; |
|
| 206 | +$redirectToSession = $redirectToSession ? '?s='.$sessionId : false; |
|
| 207 | 207 | |
| 208 | 208 | $coursesInThisSession = SessionManager::get_course_list_by_session_id($sessionId); |
| 209 | 209 | $coursesCount = count($coursesInThisSession); |
| 210 | -$redirectToSession = $coursesCount == 1 && $redirectToSession ? $redirectToSession . '&cr=' . array_values($coursesInThisSession)[0]['directory'] : $redirectToSession; |
|
| 210 | +$redirectToSession = $coursesCount == 1 && $redirectToSession ? $redirectToSession.'&cr='.array_values($coursesInThisSession)[0]['directory'] : $redirectToSession; |
|
| 211 | 211 | |
| 212 | 212 | $template->assign('redirect_to_session', $redirectToSession); |
| 213 | 213 | $template->assign('courses', $courses); |
| 214 | -$essence = Essence\Essence::instance(); |
|
| 214 | +$essence = Essence\Essence::instance(); |
|
| 215 | 215 | $template->assign('essence', $essence); |
| 216 | 216 | $template->assign( |
| 217 | 217 | 'session_extra_fields', |