From a6d3b66c751d4775f0b21015af332fbe59a7a80a Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Thu, 14 Feb 2013 17:40:29 +0100 Subject: [PATCH 001/299] added app stylings to core --- core/css/styles.css | 136 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 136 insertions(+) diff --git a/core/css/styles.css b/core/css/styles.css index b41c205c21b..452a90c2270 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -334,3 +334,139 @@ div.crumb { float:left; display:block; background:url('../img/breadcrumb.svg') n div.crumb:first-child { padding:10px 20px 10px 5px; } div.crumb.last { font-weight:bold; background:none; padding-right:10px; } div.crumb a{ padding: 0.9em 0 0.7em 0; } + + +/* ---- APP STYLING ---- */ +#app { height: 100%; width: 100%; } +/* Navigation: folder like structure */ +#app-navigation { + width: 250px; height: 100%; float: left; padding-bottom: 32px; + -moz-box-sizing: border-box; box-sizing: border-box; + border-right: 1px solid #ccc; background-color: #f8f8f8; +} +#app-navigation > ul { + height: 100%; overflow: auto; + -moz-box-sizing: border-box; box-sizing: border-box; +} +#app-navigation li { + width: 100%; position: relative; + -moz-box-sizing: border-box; box-sizing: border-box; + text-shadow: 0 1px 0 rgba(255, 255, 255, .9); +} +#app-navigation li.active { background-color: #ccc; text-shadow: 0 1px 0 rgba(255,255,255,.7); } + +#app-navigation > ul > li { + border-bottom: 1px solid #ddd; + border-top: 1px solid #fff; + background-color: #eee; +} +#app-navigation > ul > li.active { border-bottom: 1px solid #ccc; border-top: 1px solid #ccc; } + +#app-navigation ul.with-icon a { + padding-left: 32px; + background-size: 16px 16px; background-repeat: no-repeat; + background-position: 10px center; +} + +#app-navigation li > a { + display: block; width: 100%; padding: 0 16px; overflow: hidden; line-height: 32px; + -moz-box-sizing: border-box; box-sizing: border-box; + white-space: nowrap; text-overflow: ellipsis; color: #333; +} +#app-navigation li:hover > a { background-color: #ccc; } +#app-navigation > ul > li:hover { border-top: 1px solid #ccc; } + +#app-navigation li.collapsible > button.collapse { + display: none; position: absolute; left: 6px; top: 5px; height: 16px; width: 16px; + background: none; background-image: url('%webroot%/core/img/actions/triangle-s.svg'); + background-repeat: no-repeat; background-size: 16px 16px; + border: none; border-radius: 0; outline: none !important; + box-shadow: none; +} + +#app-navigation li.collapsible:hover > a { background-image: none; } +#app-navigation li.collapsible:hover > button.collapse { display: block; } + +#app-navigation li.collapsible button.collapse { + -moz-transform: rotate(-90deg); + -webkit-transform: rotate(-90deg); + -ms-transform:rotate(-90deg); + -o-transform:rotate(-90deg); + transform: rotate(-90deg); +} + +#app-navigation li.collapsible.open button.collapse { + -moz-transform: rotate(0); + -webkit-transform: rotate(0); + -ms-transform:rotate(0); + -o-transform:rotate(0); + transform: rotate(0); +} + +/* Second level nesting for lists */ +#app-navigation > ul ul { display: none; } +#app-navigation > ul ul li > a { padding-left: 32px; } +#app-navigation > ul.with-icon ul li > a { padding-left: 48px; background-position: 24px center; } + +#app-navigation .open { + background-image: linear-gradient(top, rgb(238,238,238) 0%, rgb(245,245,245) 100%); + background-image: -o-linear-gradient(top, rgb(238,238,238) 0%, rgb(245,245,245) 100%); + background-image: -moz-linear-gradient(top, rgb(238,238,238) 0%, rgb(245,245,245) 100%); + background-image: -webkit-linear-gradient(top, rgb(238,238,238) 0%, rgb(245,245,245) 100%); + background-image: -ms-linear-gradient(top, rgb(238,238,238) 0%, rgb(245,245,245) 100%); +} + +#app-navigation > ul li.open:hover { + -webkit-box-shadow: inset 0 0 3px #cccccc; + box-shadow: inset 0 0 3px #cccccc; + border-top: 1px solid #ccc; +} + +#app-navigation > ul li.open ul { display: block; } + +/* drag and drop */ +#app-navigation .drag-and-drop { + -moz-transition: padding-bottom 500ms ease 0s; + -o-transition: padding-bottom 500ms ease 0s; + -webkit-transition: padding-bottom 500ms ease 0s; + -ms-transition: padding-bottom 500ms ease 0s; + transition: padding-bottom 500ms ease 0s; + padding-bottom: 40px; +} +#app-navigation .personalblock > legend { padding: 10px 0; margin: 0; } +#app-navigation .error { color: #DD1144; } + + + +/* Part where the content will be loaded into */ +#app-content { height: 100%; overflow-y: auto; } + +/* settings area */ +#app-settings { position: fixed; width: 249px; bottom: 0; border-top: 1px solid #ccc; } +#app-settings-header { background-color: #eee; } +#app-settings-content { background-color: #eee; display: none; padding: 10px; } +#app-settings.open #app-settings-content { display: block; } + +.settings-button { + height: 32px; width: 100%; padding: 0; margin: 0; display: block; + background-image: url('%webroot%/core/img/actions/settings.png'); + background-repeat: no-repeat; background-position: 10px center; + background-color: transparent; + box-shadow: none; + border-radius: 0; border: 0; +} +.settings-button:hover { background-color: #ddd; } + +/* icons */ +.folder-icon { background-image: url('%webroot%/core/img/places/folder.png'); } +.delete-icon { background-image: url('%webroot%/core/img/actions/delete.svg'); } +.delete-icon:hover { background-image: url('%webroot%/core/img/actions/delete-hover.svg'); } +.edit-icon { background-image: url('%webroot%/core/img/actions/rename.svg'); } + +/* buttons */ +button.loading { + background-image: url('%webroot%/core/img/loading.gif'); + background-position: right 10px center; + background-repeat: no-repeat; + padding-right: 30px; +} \ No newline at end of file -- GitLab From ab8c97e9c60307d25b83c71d2ea210b40e836382 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Thu, 14 Feb 2013 17:52:55 +0100 Subject: [PATCH 002/299] small fixes --- core/css/styles.css | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/core/css/styles.css b/core/css/styles.css index 452a90c2270..b441b5477a9 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -378,7 +378,7 @@ div.crumb a{ padding: 0.9em 0 0.7em 0; } #app-navigation li.collapsible > button.collapse { display: none; position: absolute; left: 6px; top: 5px; height: 16px; width: 16px; - background: none; background-image: url('%webroot%/core/img/actions/triangle-s.svg'); + background: none; background-image: url('../img/actions/triangle-s.svg'); background-repeat: no-repeat; background-size: 16px 16px; border: none; border-radius: 0; outline: none !important; box-shadow: none; @@ -449,7 +449,7 @@ div.crumb a{ padding: 0.9em 0 0.7em 0; } .settings-button { height: 32px; width: 100%; padding: 0; margin: 0; display: block; - background-image: url('%webroot%/core/img/actions/settings.png'); + background-image: url('../img/actions/settings.png'); background-repeat: no-repeat; background-position: 10px center; background-color: transparent; box-shadow: none; @@ -458,14 +458,14 @@ div.crumb a{ padding: 0.9em 0 0.7em 0; } .settings-button:hover { background-color: #ddd; } /* icons */ -.folder-icon { background-image: url('%webroot%/core/img/places/folder.png'); } -.delete-icon { background-image: url('%webroot%/core/img/actions/delete.svg'); } -.delete-icon:hover { background-image: url('%webroot%/core/img/actions/delete-hover.svg'); } -.edit-icon { background-image: url('%webroot%/core/img/actions/rename.svg'); } +.folder-icon { background-image: url('../img/places/folder.png'); } +.delete-icon { background-image: url('../img/actions/delete.svg'); } +.delete-icon:hover { background-image: url('../img/actions/delete-hover.svg'); } +.edit-icon { background-image: url('../img/actions/rename.svg'); } /* buttons */ button.loading { - background-image: url('%webroot%/core/img/loading.gif'); + background-image: url('../img/loading.gif'); background-position: right 10px center; background-repeat: no-repeat; padding-right: 30px; -- GitLab From 4205f8243982f9ee570c85581cb86c7412436782 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Thu, 14 Feb 2013 17:57:38 +0100 Subject: [PATCH 003/299] also make bottom border grey on first level hover --- core/css/styles.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/css/styles.css b/core/css/styles.css index b441b5477a9..ef619fac551 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -374,7 +374,7 @@ div.crumb a{ padding: 0.9em 0 0.7em 0; } white-space: nowrap; text-overflow: ellipsis; color: #333; } #app-navigation li:hover > a { background-color: #ccc; } -#app-navigation > ul > li:hover { border-top: 1px solid #ccc; } +#app-navigation > ul > li:hover { border-top: 1px solid #ccc; border-bottom: 1px solid #ccc;} #app-navigation li.collapsible > button.collapse { display: none; position: absolute; left: 6px; top: 5px; height: 16px; width: 16px; -- GitLab From ab5e20a2c18fca77aaf12c360e324ab0882a495e Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Wed, 27 Feb 2013 21:53:46 +0100 Subject: [PATCH 004/299] Just use rawurlencode in files list template --- apps/files/templates/part.list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/files/templates/part.list.php b/apps/files/templates/part.list.php index 3c6c5dbd267..8b7ae236387 100644 --- a/apps/files/templates/part.list.php +++ b/apps/files/templates/part.list.php @@ -9,9 +9,9 @@ // the older the file, the brighter the shade of grey; days*14 $relative_date_color = round((time()-$file['mtime'])/60/60/24*14); if($relative_date_color>200) $relative_date_color = 200; - $name = str_replace('+', '%20', urlencode($file['name'])); + $name = rawurlencode($file['name']); $name = str_replace('%2F', '/', $name); - $directory = str_replace('+', '%20', urlencode($file['directory'])); + $directory = rawurlencode($file['directory']); $directory = str_replace('%2F', '/', $directory); ?> Date: Wed, 6 Mar 2013 23:30:16 +0100 Subject: [PATCH 005/299] Allow to load splited config files ref #946 --- lib/config.php | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/lib/config.php b/lib/config.php index 0bd497b8e50..626dc8b02e3 100644 --- a/lib/config.php +++ b/lib/config.php @@ -130,14 +130,24 @@ class OC_Config{ return true; } - if( !file_exists( OC::$SERVERROOT."/config/config.php" )) { - return false; - } + // read all file in config dir ending by config.php + $config_files = glob( OC::$SERVERROOT."/config/*.config.php"); + + //Sort array naturally : + natsort($config_files); + + //Filter only regular files + $config_files = array_filter($config_files, 'is_file'); + + // Add default config + array_unshift($config_files,OC::$SERVERROOT."/config/config.php"); - // Include the file, save the data from $CONFIG - include OC::$SERVERROOT."/config/config.php"; - if( isset( $CONFIG ) && is_array( $CONFIG )) { - self::$cache = $CONFIG; + //Include file and merge config + foreach($config_files as $file){ + include $file; + if( isset( $CONFIG ) && is_array( $CONFIG )) { + self::$cache = array_merge(self::$cache, $CONFIG); + } } // We cached everything -- GitLab From d5da94acbcc53e310a1970af12af6712eb374a09 Mon Sep 17 00:00:00 2001 From: Brice Maron Date: Sat, 9 Mar 2013 21:41:59 +0100 Subject: [PATCH 006/299] Small perf improvement : filter before sort --- lib/config.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/config.php b/lib/config.php index 626dc8b02e3..387948c49cf 100644 --- a/lib/config.php +++ b/lib/config.php @@ -133,12 +133,12 @@ class OC_Config{ // read all file in config dir ending by config.php $config_files = glob( OC::$SERVERROOT."/config/*.config.php"); - //Sort array naturally : - natsort($config_files); - //Filter only regular files $config_files = array_filter($config_files, 'is_file'); + //Sort array naturally : + natsort($config_files); + // Add default config array_unshift($config_files,OC::$SERVERROOT."/config/config.php"); -- GitLab From 2fe56b8969406ce6b3ade6d9d2adfb8740329478 Mon Sep 17 00:00:00 2001 From: Thomas Mueller Date: Tue, 12 Mar 2013 09:14:05 +0100 Subject: [PATCH 007/299] fixes #2081 --- lib/setup.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/setup.php b/lib/setup.php index 8814447f52f..e9c090c5b6a 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -70,6 +70,13 @@ class OC_Setup { $password = htmlspecialchars_decode($options['adminpass']); $datadir = htmlspecialchars_decode($options['directory']); + if (OC_Util::runningOnWindows()) { + $datadir = realpath($datadir); + if (substr($datadir, -1) == '\\') { + $datadir = substr_replace($datadir ,"",-1); + } + } + //use sqlite3 when available, otherise sqlite2 will be used. if($dbtype=='sqlite' and class_exists('SQLite3')) { $dbtype='sqlite3'; -- GitLab From f971ce0b66ba32b1946df493ab5a937e4a778548 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Schie=C3=9Fle?= Date: Wed, 13 Mar 2013 11:15:17 +0100 Subject: [PATCH 008/299] let public link download handle json encoded file lists --- apps/files/js/files.js | 2 +- apps/files_sharing/public.php | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/files/js/files.js b/apps/files/js/files.js index a4ef41c2803..82069e3bc57 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -226,7 +226,7 @@ $(document).ready(function() { OC.Notification.show(t('files','Your download is being prepared. This might take some time if the files are big.')); // use special download URL if provided, e.g. for public shared files if ( (downloadURL = document.getElementById("downloadURL")) ) { - window.location=downloadURL.value+"&download&files="+files; + window.location=downloadURL.value+"&download&files="+encodeURIComponent(fileslist); } else { window.location=OC.filePath('files', 'ajax', 'download.php') + '?'+ $.param({ dir: dir, files: fileslist }); } diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php index 1da972ad7e3..c8aca498f8c 100644 --- a/apps/files_sharing/public.php +++ b/apps/files_sharing/public.php @@ -113,7 +113,13 @@ if (isset($path)) { // Download the file if (isset($_GET['download'])) { if (isset($_GET['files'])) { // download selected files - OC_Files::get($path, $_GET['files'], $_SERVER['REQUEST_METHOD'] == 'HEAD' ? true : false); + $files = urldecode($_GET['files']); + $files_list = json_decode($files); + // in case we get only a single file + if ($files_list === NULL ) { + $files_list = array($files); + } + OC_Files::get($path, $files_list, $_SERVER['REQUEST_METHOD'] == 'HEAD' ? true : false); } else { OC_Files::get($dir, $file, $_SERVER['REQUEST_METHOD'] == 'HEAD' ? true : false); } -- GitLab From 285d328ef145010922773a0d05451a80759da788 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Schie=C3=9Fle?= Date: Thu, 14 Mar 2013 20:10:21 +0100 Subject: [PATCH 009/299] use html video tag to preview videos for public shares --- apps/files_sharing/templates/public.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php index 88692445ec3..88a4cc242ba 100644 --- a/apps/files_sharing/templates/public.php +++ b/apps/files_sharing/templates/public.php @@ -28,7 +28,13 @@
- + +
+ +
+
  • t('No preview available for').' '.$_['fileTarget']); ?>
    @@ -37,6 +43,7 @@ />t('Download'))?>
+