Skip to content
Snippets Groups Projects
Commit acc4d115 authored by llaffont's avatar llaffont
Browse files

correction config cosmogramme

parent 2d0090c9
Branches
Tags
No related merge requests found
......@@ -3,11 +3,9 @@
define("VERSION_COSMOGRAMME","6.31");
define("PATCH_LEVEL","156");
define("APPLI","cosmogramme");
define("COSMOPATH", "/var/www/html/vhosts/opac2/www/htdocs");
define("CRLF", chr(13) . chr(10));
define("BR","<br />");
define("COSMOPATH", "/var/www/html/vhosts/opac2/www/htdocs");
if (!function_exists('xdebug_break')) {
function xdebug_break(){};
......@@ -37,14 +35,17 @@ define("URL_IMG", URL_BASE ."images/");
// Includes
set_include_path(get_include_path().PATH_SEPARATOR.'./php/' . PATH_SEPARATOR . "./php/classes/");
require("classe_sql.php");
require("fonctions/sql.php");
require("fonctions/fonctions_base.php");
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');
require("classe_sql.php");
require("fonctions/sql.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
*/
/**
* 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
*/
include_once (realpath(dirname(__FILE__)).'/local.php');
if (!defined('OPAC_PATH'))
define('OPAC_PATH',realpath(dirname(__FILE__).'/../'));
if (!defined('ZEND_FRAMEWORK_PATH'))
define ('ZEND_FRAMEWORK_PATH', PATH_SEPARATOR . '../../ZendFramework-1.6.2/library');
if (!defined('OPAC_PATH'))
define('OPAC_PATH',realpath(dirname(__FILE__).'/../'));
if (!defined('LANG_DIR'))
define('LANG_DIR', OPAC_PATH.'/library/translation/');
set_include_path(
ZEND_FRAMEWORK_PATH
. PATH_SEPARATOR . get_include_path()
. PATH_SEPARATOR.OPAC_PATH . '/library'
);
set_include_path(get_include_path().PATH_SEPARATOR.OPAC_PATH.'/library');
// Includes de base
include_once "fonctions/array.php";
include_once OPAC_PATH."/local.php";
if (!defined('ZEND_FRAMEWORK_PATH'))
define ('ZEND_FRAMEWORK_PATH', PATH_SEPARATOR . '../../ZendFramework-1.6.2/library');
set_include_path(ZEND_FRAMEWORK_PATH.PATH_SEPARATOR.get_include_path());
require_once "Zend/Loader.php";
require_once "startup.php";
Zend_Loader::registerAutoload();
$cfg_file = file_exists('../config.ini') ? '../config.ini' : OPAC_PATH.'/config.ini';
$base_dir = $_SERVER['DOCUMENT_ROOT'].'/'.explode('/', $_SERVER['SCRIPT_NAME'])[1];
if (!file_exists($cfg_file = $base_dir.'/config.ini')) {
$cfg_file = file_exists('../config.ini') ? '../config.ini' : OPAC_PATH.'/config.ini';
}
$cfg = loadConfig($cfg_file);
setupDatabase($cfg);
setupDevOptions($cfg);
defineConstant('LANG_DIR', realpath(dirname(__FILE__)).'/../library/translation/');
setupLanguage();
?>
\ No newline at end of file
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