Fixing indentation
parent
ed4b3e2fc7
commit
95d30f9619
|
@ -28,59 +28,59 @@
|
|||
**/
|
||||
|
||||
namespace {
|
||||
// Include paths
|
||||
define('PSM_PATH_SRC', __DIR__ . DIRECTORY_SEPARATOR);
|
||||
define('PSM_PATH_CONFIG', PSM_PATH_SRC . 'config' . DIRECTORY_SEPARATOR);
|
||||
define('PSM_PATH_LANG', PSM_PATH_SRC . 'lang' . DIRECTORY_SEPARATOR);
|
||||
define('PSM_PATH_SMS_GATEWAY', PSM_PATH_SRC . 'psm' . DIRECTORY_SEPARATOR . 'Txtmsg' . DIRECTORY_SEPARATOR);
|
||||
// Include paths
|
||||
define('PSM_PATH_SRC', __DIR__ . DIRECTORY_SEPARATOR);
|
||||
define('PSM_PATH_CONFIG', PSM_PATH_SRC . 'config' . DIRECTORY_SEPARATOR);
|
||||
define('PSM_PATH_LANG', PSM_PATH_SRC . 'lang' . DIRECTORY_SEPARATOR);
|
||||
define('PSM_PATH_SMS_GATEWAY', PSM_PATH_SRC . 'psm' . DIRECTORY_SEPARATOR . 'Txtmsg' . DIRECTORY_SEPARATOR);
|
||||
|
||||
// user levels
|
||||
define('PSM_USER_ADMIN', 10);
|
||||
define('PSM_USER_USER', 20);
|
||||
define('PSM_USER_ANONYMOUS', 30);
|
||||
// user levels
|
||||
define('PSM_USER_ADMIN', 10);
|
||||
define('PSM_USER_USER', 20);
|
||||
define('PSM_USER_ANONYMOUS', 30);
|
||||
|
||||
if (function_exists('date_default_timezone_set') && function_exists('date_default_timezone_get')) {
|
||||
date_default_timezone_set(@date_default_timezone_get());
|
||||
}
|
||||
|
||||
// find config file
|
||||
$path_conf = PSM_PATH_SRC . '../config.php';
|
||||
// find config file
|
||||
$path_conf = PSM_PATH_SRC . '../config.php';
|
||||
if (file_exists($path_conf)) {
|
||||
include_once $path_conf;
|
||||
}
|
||||
// check for a debug var
|
||||
// check for a debug var
|
||||
if (!defined('PSM_DEBUG')) {
|
||||
define('PSM_DEBUG', false);
|
||||
}
|
||||
|
||||
// Debug enabled: report everything
|
||||
// Debug disabled: report error only if created manually
|
||||
ini_set('display_errors', 1);
|
||||
PSM_DEBUG ? error_reporting(E_ALL) : error_reporting(E_USER_ERROR);
|
||||
// Debug enabled: report everything
|
||||
// Debug disabled: report error only if created manually
|
||||
ini_set('display_errors', 1);
|
||||
PSM_DEBUG ? error_reporting(E_ALL) : error_reporting(E_USER_ERROR);
|
||||
|
||||
// check for a cron allowed ip array
|
||||
// check for a cron allowed ip array
|
||||
if (!defined('PSM_CRON_ALLOW')) {
|
||||
//serialize for php version lower than 7.0.0
|
||||
//serialize for php version lower than 7.0.0
|
||||
define('PSM_CRON_ALLOW', serialize(array()));
|
||||
}
|
||||
|
||||
$vendor_autoload = PSM_PATH_SRC . '..' . DIRECTORY_SEPARATOR . 'vendor' .
|
||||
DIRECTORY_SEPARATOR . 'autoload.php';
|
||||
$vendor_autoload = PSM_PATH_SRC . '..' . DIRECTORY_SEPARATOR . 'vendor' .
|
||||
DIRECTORY_SEPARATOR . 'autoload.php';
|
||||
if (!file_exists($vendor_autoload)) {
|
||||
trigger_error(
|
||||
"No dependencies found in vendor dir. Did you install the dependencies?
|
||||
Please run \"php composer.phar install\".",
|
||||
Please run \"php composer.phar install\".",
|
||||
E_USER_ERROR
|
||||
);
|
||||
}
|
||||
require_once $vendor_autoload;
|
||||
require_once $vendor_autoload;
|
||||
|
||||
$router = new psm\Router();
|
||||
// this may seem insignificant, but right now lots of functions
|
||||
// depend on the following global var definition:
|
||||
$db = $router->getService('db');
|
||||
$router = new psm\Router();
|
||||
// this may seem insignificant, but right now lots of functions
|
||||
// depend on the following global var definition:
|
||||
$db = $router->getService('db');
|
||||
|
||||
// sanity check!
|
||||
// sanity check!
|
||||
if (!defined('PSM_INSTALL') || !PSM_INSTALL) {
|
||||
if ($db->getDbHost() === null) {
|
||||
// no config file has been loaded, redirect the user to the install
|
||||
|
@ -102,7 +102,7 @@ namespace {
|
|||
if ($installer->isUpgradeRequired()) {
|
||||
trigger_error(
|
||||
"Your database is for an older version and requires an upgrade,
|
||||
<a href=\"install.php\">please click here</a> to update your database to the latest version.",
|
||||
<a href=\"install.php\">please click here</a> to update your database to the latest version.",
|
||||
E_USER_ERROR
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue