diff options
author | Georg Ehrke <dev@georgswebsite.de> | 2012-07-26 16:47:05 +0200 |
---|---|---|
committer | Georg Ehrke <dev@georgswebsite.de> | 2012-07-26 16:47:05 +0200 |
commit | e1d14ab461aa81363497e914cb6864da49ace372 (patch) | |
tree | 0895467ace65657d5d0abfac8d4e7eb32decbaa8 /lib/util.php | |
parent | 6ccd4e0cfb57d258301993157cf100061546f0c4 (diff) | |
parent | c8de77b3fddf52eeaf0f81224e9b4aa2085bcc59 (diff) | |
download | nextcloud-server-e1d14ab461aa81363497e914cb6864da49ace372.tar.gz nextcloud-server-e1d14ab461aa81363497e914cb6864da49ace372.zip |
Merge branch 'master' into subadmin
Diffstat (limited to 'lib/util.php')
-rwxr-xr-x | lib/util.php | 59 |
1 files changed, 26 insertions, 33 deletions
diff --git a/lib/util.php b/lib/util.php index f1a87742168..6e62ed9bf58 100755 --- a/lib/util.php +++ b/lib/util.php @@ -77,13 +77,13 @@ class OC_Util { return '5 pre alpha'; } - /** - * get the current installed edition of ownCloud. There is the community edition that just returns an empty string and the enterprise edition that returns "Enterprise". - * @return string - */ - public static function getEditionString(){ - return ''; - } + /** + * get the current installed edition of ownCloud. There is the community edition that just returns an empty string and the enterprise edition that returns "Enterprise". + * @return string + */ + public static function getEditionString(){ + return ''; + } /** * add a javascript file @@ -131,12 +131,12 @@ class OC_Util { self::$headers[]=array('tag'=>$tag,'attributes'=>$attributes,'text'=>$text); } - /** - * formats a timestamp in the "right" way - * - * @param int timestamp $timestamp - * @param bool dateOnly option to ommit time from the result - */ + /** + * formats a timestamp in the "right" way + * + * @param int timestamp $timestamp + * @param bool dateOnly option to ommit time from the result + */ public static function formatDate( $timestamp,$dateOnly=false){ if(isset($_SESSION['timezone'])){//adjust to clients timezone if we know it $systemTimeZone = intval(date('O')); @@ -455,26 +455,25 @@ class OC_Util { } - /** - * Check if the htaccess file is working by creating a test file in the data directory and trying to access via http - */ - public static function ishtaccessworking() { - + /** + * Check if the htaccess file is working by creating a test file in the data directory and trying to access via http + */ + public static function ishtaccessworking() { // testdata $filename='/htaccesstest.txt'; $testcontent='testcontent'; // creating a test file - $testfile = OC_Config::getValue( "datadirectory", OC::$SERVERROOT."/data" ).'/'.$filename; - $fp = @fopen($testfile, 'w'); - @fwrite($fp, $testcontent); - @fclose($fp); + $testfile = OC_Config::getValue( "datadirectory", OC::$SERVERROOT."/data" ).'/'.$filename; + $fp = @fopen($testfile, 'w'); + @fwrite($fp, $testcontent); + @fclose($fp); // accessing the file via http - $url = OC_Helper::serverProtocol(). '://' . OC_Helper::serverHost() . OC::$WEBROOT.'/data'.$filename; - $fp = @fopen($url, 'r'); - $content=@fread($fp, 2048); - @fclose($fp); + $url = OC_Helper::serverProtocol(). '://' . OC_Helper::serverHost() . OC::$WEBROOT.'/data'.$filename; + $fp = @fopen($url, 'r'); + $content=@fread($fp, 2048); + @fclose($fp); // cleanup @unlink($testfile); @@ -484,13 +483,7 @@ class OC_Util { return(false); }else{ return(true); - } - - } - - - - + } } |