Relocate folders
the old "www/layout/<admin/frontend>/<template name>/..." layout is deprecated. new layout: www/layout/<admin|frontend>/<cache/css/images/javascript>/ The layout/<admin/frontend> is symlinked to www/<admin|frontend>/layout templates and lang are moved to includes www/includes/template/<admin/frontend> www/includes/lang/<admin/frontend> and no longer symlinked to any public facing folders The language po files have already been moved to 4dev/lang/<admin|frontend>/
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
define('CONFIG_PATH', 'configs'.DIRECTORY_SEPARATOR);
|
||||
// config path prefix search, start with 0, got down each level __DIR__ has, if nothing found -> bail
|
||||
$CONFIG_PATH_PREFIX = '';
|
||||
for ($dir_pos = 0, $dir_max = count(explode('/', __DIR__)); $dir_pos <= $dir_max; $dir_pos ++) {
|
||||
for ($dir_pos = 0, $dir_max = count(explode(DIRECTORY_SEPARATOR, __DIR__)); $dir_pos <= $dir_max; $dir_pos ++) {
|
||||
$CONFIG_PATH_PREFIX .= '..'.DIRECTORY_SEPARATOR;
|
||||
if (file_exists($CONFIG_PATH_PREFIX.CONFIG_PATH.'config.inc')) {
|
||||
require $CONFIG_PATH_PREFIX.CONFIG_PATH.'config.inc';
|
||||
@@ -21,5 +21,12 @@ for ($dir_pos = 0, $dir_max = count(explode('/', __DIR__)); $dir_pos <= $dir_max
|
||||
if (!defined('DS')) {
|
||||
exit('Base config unloadable');
|
||||
}
|
||||
// find trigger name "admin/" or "frontend/" in the getcwd() folder
|
||||
foreach (array ('admin', 'frontend') as $folder) {
|
||||
if (strstr(getcwd(), DS.$folder)) {
|
||||
define('CONTENT_PATH', $folder.DS);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// __END__
|
||||
|
||||
Reference in New Issue
Block a user