diff --git a/main/admin/skill_level.php b/main/admin/skill_level.php index 326803c833..6b322ff16f 100644 --- a/main/admin/skill_level.php +++ b/main/admin/skill_level.php @@ -59,7 +59,7 @@ if (!empty($item)) { ]); } elseif (!empty($profileId)) { $form->setDefaults([ - 'profile_id' => $profileId + 'profile_id' => $profileId, ]); } diff --git a/main/auth/cas/cas_var.inc.php b/main/auth/cas/cas_var.inc.php index dc01f83b25..c25054c5b6 100755 --- a/main/auth/cas/cas_var.inc.php +++ b/main/auth/cas/cas_var.inc.php @@ -49,7 +49,7 @@ if (api_is_cas_activated()) { } } - phpCAS::client($version, $hostname, $port, $uri, $serviceBaseUrl); + phpCAS::client($version, $hostname, $port, $uri, $serviceBaseUrl); if (is_array($cas) && array_key_exists('noCasServerValidation', $cas) && $cas['noCasServerValidation']) { phpCAS::setNoCasServerValidation(); diff --git a/main/cron/import_csv.php b/main/cron/import_csv.php index dd87872ee8..1b2f13e48a 100755 --- a/main/cron/import_csv.php +++ b/main/cron/import_csv.php @@ -3606,8 +3606,9 @@ class ImportCsv fwrite($f, '";'); }*/ } + /** - * Get custom tpl for mail welcome + * Get custom tpl for mail welcome. */ private function getCustomMailTemplate(): string { @@ -3626,6 +3627,7 @@ class ImportCsv // If none has been found, it means we don't have a custom mail // welcome message, so use the .dist version $alternateName = 'mail/custom_calendar_welcome.dist.tpl'; + return 'default/'.$alternateName; } } diff --git a/main/inc/lib/document.lib.php b/main/inc/lib/document.lib.php index a62fb58f7b..c8aeb09da0 100644 --- a/main/inc/lib/document.lib.php +++ b/main/inc/lib/document.lib.php @@ -7015,6 +7015,25 @@ class DocumentManager } } + /** + * It gest extra value to define if download icon is visible or not. + * + * @param $documentId + * + * @return bool + */ + public static function getHideDownloadIcon($documentId) + { + $extraFieldValue = new ExtraFieldValue('document'); + $extraValue = $extraFieldValue->get_values_by_handler_and_field_variable($documentId, 'can_be_downloaded'); + $canBeDownloadedIcon = false; + if (!empty($extraValue) && isset($extraValue['value'])) { + $canBeDownloadedIcon = (bool) $extraValue['value']; + } + + return $canBeDownloadedIcon; + } + /** * Parse file information into a link. * @@ -7471,23 +7490,4 @@ class DocumentManager return $btn; } - - /** - * It gest extra value to define if download icon is visible or not. - * - * @param $documentId - * - * @return bool - */ - public static function getHideDownloadIcon($documentId) - { - $extraFieldValue = new ExtraFieldValue('document'); - $extraValue = $extraFieldValue->get_values_by_handler_and_field_variable($documentId, 'can_be_downloaded'); - $canBeDownloadedIcon = false; - if (!empty($extraValue) && isset($extraValue['value'])) { - $canBeDownloadedIcon = (bool) $extraValue['value']; - } - - return $canBeDownloadedIcon; - } } diff --git a/main/inc/lib/extra_field.lib.php b/main/inc/lib/extra_field.lib.php index 8f924509f0..46facd3b8d 100755 --- a/main/inc/lib/extra_field.lib.php +++ b/main/inc/lib/extra_field.lib.php @@ -207,7 +207,7 @@ class ExtraField extends Model 'lp_view', 'course_announcement', 'message', - 'document' + 'document', ]; if (api_get_configuration_value('allow_scheduled_announcements')) { diff --git a/src/Chamilo/CoreBundle/Entity/Portfolio.php b/src/Chamilo/CoreBundle/Entity/Portfolio.php index 98c589af7c..217a15f480 100644 --- a/src/Chamilo/CoreBundle/Entity/Portfolio.php +++ b/src/Chamilo/CoreBundle/Entity/Portfolio.php @@ -24,7 +24,7 @@ use Doctrine\ORM\Mapping as ORM; * } * ) * Add @ to the next line if api_get_configuration_value('allow_portfolio_tool') is true - * ORM\Entity(repositoryClass="Chamilo\CoreBundle\Entity\Repository\PortfolioRepository") + * @ORM\Entity(repositoryClass="Chamilo\CoreBundle\Entity\Repository\PortfolioRepository") */ class Portfolio { diff --git a/src/Chamilo/CoreBundle/Entity/PortfolioAttachment.php b/src/Chamilo/CoreBundle/Entity/PortfolioAttachment.php index 2e9b630284..6c1c4712a3 100644 --- a/src/Chamilo/CoreBundle/Entity/PortfolioAttachment.php +++ b/src/Chamilo/CoreBundle/Entity/PortfolioAttachment.php @@ -13,7 +13,7 @@ use Doctrine\ORM\Mapping as ORM; * * @ORM\Table(name="portfolio_attachment") * Add @ to the next line if api_get_configuration_value('allow_portfolio_tool') is true - * ORM\Entity(repositoryClass="Chamilo\CoreBundle\Entity\Repository\PortfolioAttachmentRepository") + * @ORM\Entity(repositoryClass="Chamilo\CoreBundle\Entity\Repository\PortfolioAttachmentRepository") */ class PortfolioAttachment { diff --git a/src/Chamilo/CoreBundle/Entity/PortfolioCategory.php b/src/Chamilo/CoreBundle/Entity/PortfolioCategory.php index de629ed891..192d171cab 100644 --- a/src/Chamilo/CoreBundle/Entity/PortfolioCategory.php +++ b/src/Chamilo/CoreBundle/Entity/PortfolioCategory.php @@ -20,7 +20,7 @@ use Doctrine\ORM\Mapping as ORM; * } * ) * Add @ to the next line if api_get_configuration_value('allow_portfolio_tool') is true - * ORM\Entity() + * @ORM\Entity() */ class PortfolioCategory { diff --git a/src/Chamilo/CoreBundle/Entity/PortfolioComment.php b/src/Chamilo/CoreBundle/Entity/PortfolioComment.php index 331284dfe8..601027b9a7 100644 --- a/src/Chamilo/CoreBundle/Entity/PortfolioComment.php +++ b/src/Chamilo/CoreBundle/Entity/PortfolioComment.php @@ -18,7 +18,7 @@ use Gedmo\Mapping\Annotation as Gedmo; * @Gedmo\Tree(type="nested") * @ORM\Table(name="portfolio_comment") * Add @ to the next line if api_get_configuration_value('allow_portfolio_tool') is true - * ORM\Entity(repositoryClass="Chamilo\CoreBundle\Entity\Repository\PortfolioCommentRepository") + * @ORM\Entity(repositoryClass="Chamilo\CoreBundle\Entity\Repository\PortfolioCommentRepository") */ class PortfolioComment { diff --git a/src/Chamilo/CoreBundle/Entity/PortfolioRelTag.php b/src/Chamilo/CoreBundle/Entity/PortfolioRelTag.php index 0b0d59584b..fe90c9f358 100644 --- a/src/Chamilo/CoreBundle/Entity/PortfolioRelTag.php +++ b/src/Chamilo/CoreBundle/Entity/PortfolioRelTag.php @@ -8,7 +8,7 @@ use Doctrine\ORM\Mapping as ORM; /** * @ORM\Table(name="portfolio_rel_tag") - * ORM\Entity() + * @ORM\Entity() */ class PortfolioRelTag {