Skip to content
Snippets Groups Projects

bootstrap

Files
116
@@ -77,8 +77,8 @@ class Admin_ProfilController extends ZendAfi_Controller_Action {
public function indexAction() {
$user = ZendAfi_Auth::getInstance()->getIdentity();
$profils = Class_Profil::getLoader()->findAllByZoneAndBib($this->id_zone,
$this->id_bib);
$profils = Class_Profil::findAllByZoneAndBib($this->id_zone,
$this->id_bib);
$profils_by_bib = array();
foreach ($profils as $profil) {
@@ -266,6 +266,23 @@ class Admin_ProfilController extends ZendAfi_Controller_Action {
}
public function promoteAction() {
if ( !$profile = Class_Profil::find($this->_getParam('id_profil'))) {
$this->_helper->notify($this->_('Une erreur c\'est produite.'));
return $this->_redirectToIndex();
}
if ($profile->isPortail()) {
$this->_helper->notify($this->_('Une erreur c\'est produite.'));
return $this->_redirectToIndex();
}
(new Class_Profil_Promoter())->promote($profile);
$this->_redirect('/opac/index/index/id_profil/' . Class_Profil::DEFAULT_PROFIL);
}
protected function updateAccueil($profil) {
$enreg = $this->_parseSaveContentString();
$enreg['use_parent_css'] = $this->_getParam('use_parent_css', $profil->getUseParentCss());