diff --git a/checklists/index.php b/checklists/index.php
index 56288d296f..4c1bbf6595 100644
--- a/checklists/index.php
+++ b/checklists/index.php
@@ -59,11 +59,20 @@
diff --git a/classes/ChecklistManager.php b/classes/ChecklistManager.php
index 9b9a8906ab..40091d5bce 100644
--- a/classes/ChecklistManager.php
+++ b/classes/ChecklistManager.php
@@ -685,17 +685,22 @@ public function addNewSpecies($postArr){
//Checklist index page functions
public function getChecklists($limitToKey=false){
$retArr = Array();
- $sql = 'SELECT p.pid, p.projname, p.ispublic, c.clid, c.name, c.access, c.defaultSettings, COUNT(l.tid) AS sppcnt
+ $sql = 'SELECT p.pid, p.projname, p.ispublic, c.clid, c.name, c.access, c.defaultSettings, c.latCentroid
FROM fmchecklists c LEFT JOIN fmchklstprojlink cpl ON c.clid = cpl.clid
- INNER JOIN fmchklsttaxalink l ON c.clid = l.clid
LEFT JOIN fmprojects p ON cpl.pid = p.pid
- WHERE ((c.access LIKE "public%") ';
- if(isset($GLOBALS['USER_RIGHTS']['ClAdmin']) && $GLOBALS['USER_RIGHTS']['ClAdmin']) $sql .= 'OR (c.clid IN('.implode(',',$GLOBALS['USER_RIGHTS']['ClAdmin']).'))';
+ WHERE c.type != "excludespp" AND ((c.access LIKE "public%") ';
+ if(isset($GLOBALS['USER_RIGHTS']['ClAdmin']) && $GLOBALS['USER_RIGHTS']['ClAdmin']){
+ $sql .= 'OR (c.clid IN('.implode(',',$GLOBALS['USER_RIGHTS']['ClAdmin']).'))';
+ }
$sql .= ') AND ((p.pid IS NULL) OR (p.ispublic = 1) ';
- if(isset($GLOBALS['USER_RIGHTS']['ProjAdmin']) && $GLOBALS['USER_RIGHTS']['ProjAdmin']) $sql .= 'OR (p.pid IN('.implode(',',$GLOBALS['USER_RIGHTS']['ProjAdmin']).'))';
+ if(isset($GLOBALS['USER_RIGHTS']['ProjAdmin']) && $GLOBALS['USER_RIGHTS']['ProjAdmin']){
+ $sql .= 'OR (p.pid IN('.implode(',',$GLOBALS['USER_RIGHTS']['ProjAdmin']).'))';
+ }
$sql .= ') ';
if($this->pid) $sql .= 'AND (p.pid = '.$this->pid.') ';
- $sql .= 'GROUP BY p.projname, c.Name HAVING sppcnt > 10';
+ //Following line limits result to only checklists that have a linked taxon or is a parent checklist with possible inherited taxa
+ $sql .= 'AND c.clid IN(SELECT clid FROM fmchklsttaxalink UNION DISTINCT SELECT clid FROM fmchklstchildren) ';
+ $sql .= 'ORDER BY p.projname, c.name';
$rs = $this->conn->query($sql);
while($row = $rs->fetch_object()){
if($limitToKey){
@@ -709,6 +714,7 @@ public function getChecklists($limitToKey=false){
$pid = 0;
$projName = 'Miscellaneous Inventories';
}
+ if($row->latCentroid) $retArr[$pid]['displayMap'] = 1;
$retArr[$pid]['name'] = $this->cleanOutStr($projName);
$retArr[$pid]['clid'][$row->clid] = $this->cleanOutStr($row->name).($row->access=='private'?' (Private)':'');
}
diff --git a/classes/DwcArchiverPublisher.php b/classes/DwcArchiverPublisher.php
index 762c0ea6fd..1c9c40569c 100644
--- a/classes/DwcArchiverPublisher.php
+++ b/classes/DwcArchiverPublisher.php
@@ -316,22 +316,27 @@ private function aasort(&$array, $key){
}
public function humanFileSize($filePath) {
+ $x = false;
if(substr($filePath,0,4)=='http') {
- $x = array_change_key_case(get_headers($filePath, 1),CASE_LOWER);
- if( strcasecmp($x[0], 'HTTP/1.1 200 OK') != 0 ) {
- $x = $x['content-length'][1];
- }
- else {
- $x = $x['content-length'];
+ if($headerArr = @get_headers($filePath, 1)){
+ $x = array_change_key_case($headerArr, CASE_LOWER);
+ if( strcasecmp($x[0], 'HTTP/1.1 200 OK') != 0 ) {
+ $x = $x['content-length'][1];
+ }
+ else {
+ $x = $x['content-length'];
+ }
}
}
else {
$x = @filesize($filePath);
}
- $x = round($x/1000000, 1);
- if(!$x) $x = 0.1;
-
- return $x.'M ';
+ if($x !== false){
+ $x = round($x/1000000, 1);
+ if(!$x) $x = 0.1;
+ return $x.'M';
+ }
+ return '?M';
}
}
?>
\ No newline at end of file
diff --git a/config/symbbase.php b/config/symbbase.php
index 7543686243..6c786c9521 100644
--- a/config/symbbase.php
+++ b/config/symbbase.php
@@ -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.32';
+$CODE_VERSION = '3.0.33';
set_include_path(get_include_path() . PATH_SEPARATOR . $SERVER_ROOT . PATH_SEPARATOR . $SERVER_ROOT.'/config/' . PATH_SEPARATOR . $SERVER_ROOT.'/classes/');
diff --git a/ident/index.php b/ident/index.php
index 56df9cec5c..28ce259c91 100644
--- a/ident/index.php
+++ b/ident/index.php
@@ -44,7 +44,11 @@
foreach($projArr as $pidKey => $pArr){
$clArr = $pArr['clid'];
echo '';
- echo '
'.$pArr['name'].'
';
+ echo '
' . $pArr['name'];
+ if(!empty($pArr['displayMap'])){
+ echo ' ';
+ }
+ echo '
';
echo '