diff --git a/CHANGELOG b/CHANGELOG index 43ebd86f4..4b3d20b42 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +-------------------------------------------------------------------------------- + Changes in version 6.0.31 +-------------------------------------------------------------------------------- +- merge changes up to 5.1.38 + -------------------------------------------------------------------------------- Changes in version 6.0.30 -------------------------------------------------------------------------------- @@ -302,6 +307,11 @@ - add document list which can be exported as an archive - search results can be exported +-------------------------------------------------------------------------------- + Changes in version 5.1.38 +-------------------------------------------------------------------------------- +- require php 8.2 + -------------------------------------------------------------------------------- Changes in version 5.1.37 -------------------------------------------------------------------------------- diff --git a/composer-dist.json b/composer-dist.json index 45d43ae3f..400cc5b6f 100644 --- a/composer-dist.json +++ b/composer-dist.json @@ -1,7 +1,7 @@ { "config": { "platform": { - "php": "7.4" + "php": "8.2" } }, "require": { diff --git a/inc/inc.ClassDownloadMgr.php b/inc/inc.ClassDownloadMgr.php index 5bf28edb2..b77d1aac8 100644 --- a/inc/inc.ClassDownloadMgr.php +++ b/inc/inc.ClassDownloadMgr.php @@ -129,7 +129,7 @@ class SeedDMS_Download_Mgr { public function createToc($file) { /* {{{ */ $objPHPExcel = new PhpOffice\PhpSpreadsheet\Spreadsheet(); - //$objPHPExcel->setValueBinder(new \PhpOffice\PhpSpreadsheet\Cell\AdvancedValueBinder()); + $objPHPExcel->setValueBinder(new \PhpOffice\PhpSpreadsheet\Cell\AdvancedValueBinder()); $objPHPExcel->getProperties()->setCreator("SeedDMS")->setTitle("Metadata"); if($items = $this->items) { $sheet = $objPHPExcel->setActiveSheetIndex(0); @@ -138,9 +138,9 @@ class SeedDMS_Download_Mgr { $i = 1; $col = 1; foreach($this->header as $h) - $sheet->setCellValueByColumnAndRow($col++, $i, $h); + $sheet->setCellValue([$col++, $i], $h); foreach($this->extraheader as $h) - $sheet->setCellValueByColumnAndRow($col++, $i, $h); + $sheet->setCellValue([$col++, $i], $h); $i++; foreach($items as $item) { if($item->isType('documentcontent')) { @@ -151,11 +151,11 @@ class SeedDMS_Download_Mgr { $approvalStatus = $item->getApprovalStatus(); $col = 1; - $sheet->setCellValueByColumnAndRow($col++, $i, $document->getID()); - $sheet->setCellValueByColumnAndRow($col++, $i, $document->getName()); - $sheet->setCellValueByColumnAndRow($col++, $i, $document->getID()."-".$item->getOriginalFileName()); - $sheet->setCellValueByColumnAndRow($col++, $i, getOverallStatusText($status['status'])); - $sheet->setCellValueByColumnAndRow($col++, $i, $item->getVersion()); + $sheet->setCellValue([$col++, $i], $document->getID()); + $sheet->setCellValue([$col++, $i], $document->getName()); + $sheet->setCellValue([$col++, $i], $document->getID()."-".$item->getOriginalFileName()); + $sheet->setCellValue([$col++, $i], getOverallStatusText($status['status'])); + $sheet->setCellValue([$col++, $i], $item->getVersion()); $l = $i; $k = $i; if($reviewStatus) { @@ -179,11 +179,11 @@ class SeedDMS_Download_Mgr { break; } $tcol = $col; - $sheet->setCellValueByColumnAndRow($tcol++, $l, $reqName); - $sheet->setCellValueByColumnAndRow($tcol, $l, ($r['status']==1 || $r['status']==-1) ? \PhpOffice\PhpSpreadsheet\Shared\Date::PHPToExcel(new DateTime($r['date'])) : null); + $sheet->setCellValue([$tcol++, $l], $reqName); + $sheet->setCellValue([$tcol, $l], ($r['status']==1 || $r['status']==-1) ? \PhpOffice\PhpSpreadsheet\Shared\Date::PHPToExcel(new DateTime($r['date'])) : null); $sheet->getStyleByColumnAndRow($tcol++, $l)->getNumberFormat()->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_DATE_DATETIME); - $sheet->setCellValueByColumnAndRow($tcol++, $l, $r['comment']); - $sheet->setCellValueByColumnAndRow($tcol++, $l, getReviewStatusText($r["status"])); + $sheet->setCellValue([$tcol++, $l], $r['comment']); + $sheet->setCellValue([$tcol++, $l], getReviewStatusText($r["status"])); $l++; } $l--; @@ -210,11 +210,11 @@ class SeedDMS_Download_Mgr { break; } $tcol = $col; - $sheet->setCellValueByColumnAndRow($tcol++, $k, $reqName); - $sheet->setCellValueByColumnAndRow($tcol, $k, ($r['status']==1 || $r['status']==-1) ? \PhpOffice\PhpSpreadsheet\Shared\Date::PHPToExcel(new DateTime($r['date'])) : null); + $sheet->setCellValue([$tcol++, $k], $reqName); + $sheet->setCellValue([$tcol, $k], ($r['status']==1 || $r['status']==-1) ? \PhpOffice\PhpSpreadsheet\Shared\Date::PHPToExcel(new DateTime($r['date'])) : null); $sheet->getStyleByColumnAndRow($tcol++, $k)->getNumberFormat()->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_DATE_DATETIME); - $sheet->setCellValueByColumnAndRow($tcol++, $k, $r['comment']); - $sheet->setCellValueByColumnAndRow($tcol++, $k, getApprovalStatusText($r["status"])); + $sheet->setCellValue([$tcol++, $k], $r['comment']); + $sheet->setCellValue([$tcol++, $k], getApprovalStatusText($r["status"])); $k++; } $k--; @@ -222,7 +222,7 @@ class SeedDMS_Download_Mgr { $col += 4; if(isset($this->extracols[$item->getID()]) && $this->extracols[$item->getID()]) { foreach($this->extracols[$item->getID()] as $column) - $sheet->setCellValueByColumnAndRow($col++, $i, is_array($column) ? implode("\n", $column) : $column ); + $sheet->setCellValue([$col++, $i], is_array($column) ? implode("\n", $column) : $column ); } $i = max($l, $k); $i++; @@ -240,9 +240,9 @@ class SeedDMS_Download_Mgr { $i = 1; $col = 1; foreach($this->folder_header as $h) - $sheet->setCellValueByColumnAndRow($col++, $i, $h); + $sheet->setCellValue([$col++, $i], $h); foreach($this->folder_extraheader as $h) - $sheet->setCellValueByColumnAndRow($col++, $i, $h); + $sheet->setCellValue([$col++, $i], $h); $i++; $items = $this->folder_items; foreach($items as $item) { @@ -251,11 +251,11 @@ class SeedDMS_Download_Mgr { $dms = $folder->_dms; $col = 1; - $sheet->setCellValueByColumnAndRow($col++, $i, $folder->getID()); - $sheet->setCellValueByColumnAndRow($col++, $i, $folder->getName()); + $sheet->setCellValue([$col++, $i], $folder->getID()); + $sheet->setCellValue([$col++, $i], $folder->getName()); if(isset($this->folder_extracols[$item->getID()]) && $this->folder_extracols[$item->getID()]) { foreach($this->folder_extracols[$item->getID()] as $column) - $sheet->setCellValueByColumnAndRow($col++, $i, is_array($column) ? implode("\n", $column) : $column ); + $sheet->setCellValue([$col++, $i], is_array($column) ? implode("\n", $column) : $column ); } $i++; } diff --git a/restapi/index.php b/restapi/index.php index 4827f5141..6c92840f8 100644 --- a/restapi/index.php +++ b/restapi/index.php @@ -3034,7 +3034,7 @@ final class SeedDMS_TestController { /* {{{ */ $logger = $this->container->get('logger'); $v = new SeedDMS_Version(); - return $this->renderer->json($response, ['success'=>true, 'message'=>'This is '.$v->banner(), 'data'=>['major'=>$v->majorVersion(), 'minor'=>$v->minorVersion(), 'subminor'=>$v->subminorVersion()]]); + return $this->renderer->json($response, ['success'=>true, 'message'=>'This is '.$v->banner(), 'data'=>['major'=>$v->majorVersion(), 'minor'=>$v->minorVersion(), 'subminor'=>$v->subminorVersion(), 'version'=>$v->majorVersion().'.'.$v->minorVersion().'.'.$v->subminorVersion()]]); } /* }}} */ } /* }}} */ diff --git a/views/bootstrap4/styles/application.js b/views/bootstrap4/styles/application.js index bbd87464a..b92184282 100644 --- a/views/bootstrap4/styles/application.js +++ b/views/bootstrap4/styles/application.js @@ -395,7 +395,8 @@ $(document).ready( function() { */ $('body').on('click', '[data-toggle="modal"]', function(ev){ /* {{{ */ ev.preventDefault(); - $($(this).data("target")+' .modal-body').load($(this).data("remote")); + if($(this).data("remote")) + $($(this).data("target")+' .modal-body').load($(this).data("remote")); /* Also set the title */ if($(this).data("modal-title")) $($(this).data("target")+' .modal-header h3').html($(this).data("modal-title")); @@ -1694,7 +1695,8 @@ $(document).ready(function() { /* {{{ */ $(document).ready(function() { /* {{{ */ $('body').on('click.modal.data-api', '[data-toggle="modal"]', function(){ - $($(this).data("target")+' .modal-body').load($(this).attr('href')); + if($(this).attr("href")) + $($(this).data("target")+' .modal-body').load($(this).attr('href')); }); }); /* }}} */