Fix psalm issues

pull/3768/head
Julio Montoya 4 years ago
parent 1072a025c0
commit 139f0e7bd4
  1. 2
      public/main/inc/lib/career.lib.php
  2. 2
      public/main/inc/lib/groupmanager.lib.php
  3. 12
      public/main/inc/lib/link.lib.php

@ -567,7 +567,7 @@ class Career extends Model
'', '',
$explode[0] $explode[0]
); );
$simpleFirstConnection = 'g'.(int) $groupValueId; $simpleFirstConnection = 'g'.$groupValueId;
} else { } else {
// Course block (row_123 id) // Course block (row_123 id)
if (!empty($explode[0])) { if (!empty($explode[0])) {

@ -3025,7 +3025,7 @@ class GroupManager
// Check group document access // Check group document access
$allow = api_get_configuration_value('group_document_access'); $allow = api_get_configuration_value('group_document_access');
if ($allow) { if ($allow) {
$documentAccess = (int) $group->getDocumentAccess(); $documentAccess = $group->getDocumentAccess();
} }
// Check access for students // Check access for students

@ -155,9 +155,7 @@ class Link extends Model
$link_id && extension_loaded('xapian') $link_id && extension_loaded('xapian')
) { ) {
require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php'; require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php';
$courseCode = $course_info['code'];
$course_int_id = $_course['real_id'];
$courseCode = $_course['code'];
$specific_fields = get_specific_field_list(); $specific_fields = get_specific_field_list();
$ic_slide = new IndexableChunk(); $ic_slide = new IndexableChunk();
@ -194,7 +192,7 @@ class Link extends Model
SE_COURSE_ID => $courseCode, SE_COURSE_ID => $courseCode,
SE_TOOL_ID => TOOL_LINK, SE_TOOL_ID => TOOL_LINK,
SE_DATA => [ SE_DATA => [
'link_id' => (int) $link_id, 'link_id' => $link_id,
], ],
SE_USER => (int) api_get_user_id(), SE_USER => (int) api_get_user_id(),
]; ];
@ -211,8 +209,8 @@ class Link extends Model
$sql_cat = sprintf( $sql_cat = sprintf(
$sql_cat, $sql_cat,
$table_link_category, $table_link_category,
(int) $categoryId, $categoryId,
$course_int_id $course_id
); );
$result = Database:: query($sql_cat); $result = Database:: query($sql_cat);
if (1 == Database:: num_rows($result)) { if (1 == Database:: num_rows($result)) {
@ -243,7 +241,7 @@ class Link extends Model
$sql = sprintf( $sql = sprintf(
$sql, $sql,
$tbl_se_ref, $tbl_se_ref,
$course_int_id, $course_id,
$courseCode, $courseCode,
TOOL_LINK, TOOL_LINK,
$link_id, $link_id,

Loading…
Cancel
Save