diff --git a/classes/OccurrenceDownload.php b/classes/OccurrenceDownload.php
index 80ebdd3089..54caebe991 100644
--- a/classes/OccurrenceDownload.php
+++ b/classes/OccurrenceDownload.php
@@ -610,13 +610,14 @@ public function getProcessingStatusList($collid = 0){
if($collid){
$sql .= 'WHERE collid = '.$collid;
}
+ $sql .= ' ORDER BY processingstatus ASC';
$rs = $this->conn->query($sql);
while($r = $rs->fetch_object()){
if($r->processingstatus) $psArr[] = $r->processingstatus;
}
$rs->free();
//Special sort
- $templateArr = array('unprocessed','unprocessed-nlp','pending duplicate','stage 1','stage 2','stage 3','pending review','reviewed');
+ $templateArr = array('unprocessed','unprocessed-nlp','stage 1','stage 2','stage 3','pending duplicate','pending review','expert required','reviewed', 'closed');
//Get all active processing statuses and then merge all extra statuses that may exists for one reason or another
return array_merge(array_intersect($templateArr,$psArr),array_diff($psArr,$templateArr));
}
diff --git a/classes/SpecProcessorManager.php b/classes/SpecProcessorManager.php
index 221d3effd4..ff2647a260 100644
--- a/classes/SpecProcessorManager.php
+++ b/classes/SpecProcessorManager.php
@@ -284,14 +284,14 @@ public function getSpecNoOcr($procStatus = ''){
public function getProcessingStatusList(){
$retArr = array();
if($this->collid){
- $sql = 'SELECT DISTINCT processingstatus FROM omoccurrences WHERE collid = '.$this->collid;
+ $sql = 'SELECT DISTINCT processingstatus FROM omoccurrences WHERE collid = '.$this->collid.' ORDER BY processingstatus ASC';
//echo $sql;
$rs = $this->conn->query($sql);
while($r = $rs->fetch_object()){
if($r->processingstatus) $retArr[] = $r->processingstatus;
}
$rs->free();
- sort($retArr);
+ //sort($retArr);
}
return $retArr;
}
diff --git a/collections/admin/specupload.php b/collections/admin/specupload.php
index e4bec8d074..87895d39e0 100644
--- a/collections/admin/specupload.php
+++ b/collections/admin/specupload.php
@@ -92,6 +92,28 @@
$duManager->setVerifyImageUrls($verifyImages);
$duManager->setProcessingStatus($processingStatus);
+//Bring in config variables
+if($duManager->getCollInfo('colltype') == 'General Observations'){
+ if(file_exists('../editor/includes/config/occurVarGenObs'.$SYMB_UID.'.php')){
+ //Specific to particular general observation collection
+ include('../editor/includes/config/occurVarGenObs'.$SYMB_UID.'.php');
+ }
+ elseif(file_exists('../editor/includes/config/occurVarGenObsDefault.php')){
+ //Specific to Default values for portal
+ include('../editor/includes/config/occurVarGenObsDefault.php');
+ }
+}
+else{
+ if($collid && file_exists('../editor/includes/config/occurVarColl'.$collid.'.php')){
+ //Specific to particular collection
+ include('../editor/includes/config/occurVarColl'.$collid.'.php');
+ }
+ elseif(file_exists('../editor/includes/config/occurVarDefault.php')){
+ //Specific to Default values for portal
+ include('../editor/includes/config/occurVarDefault.php');
+ }
+}
+
if($action == 'Automap Fields'){
$autoMap = true;
}
@@ -642,8 +664,16 @@ function pkChanged(selObj){
'Unprocessed', 'stage 1' => 'Stage 1', 'stage 2' => 'Stage 2', 'stage 3' => 'STAGE_3', 'pending review' => 'Pending Review',
- 'expert required' => 'Expert Required', 'pending review-nfn' => 'Pending Review-NfN', 'reviewed' => 'Reviewed', 'closed' => 'Closed');
+
+ // Set the list of processing statuses, from the collection editor template
+ $processingStatusArr = array();
+ if(defined('PROCESSINGSTATUS') && PROCESSINGSTATUS){
+ $processingStatusArr = PROCESSINGSTATUS;
+ }
+ else{
+ $processingStatusArr = array('unprocessed','unprocessed/NLP','stage 1','stage 2','stage 3','pending duplicate','pending review-nfn','pending review','expert required','reviewed','closed');
+ }
+
if($ulPath && ($uploadType == $DWCAUPLOAD || $uploadType == $IPTUPLOAD)){
//Data has been uploaded and it's a DWCA upload type
if($duManager->analyzeUpload()){
@@ -826,8 +856,11 @@ function pkChanged(selObj){
'.ucwords($ps).'';
+ foreach($processingStatusArr as $v){
+
+ $keyOut = strtolower($v);
+
+ echo '';
}
?>
@@ -871,8 +904,11 @@ function pkChanged(selObj){
'.ucwords($ps).'';
+ foreach($processingStatusArr as $v){
+
+ $keyOut = strtolower($v);
+
+ echo '';
}
?>
@@ -1001,8 +1037,11 @@ function pkChanged(selObj){
'.ucwords($ps).'';
+ foreach($processingStatusArr as $v){
+
+ $keyOut = strtolower($v);
+
+ echo '';
}
?>
@@ -1055,4 +1094,4 @@ function pkChanged(selObj){
include($SERVER_ROOT.'/includes/footer.php');
?>