spaces -> tabs

Thanks to Jakob for reminding me
This commit is contained in:
Frank Karlitschek 2012-02-27 18:01:43 +01:00
parent 63a088c2b1
commit 5943af17e7
2 changed files with 49 additions and 49 deletions

View File

@ -83,24 +83,24 @@ class OC_Helper {
* Returns the path to the image. * Returns the path to the image.
*/ */
public static function imagePath( $app, $image ){ public static function imagePath( $app, $image ){
// Read the selected theme from the config file // Read the selected theme from the config file
$theme=OC_Config::getValue( "theme" ); $theme=OC_Config::getValue( "theme" );
// Check if the app is in the app folder // Check if the app is in the app folder
if( file_exists( OC::$SERVERROOT."/themes/$theme/apps/$app/img/$image" )){ if( file_exists( OC::$SERVERROOT."/themes/$theme/apps/$app/img/$image" )){
return OC::$WEBROOT."/themes/$theme/apps/$app/img/$image"; return OC::$WEBROOT."/themes/$theme/apps/$app/img/$image";
}elseif( file_exists( OC::$APPSROOT."/apps/$app/img/$image" )){ }elseif( file_exists( OC::$APPSROOT."/apps/$app/img/$image" )){
return OC::$APPSWEBROOT."/apps/$app/img/$image"; return OC::$APPSWEBROOT."/apps/$app/img/$image";
}elseif( !empty( $app ) and file_exists( OC::$SERVERROOT."/themes/$theme/$app/img/$image" )){ }elseif( !empty( $app ) and file_exists( OC::$SERVERROOT."/themes/$theme/$app/img/$image" )){
return OC::$WEBROOT."/themes/$theme/$app/img/$image"; return OC::$WEBROOT."/themes/$theme/$app/img/$image";
}elseif( !empty( $app ) and file_exists( OC::$SERVERROOT."/$app/img/$image" )){ }elseif( !empty( $app ) and file_exists( OC::$SERVERROOT."/$app/img/$image" )){
return OC::$WEBROOT."/$app/img/$image"; return OC::$WEBROOT."/$app/img/$image";
}elseif( file_exists( OC::$SERVERROOT."/themes/$theme/core/img/$image" )){ }elseif( file_exists( OC::$SERVERROOT."/themes/$theme/core/img/$image" )){
return OC::$WEBROOT."/themes/$theme/core/img/$image"; return OC::$WEBROOT."/themes/$theme/core/img/$image";
}else{ }else{
return OC::$WEBROOT."/core/img/$image"; return OC::$WEBROOT."/core/img/$image";
} }
} }
/** /**
* @brief get path to icon of file type * @brief get path to icon of file type

View File

@ -170,39 +170,39 @@ class OC_Template{
// Check if it is a app template or not. // Check if it is a app template or not.
if( $app != "" ){ if( $app != "" ){
// Check if the app is in the app folder or in the root // Check if the app is in the app folder or in the root
if( file_exists( OC::$APPSROOT."/apps/$app/templates/" )){ if( file_exists( OC::$APPSROOT."/apps/$app/templates/" )){
// Check if the template is overwritten by the selected theme // Check if the template is overwritten by the selected theme
if( file_exists( OC::$SERVERROOT."/themes/$theme/apps/$app/templates/"."$name$fext.php" )){ if( file_exists( OC::$SERVERROOT."/themes/$theme/apps/$app/templates/"."$name$fext.php" )){
$template = OC::$SERVERROOT."/themes/$theme/apps/$app/templates/"."$name$fext.php"; $template = OC::$SERVERROOT."/themes/$theme/apps/$app/templates/"."$name$fext.php";
$path = OC::$SERVERROOT."/themes/$theme/apps/$app/templates/"; $path = OC::$SERVERROOT."/themes/$theme/apps/$app/templates/";
}elseif( file_exists( OC::$SERVERROOT."/themes/$theme/apps/$app/templates/"."$name.php" )){ }elseif( file_exists( OC::$SERVERROOT."/themes/$theme/apps/$app/templates/"."$name.php" )){
$template = OC::$SERVERROOT."/themes/$theme/apps/$app/templates/"."$name.php"; $template = OC::$SERVERROOT."/themes/$theme/apps/$app/templates/"."$name.php";
$path = OC::$SERVERROOT."/themes/$theme/apps/$app/templates/"; $path = OC::$SERVERROOT."/themes/$theme/apps/$app/templates/";
}elseif( OC::$APPSROOT."/apps/$app/templates/"."$name$fext.php" ){ }elseif( OC::$APPSROOT."/apps/$app/templates/"."$name$fext.php" ){
$template = OC::$APPSROOT."/apps/$app/templates/"."$name$fext.php"; $template = OC::$APPSROOT."/apps/$app/templates/"."$name$fext.php";
$path = OC::$APPSROOT."/apps/$app/templates/"; $path = OC::$APPSROOT."/apps/$app/templates/";
}else{ }else{
$template = OC::$APPSROOT."/apps/$app/templates/"."$name.php"; $template = OC::$APPSROOT."/apps/$app/templates/"."$name.php";
$path = OC::$APPSROOT."/apps/$app/templates/"; $path = OC::$APPSROOT."/apps/$app/templates/";
} }
}else{ }else{
// Check if the template is overwritten by the selected theme // Check if the template is overwritten by the selected theme
if( file_exists( OC::$SERVERROOT."/themes/$theme/$app/templates/"."$name$fext.php" )){ if( file_exists( OC::$SERVERROOT."/themes/$theme/$app/templates/"."$name$fext.php" )){
$template = OC::$SERVERROOT."/themes/$theme/$app/templates/"."$name$fext.php"; $template = OC::$SERVERROOT."/themes/$theme/$app/templates/"."$name$fext.php";
$path = OC::$SERVERROOT."/themes/$theme/$app/templates/"; $path = OC::$SERVERROOT."/themes/$theme/$app/templates/";
}elseif( file_exists( OC::$SERVERROOT."/themes/$theme/$app/templates/"."$name.php" )){ }elseif( file_exists( OC::$SERVERROOT."/themes/$theme/$app/templates/"."$name.php" )){
$template = OC::$SERVERROOT."/themes/$theme/$app/templates/"."$name.php"; $template = OC::$SERVERROOT."/themes/$theme/$app/templates/"."$name.php";
$path = OC::$SERVERROOT."/themes/$theme/$app/templates/"; $path = OC::$SERVERROOT."/themes/$theme/$app/templates/";
}elseif( file_exists( OC::$SERVERROOT."/$app/templates/"."$name$fext.php" )){ }elseif( file_exists( OC::$SERVERROOT."/$app/templates/"."$name$fext.php" )){
$template = OC::$SERVERROOT."/$app/templates/"."$name$fext.php"; $template = OC::$SERVERROOT."/$app/templates/"."$name$fext.php";
$path = OC::$SERVERROOT."/$app/templates/"; $path = OC::$SERVERROOT."/$app/templates/";
}else{ }else{
$template = OC::$SERVERROOT."/$app/templates/"."$name.php"; $template = OC::$SERVERROOT."/$app/templates/"."$name.php";
$path = OC::$SERVERROOT."/$app/templates/"; $path = OC::$SERVERROOT."/$app/templates/";
} }
} }
}else{ }else{
// Check if the template is overwritten by the selected theme // Check if the template is overwritten by the selected theme
if( file_exists( OC::$SERVERROOT."/themes/$theme/core/templates/"."$name$fext.php" )){ if( file_exists( OC::$SERVERROOT."/themes/$theme/core/templates/"."$name$fext.php" )){