From 5f610a1cbc5a97bd4f097111536516f547a94fda Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Fri, 24 Jan 2014 16:40:32 +0100 Subject: Add missing slash in URLGenerator::getAbsoluteURL(). Refs. #6840 --- lib/private/urlgenerator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/private/urlgenerator.php b/lib/private/urlgenerator.php index 4e3c1109000..e618aef268a 100644 --- a/lib/private/urlgenerator.php +++ b/lib/private/urlgenerator.php @@ -147,6 +147,6 @@ class URLGenerator implements IURLGenerator { * @return string the absolute version of the url */ public function getAbsoluteURL($url) { - return \OC_Request::serverProtocol() . '://' . \OC_Request::serverHost() . $url; + return \OC_Request::serverProtocol() . '://' . \OC_Request::serverHost() . '/' . $url; } } -- cgit v1.2.3 From a521949bafdaba0cb94061967b6b8307bbbebc05 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 27 Jan 2014 15:41:56 +0100 Subject: Allow passing a root folder to get the used space from in the quota wrapper --- lib/private/files/storage/wrapper/quota.php | 8 +++++++- lib/private/util.php | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/private/files/storage/wrapper/quota.php b/lib/private/files/storage/wrapper/quota.php index a430e3e4617..83a5de5ca30 100644 --- a/lib/private/files/storage/wrapper/quota.php +++ b/lib/private/files/storage/wrapper/quota.php @@ -15,12 +15,18 @@ class Quota extends Wrapper { */ protected $quota; + /** + * @var string $freeSpaceRoot + */ + protected $sizeRoot; + /** * @param array $parameters */ public function __construct($parameters) { $this->storage = $parameters['storage']; $this->quota = $parameters['quota']; + $this->freeSpaceRoot = isset($parameters['root']) ? $parameters['root'] : ''; } protected function getSize($path) { @@ -43,7 +49,7 @@ class Quota extends Wrapper { if ($this->quota < 0) { return $this->storage->free_space($path); } else { - $used = $this->getSize(''); + $used = $this->getSize($this->freeSpaceRoot); if ($used < 0) { return \OC\Files\SPACE_NOT_COMPUTED; } else { diff --git a/lib/private/util.php b/lib/private/util.php index 8aa7a074d0d..66a770a33dc 100755 --- a/lib/private/util.php +++ b/lib/private/util.php @@ -65,7 +65,7 @@ class OC_Util { $user = $storage->getUser()->getUID(); $quota = OC_Util::getUserQuota($user); if ($quota !== \OC\Files\SPACE_UNLIMITED) { - return new \OC\Files\Storage\Wrapper\Quota(array('storage' => $storage, 'quota' => $quota)); + return new \OC\Files\Storage\Wrapper\Quota(array('storage' => $storage, 'quota' => $quota, 'root' => 'files')); } } -- cgit v1.2.3 From c8207312c73f61b2be4aa8ca1d9ae6a8c33453cf Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 27 Jan 2014 16:00:10 +0100 Subject: Fix phpdoc --- lib/private/files/storage/wrapper/quota.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/private/files/storage/wrapper/quota.php b/lib/private/files/storage/wrapper/quota.php index 83a5de5ca30..2fc3119fc7d 100644 --- a/lib/private/files/storage/wrapper/quota.php +++ b/lib/private/files/storage/wrapper/quota.php @@ -16,7 +16,7 @@ class Quota extends Wrapper { protected $quota; /** - * @var string $freeSpaceRoot + * @var string $sizeRoot */ protected $sizeRoot; -- cgit v1.2.3 From 20c2aaab00e92d74547ccd6c964102e10ea34cbf Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 27 Jan 2014 16:26:54 +0100 Subject: Actually rename the variable --- lib/private/files/storage/wrapper/quota.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/private/files/storage/wrapper/quota.php b/lib/private/files/storage/wrapper/quota.php index 2fc3119fc7d..16127403181 100644 --- a/lib/private/files/storage/wrapper/quota.php +++ b/lib/private/files/storage/wrapper/quota.php @@ -26,7 +26,7 @@ class Quota extends Wrapper { public function __construct($parameters) { $this->storage = $parameters['storage']; $this->quota = $parameters['quota']; - $this->freeSpaceRoot = isset($parameters['root']) ? $parameters['root'] : ''; + $this->sizeRoot = isset($parameters['root']) ? $parameters['root'] : ''; } protected function getSize($path) { @@ -49,7 +49,7 @@ class Quota extends Wrapper { if ($this->quota < 0) { return $this->storage->free_space($path); } else { - $used = $this->getSize($this->freeSpaceRoot); + $used = $this->getSize($this->sizeRoot); if ($used < 0) { return \OC\Files\SPACE_NOT_COMPUTED; } else { -- cgit v1.2.3 From 8cc97275200ec9b47d1cd0c38c88c0c076687104 Mon Sep 17 00:00:00 2001 From: Tigran Mkrtchyan Date: Wed, 15 Jan 2014 12:49:47 +0100 Subject: mount: make location of mount.json configurable do not share users data with config files Signed-off-by: Tigran Mkrtchyan --- apps/files_external/lib/config.php | 6 ++---- config/config.sample.php | 3 +++ lib/private/files/filesystem.php | 10 +++++----- 3 files changed, 10 insertions(+), 9 deletions(-) (limited to 'lib') diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php index 01d588b3721..3118e1ac68d 100755 --- a/apps/files_external/lib/config.php +++ b/apps/files_external/lib/config.php @@ -352,9 +352,8 @@ class OC_Mount_Config { $phpFile = OC_User::getHome(OCP\User::getUser()).'/mount.php'; $jsonFile = OC_User::getHome(OCP\User::getUser()).'/mount.json'; } else { - $datadir = \OC_Config::getValue("datadirectory", \OC::$SERVERROOT . "/data"); $phpFile = OC::$SERVERROOT.'/config/mount.php'; - $jsonFile = $datadir . '/mount.json'; + $jsonFile = \OC_Config::getValue("mount_file", \OC::$SERVERROOT . "/data/mount.json"); } if (is_file($jsonFile)) { $mountPoints = json_decode(file_get_contents($jsonFile), true); @@ -379,8 +378,7 @@ class OC_Mount_Config { if ($isPersonal) { $file = OC_User::getHome(OCP\User::getUser()).'/mount.json'; } else { - $datadir = \OC_Config::getValue("datadirectory", \OC::$SERVERROOT . "/data"); - $file = $datadir . '/mount.json'; + $file = \OC_Config::getValue("mount_file", \OC::$SERVERROOT . "/data/mount.json"); } $content = json_encode($data); @file_put_contents($file, $content); diff --git a/config/config.sample.php b/config/config.sample.php index 01abc583688..5018a781f24 100755 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -250,4 +250,7 @@ $CONFIG = array( /* whether usage of the instance should be restricted to admin users only */ 'singleuser' => false, + + /* where mount.json file should be stored, defaults to data/mount.json */ + 'mount_file' => '', ); diff --git a/lib/private/files/filesystem.php b/lib/private/files/filesystem.php index a83e9aa86d2..f5e723afab0 100644 --- a/lib/private/files/filesystem.php +++ b/lib/private/files/filesystem.php @@ -320,16 +320,16 @@ class Filesystem { else { self::mount('\OC\Files\Storage\Local', array('datadir' => $root), $user); } - $datadir = \OC_Config::getValue("datadirectory", \OC::$SERVERROOT . "/data"); + $mount_file = \OC_Config::getValue("mount_file", \OC::$SERVERROOT . "/data/mount.json"); //move config file to it's new position if (is_file(\OC::$SERVERROOT . '/config/mount.json')) { - rename(\OC::$SERVERROOT . '/config/mount.json', $datadir . '/mount.json'); + rename(\OC::$SERVERROOT . '/config/mount.json', $mount_file); } // Load system mount points - if (is_file(\OC::$SERVERROOT . '/config/mount.php') or is_file($datadir . '/mount.json')) { - if (is_file($datadir . '/mount.json')) { - $mountConfig = json_decode(file_get_contents($datadir . '/mount.json'), true); + if (is_file(\OC::$SERVERROOT . '/config/mount.php') or is_file($mount_file)) { + if (is_file($mount_file)) { + $mountConfig = json_decode(file_get_contents($mount_file), true); } elseif (is_file(\OC::$SERVERROOT . '/config/mount.php')) { $mountConfig = $parser->parsePHP(file_get_contents(\OC::$SERVERROOT . '/config/mount.php')); } -- cgit v1.2.3 From f830ad0e47df14e821161c49ab1b52694f74912a Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 4 Feb 2014 16:28:41 +0100 Subject: Don't create new thumbnails on the write hook --- lib/private/image.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/private/image.php b/lib/private/image.php index 7761a3c7737..a6a2413f59f 100644 --- a/lib/private/image.php +++ b/lib/private/image.php @@ -230,7 +230,7 @@ class OC_Image { } /** - * @returns Returns the image resource in any. + * @returns resource Returns the image resource in any. */ public function resource() { return $this->resource; -- cgit v1.2.3 From 2ff0d3a2552ea18e6e73a9de9332f89f723a1495 Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Fri, 7 Feb 2014 17:39:19 +0100 Subject: Test if $url is already prefixed by '/' --- lib/private/urlgenerator.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/private/urlgenerator.php b/lib/private/urlgenerator.php index e618aef268a..60da34f2d6e 100644 --- a/lib/private/urlgenerator.php +++ b/lib/private/urlgenerator.php @@ -147,6 +147,7 @@ class URLGenerator implements IURLGenerator { * @return string the absolute version of the url */ public function getAbsoluteURL($url) { - return \OC_Request::serverProtocol() . '://' . \OC_Request::serverHost() . '/' . $url; + $separator = $url[0] === '/' ? '' : '/'; + return \OC_Request::serverProtocol() . '://' . \OC_Request::serverHost() . $separator . $url; } } -- cgit v1.2.3 From 937a25593b1e342bca2878eb6f45158bee9edd7c Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Wed, 19 Feb 2014 16:27:38 +0100 Subject: fix lots of file type icons for archives, js, flash, ics, fonts, code, ... --- core/img/filetypes/application-javascript.png | Bin 0 -> 1340 bytes core/img/filetypes/application-javascript.svg | 76 +++++++++++++++++ .../filetypes/application-x-shockwave-flash.png | Bin 0 -> 954 bytes .../filetypes/application-x-shockwave-flash.svg | 60 +++++++++++++ core/img/filetypes/calendar.png | Bin 1333 -> 0 bytes core/img/filetypes/calendar.svg | 94 --------------------- core/img/filetypes/flash.png | Bin 954 -> 0 bytes core/img/filetypes/flash.svg | 60 ------------- core/img/filetypes/text-calendar.png | Bin 0 -> 1333 bytes core/img/filetypes/text-calendar.svg | 94 +++++++++++++++++++++ core/img/filetypes/text-x-javascript.png | Bin 1340 -> 0 bytes core/img/filetypes/text-x-javascript.svg | 76 ----------------- lib/private/helper.php | 26 +++++- lib/private/mimetypes.list.php | 12 ++- 14 files changed, 266 insertions(+), 232 deletions(-) create mode 100644 core/img/filetypes/application-javascript.png create mode 100644 core/img/filetypes/application-javascript.svg create mode 100644 core/img/filetypes/application-x-shockwave-flash.png create mode 100644 core/img/filetypes/application-x-shockwave-flash.svg delete mode 100644 core/img/filetypes/calendar.png delete mode 100644 core/img/filetypes/calendar.svg delete mode 100644 core/img/filetypes/flash.png delete mode 100644 core/img/filetypes/flash.svg create mode 100644 core/img/filetypes/text-calendar.png create mode 100644 core/img/filetypes/text-calendar.svg delete mode 100644 core/img/filetypes/text-x-javascript.png delete mode 100644 core/img/filetypes/text-x-javascript.svg (limited to 'lib') diff --git a/core/img/filetypes/application-javascript.png b/core/img/filetypes/application-javascript.png new file mode 100644 index 00000000000..24d09ce9781 Binary files /dev/null and b/core/img/filetypes/application-javascript.png differ diff --git a/core/img/filetypes/application-javascript.svg b/core/img/filetypes/application-javascript.svg new file mode 100644 index 00000000000..0cc52ce6ba7 --- /dev/null +++ b/core/img/filetypes/application-javascript.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + diff --git a/core/img/filetypes/application-x-shockwave-flash.png b/core/img/filetypes/application-x-shockwave-flash.png new file mode 100644 index 00000000000..bcde641da3c Binary files /dev/null and b/core/img/filetypes/application-x-shockwave-flash.png differ diff --git a/core/img/filetypes/application-x-shockwave-flash.svg b/core/img/filetypes/application-x-shockwave-flash.svg new file mode 100644 index 00000000000..cb823703d9b --- /dev/null +++ b/core/img/filetypes/application-x-shockwave-flash.svg @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/core/img/filetypes/calendar.png b/core/img/filetypes/calendar.png deleted file mode 100644 index d85b1db651c..00000000000 Binary files a/core/img/filetypes/calendar.png and /dev/null differ diff --git a/core/img/filetypes/calendar.svg b/core/img/filetypes/calendar.svg deleted file mode 100644 index 0016749b936..00000000000 --- a/core/img/filetypes/calendar.svg +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/core/img/filetypes/flash.png b/core/img/filetypes/flash.png deleted file mode 100644 index bcde641da3c..00000000000 Binary files a/core/img/filetypes/flash.png and /dev/null differ diff --git a/core/img/filetypes/flash.svg b/core/img/filetypes/flash.svg deleted file mode 100644 index cb823703d9b..00000000000 --- a/core/img/filetypes/flash.svg +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/core/img/filetypes/text-calendar.png b/core/img/filetypes/text-calendar.png new file mode 100644 index 00000000000..d85b1db651c Binary files /dev/null and b/core/img/filetypes/text-calendar.png differ diff --git a/core/img/filetypes/text-calendar.svg b/core/img/filetypes/text-calendar.svg new file mode 100644 index 00000000000..0016749b936 --- /dev/null +++ b/core/img/filetypes/text-calendar.svg @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/core/img/filetypes/text-x-javascript.png b/core/img/filetypes/text-x-javascript.png deleted file mode 100644 index 24d09ce9781..00000000000 Binary files a/core/img/filetypes/text-x-javascript.png and /dev/null differ diff --git a/core/img/filetypes/text-x-javascript.svg b/core/img/filetypes/text-x-javascript.svg deleted file mode 100644 index 0cc52ce6ba7..00000000000 --- a/core/img/filetypes/text-x-javascript.svg +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - diff --git a/lib/private/helper.php b/lib/private/helper.php index e5d1fa9b513..9b5bf0652ae 100644 --- a/lib/private/helper.php +++ b/lib/private/helper.php @@ -152,7 +152,28 @@ class OC_Helper { public static function mimetypeIcon($mimetype) { $alias = array( 'application/octet-stream' => 'file', // use file icon as fallback - 'application/xml' => 'code/xml', + + 'application/illustrator' => 'image', + 'application/coreldraw' => 'image', + 'application/x-gimp' => 'image', + 'application/x-photoshop' => 'image', + + 'application/x-font-ttf' => 'font', + 'application/font-woff' => 'font', + 'application/vnd.ms-fontobject' => 'font', + + 'application/json' => 'text/code', + 'application/x-php' => 'text/code', + 'application/xml' => 'text/html', + 'text/css' => 'text/code', + + 'application/x-compressed' => 'package/x-generic', + 'application/x-7z-compressed' => 'package/x-generic', + 'application/x-deb' => 'package/x-generic', + 'application/x-rar-compressed' => 'package/x-generic', + 'application/x-tar' => 'package/x-generic', + 'application/zip' => 'package/x-generic', + 'application/msword' => 'x-office/document', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => 'x-office/document', 'application/vnd.openxmlformats-officedocument.wordprocessingml.template' => 'x-office/document', @@ -162,6 +183,7 @@ class OC_Helper { 'application/vnd.oasis.opendocument.text-template' => 'x-office/document', 'application/vnd.oasis.opendocument.text-web' => 'x-office/document', 'application/vnd.oasis.opendocument.text-master' => 'x-office/document', + 'application/mspowerpoint' => 'x-office/presentation', 'application/vnd.ms-powerpoint' => 'x-office/presentation', 'application/vnd.openxmlformats-officedocument.presentationml.presentation' => 'x-office/presentation', @@ -173,6 +195,7 @@ class OC_Helper { 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12' => 'x-office/presentation', 'application/vnd.oasis.opendocument.presentation' => 'x-office/presentation', 'application/vnd.oasis.opendocument.presentation-template' => 'x-office/presentation', + 'application/msexcel' => 'x-office/spreadsheet', 'application/vnd.ms-excel' => 'x-office/spreadsheet', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => 'x-office/spreadsheet', @@ -183,6 +206,7 @@ class OC_Helper { 'application/vnd.ms-excel.sheet.binary.macroEnabled.12' => 'x-office/spreadsheet', 'application/vnd.oasis.opendocument.spreadsheet' => 'x-office/spreadsheet', 'application/vnd.oasis.opendocument.spreadsheet-template' => 'x-office/spreadsheet', + 'application/msaccess' => 'database', ); diff --git a/lib/private/mimetypes.list.php b/lib/private/mimetypes.list.php index 174877d623b..7bf061172c9 100644 --- a/lib/private/mimetypes.list.php +++ b/lib/private/mimetypes.list.php @@ -24,11 +24,13 @@ * Array mapping file extensions to mimetypes (in alphabetical order). */ return array( + '7z' => 'application/x-7z-compressed', 'accdb'=>'application/msaccess', 'ai' => 'application/illustrator', 'avi'=>'video/x-msvideo', 'bash' => 'text/x-shellscript', 'blend'=>'application/x-blender', + 'bin' => 'application/x-bin', 'cb7' => 'application/x-cbr', 'cba' => 'application/x-cbr', 'cbr' => 'application/x-cbr', @@ -42,11 +44,13 @@ return array( 'cvbdl' => 'application/x-cbr', 'c' => 'text/x-c', 'c++' => 'text/x-c++src', + 'deb' => 'application/x-deb', 'doc'=>'application/msword', 'docx'=>'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'dot'=>'application/msword', 'dotx'=>'application/vnd.openxmlformats-officedocument.wordprocessingml.template', 'dv'=>'video/dv', + 'eot' => 'application/vnd.ms-fontobject', 'epub' => 'application/epub+zip', 'exe'=>'application/x-ms-dos-executable', 'flac'=>'audio/flac', @@ -61,6 +65,7 @@ return array( 'jpeg'=>'image/jpeg', 'jpg'=>'image/jpeg', 'js'=>'application/javascript', + 'json' => 'application/json', 'keynote'=>'application/x-iwork-keynote-sffkey', 'kra'=>'application/x-krita', 'm2t'=>'video/mp2t', @@ -85,6 +90,7 @@ return array( 'oga'=>'audio/ogg', 'ogg'=>'audio/ogg', 'ogv'=>'video/ogg', + 'otf'=>'font/opentype', 'pages'=>'application/x-iwork-pages-sffpages', 'pdf'=>'application/pdf', 'php'=>'application/x-php', @@ -93,22 +99,26 @@ return array( 'ppt'=>'application/mspowerpoint', 'pptx'=>'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'psd'=>'application/x-photoshop', - 'py'=>'text/x-script.python', + 'py'=>'text/x-python', + 'rar' => 'application/x-rar-compressed', 'reveal' => 'text/reveal', 'sgf' => 'application/sgf', 'sh-lib' => 'text/x-shellscript', 'sh' => 'text/x-shellscript', 'svg'=>'image/svg+xml', + 'swf' => 'application/x-shockwave-flash', 'tar'=>'application/x-tar', 'tar.gz'=>'application/x-compressed', 'tgz'=>'application/x-compressed', 'tiff'=>'image/tiff', 'tif'=>'image/tiff', + 'ttf'=>'application/x-font-ttf', 'txt'=>'text/plain', 'vcard' => 'text/vcard', 'vcf' => 'text/vcard', 'wav'=>'audio/wav', 'webm'=>'video/webm', + 'woff' => 'application/font-woff', 'wmv'=>'video/x-ms-asf', 'xcf'=>'application/x-gimp', 'xls'=>'application/msexcel', -- cgit v1.2.3 From cac4652c10763715fa5cdf46a71b2b8714b865d4 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Wed, 19 Feb 2014 16:28:29 +0100 Subject: coding style: spaces around => --- lib/private/mimetypes.list.php | 132 ++++++++++++++++++++--------------------- 1 file changed, 66 insertions(+), 66 deletions(-) (limited to 'lib') diff --git a/lib/private/mimetypes.list.php b/lib/private/mimetypes.list.php index 7bf061172c9..ff2a7ecc48d 100644 --- a/lib/private/mimetypes.list.php +++ b/lib/private/mimetypes.list.php @@ -25,11 +25,11 @@ */ return array( '7z' => 'application/x-7z-compressed', - 'accdb'=>'application/msaccess', + 'accdb' => 'application/msaccess', 'ai' => 'application/illustrator', - 'avi'=>'video/x-msvideo', + 'avi' => 'video/x-msvideo', 'bash' => 'text/x-shellscript', - 'blend'=>'application/x-blender', + 'blend' => 'application/x-blender', 'bin' => 'application/x-bin', 'cb7' => 'application/x-cbr', 'cba' => 'application/x-cbr', @@ -40,89 +40,89 @@ return array( 'cc' => 'text/x-c', 'cdr' => 'application/coreldraw', 'cpp' => 'text/x-c++src', - 'css'=>'text/css', + 'css' => 'text/css', 'cvbdl' => 'application/x-cbr', 'c' => 'text/x-c', 'c++' => 'text/x-c++src', 'deb' => 'application/x-deb', - 'doc'=>'application/msword', - 'docx'=>'application/vnd.openxmlformats-officedocument.wordprocessingml.document', - 'dot'=>'application/msword', - 'dotx'=>'application/vnd.openxmlformats-officedocument.wordprocessingml.template', - 'dv'=>'video/dv', + 'doc' => 'application/msword', + 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', + 'dot' => 'application/msword', + 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', + 'dv' => 'video/dv', 'eot' => 'application/vnd.ms-fontobject', 'epub' => 'application/epub+zip', - 'exe'=>'application/x-ms-dos-executable', - 'flac'=>'audio/flac', - 'gif'=>'image/gif', - 'gz'=>'application/x-gzip', - 'gzip'=>'application/x-gzip', - 'html'=>'text/html', - 'htm'=>'text/html', - 'ical'=>'text/calendar', - 'ics'=>'text/calendar', + 'exe' => 'application/x-ms-dos-executable', + 'flac' => 'audio/flac', + 'gif' => 'image/gif', + 'gz' => 'application/x-gzip', + 'gzip' => 'application/x-gzip', + 'html' => 'text/html', + 'htm' => 'text/html', + 'ical' => 'text/calendar', + 'ics' => 'text/calendar', 'impress' => 'text/impress', - 'jpeg'=>'image/jpeg', - 'jpg'=>'image/jpeg', - 'js'=>'application/javascript', + 'jpeg' => 'image/jpeg', + 'jpg' => 'image/jpeg', + 'js' => 'application/javascript', 'json' => 'application/json', - 'keynote'=>'application/x-iwork-keynote-sffkey', - 'kra'=>'application/x-krita', - 'm2t'=>'video/mp2t', - 'm4v'=>'video/mp4', + 'keynote' => 'application/x-iwork-keynote-sffkey', + 'kra' => 'application/x-krita', + 'm2t' => 'video/mp2t', + 'm4v' => 'video/mp4', 'markdown' => 'text/markdown', 'mdown' => 'text/markdown', 'md' => 'text/markdown', - 'mdb'=>'application/msaccess', + 'mdb' => 'application/msaccess', 'mdwn' => 'text/markdown', 'mobi' => 'application/x-mobipocket-ebook', - 'mov'=>'video/quicktime', - 'mp3'=>'audio/mpeg', - 'mp4'=>'video/mp4', - 'mpeg'=>'video/mpeg', - 'mpg'=>'video/mpeg', - 'msi'=>'application/x-msi', - 'numbers'=>'application/x-iwork-numbers-sffnumbers', - 'odg'=>'application/vnd.oasis.opendocument.graphics', - 'odp'=>'application/vnd.oasis.opendocument.presentation', - 'ods'=>'application/vnd.oasis.opendocument.spreadsheet', - 'odt'=>'application/vnd.oasis.opendocument.text', - 'oga'=>'audio/ogg', - 'ogg'=>'audio/ogg', - 'ogv'=>'video/ogg', - 'otf'=>'font/opentype', - 'pages'=>'application/x-iwork-pages-sffpages', - 'pdf'=>'application/pdf', - 'php'=>'application/x-php', - 'pl'=>'application/x-pearl', - 'png'=>'image/png', - 'ppt'=>'application/mspowerpoint', - 'pptx'=>'application/vnd.openxmlformats-officedocument.presentationml.presentation', - 'psd'=>'application/x-photoshop', - 'py'=>'text/x-python', + 'mov' => 'video/quicktime', + 'mp3' => 'audio/mpeg', + 'mp4' => 'video/mp4', + 'mpeg' => 'video/mpeg', + 'mpg' => 'video/mpeg', + 'msi' => 'application/x-msi', + 'numbers' => 'application/x-iwork-numbers-sffnumbers', + 'odg' => 'application/vnd.oasis.opendocument.graphics', + 'odp' => 'application/vnd.oasis.opendocument.presentation', + 'ods' => 'application/vnd.oasis.opendocument.spreadsheet', + 'odt' => 'application/vnd.oasis.opendocument.text', + 'oga' => 'audio/ogg', + 'ogg' => 'audio/ogg', + 'ogv' => 'video/ogg', + 'otf' => 'font/opentype', + 'pages' => 'application/x-iwork-pages-sffpages', + 'pdf' => 'application/pdf', + 'php' => 'application/x-php', + 'pl' => 'application/x-pearl', + 'png' => 'image/png', + 'ppt' => 'application/mspowerpoint', + 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', + 'psd' => 'application/x-photoshop', + 'py' => 'text/x-python', 'rar' => 'application/x-rar-compressed', 'reveal' => 'text/reveal', 'sgf' => 'application/sgf', 'sh-lib' => 'text/x-shellscript', 'sh' => 'text/x-shellscript', - 'svg'=>'image/svg+xml', + 'svg' => 'image/svg+xml', 'swf' => 'application/x-shockwave-flash', - 'tar'=>'application/x-tar', - 'tar.gz'=>'application/x-compressed', - 'tgz'=>'application/x-compressed', - 'tiff'=>'image/tiff', - 'tif'=>'image/tiff', - 'ttf'=>'application/x-font-ttf', - 'txt'=>'text/plain', + 'tar' => 'application/x-tar', + 'tar.gz' => 'application/x-compressed', + 'tgz' => 'application/x-compressed', + 'tiff' => 'image/tiff', + 'tif' => 'image/tiff', + 'ttf' => 'application/x-font-ttf', + 'txt' => 'text/plain', 'vcard' => 'text/vcard', 'vcf' => 'text/vcard', - 'wav'=>'audio/wav', - 'webm'=>'video/webm', + 'wav' => 'audio/wav', + 'webm' => 'video/webm', 'woff' => 'application/font-woff', - 'wmv'=>'video/x-ms-asf', - 'xcf'=>'application/x-gimp', - 'xls'=>'application/msexcel', - 'xlsx'=>'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', - 'xml'=>'application/xml', - 'zip'=>'application/zip', + 'wmv' => 'video/x-ms-asf', + 'xcf' => 'application/x-gimp', + 'xls' => 'application/msexcel', + 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', + 'xml' => 'application/xml', + 'zip' => 'application/zip', ); -- cgit v1.2.3 From a6fb6abbe015b6c2fa643da94884fc1ec2fdb336 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Thu, 20 Feb 2014 10:34:40 +0100 Subject: fix filetype icons for gzip, tex, perl, csv, sh --- lib/private/helper.php | 5 +++++ lib/private/mimetypes.list.php | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/private/helper.php b/lib/private/helper.php index 9b5bf0652ae..1aab2f296e1 100644 --- a/lib/private/helper.php +++ b/lib/private/helper.php @@ -163,13 +163,17 @@ class OC_Helper { 'application/vnd.ms-fontobject' => 'font', 'application/json' => 'text/code', + 'application/x-perl' => 'text/code', 'application/x-php' => 'text/code', + 'text/x-shellscript' => 'text/code', 'application/xml' => 'text/html', 'text/css' => 'text/code', + 'application/x-tex' => 'text', 'application/x-compressed' => 'package/x-generic', 'application/x-7z-compressed' => 'package/x-generic', 'application/x-deb' => 'package/x-generic', + 'application/x-gzip' => 'package/x-generic', 'application/x-rar-compressed' => 'package/x-generic', 'application/x-tar' => 'package/x-generic', 'application/zip' => 'package/x-generic', @@ -206,6 +210,7 @@ class OC_Helper { 'application/vnd.ms-excel.sheet.binary.macroEnabled.12' => 'x-office/spreadsheet', 'application/vnd.oasis.opendocument.spreadsheet' => 'x-office/spreadsheet', 'application/vnd.oasis.opendocument.spreadsheet-template' => 'x-office/spreadsheet', + 'text/csv' => 'x-office/spreadsheet', 'application/msaccess' => 'database', ); diff --git a/lib/private/mimetypes.list.php b/lib/private/mimetypes.list.php index ff2a7ecc48d..9bd07b89023 100644 --- a/lib/private/mimetypes.list.php +++ b/lib/private/mimetypes.list.php @@ -41,6 +41,7 @@ return array( 'cdr' => 'application/coreldraw', 'cpp' => 'text/x-c++src', 'css' => 'text/css', + 'csv' => 'text/csv', 'cvbdl' => 'application/x-cbr', 'c' => 'text/x-c', 'c++' => 'text/x-c++src', @@ -94,7 +95,7 @@ return array( 'pages' => 'application/x-iwork-pages-sffpages', 'pdf' => 'application/pdf', 'php' => 'application/x-php', - 'pl' => 'application/x-pearl', + 'pl' => 'application/x-perl', 'png' => 'image/png', 'ppt' => 'application/mspowerpoint', 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', @@ -109,6 +110,7 @@ return array( 'swf' => 'application/x-shockwave-flash', 'tar' => 'application/x-tar', 'tar.gz' => 'application/x-compressed', + 'tex' => 'application/x-tex', 'tgz' => 'application/x-compressed', 'tiff' => 'image/tiff', 'tif' => 'image/tiff', -- cgit v1.2.3 From 3e2c56157bfb20fbc48bdf668bd56fb47bd7cc1f Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Thu, 20 Feb 2014 11:33:46 +0100 Subject: reduce width of searchbox on mobile, fix overlap, fix #7282 --- core/css/mobile.css | 20 ++++++++++++++++++++ core/css/styles.css | 10 ++++++---- lib/base.php | 1 + 3 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 core/css/mobile.css (limited to 'lib') diff --git a/core/css/mobile.css b/core/css/mobile.css new file mode 100644 index 00000000000..a4cca6f37f6 --- /dev/null +++ b/core/css/mobile.css @@ -0,0 +1,20 @@ +@media only screen and (max-width: 600px) { + +/* compress search box on mobile, expand when focused */ +.searchbox input[type="search"] { + width: 17%; + -webkit-transition: width 100ms; + -moz-transition: width 100ms; + -o-transition: width 100ms; + transition: width 100ms; +} +.searchbox input[type="search"]:focus, +.searchbox input[type="search"]:active { + width: 155px; + -webkit-transition: width 100ms; + -moz-transition: width 100ms; + -o-transition: width 100ms; + transition: width 100ms; +} + +} diff --git a/core/css/styles.css b/core/css/styles.css index bee44785f12..c17d0a9bc07 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -205,17 +205,19 @@ textarea:disabled { color: #bbb; } - +/* Searchbox */ .searchbox input[type="search"] { + position: relative; font-size: 1.2em; - padding: .2em .5em .2em 1.5em; + padding-left: 1.5em; background: #fff url('../img/actions/search.svg') no-repeat .5em center; border: 0; - border-radius: 1em; + border-radius: 2em; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=70)"; filter:alpha(opacity=70); opacity: .7; - margin-top: 10px; + margin-top: 6px; float: right; } + input[type="submit"].enabled { background: #66f866; border: 1px solid #5e5; diff --git a/lib/base.php b/lib/base.php index a5f064bdb4b..84177c7ba6c 100644 --- a/lib/base.php +++ b/lib/base.php @@ -332,6 +332,7 @@ class OC { } OC_Util::addStyle("styles"); + OC_Util::addStyle("mobile"); OC_Util::addStyle("icons"); OC_Util::addStyle("apps"); OC_Util::addStyle("fixes"); -- cgit v1.2.3 From 69325c5eebef1f21b514a5edeb48d71d53815668 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Fri, 21 Feb 2014 08:11:07 +0100 Subject: Move session_regenerate_id to `login()` --- lib/private/user.php | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') diff --git a/lib/private/user.php b/lib/private/user.php index 08ead712028..a89b7286c10 100644 --- a/lib/private/user.php +++ b/lib/private/user.php @@ -227,6 +227,7 @@ class OC_User { * Log in a user and regenerate a new session - if the password is ok */ public static function login($uid, $password) { + session_regenerate_id(true); return self::getUserSession()->login($uid, $password); } -- cgit v1.2.3 From f7fa8662e21fdb93383e771ba629f82d8344582a Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Fri, 21 Feb 2014 08:12:45 +0100 Subject: Remove `session_id_regenerate` from here Jenkins somewhat complains that there are already sent headers. --- lib/private/user/session.php | 1 - 1 file changed, 1 deletion(-) (limited to 'lib') diff --git a/lib/private/user/session.php b/lib/private/user/session.php index cd03b30205f..1740bad5abe 100644 --- a/lib/private/user/session.php +++ b/lib/private/user/session.php @@ -157,7 +157,6 @@ class Session implements Emitter, \OCP\IUserSession { if($user !== false) { if (!is_null($user)) { if ($user->isEnabled()) { - session_regenerate_id(true); $this->setUser($user); $this->setLoginName($uid); $this->manager->emit('\OC\User', 'postLogin', array($user, $password)); -- cgit v1.2.3