some path fixes for multi-dir app

This commit is contained in:
Thomas Mueller 2012-06-22 09:56:54 +02:00
Родитель b5953e7a83
Коммит ba2d203a54
2 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -370,7 +370,7 @@ class OC_App{
*/
public static function getAppWebPath($appid) {
if( ($dir = self::findAppInDirectories($appid)) != false) {
return $dir['url'].'/'.$appid;
return OC::$WEBROOT.$dir['url'].'/'.$appid;
}
}

Просмотреть файл

@ -181,8 +181,8 @@ class OC_TemplateLayout extends OC_Template {
// Is it part of an app?
$append = false;
foreach( OC::$APPSROOTS as $apps_dir) {
if(self::appendIfExist($files, $apps_dir['path'], $apps_dir['url'], "$script$fext.js")) { $append =true; break; }
elseif(self::appendIfExist($files, $apps_dir['path'], $apps_dir['url'], "$script.js")) { $append =true; break; }
if(self::appendIfExist($files, $apps_dir['path'], OC::$WEBROOT.$apps_dir['url'], "$script$fext.js")) { $append =true; break; }
elseif(self::appendIfExist($files, $apps_dir['path'], OC::$WEBROOT.$apps_dir['url'], "$script.js")) { $append =true; break; }
}
if(! $append) {
echo('js file not found: script:'.$script.' formfactor:'.$fext.' webroot:'.OC::$WEBROOT.' serverroot:'.OC::$SERVERROOT);