Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 1699 | Revision 1702 | Zur aktuellen Revision | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 1699 Revision 1701
Zeile 1... Zeile 1...
1
<?php
1
<?php
Zeile 2... Zeile 2...
2
 
2
 
3
    function getConfig()
3
    function getConfig()
-
 
4
    {
-
 
5
        if ( !defined( "__SITE__" ) )
4
    {
6
        {
-
 
7
            define( '__SITE__', env( 'site' ) );
-
 
8
        }
-
 
9
        if ( !defined( "__SHOP__" ) )
5
        define( '__SITE__', env( 'site' ) );
10
        {
-
 
11
            define( '__SHOP__', env( 'shop' ) );
-
 
12
        }
-
 
13
        if ( !defined( "__CFG_PATH__" ) )
6
        define( '__SHOP__', env( 'shop' ) );
14
        {
7
        define( "__CFG_PATH__", "/etc/shop_configs/" . __SITE__ . "/" . __SHOP__ );
15
            define( "__CFG_PATH__", "/etc/shop_configs/" . __SITE__ . "/" . __SHOP__ );
8
 
16
        }
9
        $cfg_file = __CFG_PATH__ . "/config.de.xml";
17
        $cfg_file = __CFG_PATH__ . "/config.de.xml";
10
        if ( !file_exists( $cfg_file ) )
18
        if ( !file_exists( $cfg_file ) )
11
        {
19
        {
12
            trigger_error( "Konnte keine Konfigurationsdatei für das Shopsystem " . __SITE__ . " -> " . __SHOP__ . " finden (" . ( $cfg_file ) . ")!", E_USER_ERROR );
20
            trigger_error( "Konnte keine Konfigurationsdatei für das Shopsystem " . __SITE__ . " -> " . __SHOP__ . " finden (" . ( $cfg_file ) . ")!", E_USER_ERROR );