Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJan-Christoph Borchardt <jan@unhosted.org>2012-04-15 15:32:45 +0400
committerJan-Christoph Borchardt <jan@unhosted.org>2012-04-15 15:34:30 +0400
commit7ddd0434270fa1cc51769e812f257cf63b0ec92f (patch)
tree10a2cac32c4cdb05e4c88b9008d6b1e05e670faa /lib
parentd32799e4bf48412d71222401dba84aaab47a75a7 (diff)
renamed extention to extension, also now only showing lowercase
Diffstat (limited to 'lib')
-rw-r--r--lib/filestorage/common.php12
-rwxr-xr-xlib/helper.php12
-rw-r--r--lib/mimetypes.list.php2
-rw-r--r--lib/template.php2
4 files changed, 14 insertions, 14 deletions
diff --git a/lib/filestorage/common.php b/lib/filestorage/common.php
index f632474df01..f0bfc064cb5 100644
--- a/lib/filestorage/common.php
+++ b/lib/filestorage/common.php
@@ -100,11 +100,11 @@ abstract class OC_Filestorage_Common extends OC_Filestorage {
}
$head=fread($source,8192);//8kb should suffice to determine a mimetype
if($pos=strrpos($path,'.')){
- $extention=substr($path,$pos);
+ $extension=substr($path,$pos);
}else{
- $extention='';
+ $extension='';
}
- $tmpFile=OC_Helper::tmpFile($extention);
+ $tmpFile=OC_Helper::tmpFile($extension);
file_put_contents($tmpFile,$head);
$mime=OC_Helper::getMimeType($tmpFile);
unlink($tmpFile);
@@ -129,11 +129,11 @@ abstract class OC_Filestorage_Common extends OC_Filestorage {
return false;
}
if($pos=strrpos($path,'.')){
- $extention=substr($path,$pos);
+ $extension=substr($path,$pos);
}else{
- $extention='';
+ $extension='';
}
- $tmpFile=OC_Helper::tmpFile($extention);
+ $tmpFile=OC_Helper::tmpFile($extension);
$target=fopen($tmpFile,'w');
$count=OC_Helper::streamCopy($source,$target);
return $tmpFile;
diff --git a/lib/helper.php b/lib/helper.php
index 2026286352a..c33db5f10fe 100755
--- a/lib/helper.php
+++ b/lib/helper.php
@@ -310,9 +310,9 @@ class OC_Helper {
$mimeType='application/octet-stream';
if ($mimeType=='application/octet-stream') {
self::$mimetypes = include('mimetypes.fixlist.php');
- $extention=strtolower(strrchr(basename($path), "."));
- $extention=substr($extention,1);//remove leading .
- $mimeType=(isset(self::$mimetypes[$extention]))?self::$mimetypes[$extention]:'application/octet-stream';
+ $extension=strtolower(strrchr(basename($path), "."));
+ $extension=substr($extension,1);//remove leading .
+ $mimeType=(isset(self::$mimetypes[$extension]))?self::$mimetypes[$extension]:'application/octet-stream';
}
if (@is_dir($path)) {
@@ -346,9 +346,9 @@ class OC_Helper {
if(!self::$mimetypes || self::$mimetypes != include('mimetypes.list.php')){
self::$mimetypes=include('mimetypes.list.php');
}
- $extention=strtolower(strrchr(basename($path), "."));
- $extention=substr($extention,1);//remove leading .
- $mimeType=(isset(self::$mimetypes[$extention]))?self::$mimetypes[$extention]:'application/octet-stream';
+ $extension=strtolower(strrchr(basename($path), "."));
+ $extension=substr($extension,1);//remove leading .
+ $mimeType=(isset(self::$mimetypes[$extension]))?self::$mimetypes[$extension]:'application/octet-stream';
}
return $mimeType;
}
diff --git a/lib/mimetypes.list.php b/lib/mimetypes.list.php
index e0570e84ea5..ccf47999b1c 100644
--- a/lib/mimetypes.list.php
+++ b/lib/mimetypes.list.php
@@ -21,7 +21,7 @@
*/
/**
- * list of mimetypes by extention
+ * list of mimetypes by extension
*/
return array(
diff --git a/lib/template.php b/lib/template.php
index cb39a10df31..eeba2410b68 100644
--- a/lib/template.php
+++ b/lib/template.php
@@ -161,7 +161,7 @@ class OC_Template{
}
/**
- * @brief Returns the formfactor extention for current formfactor
+ * @brief Returns the formfactor extension for current formfactor
*/
protected function getFormFactorExtension()
{