Browse Source

Minor - flint fixes

Julio Montoya 5 years ago
parent
commit
8564eee86c

+ 0 - 1
main/inc/lib/api.lib.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;
         }

+ 0 - 1
main/inc/lib/display.lib.php

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

+ 1 - 1
main/inc/lib/sessionmanager.lib.php

@@ -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)

+ 0 - 1
plugin/buycourses/src/buy_course_plugin.class.php

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

+ 0 - 1
plugin/buycourses/src/buycourses.ajax.php

@@ -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> ";

+ 1 - 1
plugin/buycourses/src/configure_course.php

@@ -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();

+ 0 - 1
plugin/buycourses/src/list.php

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

+ 0 - 3
plugin/buycourses/src/list_service.php

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

+ 0 - 1
plugin/buycourses/src/list_session.php

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

+ 13 - 4
src/Chamilo/CoreBundle/Component/Utils/ChamiloApi.php

@@ -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;
     }