Skip to content

Commit

Permalink
Merge pull request #12 from BioKIC/master
Browse files Browse the repository at this point in the history
Merge BioKIC/Symbiota bug fixes
  • Loading branch information
egbot authored Sep 13, 2022
2 parents abe688e + 7ddade9 commit 34c89ea
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 23 deletions.
4 changes: 2 additions & 2 deletions classes/OccurrenceChecklistManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function getChecklist($taxonAuthorityId){
$this->checklistTaxaCnt = 0;
$sqlWhere = $this->getSqlWhere();
if($sqlWhere){
$sql = "";
$sql = '';
if($taxonAuthorityId && is_numeric($taxonAuthorityId)){
$sql = 'SELECT DISTINCT ts2.family, t.sciname, t.tid '.
'FROM omoccurrences o INNER JOIN taxstatus ts1 ON o.TidInterpreted = ts1.Tid '.
Expand All @@ -37,7 +37,7 @@ public function getChecklist($taxonAuthorityId){
'FROM omoccurrences o LEFT JOIN taxa t ON o.tidinterpreted = t.tid '.
'LEFT JOIN taxstatus ts1 ON t.tid = ts1.tid '.
$this->getTableJoins($sqlWhere).
$sqlWhere.' AND (t.rankid > 140) AND (ts1.taxauthid = 1) ';
$sqlWhere.' AND ((t.rankid > 140 AND ts1.taxauthid = 1) OR t.tid IS NULL) ';
}
//echo '<div>'.$sql.'</div>';
$result = $this->conn->query($sql);
Expand Down
20 changes: 12 additions & 8 deletions collections/checklist.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,16 @@
<div style="clear:both;"><hr/></div>
<?php
$checklistArr = $checklistManager->getChecklist($taxonFilter);
echo '<div style="font-weight:bold;font-size:125%;">'.$LANG['TAXA_COUNT'].': '.$checklistManager->getChecklistTaxaCnt().'</div>';
echo '<div style="font-size:110%;margin-bottom: 10px">'.$LANG['TAXA_COUNT'].': '.$checklistManager->getChecklistTaxaCnt().'</div>';
$undFamilyArray = Array();
if(array_key_exists("undefined",$checklistArr)){
$undFamilyArray = $checklistArr["undefined"];
unset($checklistArr["undefined"]);
if(array_key_exists('undefined',$checklistArr)){
$undFamilyArray = $checklistArr['undefined'];
unset($checklistArr['undefined']);
}
ksort($checklistArr);
foreach($checklistArr as $family => $sciNameArr){
ksort($sciNameArr);
echo '<div style="margin-left:5;margin-top:5;"><h3>'.$family.'</h3></div>';
echo '<div style="margin-left:5;margin-top:5;">'.$family.'</div>';
foreach($sciNameArr as $sciName => $tid){
echo '<div style="margin-left:20;font-style:italic;">';
if($tid) echo '<a target="_blank" href="../taxa/index.php?tid='.$tid.'">';
Expand All @@ -86,9 +86,13 @@
}
}
if($undFamilyArray){
echo '<div style="margin-left:5;margin-top:5;"><h3>'.$LANG['FAMILY_NOT_DEFINED'].'</h3></div>';
foreach($undFamilyArray as $sciName){
echo '<div style="margin-left:20;font-style:italic;"><a target="_blank" href="../taxa/index.php?taxon='.$sciName.'">'.$sciName.'</a></div>';
echo '<div style="margin-left:5;margin-top:5;">'.$LANG['FAMILY_NOT_DEFINED'].'</div>';
foreach($undFamilyArray as $sciName => $tid){
echo '<div style="margin-left:20;font-style:italic;">';
if($tid) echo '<a target="_blank" href="../taxa/index.php?tid='.$tid.'">';
echo $sciName;
if($tid) echo '</a>';
echo '</div>';
}
}
?>
Expand Down
24 changes: 11 additions & 13 deletions collections/map/googlemap.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ function initialize(){
foreach($legendArr as $legArr){
if(isset($legArr['t']) && strpos($sciName, $legArr['t']) === 0){
$iconColor = $legArr['c'];
echo 'cond1'."\n";
break;
}
}
Expand All @@ -153,7 +152,6 @@ function initialize(){
$legendArr[$tkTid]['t'] = $tkArr['t'];
$iconColor = $iconColors[(count($legendArr)%8)];
$legendArr[$tkTid]['c'] = $iconColor;
echo 'cond2'."\n";
break;
}
}
Expand Down Expand Up @@ -392,19 +390,24 @@ function toggleLatLongDivs(){
<div style="width:400px;float:left;">
<fieldset>
<legend>Add Point of Reference</legend>
<div style='clear:both'>
<div>
<div>
Marker Name: <input name='title' id='title' size='15' type='text' />
</div>
<div class="latlongdiv">
<div>
Latitude decimal: <input name='lat' id='lat' size='10' type='text' /> eg: 34.57
<div style="float:left;margin-right:5px">Latitude decimal: <input name='lat' id='lat' size='10' type='text' /> </div>
<div style="float:left;">eg: 34.57</div>
</div>
<div style="margin-top:5px;">
Longitude decimal: <input name='lng' id='lng' size='10' type='text' /> eg: -112.38
<div style="margin-top:5px;clear:both">
<div style="float:left;margin-right:5px">Longitude decimal: <input name='lng' id='lng' size='10' type='text' /> </div>
<div style="float:left;">eg: -112.38</div>
</div>
<div style='font-size:80%;margin-top:5px;'>
<div style='font-size:80%;margin-top:5px;clear:both'>
<a href='#' onclick='toggleLatLongDivs();'>Enter in D:M:S format</a>
</div>
</div>
<div class='latlongdiv' style='display:none;'>
<div class='latlongdiv' style='display:none;clear:both'>
<div>
Latitude:
<input name='latdeg' id='latdeg' size='2' type='text' />&deg;
Expand All @@ -429,11 +432,6 @@ function toggleLatLongDivs(){
<a href='#' onclick='toggleLatLongDivs();'>Enter in Decimal format</a>
</div>
</div>
</div>
<div>
<div>
Marker Name: <input name='title' id='title' size='20' type='text' />
</div>
<div style="margin-top:10px;">
<input type='submit' value='Add Marker' onclick='addRefPoint();' />
</div>
Expand Down

0 comments on commit 34c89ea

Please sign in to comment.