}
- /**
- * @brief Returns the server protocol
- * @returns the server protocol
- *
- * Returns the server protocol. It respects reverse proxy servers and load balancers
- */
+ /**
+ * @brief Returns the server protocol
+ * @returns the server protocol
+ *
+ * Returns the server protocol. It respects reverse proxy servers and load balancers
+ */
public static function serverProtocol() {
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO'])) {
$proto = strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']);
*
* 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
$theme=OC_Config::getValue( "theme" );
}
}
- /**
- * Adds a suffix to the name in case the file exists
- *
- * @param $path
- * @param $filename
- * @return string
- */
- public static function buildNotExistingFileName($path, $filename){
- if($path==='/'){
- $path='';
- }
- if ($pos = strrpos($filename, '.')) {
- $name = substr($filename, 0, $pos);
- $ext = substr($filename, $pos);
- } else {
- $name = $filename;
- }
-
- $newpath = $path . '/' . $filename;
- $newname = $filename;
- $counter = 2;
- while (OC_Filesystem::file_exists($newpath)) {
- $newname = $name . ' (' . $counter . ')' . $ext;
- $newpath = $path . '/' . $newname;
- $counter++;
- }
-
- return $newpath;
- }
+ /**
+ * Adds a suffix to the name in case the file exists
+ *
+ * @param $path
+ * @param $filename
+ * @return string
+ */
+ public static function buildNotExistingFileName($path, $filename){
+ if($path==='/'){
+ $path='';
+ }
+ if ($pos = strrpos($filename, '.')) {
+ $name = substr($filename, 0, $pos);
+ $ext = substr($filename, $pos);
+ } else {
+ $name = $filename;
+ }
+
+ $newpath = $path . '/' . $filename;
+ $newname = $filename;
+ $counter = 2;
+ while (OC_Filesystem::file_exists($newpath)) {
+ $newname = $name . ' (' . $counter . ')' . $ext;
+ $newpath = $path . '/' . $newname;
+ $counter++;
+ }
+
+ return $newpath;
+ }
/*
* checks if $sub is a subdirectory of $parent
}
- /**
- * @brief Creates an url
- * @param $app app
- * @param $file file
- * @returns the url
- *
- * Returns a url to the given app and file.
- */
- public static function linkTo( $app, $file ){
+ /**
+ * @brief Creates an url
+ * @param $app app
+ * @param $file file
+ * @returns the url
+ *
+ * Returns a url to the given app and file.
+ */
+ public static function linkTo( $app, $file ){
return(\OC_Helper::linkTo( $app, $file ));
}
public static function callCheck(){
return(\OC_Util::callCheck());
}
-
-
-
-
}
?>