Skip to content
Snippets Groups Projects
Commit 94ba5569 authored by efalcy's avatar efalcy
Browse files

Cosmogramme :changement de configuration serveur

parent ba97f0e6
Branches
Tags
No related merge requests found
......@@ -2132,6 +2132,7 @@ cosmogramme/sql/patch/patch_150.sql -text
cosmogramme/sql/patch/patch_151.sql -text
cosmogramme/sql/patch/patch_152.sql -text
cosmogramme/sql/patch/patch_153.sql -text
cosmogramme/storm_init.php -text
cosmogramme/tests/bootstrap.php -text
cosmogramme/tests/php/classes/IndexationTest.php -text
cosmogramme/tests/php/classes/Iso2709RecordTest.php -text
......
......@@ -8,6 +8,7 @@ define("BR","<br />");
define("COSMOPATH", "/var/www/html/vhosts/opac2/www/htdocs");
if (!function_exists('xdebug_break')) {
function xdebug_break(){};
}
......@@ -43,7 +44,7 @@ require("fonctions/string.php");
require("fonctions/erreur.php");
require("fonctions/date_heure.php");
require("fonctions/variables.php");
require_once(realpath(dirname(__FILE__)).'/../storm_init.php');
// Lire la config
$cfg=lireConfig($cfgfile);
......
<?php
/**
* Copyright (c) 2012, Agence Française Informatique (AFI). All rights reserved.
*
* AFI-OPAC 2.0 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).
*
* AFI-OPAC 2.0 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 AFI-OPAC 2.0; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
define ('OPAC_REALPATH',realpath(dirname(__FILE__)));
set_include_path(
PATH_SEPARATOR . '../../ZendFramework-1.6.2/library'
. PATH_SEPARATOR . get_include_path()
. PATH_SEPARATOR.OPAC_REALPATH . '/../library'
);
// Includes de base
include_once "fonctions/array.php";
include_once OPAC_REALPATH."/../local.php";
require_once "Zend/Loader.php";
require_once "startup.php";
Zend_Loader::registerAutoload();
$cfg = loadConfig(OPAC_REALPATH.'/../config.ini');
setupDatabase($cfg);
defineConstant('LANG_DIR', realpath(dirname(__FILE__)).'/../library/translation/');
setupLanguage();
?>
\ No newline at end of file
......@@ -13,7 +13,7 @@ set_include_path( realpath(dirname(__FILE__)).'/../php'
. PATH_SEPARATOR . realpath(dirname(__FILE__)).'/../php/classes'
. PATH_SEPARATOR . get_include_path());
chdir('..');
chdir(realpath(dirname(__FILE__)).'/..');
session_start();
......
......@@ -108,13 +108,13 @@ function setupConstants() {
function loadConfig() {
function loadConfig($config_init_file_path = './config.ini') {
// load configuration (local ou production)
if(array_isset('REMOTE_ADDR', $_SERVER) and $_SERVER['REMOTE_ADDR'] == '127.0.0.1')
$serveur='local';
else
$serveur='production';
$cfg = new Zend_Config_Ini('./config.ini', $serveur);
$cfg = new Zend_Config_Ini($config_init_file_path, $serveur);
Zend_Registry::set('cfg', $cfg);
......
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