From fdbdd4f681aca9ecc81f0af438660f5c3bd5414b Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Tue, 10 Feb 2015 14:18:13 +0100 Subject: [PATCH] Removing myspace.lib.php includes --- composer.lock | 32 ++------------------------- main/auth/my_progress.php | 1 - main/inc/ajax/myspace.ajax.php | 2 -- main/inc/lib/myspace.lib.php | 16 ++++++-------- main/mySpace/access_details.php | 3 --- main/mySpace/admin.php | 3 +-- main/mySpace/admin_view.php | 4 ---- main/mySpace/coaches.php | 3 +-- main/mySpace/index.php | 4 ---- main/mySpace/myStudents.php | 3 --- main/mySpace/progression.php | 3 +-- main/mySpace/user_import.php | 3 +-- vendor/autoload.php | 2 +- vendor/composer/autoload_classmap.php | 7 +----- vendor/composer/autoload_real.php | 10 ++++----- vendor/composer/installed.json | 29 ------------------------ 16 files changed, 20 insertions(+), 105 deletions(-) diff --git a/composer.lock b/composer.lock index 98894150b8..e0f10bfd60 100755 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "6278d7d871b000bcfc52ed6726bc22e5", + "hash": "869c0f0cb81f3231bc4f679445bcc110", "packages": [ { "name": "aferrandini/phpqrcode", @@ -612,33 +612,6 @@ ], "time": "2012-12-21 11:40:51" }, - { - "name": "ros/ezpdf", - "version": "0.12.0-RC17", - "source": { - "type": "git", - "url": "https://github.com/didaxRedux/php-ezPDF.git", - "reference": "62e09bc84985e848645c6ae359cc8be4275cfd32" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/didaxRedux/php-ezPDF/zipball/62e09bc84985e848645c6ae359cc8be4275cfd32", - "reference": "62e09bc84985e848645c6ae359cc8be4275cfd32", - "shasum": "" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Porting of the well-known R&OS PDF class.", - "time": "2014-09-30 15:15:44" - }, { "name": "sabre/vobject", "version": "3.3.5", @@ -1236,8 +1209,7 @@ "aliases": [], "minimum-stability": "stable", "stability-flags": { - "php-ffmpeg/php-ffmpeg": 20, - "ros/ezpdf": 5 + "php-ffmpeg/php-ffmpeg": 20 }, "prefer-stable": false, "prefer-lowest": false, diff --git a/main/auth/my_progress.php b/main/auth/my_progress.php index 561978902d..b948a03f73 100755 --- a/main/auth/my_progress.php +++ b/main/auth/my_progress.php @@ -44,7 +44,6 @@ $(function() { }); }); '; -require_once api_get_path(SYS_CODE_PATH).'mySpace/myspace.lib.php'; $user_id = api_get_user_id(); $course_user_list = CourseManager::get_courses_list_by_user_id($user_id); diff --git a/main/inc/ajax/myspace.ajax.php b/main/inc/ajax/myspace.ajax.php index d27eec4208..b19ad502d5 100755 --- a/main/inc/ajax/myspace.ajax.php +++ b/main/inc/ajax/myspace.ajax.php @@ -9,8 +9,6 @@ $language_file = array('tracking'); require_once '../global.inc.php'; $action = $_GET['a']; -//if (!api_is_platform_admin() && !api_is_xml_http_request()) { exit; } -require_once api_get_path(SYS_CODE_PATH) . 'mySpace/myspace.lib.php'; switch ($action) { case 'access_detail': diff --git a/main/inc/lib/myspace.lib.php b/main/inc/lib/myspace.lib.php index 5a490ef623..da9ee9cde3 100644 --- a/main/inc/lib/myspace.lib.php +++ b/main/inc/lib/myspace.lib.php @@ -308,8 +308,6 @@ class MySpace public static function display_tracking_coach_overview($export_csv) { - global $_configuration; - if ($export_csv) { $is_western_name_order = api_is_western_name_order(PERSON_NAME_DATA_EXPORT); } else { @@ -373,7 +371,7 @@ class MySpace WHERE scu.id_user=user_id AND scu.status=2 AND login_user_id=user_id GROUP BY user_id "; - if ($_configuration['multiple_access_urls']) { + if (api_is_multiple_url_enabled()) { $tbl_session_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_SESSION); $access_url_id = api_get_current_access_url_id(); if ($access_url_id != -1) { @@ -400,7 +398,7 @@ class MySpace GROUP BY user_id ORDER BY login_date '.$tracking_direction; - if ($_configuration['multiple_access_urls']) { + if (api_is_multiple_url_enabled()) { $tbl_session_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_SESSION); $access_url_id = api_get_current_access_url_id(); if ($access_url_id != -1) { @@ -1088,7 +1086,7 @@ class MySpace public static function display_user_overview_export_options() { // include the user manager and formvalidator library - if ($_GET['export'] == 'options') { + if (isset($_GET['export']) && $_GET['export'] == 'options') { // get all the defined extra fields $extrafields = UserManager::get_extra_fields(0, 50, 5, 'ASC', false, 1); @@ -2159,14 +2157,14 @@ class MySpace */ public static function get_user_data_tracking_overview($from, $number_of_items, $column, $direction) { - global $_configuration; // database table definition $access_url_id = api_get_current_access_url_id(); $tbl_url_rel_user = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER); $main_user_table = Database::get_main_table(TABLE_MAIN_USER); - - if ($_configuration['multiple_access_urls']) { - $condition_multi_url = ", $tbl_url_rel_user as url_user WHERE user.user_id=url_user.user_id AND access_url_id='$access_url_id'"; + $condition_multi_url = null; + if (api_is_multiple_url_enabled()) { + $condition_multi_url = ", $tbl_url_rel_user as url_user + WHERE user.user_id=url_user.user_id AND access_url_id='$access_url_id'"; } global $export_csv; diff --git a/main/mySpace/access_details.php b/main/mySpace/access_details.php index 0e10fa0622..669ebc798a 100755 --- a/main/mySpace/access_details.php +++ b/main/mySpace/access_details.php @@ -20,9 +20,6 @@ $language_file = array ('registration', 'index', 'tracking'); require_once '../inc/global.inc.php'; -// including additional libraries -require_once 'myspace.lib.php'; - api_block_anonymous_users(); // the section (for the tabs) diff --git a/main/mySpace/admin.php b/main/mySpace/admin.php index 0771e59e5b..6cde089b74 100755 --- a/main/mySpace/admin.php +++ b/main/mySpace/admin.php @@ -13,8 +13,7 @@ ob_start(); $language_file = array('registration', 'index', 'trad4all', 'tracking'); $cidReset = true; -require '../inc/global.inc.php'; -require_once api_get_path(SYS_CODE_PATH) . 'mySpace/myspace.lib.php'; +require_once '../inc/global.inc.php'; $this_section = SECTION_TRACKING; diff --git a/main/mySpace/admin_view.php b/main/mySpace/admin_view.php index 4411aea74a..455e5812b0 100644 --- a/main/mySpace/admin_view.php +++ b/main/mySpace/admin_view.php @@ -7,10 +7,6 @@ $cidReset = true; require_once '../inc/global.inc.php'; -// including additional libraries -require_once api_get_path(LIBRARY_PATH).'export.lib.inc.php'; -require_once 'myspace.lib.php'; - $exportCSV = isset($_GET['export']) && $_GET['export'] == 'csv' ? true : false; $display = isset($_GET['display']) ? Security::remove_XSS($_GET['display']) : null; diff --git a/main/mySpace/coaches.php b/main/mySpace/coaches.php index ca1b96ce56..8a2649c642 100755 --- a/main/mySpace/coaches.php +++ b/main/mySpace/coaches.php @@ -13,8 +13,7 @@ ob_start(); $language_file = array ('registration', 'index', 'tracking', 'admin'); $cidReset = true; -require '../inc/global.inc.php'; -require_once api_get_path(SYS_CODE_PATH).'mySpace/myspace.lib.php'; +require_once '../inc/global.inc.php'; $this_section = SECTION_TRACKING; diff --git a/main/mySpace/index.php b/main/mySpace/index.php index c328b70441..ede696a7ff 100755 --- a/main/mySpace/index.php +++ b/main/mySpace/index.php @@ -13,10 +13,6 @@ $cidReset = true; require_once '../inc/global.inc.php'; -// including additional libraries -require_once api_get_path(LIBRARY_PATH).'export.lib.inc.php'; -require_once 'myspace.lib.php'; - $htmlHeadXtra[] = api_get_jqgrid_js(); // the section (for the tabs) $this_section = SECTION_TRACKING; diff --git a/main/mySpace/myStudents.php b/main/mySpace/myStudents.php index 67bae46b84..e1e0e2c7c5 100755 --- a/main/mySpace/myStudents.php +++ b/main/mySpace/myStudents.php @@ -20,15 +20,12 @@ $language_file = array( require_once '../inc/global.inc.php'; -require_once api_get_path(LIBRARY_PATH).'export.lib.inc.php'; require_once api_get_path(SYS_CODE_PATH).'newscorm/learnpath.class.php'; -require_once api_get_path(SYS_CODE_PATH).'mySpace/myspace.lib.php'; require_once api_get_path(SYS_CODE_PATH).'gradebook/lib/be/gradebookitem.class.php'; require_once api_get_path(SYS_CODE_PATH).'gradebook/lib/be/evaluation.class.php'; require_once api_get_path(SYS_CODE_PATH).'gradebook/lib/be/result.class.php'; require_once api_get_path(SYS_CODE_PATH).'gradebook/lib/be/linkfactory.class.php'; require_once api_get_path(SYS_CODE_PATH).'gradebook/lib/be/category.class.php'; -require_once api_get_path(LIBRARY_PATH).'attendance.lib.php'; require_once api_get_path(SYS_CODE_PATH).'survey/survey.lib.php'; api_block_anonymous_users(); diff --git a/main/mySpace/progression.php b/main/mySpace/progression.php index 140b48751c..6f3da0fd92 100755 --- a/main/mySpace/progression.php +++ b/main/mySpace/progression.php @@ -12,8 +12,7 @@ $language_file = array ('registration', 'index', 'tracking'); -require '../inc/global.inc.php'; -require_once api_get_path(SYS_CODE_PATH).'mySpace/myspace.lib.php'; +require_once '../inc/global.inc.php'; $nameTools = get_lang('Progression'); diff --git a/main/mySpace/user_import.php b/main/mySpace/user_import.php index 3c90b06048..1ce9d7d31e 100755 --- a/main/mySpace/user_import.php +++ b/main/mySpace/user_import.php @@ -12,8 +12,7 @@ $language_file = array ('admin', 'registration', 'index', 'trad4all', 'tracking'); $cidReset = true; -require '../inc/global.inc.php'; -require_once 'myspace.lib.php'; +require_once '../inc/global.inc.php'; $this_section = SECTION_PLATFORM_ADMIN; // TODO: Platform admin section? diff --git a/vendor/autoload.php b/vendor/autoload.php index f4d57d33be..e026702e2d 100755 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer' . '/autoload_real.php'; -return ComposerAutoloaderInit1f73abd4e680c1cbca5154be248fc1ac::getLoader(); +return ComposerAutoloaderInitb90538abc535a9b1749268777844c9b2::getLoader(); diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index ddd6debc64..8363b3c609 100755 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -54,8 +54,6 @@ return array( 'Attribute_Translator' => $baseDir . '/main/inc/lib/phpdocx/pdf/include/attribute_translator.cls.php', 'Auth' => $baseDir . '/main/inc/lib/auth.lib.php', 'AutoLoader' => $baseDir . '/main/inc/lib/phpdocx/classes/AutoLoader.inc', - 'Autoload' => $baseDir . '/main/inc/lib/autoload.class.php', - 'AutoloadClassFinder' => $baseDir . '/main/inc/lib/autoload.class.php', 'BBBPlugin' => $baseDir . '/plugin/bbb/lib/bbb_plugin.class.php', 'BaseFacebook' => $baseDir . '/main/auth/external_login/facebook-php-sdk/src/base_facebook.php', 'BigBlueButtonBN' => $baseDir . '/plugin/bbb/lib/bbb_api.php', @@ -94,7 +92,6 @@ return array( 'Category' => $baseDir . '/main/gradebook/lib/be/category.class.php', 'Cellmap' => $baseDir . '/main/inc/lib/phpdocx/pdf/include/cellmap.cls.php', 'Certificate' => $baseDir . '/main/inc/lib/certificate.lib.php', - 'Cezpdf' => $baseDir . '/main/inc/lib/ezpdf/class.ezpdf.php', 'Chamilo' => $baseDir . '/main/inc/lib/chamilo.class.php', 'ChamiloIndexer' => $baseDir . '/main/inc/lib/search/ChamiloIndexer.class.php', 'ChamiloSession' => $baseDir . '/main/inc/lib/chamilo_session.class.php', @@ -995,6 +992,7 @@ return array( 'MultipleAnswerCombinationTrueFalse' => $baseDir . '/main/exercice/multiple_answer_combination_true_false.class.php', 'MultipleAnswerTrueFalse' => $baseDir . '/main/exercice/multiple_answer_true_false.class.php', 'MySQLIDatabase' => $baseDir . '/main/inc/lib/database.mysqli.lib.php', + 'MySpace' => $baseDir . '/main/inc/lib/myspace.lib.php', 'Nanogong' => $baseDir . '/main/inc/lib/nanogong.lib.php', 'Net_SCP' => $baseDir . '/main/inc/lib/phpseclib/Net/SCP.php', 'Net_SFTP' => $baseDir . '/main/inc/lib/phpseclib/Net/SFTP.php', @@ -1206,11 +1204,8 @@ return array( 'SystemManagementPage' => $baseDir . '/main/admin/system_management.php', 'System\\Session' => $baseDir . '/main/inc/lib/system/session.class.php', 'TCPDF_Adapter' => $baseDir . '/main/inc/lib/phpdocx/pdf/include/tcpdf_adapter.cls.php', - 'TTF' => $vendorDir . '/ros/ezpdf/src/include/TTF.php', - 'TTFchar' => $vendorDir . '/ros/ezpdf/src/include/TTFsubset.php', 'TTFontFile' => $vendorDir . '/mpdf/mpdf/classes/ttfontsuni.php', 'TTFontFile_Analysis' => $vendorDir . '/mpdf/mpdf/classes/ttfontsuni_analysis.php', - 'TTFsubset' => $vendorDir . '/ros/ezpdf/src/include/TTFsubset.php', 'TableSort' => $baseDir . '/main/inc/lib/table_sort.class.php', 'Table_Cell_Frame_Decorator' => $baseDir . '/main/inc/lib/phpdocx/pdf/include/table_cell_frame_decorator.cls.php', 'Table_Cell_Frame_Reflower' => $baseDir . '/main/inc/lib/phpdocx/pdf/include/table_cell_frame_reflower.cls.php', diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 0e311366dc..9e5db0bba9 100755 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit1f73abd4e680c1cbca5154be248fc1ac +class ComposerAutoloaderInitb90538abc535a9b1749268777844c9b2 { private static $loader; @@ -19,9 +19,9 @@ class ComposerAutoloaderInit1f73abd4e680c1cbca5154be248fc1ac return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit1f73abd4e680c1cbca5154be248fc1ac', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInitb90538abc535a9b1749268777844c9b2', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInit1f73abd4e680c1cbca5154be248fc1ac', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInitb90538abc535a9b1749268777844c9b2', 'loadClassLoader')); $map = require __DIR__ . '/autoload_namespaces.php'; foreach ($map as $namespace => $path) { @@ -42,14 +42,14 @@ class ComposerAutoloaderInit1f73abd4e680c1cbca5154be248fc1ac $includeFiles = require __DIR__ . '/autoload_files.php'; foreach ($includeFiles as $file) { - composerRequire1f73abd4e680c1cbca5154be248fc1ac($file); + composerRequireb90538abc535a9b1749268777844c9b2($file); } return $loader; } } -function composerRequire1f73abd4e680c1cbca5154be248fc1ac($file) +function composerRequireb90538abc535a9b1749268777844c9b2($file) { require $file; } diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 7f685d6e0c..98ab9a51eb 100755 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -1242,34 +1242,5 @@ "php", "utf-8" ] - }, - { - "name": "ros/ezpdf", - "version": "0.12.0-RC17", - "version_normalized": "0.12.0.0-RC17", - "source": { - "type": "git", - "url": "https://github.com/didaxRedux/php-ezPDF.git", - "reference": "62e09bc84985e848645c6ae359cc8be4275cfd32" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/didaxRedux/php-ezPDF/zipball/62e09bc84985e848645c6ae359cc8be4275cfd32", - "reference": "62e09bc84985e848645c6ae359cc8be4275cfd32", - "shasum": "" - }, - "time": "2014-09-30 15:15:44", - "type": "library", - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Porting of the well-known R&OS PDF class." } ]