Skip to content

Commit

Permalink
Taxon Profile adjustments
Browse files Browse the repository at this point in the history
- Adjust taxon link retrieval to direct links to target taxon
  • Loading branch information
egbot committed Oct 8, 2021
1 parent 13cd078 commit 10dfa5c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion classes/TaxonProfile.php
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ private function setLinkArr(){
if($this->linkArr === false && $this->tid){
$sql = 'SELECT DISTINCT l.tlid, l.url, l.icon, l.title, l.notes
FROM taxalinks l INNER JOIN taxaenumtree e ON l.tid = e.parenttid
WHERE (e.tid IN('.$this->tid.')) ORDER BY l.sortsequence, l.title';
WHERE (e.tid IN('.$this->tid.') OR l.tid IN('.$this->tid.')) ORDER BY l.sortsequence, l.title';
$rs = $this->conn->query($sql);
while($r = $rs->fetch_object()){
$this->linkArr[$r->tlid]['title'] = $r->title;
Expand Down
16 changes: 10 additions & 6 deletions taxa/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,11 @@
if($isEditor){
?>
<div id="editorDiv">
<a href="profile/tpeditor.php?tid=<?php echo $taxonManager->getTid(); ?>" <?php echo 'title="'.(isset($LANG['EDIT_TAXON_DATA'])?$LANG['EDIT_TAXON_DATA']:'Edit Taxon Data').'"'; ?>>
<img class="navIcon" src='../images/edit.png'/>
</a>
<?php
echo '<a href="profile/tpeditor.php?tid='.$taxonManager->getTid().'" title="'.(isset($LANG['EDIT_TAXON_DATA'])?$LANG['EDIT_TAXON_DATA']:'Edit Taxon Data').'">';
echo '<img class="navIcon" src="../images/edit.png" />';
echo '</a>';
?>
</div>
<?php
}
Expand Down Expand Up @@ -424,9 +426,11 @@
if($isEditor){
?>
<div id="editorDiv">
<a href="profile/tpeditor.php?tid=<?php echo $taxonManager->getTid(); ?>" <?php echo 'title="'.(isset($LANG['EDIT_TAXON_DATA'])?$LANG['EDIT_TAXON_DATA']:'Edit Taxon Data').'"'; ?>>
<img class="navIcon" src='../images/edit.png'/>
</a>
<?php
echo '<a href="profile/tpeditor.php?tid='.$taxonManager->getTid().'" title="'.(isset($LANG['EDIT_TAXON_DATA'])?$LANG['EDIT_TAXON_DATA']:'Edit Taxon Data').'">';
echo '<img class="navIcon" src="../images/edit.png" />';
echo '</a>';
?>
</div>
<?php
}
Expand Down

0 comments on commit 10dfa5c

Please sign in to comment.