Minor - format code.

1.9.x
Julio Montoya 10 years ago
parent e6212ef2b1
commit daede739b6
  1. 10
      index.php
  2. 887
      main/admin/configure_homepage.php
  3. 13
      main/inc/lib/userportal.lib.php

@ -118,8 +118,7 @@ if (!empty($_POST['submitAuth'])) {
}
}
// End login -- if ($_POST['submitAuth'])
}
else {
} else {
// Only if login form was not sent because if the form is sent the user was already on the page.
event_open();
}
@ -142,8 +141,7 @@ if (!api_is_anonymous()) {
if (api_is_platform_admin()) {
$controller->tpl->assign('course_block', $controller->return_course_block());
}
else {
} else {
$controller->tpl->assign('teacher_block', $controller->return_teacher_link());
}
}
@ -163,9 +161,7 @@ if (!isset($_REQUEST['include'])) {
$controller->tpl->assign('hot_courses', $hot_courses);
$controller->tpl->assign('announcements_block', $announcements_block);
$controller->tpl->assign('home_page_block', $controller->return_home_page());
$controller->tpl->assign('navigation_course_links', $controller->return_navigation_links());
$controller->tpl->assign('notice_block', $controller->return_notice());
$controller->tpl->assign('main_navigation_block', $controller->return_navigation_links());
$controller->tpl->assign('help_block', $controller->return_help());
@ -183,7 +179,7 @@ if (isset($_GET['firstpage'])) {
api_set_firstpage_parameter($_GET['firstpage']);
// if we are already logged, go directly to course
if (api_user_is_login()) {
echo "<script type='text/javascript'>self.location.href='index.php?firstpage=".$_GET['firstpage']."'</script>";
echo "<script type='text/javascript'>self.location.href='index.php?firstpage=".Security::remove_XSS($_GET['firstpage'])."'</script>";
}
} else {
api_delete_firstpage_parameter();

File diff suppressed because it is too large Load Diff

@ -213,11 +213,15 @@ class IndexManager
if (!empty($html)) {
$html = self::show_right_block(get_lang('Courses'), $html, 'teacher_block');
}
return $html;
}
/* Includes a created page */
function return_home_page()
/**
* Includes a created page
* @return string
*/
public function return_home_page()
{
$userId = api_get_user_id();
global $_configuration;
@ -229,7 +233,9 @@ class IndexManager
$html = api_to_system_encoding($open, api_detect_encoding(strip_tags($open)));
} else {
// Hiding home top when user not connected.
if (isset($_configuration['hide_home_top_when_connected']) && $_configuration['hide_home_top_when_connected'] && !empty($userId)) {
if (isset($_configuration['hide_home_top_when_connected']) &&
$_configuration['hide_home_top_when_connected'] && !empty($userId)
) {
return $html;
}
@ -240,7 +246,6 @@ class IndexManager
} else {
$user_selected_language = api_get_setting('platformLanguage');
}
if (!file_exists($this->home.'home_news_'.$user_selected_language.'.html')) {
if (file_exists($this->home.'home_top.html')) {
$home_top_temp = file($this->home.'home_top.html');

Loading…
Cancel
Save