Minor - flint fixes

pull/2999/head
Julio Montoya 6 years ago
parent 75f1644d2a
commit 8564eee86c
  1. 1
      main/inc/lib/api.lib.php
  2. 1
      main/inc/lib/display.lib.php
  3. 2
      main/inc/lib/sessionmanager.lib.php
  4. 1
      plugin/buycourses/src/buy_course_plugin.class.php
  5. 1
      plugin/buycourses/src/buycourses.ajax.php
  6. 2
      plugin/buycourses/src/configure_course.php
  7. 1
      plugin/buycourses/src/list.php
  8. 3
      plugin/buycourses/src/list_service.php
  9. 1
      plugin/buycourses/src/list_session.php
  10. 17
      src/Chamilo/CoreBundle/Component/Utils/ChamiloApi.php

@ -9008,7 +9008,6 @@ function api_protect_course_group($tool, $showHeader = true)
{
$groupId = api_get_group_id();
if (!empty($groupId)) {
if (api_is_platform_admin()) {
return true;
}

@ -2476,7 +2476,6 @@ class Display
return $pagination;
}
/**
* Adds a message in the queue.
*

@ -6900,7 +6900,7 @@ SQL;
$sessionRelUserTable = Database::get_main_table(TABLE_MAIN_SESSION_USER);
$sessionId = (int) $sessionId;
$userId = (int) $userId;
$userId = (int) $userId;
// COUNT(1) actually returns the number of rows from the table (as if
// counting the results from the first column)

@ -2676,7 +2676,6 @@ class BuyCoursesPlugin extends Plugin
/**
* Filter the registered courses for show in plugin catalog.
*
*/
private function getCourses($first, $maxResults)
{

@ -512,7 +512,6 @@ switch ($action) {
}
$html .= "<li><b>{$plugin->get_lang('Total')}:</b> {$serviceSale['price']} {$serviceSale['currency']}</li> ";
//$html .= "<li><b>{$plugin->get_lang('SalePrice')}:</b> {$serviceSale['price_without_tax']} {$serviceSale['currency']}</li> ";
$orderDate = api_format_date($serviceSale['buy_date'], DATE_FORMAT_LONG);
$html .= "<li><b>{$plugin->get_lang('OrderDate')}:</b> $orderDate</li> ";

@ -31,7 +31,7 @@ if ($commissionsEnable == 'true') {
$includeSession = $plugin->get('include_sessions') === 'true';
$editingCourse = $type === BuyCoursesPlugin::PRODUCT_TYPE_COURSE;
$editingSession = $type === BuyCoursesPlugin::PRODUCT_TYPE_SESSION;
$editingSession = $type === BuyCoursesPlugin::PRODUCT_TYPE_SESSION;
$entityManager = Database::getManager();
$userRepo = UserManager::getRepository();

@ -5,7 +5,6 @@
*
* @package chamilo.plugin.buycourses
*/
use Doctrine\ORM\Tools\Pagination\Paginator;
$cidReset = true;

@ -5,9 +5,6 @@
*
* @package chamilo.plugin.buycourses
*/
use Doctrine\ORM\Tools\Pagination\Paginator;
$cidReset = true;
require_once __DIR__.'/../../../main/inc/global.inc.php';

@ -5,7 +5,6 @@
*
* @package chamilo.plugin.buycourses
*/
use Doctrine\ORM\Tools\Pagination\Paginator;
$cidReset = true;

@ -84,52 +84,61 @@ class ChamiloApi
$accessUrlId = api_get_current_access_url_id();
$themeDir = \Template::getThemeDir($theme);
$customLogoPath = $themeDir."images/header-logo-custom$accessUrlId.png";
$svgIcons = api_get_setting('icons_mode_svg');
if ($svgIcons == 'true') {
$customLogoPathSVG = substr($customLogoPath, 0, -3).'svg';
if (file_exists(api_get_path(SYS_PUBLIC_PATH)."css/$customLogoPathSVG")) {
if ($getSysPath) {
$logoPath = api_get_path(SYS_PUBLIC_PATH)."css/$customLogoPathSVG";
return $logoPath;
}
$logoPath = api_get_path(WEB_CSS_PATH).$customLogoPathSVG;
return $logoPath;
}
}
if (file_exists(api_get_path(SYS_PUBLIC_PATH)."css/$customLogoPath")) {
if ($getSysPath) {
$logoPath = api_get_path(SYS_PUBLIC_PATH)."css/$customLogoPath";
return $logoPath;
}
$logoPath = api_get_path(WEB_CSS_PATH).$customLogoPath;
return $logoPath;
}
$originalLogoPath = $themeDir."images/header-logo.png";
if ($svgIcons == 'true') {
$originalLogoPathSVG = $themeDir."images/header-logo.svg";
if (file_exists(api_get_path(SYS_CSS_PATH).$originalLogoPathSVG)) {
if ($getSysPath) {
$logoPath = api_get_path(SYS_CSS_PATH).$originalLogoPathSVG;
return $logoPath;
}
$logoPath = api_get_path(WEB_CSS_PATH).$originalLogoPathSVG;
return $logoPath;
}
}
if (file_exists(api_get_path(SYS_CSS_PATH).$originalLogoPath)) {
if ($getSysPath) {
$logoPath = api_get_path(SYS_CSS_PATH).$originalLogoPath;
return $logoPath;
}
$logoPath = api_get_path(WEB_CSS_PATH).$originalLogoPath;
return $logoPath;
}
$logoPath = '';
}
return $logoPath;
}

Loading…
Cancel
Save