|
@@ -1608,8 +1608,8 @@ function _api_format_user($user, $add_password = false, $loadAvatars = true)
|
|
|
}
|
|
|
|
|
|
if (!empty($iconStatus)) {
|
|
|
- $iconStatusMedium = '<img class="pull-left" src="'.$iconStatus.'" width="32px" height="32px">';
|
|
|
- $iconStatus = '<img class="pull-left" src="'.$iconStatus.'" width="22px" height="22px">';
|
|
|
+ $iconStatusMedium = '<img src="'.$iconStatus.'" width="32px" height="32px">';
|
|
|
+ $iconStatus = '<img src="'.$iconStatus.'" width="22px" height="22px">';
|
|
|
}
|
|
|
|
|
|
$result['icon_status'] = $iconStatus;
|
|
@@ -1892,9 +1892,8 @@ function api_get_course_path($course_code = null)
|
|
|
/**
|
|
|
* Gets a course setting from the current course_setting table. Try always using integer values.
|
|
|
*
|
|
|
- * @param string The name of the setting we want from the table
|
|
|
- * @param string Optional: course code
|
|
|
- * @param string $setting_name
|
|
|
+ * @param string $setting_name The name of the setting we want from the table
|
|
|
+ * @param string $course_code
|
|
|
*
|
|
|
* @return mixed The value of that setting in that table. Return -1 if not found.
|
|
|
*/
|
|
@@ -2284,6 +2283,7 @@ function api_format_course_array($course_data)
|
|
|
false
|
|
|
);
|
|
|
}
|
|
|
+
|
|
|
$_course['course_image_large'] = $url_image;
|
|
|
|
|
|
return $_course;
|
|
@@ -7586,8 +7586,6 @@ function api_user_is_login($user_id = null)
|
|
|
*/
|
|
|
function api_get_real_ip()
|
|
|
{
|
|
|
- // Guess the IP if behind a reverse proxy
|
|
|
- global $debug;
|
|
|
$ip = trim($_SERVER['REMOTE_ADDR']);
|
|
|
if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
|
|
|
if (preg_match('/,/', $_SERVER['HTTP_X_FORWARDED_FOR'])) {
|
|
@@ -7597,9 +7595,6 @@ function api_get_real_ip()
|
|
|
}
|
|
|
$ip = trim($ip1);
|
|
|
}
|
|
|
- if (!empty($debug)) {
|
|
|
- error_log('Real IP: '.$ip);
|
|
|
- }
|
|
|
|
|
|
return $ip;
|
|
|
}
|
|
@@ -8391,11 +8386,11 @@ function api_is_allowed_in_course()
|
|
|
* Set the cookie to go directly to the course code $in_firstpage
|
|
|
* after login.
|
|
|
*
|
|
|
- * @param string $in_firstpage is the course code of the course to go
|
|
|
+ * @param string $value is the course code of the course to go
|
|
|
*/
|
|
|
-function api_set_firstpage_parameter($in_firstpage)
|
|
|
+function api_set_firstpage_parameter($value)
|
|
|
{
|
|
|
- setcookie('GotoCourse', $in_firstpage);
|
|
|
+ setcookie('GotoCourse', $value);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -9526,7 +9521,7 @@ function api_get_language_translate_html()
|
|
|
$translate = api_get_configuration_value('translate_html');
|
|
|
|
|
|
if (!$translate) {
|
|
|
- return '';
|
|
|
+ return '';
|
|
|
}
|
|
|
|
|
|
$languageList = api_get_languages();
|