Skip to content

Commit

Permalink
Merge pull request #163 from BioKIC/Development
Browse files Browse the repository at this point in the history
Updates from BioKIC/Development
  • Loading branch information
GregoryPost authored May 16, 2024
2 parents fb050e3 + 7cc0ba5 commit 8fe2d62
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
4 changes: 2 additions & 2 deletions classes/DwcArchiverBaseManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class DwcArchiverBaseManager extends Manager{
protected $charSetSource = '';
protected $charSetOut = '';
protected $sqlBase;
protected $fileHandler;
private $fileHandler;

public function __construct($conType, $connOverride){
parent::__construct(null, $conType, $connOverride);
Expand Down Expand Up @@ -42,7 +42,7 @@ public function writeOutRecordBlock($occidArr){
$this->writeOutRecord($r);
}
$rs->free();
fclose($this->fileHandler);
if($this->fileHandler) fclose($this->fileHandler);
}
else{
$this->logOrEcho('ERROR writing out to extension file: '.$this->conn->error."\n");
Expand Down
8 changes: 5 additions & 3 deletions classes/OccurrenceEditorManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -793,9 +793,11 @@ private function setAdditionalIdentifiers(&$occurrenceArr){
foreach($occurArr['identifiers'] as $idKey => $idArr){
$idName = $idArr['name'];
$idValue = $idArr['value'];
if(array_key_exists($idValue, $otherCatNumArr)){
if(!$idName && $otherCatNumArr[$idValue]) $occurrenceArr[$occid]['identifiers'][$idKey]['name'] = $otherCatNumArr[$idValue];
unset($otherCatNumArr[$idValue]);
foreach($otherCatNumArr as $ocnValue => $ocnTag){
if($ocnValue == $idValue || $ocnValue == $idName . ' ' . $idValue){
if(!$idName && $otherCatNumArr[$idValue]) $occurrenceArr[$occid]['identifiers'][$idKey]['name'] = $otherCatNumArr[$idValue];
unset($otherCatNumArr[$ocnValue]);
}
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions collections/misc/collpermissions.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
}
else $action = "";
$collId = array_key_exists("collid",$_REQUEST) ? filter_var($_REQUEST["collid"], FILTER_SANITIZE_NUMBER_INT) : 0;
$targetUID = array_key_exists('uid', $_POST) ? filter_var($targetUID, FILTER_SANITIZE_NUMBER_INT) : 0;
$persObsCollId = array_key_exists('persobscollid', $_POST) ? filter_var($persObsCollId, FILTER_SANITIZE_NUMBER_INT) : 0;
$targetUID = array_key_exists('uid', $_POST) ? filter_var($_POST['uid'], FILTER_SANITIZE_NUMBER_INT) : 0;
$persObsCollId = array_key_exists('persobscollid', $_POST) ? filter_var($_POST['persobscollid'], FILTER_SANITIZE_NUMBER_INT) : 0;

$permManager = new PermissionsManager();

Expand Down
2 changes: 1 addition & 1 deletion config/symbbase.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
header('X-Frame-Options: DENY');
header('Cache-control: private'); // IE 6 FIX
date_default_timezone_set('America/Phoenix');
$CODE_VERSION = '3.0.28';
$CODE_VERSION = '3.0.29';

if(!isset($CLIENT_ROOT) && isset($clientRoot)) $CLIENT_ROOT = $clientRoot;
if(substr($CLIENT_ROOT,-1) == '/') $CLIENT_ROOT = substr($CLIENT_ROOT,0,strlen($CLIENT_ROOT)-1);
Expand Down
5 changes: 4 additions & 1 deletion includes/citationcollection_template.php
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
<?php echo $collData['collectionname']; ?>. Occurrence dataset (ID: <?php echo $collData['recordid'] ?>) <?php echo $collData['dwcaurl']; ?> accessed via the <?php echo ($DEFAULT_TITLE) ? $DEFAULT_TITLE : "Custom title for the portal"; ?> Portal, <?php echo $SERVER_HOST . $CLIENT_ROOT; ?>, <?php echo date('Y-m-d'); ?>).
<?php
if(!isset($collData) && isset($this->collArr)) $collData = $this->collArr;
?>
<?php echo $collData['collectionname']; ?>. Occurrence dataset (ID: <?php echo $collData['recordid'] ?>) <?php echo $collData['dwcaurl']; ?> accessed via the <?php echo ($DEFAULT_TITLE) ? $DEFAULT_TITLE : "Custom title for the portal"; ?> Portal, <?php echo $SERVER_HOST . $CLIENT_ROOT; ?>, <?php echo date('Y-m-d'); ?>).

0 comments on commit 8fe2d62

Please sign in to comment.