Avoiding PHP notice + minor cosmetic changes

skala
Julio Montoya 14 years ago
parent f07fd1be95
commit 59eaf5e3db
  1. 4
      index.php
  2. 5
      main/inc/lib/template.lib.php
  3. 2
      main/inc/lib/userportal.lib.php

@ -43,8 +43,7 @@ $htmlHeadXtra[] ='
<noscript> <noscript>
'.Display::return_message(get_lang("NoJavascript"), 'error').' '.Display::return_message(get_lang("NoJavascript"), 'error').'
</noscript> </noscript>';
';
//check cookies //check cookies
setcookie("TestCookie", "cookies_yes", time()+3600); setcookie("TestCookie", "cookies_yes", time()+3600);
@ -165,7 +164,6 @@ if (!api_is_anonymous()) {
} }
$controller->tpl->assign('hot_courses', $controller->return_hot_courses()); $controller->tpl->assign('hot_courses', $controller->return_hot_courses());
$controller->tpl->assign('announcements_block', $controller->return_announcements()); $controller->tpl->assign('announcements_block', $controller->return_announcements());
$controller->tpl->assign('home_page_block', $controller->return_home_page()); $controller->tpl->assign('home_page_block', $controller->return_home_page());
$controller->tpl->assign('notice_block', $controller->return_notice()); $controller->tpl->assign('notice_block', $controller->return_notice());

@ -8,6 +8,7 @@ require_once api_get_path(LIBRARY_PATH).'banner.lib.php';
class Template extends Smarty { class Template extends Smarty {
var $style = 'default'; //see the template folder var $style = 'default'; //see the template folder
var $title = null;
var $show_header; var $show_header;
var $show_footer; var $show_footer;
var $help; var $help;
@ -51,7 +52,8 @@ class Template extends Smarty {
//$this->loadPlugin('smarty_function_get_lang'); //$this->loadPlugin('smarty_function_get_lang');
//To the the smarty installation //To the the smarty installation
//$this->testInstall(); //$this->testInstall();
$this->set_header_parameters(); $this->set_header_parameters();
$this->set_footer_parameters(); $this->set_footer_parameters();
@ -115,6 +117,7 @@ class Template extends Smarty {
$this->show_footer = $status; $this->show_footer = $status;
$this->assign('show_footer', $status); $this->assign('show_footer', $status);
} }
/** /**
* Sets the header visibility * Sets the header visibility
* @param bool true if we show the header * @param bool true if we show the header

@ -15,7 +15,7 @@ class IndexManager {
function __construct($title, $load_template = true) { function __construct($title, $load_template = true) {
if ($load_template) { if ($load_template) {
$this->tpl = new Template($title); $this->tpl = new Template($title);
} }
$this->home = api_get_home_path(); $this->home = api_get_home_path();

Loading…
Cancel
Save