diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-10-13 04:29:20 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-10-13 04:29:20 +0200 |
commit | 11e9ce25e622ea3a98c8085717541620fb878a69 (patch) | |
tree | 4cc0563d51768efa01a92a7333f370a4d0ccf3d3 /lib | |
parent | 141ff806c6cfbd349ffa232502a89a620882c409 (diff) | |
parent | d386bc8737374200b4dc8ca0b62e432757ac2f04 (diff) | |
download | nextcloud-server-11e9ce25e622ea3a98c8085717541620fb878a69.tar.gz nextcloud-server-11e9ce25e622ea3a98c8085717541620fb878a69.zip |
merge master into filesystem
Diffstat (limited to 'lib')
-rw-r--r-- | lib/archive/tar.php | 2 | ||||
-rw-r--r-- | lib/base.php | 2 | ||||
-rw-r--r-- | lib/db.php | 2 | ||||
-rw-r--r-- | lib/fileproxy/fileoperations.php | 37 | ||||
-rw-r--r-- | lib/files/filesystem.php | 8 | ||||
-rw-r--r-- | lib/l10n/nl.php | 2 | ||||
-rw-r--r-- | lib/l10n/ru_RU.php | 1 | ||||
-rw-r--r-- | lib/log.php | 13 | ||||
-rwxr-xr-x | lib/util.php | 4 |
9 files changed, 57 insertions, 14 deletions
diff --git a/lib/archive/tar.php b/lib/archive/tar.php index 7a47802bc34..86d39b88968 100644 --- a/lib/archive/tar.php +++ b/lib/archive/tar.php @@ -6,7 +6,7 @@ * See the COPYING-README file. */ -require_once 'Archive/Tar.php'; +require_once '3rdparty/Archive/Tar.php'; class OC_Archive_TAR extends OC_Archive{ const PLAIN=0; diff --git a/lib/base.php b/lib/base.php index 2704cdecf7a..f26e6f8e4ee 100644 --- a/lib/base.php +++ b/lib/base.php @@ -106,7 +106,7 @@ class OC{ } if($fullPath = stream_resolve_include_path($path)) { - require_once $path; + require_once $fullPath; } return false; } diff --git a/lib/db.php b/lib/db.php index f1597fb49fe..6c9eec5637d 100644 --- a/lib/db.php +++ b/lib/db.php @@ -391,7 +391,7 @@ class OC_DB { * * TODO: write more documentation */ - public static function getDbStructure( $file ,$mode=MDB2_SCHEMA_DUMP_STRUCTURE) { + public static function getDbStructure( $file, $mode=MDB2_SCHEMA_DUMP_STRUCTURE) { self::connectScheme(); // write the scheme diff --git a/lib/fileproxy/fileoperations.php b/lib/fileproxy/fileoperations.php new file mode 100644 index 00000000000..fe7edafad2b --- /dev/null +++ b/lib/fileproxy/fileoperations.php @@ -0,0 +1,37 @@ +<?php +/**
+ * ownCloud
+ *
+ * @author Bjoern Schiessle
+ * @copyright 2012 Bjoern Schiessle <schiessle@owncloud.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+/**
+ * check if standard file operations
+ */ + +class OC_FileProxy_FileOperations extends OC_FileProxy{
+ static $rootView;
+ + public function premkdir($path) {
+ if(!self::$rootView){
+ self::$rootView = new OC_FilesystemView('');
+ } + return !self::$rootView->file_exists($path);
+ } + +}
\ No newline at end of file diff --git a/lib/files/filesystem.php b/lib/files/filesystem.php index 841f30c7679..e4c269257c2 100644 --- a/lib/files/filesystem.php +++ b/lib/files/filesystem.php @@ -550,15 +550,15 @@ class Filesystem { static public function removeETagHook($params, $root = false) { if (isset($params['path'])) { - $path = $params['path']; + $path=$params['path']; } else { - $path = $params['oldpath']; + $path=$params['oldpath']; } if ($root) { // reduce path to the required part of it (no 'username/files') - $fakeRootView = new View($root); + $fakeRootView = new OC_FilesystemView($root); $count = 1; - $path = str_replace(\OC_App::getStorage("files")->getAbsolutePath($path), "", $fakeRootView->getAbsolutePath($path), $count); + $path=str_replace(OC_App::getStorage("files")->getAbsolutePath(), "", $fakeRootView->getAbsolutePath($path), $count); } $path = self::normalizePath($path); diff --git a/lib/l10n/nl.php b/lib/l10n/nl.php index a90fc6caa6c..c650071c03c 100644 --- a/lib/l10n/nl.php +++ b/lib/l10n/nl.php @@ -23,6 +23,6 @@ "last year" => "vorig jaar", "years ago" => "jaar geleden", "%s is available. Get <a href=\"%s\">more information</a>" => "%s is beschikbaar. Verkrijg <a href=\"%s\">meer informatie</a>", -"up to date" => "Bijgewerkt", +"up to date" => "bijgewerkt", "updates check is disabled" => "Meest recente versie controle is uitgeschakeld" ); diff --git a/lib/l10n/ru_RU.php b/lib/l10n/ru_RU.php index 1e691993014..decf63efb97 100644 --- a/lib/l10n/ru_RU.php +++ b/lib/l10n/ru_RU.php @@ -5,6 +5,7 @@ "Users" => "Пользователи", "Apps" => "Приложения", "Admin" => "Админ", +"ZIP download is turned off." => "Загрузка ZIP выключена.", "Files need to be downloaded one by one." => "Файлы должны быть загружены один за другим.", "Back to Files" => "Обратно к файлам", "Selected files too large to generate zip file." => "Выбранные файлы слишком велики для генерации zip-архива.", diff --git a/lib/log.php b/lib/log.php index 8bb2839be66..6de99b4ea6b 100644 --- a/lib/log.php +++ b/lib/log.php @@ -20,6 +20,7 @@ class OC_Log { const ERROR=3; const FATAL=4; + static public $enabled = true; static protected $class = null; /** @@ -29,11 +30,13 @@ class OC_Log { * @param int level */ public static function write($app, $message, $level) { - if (!self::$class) { - self::$class = 'OC_Log_'.ucfirst(OC_Config::getValue('log_type', 'owncloud')); - call_user_func(array(self::$class, 'init')); + if (self::$enabled) { + if (!self::$class) { + self::$class = 'OC_Log_'.ucfirst(OC_Config::getValue('log_type', 'owncloud')); + call_user_func(array(self::$class, 'init')); + } + $log_class=self::$class; + $log_class::write($app, $message, $level); } - $log_class=self::$class; - $log_class::write($app, $message, $level); } } diff --git a/lib/util.php b/lib/util.php index be56f7bda39..a787a79e52a 100755 --- a/lib/util.php +++ b/lib/util.php @@ -1,9 +1,9 @@ <?php - /** * Class for utility functions * */ + class OC_Util { public static $scripts=array(); public static $styles=array(); @@ -49,7 +49,9 @@ class OC_Util { \OC\Files\Filesystem::mount('\OC\Files\Storage\Local', array('datadir' => $user_root), $user); \OC\Files\Filesystem::init($user_dir); $quotaProxy=new OC_FileProxy_Quota(); + $fileOperationProxy = new OC_FileProxy_FileOperations(); OC_FileProxy::register($quotaProxy); + OC_FileProxy::register($fileOperationProxy); // Load personal mount config if (is_file($user_root.'/mount.php')) { $mountConfig = include($user_root.'/mount.php'); |