More minor corrections (avoiding php notices)

skala
Julio Montoya 14 years ago
parent c3a6ca5d55
commit 551af9f8a8
  1. 22
      index.php
  2. 8
      main/admin/user_fields.php
  3. 6
      main/inc/lib/course_home.lib.php
  4. 3
      main/inc/lib/main_api.lib.php

@ -148,17 +148,17 @@ if (!api_get_user_id()) {
}
$home = 'home/';
if ($_configuration['multiple_access_urls']) {
$access_url_id = api_get_current_access_url_id();
if ($access_url_id != -1){
$url_info = api_get_access_url($access_url_id);
$url = api_remove_trailing_slash(preg_replace('/https?:\/\//i', '', $url_info['url']));
$clean_url = replace_dangerous_char($url);
$clean_url = str_replace('/', '-', $clean_url);
$clean_url .= '/';
$home_old = 'home/';
$home = 'home/'.$clean_url;
}
if (api_get_multiple_access_url()) {
$access_url_id = api_get_current_access_url_id();
$url_info = api_get_access_url($access_url_id);
$url = api_remove_trailing_slash(preg_replace('/https?:\/\//i', '', $url_info['url']));
$clean_url = replace_dangerous_char($url);
$clean_url = str_replace('/', '-', $clean_url);
$clean_url .= '/';
$home_old = 'home/';
// if $clean_url == "localhost/" means that the multiple URL was not well configured we don't rename the $home variable
if ($clean_url != 'localhost/')
$home = 'home/'.$clean_url;
}
// Including the page for the news

@ -1,9 +1,7 @@
<?php // $Id: $
/* For licensing terms, see /dokeos_license.txt */
<?php
/* For licensing terms, see /license.txt */
/**
==============================================================================
* @package dokeos.admin
==============================================================================
* @package chamilo.admin
*/
// name of the language file that needs to be included
$language_file = array('admin', 'registration');

@ -634,7 +634,8 @@ class CourseHome {
// This part displays the links to hide or remove a tool.
// These links are only visible by the course manager.
unset($lnk);
$item['extra'] = null;
if ($is_allowed_to_edit && !api_is_coach()) {
if ($tool['visibility'] == '1' && $tool['admin'] != '1') {
@ -646,8 +647,7 @@ class CourseHome {
$link['name'] = Display::return_icon('invisible.gif', get_lang('Activate'), array('id' => 'linktool_'.$tool['id']));
$link['cmd'] = 'restore=yes';
$lnk[] = $link;
}
$item['extra'] = null;
}
if (!empty($tool['adminlink'])) {
$item['extra'] = '<a href="'.$tool['adminlink'].'">'.Display::return_icon('edit.gif', get_lang('Edit')).'</a>';
}

@ -3767,7 +3767,8 @@ function & api_get_settings_categories($exceptions = array(), $access_url = 1) {
if ($list != "'',''" and $list != "''" and !empty($list)) {
$sql .= " WHERE category NOT IN ($list)";
}
return Database::store_result(Database::query($sql));
$result = Database::store_result(Database::query($sql));
return $result;
}
/**

Loading…
Cancel
Save