Skip to content

Commit

Permalink
Merge pull request #10 from BioKIC/master
Browse files Browse the repository at this point in the history
new request
  • Loading branch information
mandrewj authored May 6, 2021
2 parents dc7d9a5 + bb4a4f3 commit 7647b58
Show file tree
Hide file tree
Showing 95 changed files with 2,806 additions and 2,862 deletions.
2 changes: 1 addition & 1 deletion checklists/checklist.php
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@
<?php
}
?>
<div>
<div style="clear:both">
<hr/>
</div>
<div id="checklist-container">
Expand Down
11 changes: 9 additions & 2 deletions classes/ChecklistManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -612,9 +612,9 @@ public function addNewSpecies($postArr){
}

//Checklist index page fucntions
public function getChecklists(){
public function getChecklists($limitToKey=false){
$retArr = Array();
$sql = 'SELECT p.pid, p.projname, p.ispublic, c.clid, c.name, c.access '.
$sql = 'SELECT p.pid, p.projname, p.ispublic, c.clid, c.name, c.access, c.defaultSettings '.
'FROM fmchecklists c LEFT JOIN fmchklstprojlink cpl ON c.clid = cpl.clid '.
'LEFT JOIN fmprojects p ON cpl.pid = p.pid '.
'WHERE ((c.access LIKE "public%") ';
Expand All @@ -627,6 +627,9 @@ public function getChecklists(){
//echo $sql;
$rs = $this->conn->query($sql);
while($row = $rs->fetch_object()){
if($limitToKey){
if($row->defaultSettings && strpos($row->defaultSettings,'"activatekey":0')) continue;
}
if($row->pid){
$pid = $row->pid;
$projName = $row->projname.(!$row->ispublic?' (Private)':'');
Expand Down Expand Up @@ -790,6 +793,10 @@ public function getClName(){
}

public function setProj($pid){
$this->setPid($pid);
}

public function setPid($pid){
if(is_numeric($pid)){
$sql = 'SELECT pid, projname FROM fmprojects WHERE (pid = '.$pid.')';
if($rs = $this->conn->query($sql)){
Expand Down
4 changes: 2 additions & 2 deletions classes/DwcArchiverCore.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function __construct($conType='readonly'){
$this->charSetOut = $this->charSetSource;

$this->condAllowArr = array('catalognumber','othercatalognumbers','occurrenceid','family','sciname','country','stateprovince','county','municipality',
'recordedby','recordnumber','eventdate','decimallatitude','decimallongitude','minimumelevationinmeters','maximumelevationinmeters',
'recordedby','recordnumber','eventdate','decimallatitude','decimallongitude','minimumelevationinmeters','maximumelevationinmeters','cultivationstatus',
'datelastmodified','dateentered','processingstatus','dbpk');

$this->securityArr = array('eventDate','month','day','startDayOfYear','endDayOfYear','verbatimEventDate',
Expand Down Expand Up @@ -284,7 +284,7 @@ private function applyConditions(){
$taxaManager->setTaxonRequestVariable($taxaArr);
$sqlFrag .= $taxaManager->getTaxonWhereFrag();
}
elseif($field == 'cultivationStatus'){
elseif($field == 'cultivationstatus'){
if(current(current($condArr)) === '0') $sqlFrag .= 'AND (o.cultivationStatus = 0 OR o.cultivationStatus IS NULL) ';
else $sqlFrag .= 'AND (o.cultivationStatus = 1) ';
}
Expand Down
Loading

0 comments on commit 7647b58

Please sign in to comment.