Ce dépôt a été archivé le 2021-01-04 . Vous pouvez voir ses fichiers ou le cloner, mais pas ouvrir de ticket ou de demandes d'ajout, ni soumettre de changements.
2020-06-05 13:38:40 +02:00
< ? php
$bootstrapFileName = getenv ( 'ESHOP_BOOTSTRAP_PATH' );
if ( ! empty ( $bootstrapFileName )) {
$bootstrapFileName = realpath ( trim ( getenv ( 'ESHOP_BOOTSTRAP_PATH' )));
} else {
$count = 0 ;
2020-06-05 14:18:24 +02:00
$bootstrapFileName = '../../source/bootstrap.php' ;
2020-06-05 13:38:40 +02:00
$currentDirectory = __DIR__ . '/' ;
while ( $count < 5 ) {
$count ++ ;
if ( file_exists ( $currentDirectory . $bootstrapFileName )) {
$bootstrapFileName = $currentDirectory . $bootstrapFileName ;
break ;
}
$bootstrapFileName = '../' . $bootstrapFileName ;
}
}
if ( ! ( file_exists ( $bootstrapFileName ) && ! is_dir ( $bootstrapFileName ))) {
$items = [
" Unable to find eShop bootstrap.php file. " ,
" You can override the path by using ESHOP_BOOTSTRAP_PATH environment variable. " ,
" \n "
];
$message = implode ( " " , $items );
die ( $message );
}
require_once ( $bootstrapFileName );
define ( 'OX_IS_ADMIN' , true );
if ( false == function_exists ( 'isAdmin' )) {
/**
* @ return bool
*/
function isAdmin ()
{
if ( defined ( 'OX_IS_ADMIN' )) {
return OX_IS_ADMIN ;
}
return true ;
}
}