diff --git a/public/main/admin/user_information.php b/public/main/admin/user_information.php index 16a2cfb86e..94f673aebf 100644 --- a/public/main/admin/user_information.php +++ b/public/main/admin/user_information.php @@ -135,7 +135,6 @@ if (!empty($studentBossList)) { $studentBossListToString = $table->toHtml(); } - $table = new HTML_Table(['class' => 'data_table']); $table->setHeaderContents(0, 0, get_lang('Information')); $csvContent[] = [get_lang('Information')]; diff --git a/public/main/exercise/exercise.php b/public/main/exercise/exercise.php index 0f08029591..9e20ac3b74 100644 --- a/public/main/exercise/exercise.php +++ b/public/main/exercise/exercise.php @@ -250,7 +250,14 @@ if ($is_allowedToEdit && !empty($action)) { $zip->finish(); exit; } else { - Display::addFlash(Display::return_message(get_lang('There was an error writing the XML file. Please ask the administrator to check the error logs.'), 'error')); + Display::addFlash( + Display::return_message( + get_lang( + 'There was an error writing the XML file. Please ask the administrator to check the error logs.' + ), + 'error' + ) + ); header('Location: '.$currentUrl); exit; } @@ -432,7 +439,6 @@ if (false === api_get_configuration_value('allow_exercise_categories')) { } $down = Display::url($downIcon, $modifyUrl.'&action=down_category&category_id_edit='.$categoryIdItem); $counter++; - if ($total === $counter) { $down = Display::url(Display::return_icon('down_na.png'), '#'); } diff --git a/public/main/inc/lib/course_category.lib.php b/public/main/inc/lib/course_category.lib.php index 0841eb5d97..9186435eb6 100644 --- a/public/main/inc/lib/course_category.lib.php +++ b/public/main/inc/lib/course_category.lib.php @@ -941,7 +941,9 @@ class CourseCategory /** * Save image for a course category. + * * @deprecated + * * @param int $categoryId Course category ID * @param array $fileData File data from $_FILES */ diff --git a/public/main/inc/lib/extra_field.lib.php b/public/main/inc/lib/extra_field.lib.php index f000fcfb07..ed80f28579 100644 --- a/public/main/inc/lib/extra_field.lib.php +++ b/public/main/inc/lib/extra_field.lib.php @@ -3117,7 +3117,7 @@ JAVASCRIPT; return $result; } - public static function getExtraFieldTypesWithFiles() : array + public static function getExtraFieldTypesWithFiles(): array { return [self::FIELD_TYPE_FILE_IMAGE, self::FIELD_TYPE_FILE]; } diff --git a/public/main/inc/lib/social.lib.php b/public/main/inc/lib/social.lib.php index 3f666ab412..1dd8e127a1 100644 --- a/public/main/inc/lib/social.lib.php +++ b/public/main/inc/lib/social.lib.php @@ -1358,8 +1358,6 @@ class SocialManager extends UserManager */ public static function display_productions($user_id) { - return; - /*$webdir_array = UserManager::get_user_picture_path_by_id($user_id, 'web'); $sysdir = UserManager::getUserPathById($user_id, 'system'); $webdir = UserManager::getUserPathById($user_id, 'web'); diff --git a/public/main/inc/lib/usergroup.lib.php b/public/main/inc/lib/usergroup.lib.php index 80d115d698..89a4106688 100644 --- a/public/main/inc/lib/usergroup.lib.php +++ b/public/main/inc/lib/usergroup.lib.php @@ -2,8 +2,8 @@ /* For licensing terms, see /license.txt */ -use Chamilo\CoreBundle\Framework\Container; use Chamilo\CoreBundle\Entity\Usergroup as UserGroupEntity; +use Chamilo\CoreBundle\Framework\Container; /** * Class UserGroup. @@ -1601,9 +1601,9 @@ class UserGroup extends Model } /** - * @param UserGroupEntity $groupId - * @param string $picture - * @param string $cropParameters + * @param UserGroupEntity $groupId + * @param string $picture + * @param string $cropParameters * * @return bool */ @@ -1612,6 +1612,7 @@ class UserGroup extends Model if ($userGroup) { $illustrationRepo = Container::getIllustrationRepository(); $illustrationRepo->addIllustration($userGroup, api_get_user_entity(), $picture, $cropParameters); + return true; } diff --git a/public/main/inc/lib/usermanager.lib.php b/public/main/inc/lib/usermanager.lib.php index 132eb6c03b..c6692d1dd8 100644 --- a/public/main/inc/lib/usermanager.lib.php +++ b/public/main/inc/lib/usermanager.lib.php @@ -1823,6 +1823,7 @@ class UserManager * USER_IMAGE_SIZE_MEDIUM, USER_IMAGE_SIZE_BIG or USER_IMAGE_SIZE_ORIGINAL * @param bool $addRandomId * @param array $userInfo to avoid query the DB + * * @todo add gravatar support * @todo replace $userId with User entity * @@ -1973,7 +1974,6 @@ class UserManager $repoIllustration = Container::getIllustrationRepository(); $repoIllustration->addIllustration($user, $user, $file, $crop); } - } /**