Minor - format code, fix PHP error

pull/3924/head
Julio Montoya 4 years ago
parent 5a2f2e187b
commit e6d7ef0f62
  1. 5
      public/main/admin/course_edit.php
  2. 6
      public/main/inc/lib/TicketManager.php
  3. 2
      public/main/inc/lib/usermanager.lib.php
  4. 8
      src/CoreBundle/Resources/views/Account/edit.html.twig
  5. 7
      src/CourseBundle/Entity/CDocument.php

@ -17,18 +17,17 @@ $courseCategoriesRepo = Container::getCourseCategoryRepository();
$urlId = api_get_current_access_url_id(); $urlId = api_get_current_access_url_id();
$courseId = isset($_GET['id']) ? $_GET['id'] : null; $courseId = $_GET['id'] ?? null;
if (empty($courseId)) { if (empty($courseId)) {
api_not_allowed(true); api_not_allowed(true);
} }
$courseInfo = api_get_course_info_by_id($courseId); $courseInfo = api_get_course_info_by_id($courseId);
$courseCode = $courseInfo['code'];
if (empty($courseInfo)) { if (empty($courseInfo)) {
api_not_allowed(true); api_not_allowed(true);
} }
$courseCode = $courseInfo['code'];
$tool_name = get_lang('Edit course information'); $tool_name = get_lang('Edit course information');
$interbreadcrumb[] = ['url' => 'index.php', 'name' => get_lang('Administration')]; $interbreadcrumb[] = ['url' => 'index.php', 'name' => get_lang('Administration')];

@ -2076,11 +2076,11 @@ class TicketManager
/** /**
* @return array * @return array
*/ */
public static function getStatusSimple() /*public static function getStatusSimple()
{ {
$projects = Database::getManager()->getRepository(TicketStatus::class)->findAll(); $projects = Database::getManager()->getRepository(TicketStatus::class)->findAll();
$list = []; $list = [];
/** @var TicketProject $row */ // @var TicketProject $row
foreach ($projects as $row) { foreach ($projects as $row) {
$list[] = [ $list[] = [
'id' => $row->getId(), 'id' => $row->getId(),
@ -2091,7 +2091,7 @@ class TicketManager
} }
return $list; return $list;
} }*/
/** /**
* @return int * @return int

@ -284,7 +284,7 @@ class UserManager
->setTimezone(api_get_timezone()) ->setTimezone(api_get_timezone())
; ;
if (!empty($expirationDate)) { if (null !== $expirationDate) {
$user->setExpirationDate($expirationDate); $user->setExpirationDate($expirationDate);
} }

@ -3,12 +3,12 @@
{% block content %} {% block content %}
{% autoescape false %} {% autoescape false %}
<h3>{{ user.userIdentifier }}</h3> <h3>{{ user.userIdentifier }}</h3>
<a href="{{ url('app_forgot_password_request') }}" class="btn btn-primary"> {# <a href="{{ url('app_forgot_password_request') }}" class="btn btn-primary">#}
Reset password {# Reset password#}
</a> {# </a>#}
<img class="inline-block h-16 w-16 rounded-full ring-2 ring-white" <img class="inline-block h-16 w-16 rounded-full ring-2 ring-white"
src="{{ user | illustration }}?w=80&h=80&fit=crop" src="{{ user | illustration }}?w=120&h=120&fit=crop"
alt="" alt=""
/> />

@ -80,12 +80,15 @@ use Symfony\Component\Validator\Constraints as Assert;
* "visibility"={ * "visibility"={
* "type"="integer", * "type"="integer",
* }, * },
* "c_id"={ * "cid"={
* "type"="integer", * "type"="integer",
* }, * },
* "session_id"={ * "gid"={
* "type"="integer", * "type"="integer",
* }, * },
* "sid"={
* "type"="integer",
* }
* } * }
* } * }
* }, * },

Loading…
Cancel
Save