Ejemplo n.º 1
0
 function activate($path, $workspace = "workspace")
 {
     // Activate the workspace for the current path. All
     // calls on objects will return the workspaced
     // version when this has been called. This should be
     // called from within the workspace loader.
     $context = pobject::getContext();
     $me = $context['arCurrentObject'];
     // FIXME: Checken of de gevraagde workspace wel geconfigged is voor dit pad.
     $layer = workspace::getLayer($workspace);
     if (!isset($layer)) {
         return false;
     } else {
         $me->store->setLayer($layer);
         return true;
     }
 }
Ejemplo n.º 2
0
}
$loaderType = $ARLoader ? $ARLoader : 'web';
require_once AriadneBasePath . "/../vendor/autoload.php";
require_once AriadneBasePath . '/configs/ariadne.phtml';
require_once AriadneBasePath . '/configs/ariadne-default.phtml';
require_once AriadneBasePath . "/configs/sessions.phtml";
require_once AriadneBasePath . "/configs/cache.phtml";
require_once AriadneBasePath . "/configs/authentication.phtml";
require_once AriadneBasePath . "/configs/store.phtml";
require_once AriadneBasePath . "/ar.php";
require_once AriadneBasePath . "/modules/mod_debug.php";
require_once AriadneBasePath . "/modules/mod_cache.php";
$AR->context = array();
if ($workspace = getenv("ARIADNE_WORKSPACE")) {
    include_once $store_config['code'] . "modules/mod_workspace.php";
    $layer = workspace::getLayer($workspace);
    if (!$layer) {
        $layer = 1;
    }
    if ($wspaths = getenv("ARIADNE_WORKSPACE_PATHS")) {
        $wspaths = explode(";", $wspaths);
        foreach ($wspaths as $wspath) {
            if ($wspath != '') {
                $store_config['layer'][$wspath] = $layer;
            }
        }
    } else {
        $store_config['layer'] = array('/' => $layer);
    }
}
require_once AriadneBasePath . "/includes/loader." . $loaderType . ".php";