Skip to content
Snippets Groups Projects
Commit 95866231 authored by Henri-Damien LAURENT's avatar Henri-Damien LAURENT
Browse files

dev#118342 : RT Fix First moves

parent e9073893
1 merge request!4754[RTko] dev#118342 : C3rb digital resources platform
Pipeline #24063 passed with stage
in 21 minutes and 39 seconds
......@@ -97,23 +97,26 @@ class Admin_JournalController extends ZendAfi_Controller_Action {
public function deleteAction() {
if (!$journal = $this->_loadJournal()) {
$this->_helper->notify($this->_('Journal non trouvé'));
$this->_redirectToIndex();
if (!$journal = $this->_getJournal())
return;
}
$this->view->journal = $journal;
$this->view->titre = $this->_('Suppression de l\'événement');
}
protected function _getJournal() :?Class_Journal{
if ($journal = $this->_loadJournal())
return $journal;
$this->_helper->notify($this->_('Journal non trouvé'));
$this->_redirectToIndex();
return null;
}
public function forceDeleteAction() {
if (!$journal = $this->_loadJournal()) {
$this->_helper->notify($this->_('Journal non trouvé'));
$this->_redirectToIndex();
if (!$journal = $this->_getJournal())
return;
}
$journal->delete();
$this->_helper->notify($this->_('Journal supprimé'));
......
......@@ -74,9 +74,8 @@ class Class_Cosmogramme_Integration_Record_C3rb
protected function _profileSets() : Storm_Collection {
$sets = new Storm_Collection;
$this->_profil
->withOaiSetsDo(function($set, $doctype) use ($sets) {
$sets->append(new Class_WebService_OAI_SetDoctype($set, $doctype));
});
->withOaiSetsDo(fn($set, $doctype) =>
$sets->append(new Class_WebService_OAI_SetDoctype($set, $doctype)));
return $sets;
}
......
......@@ -136,7 +136,7 @@ class Class_Journal_RequestResponse {
}
public function responseCode() : int{
public function responseCode() : int {
return $this->_response_code;
}
}
......@@ -21,10 +21,9 @@
class Class_Notice_Sso extends Class_Notice_ThirdParty {
protected
$_valid = false,
$_catalog_agency,
$_digital_resource_config;
protected bool $_valid = false;
protected string $_catalog_agency;
protected $_digital_resource_config;
public static function newFor($record) {
$base = new Class_Notice_Sso($record);
......@@ -83,8 +82,8 @@ class Class_Notice_Sso extends Class_Notice_ThirdParty {
class Class_Notice_SsoBibliondemand extends Class_Notice_Sso {
protected
$_valid = true,
protected bool $_valid = true;
protected string
$_catalog_agency = Class_Cosmogramme_Integration_Record_Bibliondemand::CATALOG_AGENCY;
public function renderUrl(Zend_View_Abstract $view) : string {
......@@ -95,8 +94,8 @@ class Class_Notice_SsoBibliondemand extends Class_Notice_Sso {
class Class_Notice_SsoC3rb extends Class_Notice_Sso {
protected
$_valid = true,
protected bool $_valid = true;
protected string
$_catalog_agency = Class_Cosmogramme_Integration_Record_C3rb::CATALOG_AGENCY;
public function renderUrl(Zend_View_Abstract $view) : string {
......@@ -108,9 +107,8 @@ class Class_Notice_SsoC3rb extends Class_Notice_Sso {
class Class_Notice_SsoOmekaSMets extends Class_Notice_Sso {
protected
$_valid = true,
$_catalog_agency = Class_Cosmogramme_Integration_Record_OmekaSMets::CATALOG_AGENCY;
protected bool $_valid = true;
protected string $_catalog_agency = Class_Cosmogramme_Integration_Record_OmekaSMets::CATALOG_AGENCY;
public function renderUrl(Zend_View_Abstract $view) : string {
return $this->_urlToSsoAction($view);
......
......@@ -27,12 +27,13 @@ class Class_Notice_Thumbnail_ProviderFactory {
Class_Notice_Thumbnail_ProviderAlbum::class => fn() => $this->_isAlbum($record),
Class_Notice_Thumbnail_ProviderSite::class => fn() => $record->isSite(),
Class_Notice_Thumbnail_ProviderThirdParty::class => fn() => $this->_isThirdParty($record),
Class_Notice_Thumbnail_ProviderRecordWithAlbum::class => fn() => $this->_isRecordWithAlbum($record),
Class_Notice_Thumbnail_ProviderCacheServer::class => fn() => true];
Class_Notice_Thumbnail_ProviderRecordWithAlbum::class => fn() => $this->_isRecordWithAlbum($record)];
foreach ($mapping as $class_name => $closure)
if ($closure())
return new $class_name($record);
return new Class_Notice_Thumbnail_ProviderCacheServer($record);
}
......
......@@ -39,7 +39,6 @@ class ZendAfi_View_Helper_DigitalResource_Dashboard_Harvest extends ZendAfi_View
if ($dashboard = $config->renderHarvestDashboardOn($this->view))
return implode($html) . $dashboard;
if ($config->isFirstHarvestAware())
$html = $this->_addFirstHarvestAware($html, $config);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment