Commit a0b1f80b authored by Patrick Barroca's avatar Patrick Barroca 🎮

version 7.7.6

Merge remote-tracking branch 'afi/stable' into afi-hotline-master
parents 072f0ace ea576e3b
07/10/2016 - v7.7.6
- ticket #48424 : Correction des champs personnalisés d'articles CMS n'apparaissant pas en facettes du résultat de recherche
06/10/2016 - v7.7.5
- ticket #48667 : Correction des régressions des droits d'accès administrateurs selon leur rôle.
......
<?php
<?php
/**
* Copyright (c) 2012, Agence Française Informatique (AFI). All rights reserved.
......@@ -17,7 +17,7 @@
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
$basePath = realpath(dirname(__FILE__));
......@@ -28,7 +28,7 @@ if (!defined('OPAC_PATH'))
if (!defined('LANG_DIR'))
define('LANG_DIR', OPAC_PATH.'/library/translation/');
set_include_path(get_include_path()
set_include_path(get_include_path()
. PATH_SEPARATOR . OPAC_PATH . 'library'
. PATH_SEPARATOR . OPAC_PATH . 'library/storm/src');
......@@ -52,6 +52,5 @@ $cfg = loadConfig($cfg_file);
setupDatabase($cfg);
setupDevOptions($cfg);
setupHTTPClient($cfg);
setupLanguage();
?>
setupCustomFields();
<?php
/**
* Copyright (c) 2012-2014, Agence Française Informatique (AFI). All rights reserved.
*
* BOKEH is free software; you can redistribute it and/or modify
* it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
* the Free Software Foundation.
*
* There are special exceptions to the terms and conditions of the AGPL as it
* is applied to this software (see README file).
*
* BOKEH is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class ZendAfi_Controller_Plugin_CustomFields extends Zend_Controller_Plugin_Abstract {
use Trait_Translator;
public function preDispatch(Zend_Controller_Request_Abstract $request) {
Class_CustomField_Model::registerDefault();
}
}
?>
......@@ -52,6 +52,7 @@ function setupOpac() {
setupPagination();
setupRestful();
setupSearch();
setupCustomFields();
return $front_controller;
}
......@@ -65,7 +66,7 @@ function defineConstant($name, $value) {
function setupConstants() {
defineConstant('BOKEH_MAJOR_VERSION','7.7');
defineConstant('BOKEH_RELEASE_NUMBER', BOKEH_MAJOR_VERSION . '.5');
defineConstant('BOKEH_RELEASE_NUMBER', BOKEH_MAJOR_VERSION . '.6');
defineConstant('BOKEH_REMOTE_FILES', 'http://git.afi-sa.fr/afi/opacce/');
......@@ -268,7 +269,6 @@ function newFrontController() {
->registerPlugin(new ZendAfi_Controller_Plugin_System())
->registerPlugin(new ZendAfi_Controller_Plugin_Popup())
->registerPlugin(new ZendAfi_Controller_Plugin_TogetherJS())
->registerPlugin(new ZendAfi_Controller_Plugin_CustomFields())
->registerPlugin(new ZendAfi_Controller_Plugin_Lectura())
->registerPlugin(new ZendAfi_Controller_Plugin_InspectorGadget())
->registerPlugin(new ZendAfi_Controller_Plugin_CnilConsent())
......@@ -355,4 +355,9 @@ function setupRestful() {
function setupSearch() {
defineConstant('MAX_SEARCH_RESULTS', '');
Class_CriteresRecherche::setMaxSearchResults(MAX_SEARCH_RESULTS);
}
function setupCustomFields() {
Class_CustomField_Model::registerDefault();
}
\ No newline at end of file
......@@ -18,7 +18,7 @@
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
require_once 'AbstractControllerTestCase.php';
abstract class BibControllerTestCase extends AbstractControllerTestCase {
protected
......@@ -33,8 +33,6 @@ abstract class BibControllerTestCase extends AbstractControllerTestCase {
->whenCalled('open_url')
->answers($json));
Class_CustomField_Model::registerDefault();
$this->fixture('Class_CosmoVar', ['id' => 'types_docs', 'liste' => '']);
$this->bib_annecy = $this->fixture('Class_Bib',
......
<?php
<?php
/**
* Copyright (c) 2012, Agence Française Informatique (AFI). All rights reserved.
*
......
......@@ -111,10 +111,8 @@ class BibControllerIndexActionTest extends AbstractControllerTestCase {
class BibControllerIndexActionFormatJsonTest extends AbstractControllerTestCase {
protected $_storm_default_to_volatile = true, $_json;
public function setUp() {
parent::setUp();
Class_CustomField_Model::registerDefault();
$ouvertures = [Class_Ouverture::chaqueMardi('10:00', '12:00', '00:00', '00:00')];
......
......@@ -25,8 +25,6 @@ abstract class BibControllerWithZoneTestCase extends AbstractControllerTestCase
public function setUp() {
parent::setUp();
Class_CustomField_Model::registerDefault();
unset($_REQUEST['geo_zone']);
$_SESSION['selection_bib'] = ['nb_notices' => 12345, 'id_bibs' => null];
......@@ -378,7 +376,7 @@ abstract class BibControllerBibViewTestCase extends BibControllerWithZoneTestCas
$this->_mock_sql = Storm_Test_ObjectWrapper::mock();
Zend_Registry::set('sql', $this->_mock_sql);
Storm_Test_ObjectWrapper::onLoaderOfModel('Class_Exemplaire')
$this->onLoaderOfModel('Class_Exemplaire')
->whenCalled('countBy')
->with(['model' => $this->bib_annecy, 'role' => 'bib'])
->answers(20)
......@@ -978,7 +976,9 @@ class BibControllerBibViewInexistantTest extends BibControllerWithZoneTestCase {
abstract class BibControllerSelectionTestCase extends AbstractControllerTestCase {
protected $_session;
protected
$_storm_default_to_volatile = true,
$_session;
public function setUp() {
......@@ -1282,8 +1282,6 @@ abstract class BibControllerWidgetPageTestCase extends BibControllerWithThreeBib
public function setUp() {
parent::setUp();
Class_CustomField_Model::registerDefault();
$this->fixture('Class_CustomField',
['id' => 7,
'label' => 'Services',
......
......@@ -33,4 +33,5 @@ Zend_Controller_Action_HelperBroker::addHelper(new ZendAfi_Controller_Action_Hel
setupRoutes($controller, new Zend_Config([]));
$controller->getRouter()->addDefaultRoutes();
?>
\ No newline at end of file
setupCustomFields();
\ No newline at end of file
......@@ -387,8 +387,6 @@ class ArticleLoaderWithCustomFieldsTest extends ModelTestCase {
public function setUp() {
parent::setUp();
Class_CustomField_Model::registerDefault();
$this->fixture('Class_CustomField',
['id' => 5,
'priority' => 3,
......
......@@ -26,8 +26,6 @@ abstract class CalendarViewHelperTestCase extends ViewHelperTestCase {
public function setUp() {
parent::setUp();
Class_CustomField_Model::registerDefault();
Zend_Registry::get('translate')->setLocale('fr');
Class_AdminVar::newInstanceWithId('LANGUES', ['valeur' => null]);
......
......@@ -266,8 +266,6 @@ class ZendAfi_View_Helper_Accueil_LibraryCustomFieldsDisplayTest extends ZendAfi
public function setUp() {
parent::setUp();
Class_CustomField_Model::registerDefault();
$this->fixture('Class_CustomField',
['id' => 7,
'label' => 'Services',
......
Markdown is supported
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