Skip to content

Commit

Permalink
Merge branch 'devel' into 'master'.
Browse files Browse the repository at this point in the history
# Conflicts:
#	composer.json
#	composer.lock
#	composer.phar
  • Loading branch information
aarpon committed Apr 8, 2022
2 parents 042100a + 58d737e commit 112ebff
Show file tree
Hide file tree
Showing 121 changed files with 3,580 additions and 2,434 deletions.
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@ css/custom.css
# file marking a development version
.hrm_devel_version

# Composer's vendor folder
# Composer's vendor folder
/vendor/

# macOS finder files
# macOS finder files
*.DS_Store
*.phpunit.result.cache

# symlink to the HRM-OMERO connector
bin/ome_hrm.py
4 changes: 1 addition & 3 deletions add_user.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
// Settings
global $hrm_url, $image_folder, $image_host, $email_sender, $userManagerScript;

require_once dirname(__FILE__) . '/inc/bootstrap.php';

session_start();

if (!isset($_SESSION['user']) || !$_SESSION['user']->isLoggedIn()) {
Expand Down Expand Up @@ -89,7 +87,7 @@
} else if ($clean["email"] == "") {
$message = "Please provide a valid email address!";
} else if ($clean['group'] == "") {
$message = "Please a group!";
$message = "Please provide a group!";
} else {

// Make sure that there is no user with same name
Expand Down
16 changes: 15 additions & 1 deletion ajax/json-rpc-server.php
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ function jsonSendTestEmail()
global $email_admin;

// Include configuration file
include(dirname(__FILE__) . "/../config/hrm_client_config.inc");
include(dirname(__FILE__) . "/../config/hrm_config.inc");

// Prepare the output array
$json = initJSONArray();
Expand Down Expand Up @@ -1069,6 +1069,20 @@ function jsonRemoveFilesFromSelection($fileList)

function processFilesAndSelectedFilesLists($allFiles, $selectedFiles, $fileServer, $format)
{
// Sanity checks
if ($allFiles === null) {
$allFiles = [];
}
if ($selectedFiles === null) {
$selectedFiles = [];
}
if (gettype($allFiles) == "string") {
$allFiles = [$allFiles];
}
if (gettype($selectedFiles) == "string") {
$selectedFiles = [$selectedFiles];
}

// Are the selected files compatible with the current format?
if (count($selectedFiles) > 0 && !$fileServer->checkAgainstFormat($selectedFiles[0], $format)) {
$fileServer->removeAllFilesFromSelection();
Expand Down
99 changes: 0 additions & 99 deletions bin/hrm_config.py

This file was deleted.

Loading

0 comments on commit 112ebff

Please sign in to comment.