$globals->baseurl . '/site_errors',
'Erreurs d\'exécution',
$globals->baseurl . '/images/logo.png',
- $globals->spoolroot . '/core/templates/site_errors.feed.tpl');
+ $globals->coreroot . '/templates/site_errors.feed.tpl');
}
protected function fetch(PlUser $user)
public $baseurl_http;
/** paths */
+ public $coreroot;
public $spoolroot;
/** Localization configuration.
*/
public function __construct(array $files)
{
- $this->spoolroot = dirname(dirname(dirname(__FILE__)));
+ $this->coreroot = dirname(dirname(__FILE__));
+ $this->spoolroot = dirname($this->coreroot);
$this->readConfig($files);
if (isset($_SERVER) && isset($_SERVER['SERVER_NAME'])) {
{
global $globals;
if ($modname == 'core') {
- $mod_path = $globals->spoolroot . '/core/modules/' . $modname;
+ $mod_path = $globals->coreroot . '/modules/' . $modname;
} else {
$mod_path = $globals->spoolroot . '/modules/' . $modname;
}
$this->template_dir = $globals->spoolroot . '/templates/';
$this->compile_dir = $globals->spoolroot . '/spool/templates_c/';
array_unshift($this->plugins_dir,
- $globals->spoolroot . '/core/plugins/',
+ $globals->coreroot . '/plugins/',
$globals->spoolroot . '/plugins/');
$this->config_dir = $globals->spoolroot . '/configs/';
public static function getCoreTpl($tpl)
{
global $globals;
- return $globals->spoolroot . '/core/templates/' . $tpl;
+ return $globals->coreroot . '/templates/' . $tpl;
}
// }}}
{
global $globals;
return preg_replace('/\{include( [^}]*)? core=([^} ]+)(.*?)\}/ui',
- '{include\1 file="' . $globals->spoolroot . '/core/templates/\2"\3}',
+ '{include\1 file="' . $globals->coreroot . '/templates/\2"\3}',
$source);
}
} else if (starts_with($cls, 'pldbtable')) {
$cls = 'pldbtableentry';
}
- $basepath = dirname(dirname(dirname(__FILE__)));
+ $corebasepath = dirname(dirname(__FILE__));
+ $basepath = dirname($corebasepath);
+ $corebasename = basename($corebasepath);
- array_unshift($pathes, 'core/classes', 'classes');
+ array_unshift($pathes, $corebasename . '/classes', 'classes');
foreach ($pathes as $path) {
if (file_exists("$basepath/$path/$cls.php")) {
if (include_once "$basepath/$path/$cls.php") {