}
// load Backdrop bootstrap
chdir($cmsPath);
- define('BACKDROP_ROOT', $cmsPath);
+ if (!defined('BACKDROP_ROOT')) {
+ define('BACKDROP_ROOT', $cmsPath);
+ }
// For Backdrop multi-site CRM-11313
if ($realPath && strpos($realPath, 'sites/all/modules/') === FALSE) {
$e->list[] = 'js/crm.backdrop.js';
}
+ /**
+ * Start a new session.
+ */
+ public function sessionStart() {
+ if (function_exists('backdrop_session_start')) {
+ // https://issues.civicrm.org/jira/browse/CRM-14356
+ if (!(isset($GLOBALS['lazy_session']) && $GLOBALS['lazy_session'] == TRUE)) {
+ backdrop_session_start();
+ }
+ $_SESSION = [];
+ }
+ else {
+ session_start();
+ }
+ }
+
}