Skip to content

Commit

Permalink
PHPCS
Browse files Browse the repository at this point in the history
  • Loading branch information
driusan committed Oct 2, 2023
1 parent 1b7f75c commit ccc7541
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
4 changes: 3 additions & 1 deletion modules/publication/ajax/getData.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ function getProjectData($db, $user, $id) : array
$datePublication = htmlspecialchars_decode($result['datePublication'] ?? '');
$journal = htmlspecialchars_decode($result['journal'] ?? '');
$link = htmlspecialchars_decode($result['link'] ?? '');
$publishingStatus = htmlspecialchars_decode($result['publishingStatus'] ?? '');
$publishingStatus = htmlspecialchars_decode(
$result['publishingStatus'] ?? ''
);
$rejectedReason = htmlspecialchars_decode($result['RejectedReason'] ?? '');

$pubData = [
Expand Down
8 changes: 5 additions & 3 deletions modules/publication/php/files.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
namespace LORIS\publication;

/**
* Handles managing files through the /files/* endpoint of the publication
* Handles managing files through the /files/* endpoint of the publication
* module.
*
* @license http://www.gnu.org/licenses/gpl-3.0.txt GPLv3
Expand All @@ -18,11 +18,13 @@ class Files extends \LORIS\Http\FilesPassthroughEndpoint
*/
function _hasAccess(\User $user): bool
{
return $user->hasAnyPermission([
return $user->hasAnyPermission(
[
'publication_view',
'publication_propose',
'publication_approve',
]);
]
);
}

/**
Expand Down
7 changes: 0 additions & 7 deletions src/Http/FilesPassthroughEndpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,6 @@ public function handle(ServerRequestInterface $request) : ResponseInterface
}
}

/**
* Check if a User has access to the endpoint hierarchy.
*
* @return bool
*/
abstract public function _hasAccess(\User $user) : bool;

/**
* Return the download directory on the server's filesystem which the
* files are stored relative to. This is generally a configuration
Expand Down

0 comments on commit ccc7541

Please sign in to comment.