Fixing Auth class conflict in composer

skala
Julio Montoya 12 years ago
parent 2bbeffb044
commit 3cf467c86b
  1. 2
      main/auth/courses.php
  2. 6
      main/auth/courses_controller.php
  3. 2
      main/course_home/course_home.php
  4. 12
      main/inc/lib/auth.lib.php
  5. 2
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/_ajax_get_thumbnail_listing.php
  6. 2
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajaxfilemanager.php
  7. 10
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/class.auth.php
  8. 8
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/config.base.php
  9. 18
      main/template/default/auth/courses_categories.php
  10. 1
      src/ChamiloLMS/Controller/LegacyController.php
  11. 2
      vendor/autoload.php
  12. 1
      vendor/composer/autoload_classmap.php
  13. 6
      vendor/composer/autoload_real.php

@ -16,8 +16,6 @@ $cidReset = true; // Flag forcing the 'current course' reset
// including files
require_once '../inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH).'auth.lib.php';
require_once api_get_path(LIBRARY_PATH).'app_view.php';
require_once 'courses_controller.php';
if (api_get_setting('show_courses_descriptions_in_catalog') == 'true') {

@ -9,8 +9,8 @@
* Code
* @package chamilo.auth
*/
class CoursesController { // extends Controller {
class CoursesController
{
private $toolname;
private $view;
private $model;
@ -22,7 +22,7 @@ class CoursesController { // extends Controller {
$this->toolname = 'auth';
$actived_theme_path = api_get_template();
$this->view = new View($this->toolname, $actived_theme_path);
$this->model = new Auth();
$this->model = new AuthLib();
}
/**

@ -147,7 +147,7 @@ if ($is_speacialcourse) {
if (isset($_GET['action']) && $_GET['action'] == 'subscribe') {
if (Security::check_token('get')) {
Security::clear_token();
$auth = new Auth();
$auth = new AuthLib();
$msg = $auth->subscribe_user($course_code);
if (!empty($msg)) {
$show_message .= Display::return_message(get_lang($msg));

@ -12,7 +12,7 @@
* Auth can be used to instanciate objects or as a library to manage courses
* @package chamilo.auth
*/
class Auth {
class AuthLib {
/**
* Constructor
@ -441,7 +441,9 @@ class Auth {
$TABLE_COURSE_FIELD_VALUE = Database::get_main_table(TABLE_MAIN_COURSE_FIELD_VALUES);
// Get course list auto-register
$sql = "SELECT course_code FROM $TABLE_COURSE_FIELD_VALUE tcfv INNER JOIN $TABLE_COURSE_FIELD tcf ON tcfv.field_id = tcf.id
$sql = "SELECT course_code
FROM $TABLE_COURSE_FIELD_VALUE tcfv
INNER JOIN $TABLE_COURSE_FIELD tcf ON tcfv.field_id = tcf.id
WHERE tcf.field_variable = 'special_course' AND tcfv.field_value = 1 ";
$special_course_result = Database::query($sql);
@ -578,8 +580,8 @@ class Auth {
if ($url_access_id != -1) {
$tbl_url_rel_course = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE);
$sql_find = "SELECT * FROM $TABLECOURS as course INNER JOIN $tbl_url_rel_course as url_rel_course
ON (url_rel_course.course_code=course.code)
WHERE access_url_id = $url_access_id AND (code LIKE '%" . $search_term_safe . "%' OR title LIKE '%" . $search_term_safe . "%' OR tutor_name LIKE '%" . $search_term_safe . "%' ) $without_special_courses ORDER BY title, visual_code ASC ";
ON (url_rel_course.course_code=course.code)
WHERE access_url_id = $url_access_id AND (code LIKE '%" . $search_term_safe . "%' OR title LIKE '%" . $search_term_safe . "%' OR tutor_name LIKE '%" . $search_term_safe . "%' ) $without_special_courses ORDER BY title, visual_code ASC ";
}
}
$result_find = Database::query($sql_find);
@ -588,8 +590,10 @@ class Auth {
$row['registration_code'] = !empty($row['registration_code']);
$count_users = count(CourseManager::get_user_list_from_course_code($row['code']));
$count_connections_last_month = Tracking::get_course_connections_count($row['code'], 0, api_get_utc_datetime(time() - (30 * 86400)));
$courses[] = array(
'code' => $row['code'],
'real_id' => $row['id'],
'directory' => $row['directory'],
'db' => $row['db_name'],
'visual_code' => $row['visual_code'],

@ -175,7 +175,7 @@
echo ' ';
}
if ($_GET['editor'] != 'stand_alone') {
if (!isset($_GET['editor']) && isset($_GET['editor']) && $_GET['editor'] != 'stand_alone') {
$path_chamilo_file = '../'.$file['path']; // fix for makes a good show when pressed next on window preview, don't only one image
} else {
$path_chamilo_file = $file['path'];

@ -71,7 +71,7 @@ if(!empty($_GET['view'])) {
<script type="text/javascript" src="jscripts/ajaxfilemanager.js"></script>
<script type="text/javascript">
var mode_editor = '<?php echo Security::remove_XSS($_GET['editor']);?>';<!-- Chamilo hack for general my files users -->
var mode_editor = '<?php echo isset($_GET['editor']) ? Security::remove_XSS($_GET['editor']) : '' ;?>';<!-- Chamilo hack for general my files users -->
if (!mode_editor){
// Added by Ivan Tcholakov, 22-JUL-2009.
// For integration with the editor's dialig system.

@ -1,6 +1,6 @@
<?php
<?php
/**
* the purpose I added this class is to make the file system much flexible
* the purpose I added this class is to make the file system much flexible
* for customization.
* Actually, this is a kind of interface and you should modify it to fit your system
* @author Logan Cai (cailongqun [at] yahoo [dot] com [dot] cn)
@ -12,9 +12,9 @@
var $__loginIndexInSession = 'ajax_user';
function __construct()
{
}
function Auth()
{
$this->__construct();
@ -39,7 +39,7 @@
{
$_SESSION[$this->__loginIndexInSession] = true;
return true;
}else
}else
{
return false;
}

@ -1,6 +1,6 @@
<?php
/**
* sysem base config setting
* system base config setting
* @author Logan Cai (cailongqun [at] yahoo [dot] com [dot] cn)
* @link www.phpletter.com
* @since 1/August/2007
@ -33,7 +33,7 @@ define('CONFIG_SYS_THUMBNAIL_VIEW_ENABLE', true);//REMOVE THE thumbnail view if
//User Permissions
//Hack by Juan Carlos Raña Trabado
if(empty($_course['path']) || Security::remove_XSS($_GET['editor'])=="stand_alone") {
if(empty($_course['path']) || isset($_GET['editor']) && $_GET['editor'] == "stand_alone") {
define('CONFIG_OPTIONS_DELETE', true);
define('CONFIG_OPTIONS_CUT', true);
define('CONFIG_OPTIONS_COPY', true);
@ -75,7 +75,7 @@ these two paths accept relative path only, don't use absolute path
// Integration for Chamilo
if(!empty($_course['path']) && Security::remove_XSS($_GET['editor'])!="stand_alone") {
if(!empty($_course['path']) && !isset($_GET['editor']) && isset($_GET['editor']) && $_GET['editor'] != 'stand_alone') {
if(!empty($group_properties['directory'])) {
$PathChamiloAjaxFileManager='../../../../../../../courses/'.$_course['path'].'/document'.$group_properties['directory'].'/';
} else {
@ -91,7 +91,7 @@ if(!empty($_course['path']) && Security::remove_XSS($_GET['editor'])!="stand_alo
}
}
} else {
if (api_is_platform_admin() && $_SESSION['this_section']=='platform_admin') {
if (api_is_platform_admin() && isset($_SESSION['this_section']) && $_SESSION['this_section']=='platform_admin') {
//home page portal
$PathChamiloAjaxFileManager='../../../../../../../home/default_platform_document/';
} else {

@ -33,7 +33,7 @@ $stok = Security::get_token();
<div class="span3">
<div id="course_category_well" class="well">
<ul class="nav nav-list">
<?php if (intval($_GET['hidden_links']) != 1) { ?>
<?php if (!isset($_GET['hidden_links']) || isset($_GET['hidden_links']) && intval($_GET['hidden_links']) != 1) { ?>
<form class="form-search" method="post" action="<?php echo api_get_self(); ?>?action=subscribe&amp;hidden_links=0">
<fieldset>
<input type="hidden" name="sec_token" value="<?php echo $stok; ?>">
@ -66,10 +66,10 @@ $stok = Security::get_token();
// level 1
foreach ($browse_course_categories[0] as $category) {
$category_name = $category['name'];
$category_code = $category['code'];
$category_code = isset($category['code']) ? $category['code'] : null;
$count_courses_lv1 = $category['count_courses'];
if ($code == $category_code) {
if (isset($code) && $code == $category_code) {
$category_link = '<strong>'.$category_name.' ('.$count_courses_lv1.')</strong>';
} else {
if (!empty($count_courses_lv1)) {
@ -151,7 +151,7 @@ $stok = Security::get_token();
continue;
}
// course isn't closed
$title = cut($course['title'], 70);
$title = Text::cut($course['title'], 70);
$tutor_name = $course['tutor'];
$creation_date = substr($course['creation_date'],0,10);
@ -165,13 +165,15 @@ $stok = Security::get_token();
$course_medium_image = api_get_path(WEB_IMG_PATH).'without_picture.png'; // without picture
}
$rating = Display::return_rating_system('star_'.$course['real_id'], $ajax_url.'&amp;course_id='.$course['real_id'], $course['point_info']);
$pointInfo = isset($course['point_info']) ? $course['point_info'] : null;
$rating = Display::return_rating_system('star_'.$course['real_id'], $ajax_url.'&amp;course_id='.$course['real_id'], $pointInfo);
echo '<div class="well_border"><div class="row">';
echo '<div class="span2">';
echo '<div class="thumbnail">';
if (api_get_setting('show_courses_descriptions_in_catalog') == 'true') {
echo '<a class="ajax" href="'.api_get_path(WEB_CODE_PATH).'inc/ajax/course_home.ajax.php?a=show_course_information&amp;code='.$course['code'].'" title="'.$icon_title.'" rel="gb_page_center[778]">';
echo '<a class="ajax" href="'.api_get_path(WEB_CODE_PATH).'inc/ajax/course_home.ajax.php?a=show_course_information&amp;code='.$course['code'].'" rel="gb_page_center[778]">';
echo '<img src="'.$course_medium_image.'" alt="" />';
echo '</a>';
} else {
@ -183,14 +185,14 @@ $stok = Security::get_token();
echo '<div class="span4">';
$teachers = CourseManager::get_teacher_list_from_course_code_to_string($course['code']);
$teachers = '<h5>'.$teachers.'</h5>';
echo '<div class="categories-course-description"><h3>'.cut($title, 60).'</h3>'.$teachers.$rating.'</div>';
echo '<div class="categories-course-description"><h3>'.Text::cut($title, 60).'</h3>'.$teachers.$rating.'</div>';
echo '<p>';
// we display the icon to subscribe or the text already subscribed
echo '<div class="btn-toolbar">';
if (api_get_setting('show_courses_descriptions_in_catalog') == 'true') {
echo '<a class="ajax btn" href="'.api_get_path(WEB_CODE_PATH).'inc/ajax/course_home.ajax.php?a=show_course_information&amp;code='.$course['code'].'" title="'.$icon_title.'" class="thickbox">'.get_lang('Description').'</a>';
echo '<a class="ajax btn" href="'.api_get_path(WEB_CODE_PATH).'inc/ajax/course_home.ajax.php?a=show_course_information&amp;code='.$course['code'].'" class="thickbox">'.get_lang('Description').'</a>';
}
// Get access type for course button ("enter" or/and "register")

@ -36,7 +36,6 @@ class LegacyController// extends Controller
//Classic style
if ($app['classic_layout'] == true) {
//assign('content', already done in display::display_header() and display_footer()
} else {
return $app->redirect('index');
}

@ -4,4 +4,4 @@
require_once __DIR__ . '/composer' . '/autoload_real.php';
return ComposerAutoloaderInita980ba107ef57b35bdb64ba89a32ee06::getLoader();
return ComposerAutoloaderInitaf374bd7e51cd0f0c70e616dc6595334::getLoader();

@ -50,6 +50,7 @@ return array(
'AttendanceLink' => $baseDir . '/main/gradebook/lib/be/attendancelink.class.php',
'Attribute_Translator' => $baseDir . '/main/inc/lib/phpdocx/pdf/include/attribute_translator.cls.php',
'Auth' => $baseDir . '/main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/class.auth.php',
'AuthLib' => $baseDir . '/main/inc/lib/auth.lib.php',
'AutoLoader' => $baseDir . '/main/inc/lib/phpdocx/classes/AutoLoader.inc',
'BaseFacebook' => $baseDir . '/main/auth/external_login/facebook-php-sdk/src/base_facebook.php',
'Block_Frame_Decorator' => $baseDir . '/main/inc/lib/phpdocx/pdf/include/block_frame_decorator.cls.php',

@ -2,7 +2,7 @@
// autoload_real.php generated by Composer
class ComposerAutoloaderInita980ba107ef57b35bdb64ba89a32ee06
class ComposerAutoloaderInitaf374bd7e51cd0f0c70e616dc6595334
{
private static $loader;
@ -19,9 +19,9 @@ class ComposerAutoloaderInita980ba107ef57b35bdb64ba89a32ee06
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInita980ba107ef57b35bdb64ba89a32ee06', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInitaf374bd7e51cd0f0c70e616dc6595334', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInita980ba107ef57b35bdb64ba89a32ee06', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInitaf374bd7e51cd0f0c70e616dc6595334', 'loadClassLoader'));
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);

Loading…
Cancel
Save