[svn r15166] Minor: removed notice-level errors

skala
Yannick Warnier 17 years ago
parent 8987b2872e
commit 68d89ed22b
  1. 12
      index.php
  2. 4
      main/inc/banner.inc.php
  3. 5
      main/inc/lib/formvalidator/FormValidator.class.php
  4. 9
      main/inc/lib/main_api.lib.php

@ -20,7 +20,7 @@
/**
* @package dokeos.main
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University, Refactoring
* @version $Id: index.php 15074 2008-04-24 22:47:26Z yannoo $
* @version $Id: index.php 15166 2008-04-29 06:03:54Z yannoo $
* @todo check the different @todos in this page and really do them
* @todo check if the news management works as expected
*/
@ -69,7 +69,7 @@ $this_section = SECTION_CAMPUS;
* this can be usefull when you are on an open course and you need to log in to edit something and you immediately want to check how anonymous users
* will see it.
*/
if ($_GET['logout'])
if (!empty($_GET['logout']))
{
logout();
}
@ -107,10 +107,10 @@ if (isset ($_user['user_id']))
* @todo This piece of code should probably move to local.inc.php where the actual login / logout procedure is handled.
* @todo consider removing this piece of code because does nothing.
*/
if ($_GET["submitAuth"] == 1)
if (isset($_GET['submitAuth']) && $_GET['submitAuth'] == 1)
{
// nice lie!!!
echo "Attempted breakin - sysadmins notified.";
echo 'Attempted breakin - sysadmins notified.';
session_destroy();
die();
}
@ -121,7 +121,7 @@ if ($_GET["submitAuth"] == 1)
* the code does the stuff in local.inc.php and then redirects to index.php or user_portal.php depending
* on api_get_setting('page_after_login')
*/
if ($_POST["submitAuth"])
if (!empty($_POST["submitAuth"]))
{
// the user is already authenticated, we now find the last login of the user.
if (isset ($_user['user_id']))
@ -221,7 +221,7 @@ else
}
// Display System announcements
$announcement = $_GET['announcement'] ? $_GET['announcement'] : -1;
$announcement = isset($_GET['announcement']) ? $_GET['announcement'] : -1;
$announcement = intval($announcement);
if (isset($_user['user_id']))

@ -417,7 +417,7 @@ $chat = strpos(api_get_self(), 'chat_banner.php');
if (!$chat)
{
include_once (api_get_path(LIBRARY_PATH)."online.inc.php");
echo $accept;
//echo $accept;
$chatcall = chatcall();
if ($chatcall)
{
@ -549,4 +549,4 @@ function get_tabs()
return $navigation;
}
?>
<!-- Begin Of script Output -->
<!-- Begin Of script Output -->

@ -38,6 +38,7 @@ define('TEACHER_HTML_FULLPAGE',5);
*/
class FormValidator extends HTML_QuickForm
{
var $with_progress_bar=false;
/**
* Constructor
* @param string $form_name Name of the form
@ -349,7 +350,7 @@ EOT;
}
$return_value = parent::toHtml();
// Add the div which will hold the progress bar
if($this->with_progress_bar)
if(isset($this->with_progress_bar) && $this->with_progress_bar)
{
$return_value .= '<div id="dynamic_div" style="display:block;margin-left:40%;margin-top:10px;height:50px;"></div>';
}
@ -387,4 +388,4 @@ function html_filter_student_fullpage($html)
{
return html_filter($html,STUDENT_HTML_FULLPAGE);
}
?>
?>

@ -1820,7 +1820,10 @@ function api_display_language_form()
// retrieve a complete list of all the languages.
$language_list = api_get_languages();
// the the current language of the user so that his/her language occurs as selected in the dropdown menu
$user_selected_language = $_SESSION["user_language_choice"];
if(isset($_SESSION['user_language_choice']))
{
$user_selected_language = $_SESSION['user_language_choice'];
}
if (!isset ($user_selected_language))
$user_selected_language = $platformLanguage;
$original_languages = $language_list['name'];
@ -2051,7 +2054,7 @@ function string_2_boolean($string)
function api_number_of_plugins($location)
{
global $_plugins;
if (is_array($_plugins[$location]))
if (isset($_plugins[$location]) && is_array($_plugins[$location]))
{
return count($_plugins[$location]);
}
@ -2066,7 +2069,7 @@ function api_plugin($location)
{
global $_plugins;
if (is_array($_plugins[$location]))
if (isset($_plugins[$location]) && is_array($_plugins[$location]))
{
foreach ($_plugins[$location] as $this_plugin)
{

Loading…
Cancel
Save