Fixing PHP warning

ref 9648c1f1f7
1.9.x
Julio Montoya 12 years ago
parent eafd2776bc
commit f8687d7f4e
  1. 11
      main/inc/lib/userportal.lib.php

@ -208,7 +208,9 @@ class IndexManager {
}
/* Includes a created page */
function return_home_page() {
function return_home_page()
{
$userId = api_get_user_id();
global $_configuration;
// Including the page for the news
$html = '';
@ -217,11 +219,11 @@ class IndexManager {
$open = @(string)file_get_contents(api_get_path(SYS_PATH).$this->home.$_GET['include']);
$html = api_to_system_encoding($open, api_detect_encoding(strip_tags($open)));
} else {
//hiding home top when user not connected
global $_user;
if ($_configuration['hide_home_top_when_connected'] && isset($_user['user_id'])) {
// Hiding home top when user not connected.
if (isset($_configuration['hide_home_top_when_connected']) && $_configuration['hide_home_top_when_connected'] && !empty($userId)) {
return $html;
}
if (!empty($_SESSION['user_language_choice'])) {
$user_selected_language = $_SESSION['user_language_choice'];
} elseif (!empty($_SESSION['_user']['language'])) {
@ -229,6 +231,7 @@ 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