aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2013-05-27 11:35:57 -0400
committerMichael Gapczynski <mtgap@owncloud.com>2013-05-27 11:35:57 -0400
commit16925672e885071afab1fe158dc206ab8ed93baf (patch)
tree143f64c88d7d47cb0f5a3a7641228a7cae24821b /lib
parent0953b68556152187ed305323b64b186cc21c2ade (diff)
parent0c621ff6a93fe1b34c77257d83fd344489f59bab (diff)
downloadnextcloud-server-16925672e885071afab1fe158dc206ab8ed93baf.tar.gz
nextcloud-server-16925672e885071afab1fe158dc206ab8ed93baf.zip
Merge branch 'master' into googledrive
Diffstat (limited to 'lib')
-rw-r--r--lib/app.php12
-rw-r--r--lib/base.php11
-rw-r--r--lib/connector/sabre/node.php2
-rw-r--r--lib/db.php17
-rw-r--r--lib/files/cache/backgroundwatcher.php4
-rw-r--r--lib/files/cache/cache.php42
-rw-r--r--lib/files/cache/scanner.php19
-rw-r--r--lib/files/cache/watcher.php2
-rw-r--r--lib/files/filesystem.php22
-rw-r--r--lib/files/storage/common.php18
-rw-r--r--lib/files/view.php44
-rw-r--r--lib/hooks/basicemitter.php89
-rw-r--r--lib/hooks/emitter.php32
-rw-r--r--lib/hooks/legacyemitter.php16
-rw-r--r--lib/l10n/ar.php2
-rw-r--r--lib/l10n/bg_BG.php2
-rw-r--r--lib/l10n/ca.php3
-rw-r--r--lib/l10n/cs_CZ.php2
-rw-r--r--lib/l10n/cy_GB.php2
-rw-r--r--lib/l10n/da.php2
-rw-r--r--lib/l10n/de.php2
-rw-r--r--lib/l10n/de_DE.php3
-rw-r--r--lib/l10n/el.php2
-rw-r--r--lib/l10n/es.php3
-rw-r--r--lib/l10n/es_AR.php2
-rw-r--r--lib/l10n/et_EE.php5
-rw-r--r--lib/l10n/eu.php2
-rw-r--r--lib/l10n/fi_FI.php3
-rw-r--r--lib/l10n/fr.php2
-rw-r--r--lib/l10n/gl.php3
-rw-r--r--lib/l10n/hu_HU.php3
-rw-r--r--lib/l10n/id.php2
-rw-r--r--lib/l10n/it.php3
-rw-r--r--lib/l10n/ja_JP.php2
-rw-r--r--lib/l10n/ka_GE.php2
-rw-r--r--lib/l10n/lv.php2
-rw-r--r--lib/l10n/nb_NO.php2
-rw-r--r--lib/l10n/nl.php3
-rw-r--r--lib/l10n/nn_NO.php2
-rw-r--r--lib/l10n/pl.php3
-rw-r--r--lib/l10n/pt_BR.php3
-rw-r--r--lib/l10n/pt_PT.php2
-rw-r--r--lib/l10n/ru.php2
-rw-r--r--lib/l10n/ru_RU.php3
-rw-r--r--lib/l10n/sk_SK.php2
-rw-r--r--lib/l10n/sl.php2
-rw-r--r--lib/l10n/sq.php2
-rw-r--r--lib/l10n/tr.php2
-rw-r--r--lib/l10n/uk.php2
-rw-r--r--lib/l10n/zh_CN.php2
-rw-r--r--lib/l10n/zh_TW.php2
-rw-r--r--lib/public/share.php142
-rw-r--r--lib/setup.php12
-rw-r--r--lib/user.php15
-rw-r--r--lib/user/database.php2
-rwxr-xr-xlib/util.php5
-rw-r--r--lib/vcategories.php31
-rw-r--r--lib/vobject/compoundproperty.php70
58 files changed, 578 insertions, 117 deletions
diff --git a/lib/app.php b/lib/app.php
index 55b4543ec9f..c6f6e92e60e 100644
--- a/lib/app.php
+++ b/lib/app.php
@@ -172,9 +172,17 @@ class OC_App{
return array();
}
$apps=array('files');
- $query = OC_DB::prepare( 'SELECT `appid` FROM `*PREFIX*appconfig`'
- .' WHERE `configkey` = \'enabled\' AND `configvalue`=\'yes\'' );
+ $sql = 'SELECT `appid` FROM `*PREFIX*appconfig`'
+ .' WHERE `configkey` = \'enabled\' AND `configvalue`=\'yes\'';
+ if (OC_Config::getValue( 'dbtype', 'sqlite' ) === 'oci') { //FIXME oracle hack
+ $sql = 'SELECT `appid` FROM `*PREFIX*appconfig`'
+ .' WHERE `configkey` = \'enabled\' AND to_char(`configvalue`)=\'yes\'';
+ }
+ $query = OC_DB::prepare( $sql );
$result=$query->execute();
+ if( \OC_DB::isError($result)) {
+ throw new DatabaseException($result->getMessage(), $query);
+ }
while($row=$result->fetchRow()) {
if(array_search($row['appid'], $apps)===false) {
$apps[]=$row['appid'];
diff --git a/lib/base.php b/lib/base.php
index 667202d3aef..724bd250a5c 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -260,6 +260,7 @@ class OC {
OC_Util::addScript("jquery-tipsy");
OC_Util::addScript("compatibility");
OC_Util::addScript("oc-dialogs");
+ OC_Util::addScript("octemplate");
OC_Util::addScript("js");
OC_Util::addScript("eventsource");
OC_Util::addScript("config");
@@ -542,10 +543,12 @@ class OC {
* register hooks for sharing
*/
public static function registerShareHooks() {
- OC_Hook::connect('OC_User', 'post_deleteUser', 'OCP\Share', 'post_deleteUser');
- OC_Hook::connect('OC_User', 'post_addToGroup', 'OCP\Share', 'post_addToGroup');
- OC_Hook::connect('OC_User', 'post_removeFromGroup', 'OCP\Share', 'post_removeFromGroup');
- OC_Hook::connect('OC_User', 'post_deleteGroup', 'OCP\Share', 'post_deleteGroup');
+ if(\OC_Config::getValue('installed')) {
+ OC_Hook::connect('OC_User', 'post_deleteUser', 'OCP\Share', 'post_deleteUser');
+ OC_Hook::connect('OC_User', 'post_addToGroup', 'OCP\Share', 'post_addToGroup');
+ OC_Hook::connect('OC_User', 'post_removeFromGroup', 'OCP\Share', 'post_removeFromGroup');
+ OC_Hook::connect('OC_User', 'post_deleteGroup', 'OCP\Share', 'post_deleteGroup');
+ }
}
/**
diff --git a/lib/connector/sabre/node.php b/lib/connector/sabre/node.php
index 360c3066d05..1ffa048d6b2 100644
--- a/lib/connector/sabre/node.php
+++ b/lib/connector/sabre/node.php
@@ -101,7 +101,7 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr
/**
* @brief Ensure that the fileinfo cache is filled
- & @note Uses OC_FileCache or a direct stat
+ * @note Uses OC_FileCache or a direct stat
*/
protected function getFileinfoCache() {
if (!isset($this->fileinfo_cache)) {
diff --git a/lib/db.php b/lib/db.php
index 8f6f50bda6e..61836551833 100644
--- a/lib/db.php
+++ b/lib/db.php
@@ -273,18 +273,13 @@ class OC_DB {
break;
case 'oci':
$dsn = array(
- 'phptype' => 'oci8',
- 'username' => $user,
- 'password' => $pass,
- 'charset' => 'AL32UTF8',
+ 'phptype' => 'oci8',
+ 'username' => $user,
+ 'password' => $pass,
+ 'service' => $name,
+ 'hostspec' => $host,
+ 'charset' => 'AL32UTF8',
);
- if ($host != '') {
- $dsn['hostspec'] = $host;
- $dsn['database'] = $name;
- } else { // use dbname for hostspec
- $dsn['hostspec'] = $name;
- $dsn['database'] = $user;
- }
break;
case 'mssql':
$dsn = array(
diff --git a/lib/files/cache/backgroundwatcher.php b/lib/files/cache/backgroundwatcher.php
index 7549745e7d7..8933101577d 100644
--- a/lib/files/cache/backgroundwatcher.php
+++ b/lib/files/cache/backgroundwatcher.php
@@ -30,7 +30,7 @@ class BackgroundWatcher {
return;
}
list($storageId, $internalPath) = $cacheItem;
- $mounts = Mount::findByStorageId($storageId);
+ $mounts = Filesystem::getMountByStorageId($storageId);
if (count($mounts) === 0) {
//if the storage we need isn't mounted on default, try to find a user that has access to the storage
@@ -40,7 +40,7 @@ class BackgroundWatcher {
return;
}
Filesystem::initMountPoints($users[0]);
- $mounts = Mount::findByStorageId($storageId);
+ $mounts = Filesystem::getMountByStorageId($storageId);
if (count($mounts) === 0) {
return;
}
diff --git a/lib/files/cache/cache.php b/lib/files/cache/cache.php
index 8f5c9643bef..0210d5a73f1 100644
--- a/lib/files/cache/cache.php
+++ b/lib/files/cache/cache.php
@@ -107,7 +107,7 @@ class Cache {
$params = array($file);
}
$query = \OC_DB::prepare(
- 'SELECT `fileid`, `storage`, `path`, `parent`, `name`, `mimetype`, `mimepart`, `size`, `mtime`, `encrypted`, `etag`
+ 'SELECT `fileid`, `storage`, `path`, `parent`, `name`, `mimetype`, `mimepart`, `size`, `mtime`, `storage_mtime`, `encrypted`, `unencrypted_size`, `etag`
FROM `*PREFIX*filecache` ' . $where);
$result = $query->execute($params);
$data = $result->fetchRow();
@@ -123,9 +123,13 @@ class Cache {
$data['size'] = (int)$data['size'];
$data['mtime'] = (int)$data['mtime'];
$data['encrypted'] = (bool)$data['encrypted'];
+ $data['unencrypted_size'] = (int)$data['unencrypted_size'];
$data['storage'] = $this->storageId;
$data['mimetype'] = $this->getMimetype($data['mimetype']);
$data['mimepart'] = $this->getMimetype($data['mimepart']);
+ if ($data['storage_mtime'] == 0) {
+ $data['storage_mtime'] = $data['mtime'];
+ }
}
return $data;
@@ -141,13 +145,20 @@ class Cache {
$fileId = $this->getId($folder);
if ($fileId > -1) {
$query = \OC_DB::prepare(
- 'SELECT `fileid`, `storage`, `path`, `parent`, `name`, `mimetype`, `mimepart`, `size`, `mtime`, `encrypted`, `etag`
- FROM `*PREFIX*filecache` WHERE parent = ? ORDER BY `name` ASC');
+ 'SELECT `fileid`, `storage`, `path`, `parent`, `name`, `mimetype`, `mimepart`, `size`, `mtime`, `storage_mtime`, `encrypted`, `unencrypted_size`, `etag`
+ FROM `*PREFIX*filecache` WHERE `parent` = ? ORDER BY `name` ASC');
+
$result = $query->execute(array($fileId));
+ if (\OC_DB::isError($result)) {
+ \OCP\Util::writeLog('cache', 'getFolderContents failed: ' . $result->getMessage(), \OCP\Util::ERROR);
+ }
$files = $result->fetchAll();
foreach ($files as &$file) {
$file['mimetype'] = $this->getMimetype($file['mimetype']);
$file['mimepart'] = $this->getMimetype($file['mimepart']);
+ if ($file['storage_mtime'] == 0) {
+ $file['storage_mtime'] = $file['mtime'];
+ }
}
return $files;
} else {
@@ -195,7 +206,7 @@ class Cache {
. ' VALUES(' . implode(', ', $valuesPlaceholder) . ')');
$result = $query->execute($params);
if (\OC_DB::isError($result)) {
- \OCP\Util::writeLog('cache', 'Insert to cache failed: ' . $result, \OCP\Util::ERROR);
+ \OCP\Util::writeLog('cache', 'Insert to cache failed: ' . $result->getMessage(), \OCP\Util::ERROR);
}
return (int)\OC_DB::insertid('*PREFIX*filecache');
@@ -224,7 +235,7 @@ class Cache {
* @return array
*/
function buildParts(array $data) {
- $fields = array('path', 'parent', 'name', 'mimetype', 'size', 'mtime', 'encrypted', 'etag');
+ $fields = array('path', 'parent', 'name', 'mimetype', 'size', 'mtime', 'storage_mtime', 'encrypted', 'unencrypted_size', 'etag');
$params = array();
$queryParts = array();
foreach ($data as $name => $value) {
@@ -236,6 +247,11 @@ class Cache {
$params[] = $this->getMimetypeId(substr($value, 0, strpos($value, '/')));
$queryParts[] = '`mimepart`';
$value = $this->getMimetypeId($value);
+ } elseif ($name === 'storage_mtime') {
+ if (!isset($data['mtime'])) {
+ $params[] = $value;
+ $queryParts[] = '`mtime`';
+ }
}
$params[] = $value;
$queryParts[] = '`' . $name . '`';
@@ -324,8 +340,8 @@ class Cache {
if ($sourceData['mimetype'] === 'httpd/unix-directory') {
//find all child entries
- $query = \OC_DB::prepare('SELECT `path`, `fileid` FROM `*PREFIX*filecache` WHERE `path` LIKE ?');
- $result = $query->execute(array($source . '/%'));
+ $query = \OC_DB::prepare('SELECT `path`, `fileid` FROM `*PREFIX*filecache` WHERE `storage` = ? AND `path` LIKE ?');
+ $result = $query->execute(array($this->getNumericStorageId(), $source . '/%'));
$childEntries = $result->fetchAll();
$sourceLength = strlen($source);
$query = \OC_DB::prepare('UPDATE `*PREFIX*filecache` SET `path` = ?, `path_hash` = ? WHERE `fileid` = ?');
@@ -361,6 +377,9 @@ class Cache {
$pathHash = md5($file);
$query = \OC_DB::prepare('SELECT `size` FROM `*PREFIX*filecache` WHERE `storage` = ? AND `path_hash` = ?');
$result = $query->execute(array($this->getNumericStorageId(), $pathHash));
+ if( \OC_DB::isError($result)) {
+ \OCP\Util::writeLog('cache', 'get status failed: ' . $result->getMessage(), \OCP\Util::ERROR);
+ }
if ($row = $result->fetchRow()) {
if ((int)$row['size'] === -1) {
return self::SHALLOW;
@@ -384,7 +403,7 @@ class Cache {
*/
public function search($pattern) {
$query = \OC_DB::prepare('
- SELECT `fileid`, `storage`, `path`, `parent`, `name`, `mimetype`, `mimepart`, `size`, `mtime`, `encrypted`, `etag`
+ SELECT `fileid`, `storage`, `path`, `parent`, `name`, `mimetype`, `mimepart`, `size`, `mtime`, `encrypted`, `unencrypted_size`, `etag`
FROM `*PREFIX*filecache` WHERE `name` LIKE ? AND `storage` = ?'
);
$result = $query->execute(array($pattern, $this->getNumericStorageId()));
@@ -410,7 +429,7 @@ class Cache {
$where = '`mimepart` = ?';
}
$query = \OC_DB::prepare('
- SELECT `fileid`, `storage`, `path`, `parent`, `name`, `mimetype`, `mimepart`, `size`, `mtime`, `encrypted`, `etag`
+ SELECT `fileid`, `storage`, `path`, `parent`, `name`, `mimetype`, `mimepart`, `size`, `mtime`, `encrypted`, `unencrypted_size`, `etag`
FROM `*PREFIX*filecache` WHERE ' . $where . ' AND `storage` = ?'
);
$mimetype = $this->getMimetypeId($mimetype);
@@ -498,8 +517,11 @@ class Cache {
*/
public function getIncomplete() {
$query = \OC_DB::prepare('SELECT `path` FROM `*PREFIX*filecache`'
- . ' WHERE `storage` = ? AND `size` = -1 ORDER BY `fileid` DESC LIMIT 1');
+ . ' WHERE `storage` = ? AND `size` = -1 ORDER BY `fileid` DESC',1);
$result = $query->execute(array($this->getNumericStorageId()));
+ if (\OC_DB::isError($result)) {
+ \OCP\Util::writeLog('cache', 'getIncomplete failed: ' . $result->getMessage(), \OCP\Util::ERROR);
+ }
if ($row = $result->fetchRow()) {
return $row['path'];
} else {
diff --git a/lib/files/cache/scanner.php b/lib/files/cache/scanner.php
index 661bc486330..46122221dc2 100644
--- a/lib/files/cache/scanner.php
+++ b/lib/files/cache/scanner.php
@@ -51,6 +51,7 @@ class Scanner {
$data['size'] = $this->storage->filesize($path);
}
$data['etag'] = $this->storage->getETag($path);
+ $data['storage_mtime'] = $data['mtime'];
return $data;
}
@@ -115,7 +116,7 @@ class Scanner {
\OC_DB::beginTransaction();
while ($file = readdir($dh)) {
$child = ($path) ? $path . '/' . $file : $file;
- if (!$this->isIgnoredDir($file)) {
+ if (!\OC\Files\Filesystem::isIgnoredDir($file)) {
$data = $this->scanFile($child, $recursive === self::SCAN_SHALLOW);
if ($data) {
if ($data['size'] === -1) {
@@ -150,18 +151,6 @@ class Scanner {
}
/**
- * @brief check if the directory should be ignored when scanning
- * NOTE: the special directories . and .. would cause never ending recursion
- * @param String $dir
- * @return boolean
- */
- private function isIgnoredDir($dir) {
- if ($dir === '.' || $dir === '..') {
- return true;
- }
- return false;
- }
- /**
* @brief check if the file should be ignored when scanning
* NOTE: files with a '.part' extension are ignored as well!
* prevents unfinished put requests to be scanned
@@ -179,9 +168,11 @@ class Scanner {
* walk over any folders that are not fully scanned yet and scan them
*/
public function backgroundScan() {
- while (($path = $this->cache->getIncomplete()) !== false) {
+ $lastPath = null;
+ while (($path = $this->cache->getIncomplete()) !== false && $path !== $lastPath) {
$this->scan($path);
$this->cache->correctFolderSize($path);
+ $lastPath = $path;
}
}
}
diff --git a/lib/files/cache/watcher.php b/lib/files/cache/watcher.php
index 31059ec7f56..8bfd4602f3a 100644
--- a/lib/files/cache/watcher.php
+++ b/lib/files/cache/watcher.php
@@ -43,7 +43,7 @@ class Watcher {
*/
public function checkUpdate($path) {
$cachedEntry = $this->cache->get($path);
- if ($this->storage->hasUpdated($path, $cachedEntry['mtime'])) {
+ if ($this->storage->hasUpdated($path, $cachedEntry['storage_mtime'])) {
if ($this->storage->is_dir($path)) {
$this->scanner->scan($path, Scanner::SCAN_SHALLOW);
} else {
diff --git a/lib/files/filesystem.php b/lib/files/filesystem.php
index eadd8a93faf..b10625e20de 100644
--- a/lib/files/filesystem.php
+++ b/lib/files/filesystem.php
@@ -222,7 +222,10 @@ class Filesystem {
return false;
}
self::$defaultInstance = new View($root);
- self::$mounts = new Mount\Manager();
+
+ if(!self::$mounts) {
+ self::$mounts = new Mount\Manager();
+ }
//load custom mount config
self::initMountPoints($user);
@@ -233,7 +236,9 @@ class Filesystem {
}
static public function initMounts(){
- self::$mounts = new Mount\Manager();
+ if(!self::$mounts) {
+ self::$mounts = new Mount\Manager();
+ }
}
/**
@@ -451,6 +456,19 @@ class Filesystem {
}
/**
+ * @brief check if the directory should be ignored when scanning
+ * NOTE: the special directories . and .. would cause never ending recursion
+ * @param String $dir
+ * @return boolean
+ */
+ static public function isIgnoredDir($dir) {
+ if ($dir === '.' || $dir === '..') {
+ return true;
+ }
+ return false;
+ }
+
+ /**
* following functions are equivalent to their php builtin equivalents for arguments/return values.
*/
static public function mkdir($path) {
diff --git a/lib/files/storage/common.php b/lib/files/storage/common.php
index e87fe3b5239..3da13ac4df0 100644
--- a/lib/files/storage/common.php
+++ b/lib/files/storage/common.php
@@ -138,27 +138,21 @@ abstract class Common implements \OC\Files\Storage\Storage {
*/
public function deleteAll($directory, $empty = false) {
$directory = trim($directory, '/');
-
- if (!$this->file_exists(\OCP\USER::getUser() . '/' . $directory)
- || !$this->is_dir(\OCP\USER::getUser() . '/' . $directory)
- ) {
- return false;
- } elseif (!$this->isReadable(\OCP\USER::getUser() . '/' . $directory)) {
+ if (!$this->is_dir($directory) || !$this->isReadable($directory)) {
return false;
} else {
- $directoryHandle = $this->opendir(\OCP\USER::getUser() . '/' . $directory);
+ $directoryHandle = $this->opendir($directory);
while ($contents = readdir($directoryHandle)) {
- if ($contents != '.' && $contents != '..') {
- $path = $directory . "/" . $contents;
+ if (!\OC\Files\Filesystem::isIgnoredDir($contents)) {
+ $path = $directory . '/' . $contents;
if ($this->is_dir($path)) {
$this->deleteAll($path);
} else {
- $this->unlink(\OCP\USER::getUser() . '/' . $path); // TODO: make unlink use same system path as is_dir
+ $this->unlink($path);
}
}
}
- //$this->closedir( $directoryHandle ); // TODO: implement closedir in OC_FSV
- if ($empty == false) {
+ if ($empty === false) {
if (!$this->rmdir($directory)) {
return false;
}
diff --git a/lib/files/view.php b/lib/files/view.php
index f35e1e3dc16..8e7727d335c 100644
--- a/lib/files/view.php
+++ b/lib/files/view.php
@@ -251,8 +251,11 @@ class View {
if (!$this->file_exists($path)) {
$hooks[] = 'write';
}
-
- return $this->basicOperation('touch', $path, $hooks, $mtime);
+ $result = $this->basicOperation('touch', $path, $hooks, $mtime);
+ if (!$result) { //if native touch fails, we emulate it by changing the mtime in the cache
+ $this->putFileInfo($path, array('mtime' => $mtime));
+ }
+ return true;
}
public function file_get_contents($path) {
@@ -368,15 +371,24 @@ class View {
list(, $internalPath2) = Filesystem::resolvePath($absolutePath2 . $postFix2);
if ($storage) {
$result = $storage->rename($internalPath1, $internalPath2);
+ \OC_FileProxy::runPostProxies('rename', $absolutePath1, $absolutePath2);
} else {
$result = false;
}
} else {
- $source = $this->fopen($path1 . $postFix1, 'r');
- $target = $this->fopen($path2 . $postFix2, 'w');
- list($count, $result) = \OC_Helper::streamCopy($source, $target);
- list($storage1, $internalPath1) = Filesystem::resolvePath($absolutePath1 . $postFix1);
- $storage1->unlink($internalPath1);
+ if ($this->is_dir($path1)) {
+ $result = $this->copy($path1, $path2);
+ if ($result === true) {
+ list($storage1, $internalPath1) = Filesystem::resolvePath($absolutePath1 . $postFix1);
+ $result = $storage1->deleteAll($internalPath1);
+ }
+ } else {
+ $source = $this->fopen($path1 . $postFix1, 'r');
+ $target = $this->fopen($path2 . $postFix2, 'w');
+ list($count, $result) = \OC_Helper::streamCopy($source, $target);
+ list($storage1, $internalPath1) = Filesystem::resolvePath($absolutePath1 . $postFix1);
+ $storage1->unlink($internalPath1);
+ }
}
if ($this->fakeRoot == Filesystem::getRoot() && !Cache\Scanner::isPartialFile($path1)) {
\OC_Hook::emit(
@@ -459,9 +471,18 @@ class View {
$result = false;
}
} else {
- $source = $this->fopen($path1 . $postFix1, 'r');
- $target = $this->fopen($path2 . $postFix2, 'w');
- list($count, $result) = \OC_Helper::streamCopy($source, $target);
+ if ($this->is_dir($path1) && ($dh = $this->opendir($path1))) {
+ $result = $this->mkdir($path2);
+ while ($file = readdir($dh)) {
+ if (!Filesystem::isIgnoredDir($file)) {
+ $result = $this->copy($path1 . '/' . $file, $path2 . '/' . $file);
+ }
+ }
+ } else {
+ $source = $this->fopen($path1 . $postFix1, 'r');
+ $target = $this->fopen($path2 . $postFix2, 'w');
+ list($count, $result) = \OC_Helper::streamCopy($source, $target);
+ }
}
if ($this->fakeRoot == Filesystem::getRoot()) {
\OC_Hook::emit(
@@ -738,6 +759,9 @@ class View {
$data['permissions'] = $permissions;
}
}
+
+ $data = \OC_FileProxy::runPostProxies('getFileInfo', $path, $data);
+
return $data;
}
diff --git a/lib/hooks/basicemitter.php b/lib/hooks/basicemitter.php
new file mode 100644
index 00000000000..e615a58cfe8
--- /dev/null
+++ b/lib/hooks/basicemitter.php
@@ -0,0 +1,89 @@
+<?php
+/**
+ * Copyright (c) 2013 Robin Appelman <icewind@owncloud.com>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace OC\Hooks;
+
+abstract class BasicEmitter implements Emitter {
+
+ /**
+ * @var (callable[])[] $listeners
+ */
+ private $listeners = array();
+
+ /**
+ * @param string $scope
+ * @param string $method
+ * @param callable $callback
+ */
+ public function listen($scope, $method, $callback) {
+ $eventName = $scope . '::' . $method;
+ if (!isset($this->listeners[$eventName])) {
+ $this->listeners[$eventName] = array();
+ }
+ if (array_search($callback, $this->listeners[$eventName]) === false) {
+ $this->listeners[$eventName][] = $callback;
+ }
+ }
+
+ /**
+ * @param string $scope optional
+ * @param string $method optional
+ * @param callable $callback optional
+ */
+ public function removeListener($scope = null, $method = null, $callback = null) {
+ $names = array();
+ $allNames = array_keys($this->listeners);
+ if ($scope and $method) {
+ $name = $scope . '::' . $method;
+ if (isset($this->listeners[$name])) {
+ $names[] = $name;
+ }
+ } elseif ($scope) {
+ foreach ($allNames as $name) {
+ $parts = explode('::', $name, 2);
+ if ($parts[0] == $scope) {
+ $names[] = $name;
+ }
+ }
+ } elseif ($method) {
+ foreach ($allNames as $name) {
+ $parts = explode('::', $name, 2);
+ if ($parts[1] == $method) {
+ $names[] = $name;
+ }
+ }
+ } else {
+ $names = $allNames;
+ }
+
+ foreach ($names as $name) {
+ if ($callback) {
+ $index = array_search($callback, $this->listeners[$name]);
+ if ($index !== false) {
+ unset($this->listeners[$name][$index]);
+ }
+ } else {
+ $this->listeners[$name] = array();
+ }
+ }
+ }
+
+ /**
+ * @param string $scope
+ * @param string $method
+ * @param array $arguments optional
+ */
+ protected function emit($scope, $method, $arguments = array()) {
+ $eventName = $scope . '::' . $method;
+ if (isset($this->listeners[$eventName])) {
+ foreach ($this->listeners[$eventName] as $callback) {
+ call_user_func_array($callback, $arguments);
+ }
+ }
+ }
+}
diff --git a/lib/hooks/emitter.php b/lib/hooks/emitter.php
new file mode 100644
index 00000000000..8e9074bad67
--- /dev/null
+++ b/lib/hooks/emitter.php
@@ -0,0 +1,32 @@
+<?php
+/**
+ * Copyright (c) 2013 Robin Appelman <icewind@owncloud.com>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace OC\Hooks;
+
+/**
+ * Class Emitter
+ *
+ * interface for all classes that are able to emit events
+ *
+ * @package OC\Hooks
+ */
+interface Emitter {
+ /**
+ * @param string $scope
+ * @param string $method
+ * @param callable $callback
+ */
+ public function listen($scope, $method, $callback);
+
+ /**
+ * @param string $scope optional
+ * @param string $method optional
+ * @param callable $callback optional
+ */
+ public function removeListener($scope = null, $method = null, $callback = null);
+}
diff --git a/lib/hooks/legacyemitter.php b/lib/hooks/legacyemitter.php
new file mode 100644
index 00000000000..a2d16ace9a7
--- /dev/null
+++ b/lib/hooks/legacyemitter.php
@@ -0,0 +1,16 @@
+<?php
+/**
+ * Copyright (c) 2013 Robin Appelman <icewind@owncloud.com>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace OC\Hooks;
+
+abstract class LegacyEmitter extends BasicEmitter {
+ protected function emit($scope, $method, $arguments = array()) {
+ \OC_Hook::emit($scope, $method, $arguments);
+ parent::emit($scope, $method, $arguments);
+ }
+}
diff --git a/lib/l10n/ar.php b/lib/l10n/ar.php
index 98b9608ce02..22c934e238d 100644
--- a/lib/l10n/ar.php
+++ b/lib/l10n/ar.php
@@ -24,7 +24,6 @@
"%s set the database host." => "%s ادخل اسم خادم قاعدة البيانات",
"PostgreSQL username and/or password not valid" => "اسم المستخدم / أو كلمة المرور الخاصة بـPostgreSQL غير صحيحة",
"You need to enter either an existing account or the administrator." => "انت بحاجة لكتابة اسم مستخدم موجود أو حساب المدير.",
-"Oracle username and/or password not valid" => "اسم المستخدم و/أو كلمة المرور لنظام Oracle غير صحيح",
"MySQL username and/or password not valid" => "اسم المستخدم و/أو كلمة المرور لنظام MySQL غير صحيح",
"DB Error: \"%s\"" => "خطأ في قواعد البيانات : \"%s\"",
"Offending command was: \"%s\"" => "الأمر المخالف كان : \"%s\"",
@@ -32,6 +31,7 @@
"Drop this user from MySQL" => "احذف اسم المستخدم هذا من الـ MySQL",
"MySQL user '%s'@'%%' already exists" => "أسم المستخدم '%s'@'%%' الخاص بـ MySQL موجود مسبقا",
"Drop this user from MySQL." => "احذف اسم المستخدم هذا من الـ MySQL.",
+"Oracle username and/or password not valid" => "اسم المستخدم و/أو كلمة المرور لنظام Oracle غير صحيح",
"Offending command was: \"%s\", name: %s, password: %s" => "الأمر المخالف كان : \"%s\", اسم المستخدم : %s, كلمة المرور: %s",
"MS SQL username and/or password not valid: %s" => "اسم المستخدم و/أو كلمة المرور لنظام MS SQL غير صحيح : %s",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "اعدادات خادمك غير صحيحة بشكل تسمح لك بمزامنة ملفاتك وذلك بسبب أن واجهة WebDAV تبدو معطلة",
diff --git a/lib/l10n/bg_BG.php b/lib/l10n/bg_BG.php
index 73a7fdce481..2de4c0a6e68 100644
--- a/lib/l10n/bg_BG.php
+++ b/lib/l10n/bg_BG.php
@@ -23,13 +23,13 @@
"%s you may not use dots in the database name" => "%s, не можете да ползвате точки в името на базата от данни",
"PostgreSQL username and/or password not valid" => "Невалидно PostgreSQL потребителско име и/или парола",
"You need to enter either an existing account or the administrator." => "Необходимо е да влезете в всъществуващ акаунт или като администратора",
-"Oracle username and/or password not valid" => "Невалидно Oracle потребителско име и/или парола",
"MySQL username and/or password not valid" => "Невалидно MySQL потребителско име и/или парола",
"DB Error: \"%s\"" => "Грешка в базата от данни: \"%s\"",
"MySQL user '%s'@'localhost' exists already." => "MySQL потребителят '%s'@'localhost' вече съществува",
"Drop this user from MySQL" => "Изтриване на потребителя от MySQL",
"MySQL user '%s'@'%%' already exists" => "MySQL потребителят '%s'@'%%' вече съществува.",
"Drop this user from MySQL." => "Изтриване на потребителя от MySQL.",
+"Oracle username and/or password not valid" => "Невалидно Oracle потребителско име и/или парола",
"MS SQL username and/or password not valid: %s" => "Невалидно MS SQL потребителско име и/или парола: %s",
"Please double check the <a href='%s'>installation guides</a>." => "Моля направете повторна справка с <a href='%s'>ръководството за инсталиране</a>.",
"seconds ago" => "преди секунди",
diff --git a/lib/l10n/ca.php b/lib/l10n/ca.php
index 028bf2343a7..5c368a85b28 100644
--- a/lib/l10n/ca.php
+++ b/lib/l10n/ca.php
@@ -24,7 +24,7 @@
"%s set the database host." => "%s establiu l'ordinador central de la base de dades.",
"PostgreSQL username and/or password not valid" => "Nom d'usuari i/o contrasenya PostgreSQL no vàlids",
"You need to enter either an existing account or the administrator." => "Heu d'escriure un compte existent o el d'administrador.",
-"Oracle username and/or password not valid" => "Nom d'usuari i/o contrasenya Oracle no vàlids",
+"Oracle connection could not be established" => "No s'ha pogut establir la connexió Oracle",
"MySQL username and/or password not valid" => "Nom d'usuari i/o contrasenya MySQL no vàlids",
"DB Error: \"%s\"" => "Error DB: \"%s\"",
"Offending command was: \"%s\"" => "L'ordre en conflicte és: \"%s\"",
@@ -32,6 +32,7 @@
"Drop this user from MySQL" => "Elimina aquest usuari de MySQL",
"MySQL user '%s'@'%%' already exists" => "L'usuari MySQL '%s'@'%%' ja existeix",
"Drop this user from MySQL." => "Elimina aquest usuari de MySQL.",
+"Oracle username and/or password not valid" => "Nom d'usuari i/o contrasenya Oracle no vàlids",
"Offending command was: \"%s\", name: %s, password: %s" => "L'ordre en conflicte és: \"%s\", nom: %s, contrasenya: %s",
"MS SQL username and/or password not valid: %s" => "Nom d'usuari i/o contrasenya MS SQL no vàlids: %s",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "El servidor web no està configurat correctament per permetre la sincronització de fitxers perquè la interfície WebDAV sembla no funcionar correctament.",
diff --git a/lib/l10n/cs_CZ.php b/lib/l10n/cs_CZ.php
index e3007f687d9..36469507d40 100644
--- a/lib/l10n/cs_CZ.php
+++ b/lib/l10n/cs_CZ.php
@@ -24,7 +24,6 @@
"%s set the database host." => "Zadejte název počítače s databází %s.",
"PostgreSQL username and/or password not valid" => "Uživatelské jméno, či heslo PostgreSQL není platné",
"You need to enter either an existing account or the administrator." => "Musíte zadat existující účet, či správce.",
-"Oracle username and/or password not valid" => "Uživatelské jméno, či heslo Oracle není platné",
"MySQL username and/or password not valid" => "Uživatelské jméno, či heslo MySQL není platné",
"DB Error: \"%s\"" => "Chyba DB: \"%s\"",
"Offending command was: \"%s\"" => "Podezřelý příkaz byl: \"%s\"",
@@ -32,6 +31,7 @@
"Drop this user from MySQL" => "Zahodit uživatele z MySQL",
"MySQL user '%s'@'%%' already exists" => "Uživatel '%s'@'%%' již v MySQL existuje",
"Drop this user from MySQL." => "Zahodit uživatele z MySQL.",
+"Oracle username and/or password not valid" => "Uživatelské jméno, či heslo Oracle není platné",
"Offending command was: \"%s\", name: %s, password: %s" => "Podezřelý příkaz byl: \"%s\", jméno: %s, heslo: %s",
"MS SQL username and/or password not valid: %s" => "Uživatelské jméno, či heslo MSSQL není platné: %s",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Váš webový server není správně nastaven pro umožnění synchronizace, protože rozhraní WebDAV je rozbité.",
diff --git a/lib/l10n/cy_GB.php b/lib/l10n/cy_GB.php
index ab5623bbf44..b3503dcc572 100644
--- a/lib/l10n/cy_GB.php
+++ b/lib/l10n/cy_GB.php
@@ -24,7 +24,6 @@
"%s set the database host." => "%s gosod gwesteiwr y gronfa ddata.",
"PostgreSQL username and/or password not valid" => "Enw a/neu gyfrinair PostgreSQL annilys",
"You need to enter either an existing account or the administrator." => "Rhaid i chi naill ai gyflwyno cyfrif presennol neu'r gweinyddwr.",
-"Oracle username and/or password not valid" => "Enw a/neu gyfrinair Oracle annilys",
"MySQL username and/or password not valid" => "Enw a/neu gyfrinair MySQL annilys",
"DB Error: \"%s\"" => "Gwall DB: \"%s\"",
"Offending command was: \"%s\"" => "Y gorchymyn wnaeth beri tramgwydd oedd: \"%s\"",
@@ -32,6 +31,7 @@
"Drop this user from MySQL" => "Gollwng y defnyddiwr hwn o MySQL",
"MySQL user '%s'@'%%' already exists" => "Defnyddiwr MySQL '%s'@'%%' eisoes yn bodoli",
"Drop this user from MySQL." => "Gollwng y defnyddiwr hwn o MySQL.",
+"Oracle username and/or password not valid" => "Enw a/neu gyfrinair Oracle annilys",
"Offending command was: \"%s\", name: %s, password: %s" => "Y gorchymyn wnaeth beri tramgwydd oedd: \"%s\", enw: %s, cyfrinair: %s",
"MS SQL username and/or password not valid: %s" => "Enw a/neu gyfrinair MS SQL annilys: %s",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Nid yw eich gweinydd wedi'i gyflunio eto i ganiatáu cydweddu ffeiliau oherwydd bod y rhyngwyneb WebDAV wedi torri.",
diff --git a/lib/l10n/da.php b/lib/l10n/da.php
index dad64700e52..aead17f510e 100644
--- a/lib/l10n/da.php
+++ b/lib/l10n/da.php
@@ -24,7 +24,6 @@
"%s set the database host." => "%s sæt database værten.",
"PostgreSQL username and/or password not valid" => "PostgreSQL brugernavn og/eller kodeord er ikke gyldigt.",
"You need to enter either an existing account or the administrator." => "Du bliver nødt til at indtaste en eksisterende bruger eller en administrator.",
-"Oracle username and/or password not valid" => "Oracle brugernavn og/eller kodeord er ikke gyldigt.",
"MySQL username and/or password not valid" => "MySQL brugernavn og/eller kodeord er ikke gyldigt.",
"DB Error: \"%s\"" => "Databasefejl: \"%s\"",
"Offending command was: \"%s\"" => "Fejlende kommando var: \"%s\"",
@@ -32,6 +31,7 @@
"Drop this user from MySQL" => "Slet denne bruger fra MySQL",
"MySQL user '%s'@'%%' already exists" => "MySQL brugeren '%s'@'%%' eksisterer allerede.",
"Drop this user from MySQL." => "Slet denne bruger fra MySQL",
+"Oracle username and/or password not valid" => "Oracle brugernavn og/eller kodeord er ikke gyldigt.",
"Offending command was: \"%s\", name: %s, password: %s" => "Fejlende kommando var: \"%s\", navn: %s, password: %s",
"MS SQL username and/or password not valid: %s" => "MS SQL brugernavn og/eller adgangskode ikke er gyldigt: %s",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Din webserver er endnu ikke sat op til at tillade fil synkronisering fordi WebDAV grænsefladen virker ødelagt.",
diff --git a/lib/l10n/de.php b/lib/l10n/de.php
index 13acc1c55b5..74715bc66eb 100644
--- a/lib/l10n/de.php
+++ b/lib/l10n/de.php
@@ -24,7 +24,6 @@
"%s set the database host." => "%s setze den Datenbank-Host",
"PostgreSQL username and/or password not valid" => "PostgreSQL Benutzername und/oder Passwort ungültig",
"You need to enter either an existing account or the administrator." => "Du musst entweder ein existierendes Benutzerkonto oder das Administratoren-Konto angeben.",
-"Oracle username and/or password not valid" => "Oracle Benutzername und/oder Passwort ungültig",
"MySQL username and/or password not valid" => "MySQL Benutzername und/oder Passwort ungültig",
"DB Error: \"%s\"" => "DB Fehler: \"%s\"",
"Offending command was: \"%s\"" => "Fehlerhafter Befehl war: \"%s\"",
@@ -32,6 +31,7 @@
"Drop this user from MySQL" => "Lösche diesen Benutzer von MySQL",
"MySQL user '%s'@'%%' already exists" => "MySQL Benutzer '%s'@'%%' existiert bereits",
"Drop this user from MySQL." => "Lösche diesen Benutzer aus MySQL.",
+"Oracle username and/or password not valid" => "Oracle Benutzername und/oder Passwort ungültig",
"Offending command was: \"%s\", name: %s, password: %s" => "Fehlerhafter Befehl war: \"%s\", Name: %s, Passwort: %s",
"MS SQL username and/or password not valid: %s" => "MS SQL Benutzername und/oder Password ungültig: %s",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Dein Web-Server ist noch nicht für Datei-Synchronisation bereit, weil die WebDAV-Schnittstelle vermutlich defekt ist.",
diff --git a/lib/l10n/de_DE.php b/lib/l10n/de_DE.php
index 566e98b85ce..5ebe4fb26fc 100644
--- a/lib/l10n/de_DE.php
+++ b/lib/l10n/de_DE.php
@@ -24,7 +24,7 @@
"%s set the database host." => "%s setze den Datenbank-Host",
"PostgreSQL username and/or password not valid" => "PostgreSQL Benutzername und/oder Passwort ungültig",
"You need to enter either an existing account or the administrator." => "Sie müssen entweder ein existierendes Benutzerkonto oder das Administratoren-Konto angeben.",
-"Oracle username and/or password not valid" => "Oracle Benutzername und/oder Passwort ungültig",
+"Oracle connection could not be established" => "Die Oracle-Verbindung konnte nicht aufgebaut werden.",
"MySQL username and/or password not valid" => "MySQL Benutzername und/oder Passwort ungültig",
"DB Error: \"%s\"" => "DB Fehler: \"%s\"",
"Offending command was: \"%s\"" => "Fehlerhafter Befehl war: \"%s\"",
@@ -32,6 +32,7 @@
"Drop this user from MySQL" => "Lösche diesen Benutzer aus MySQL",
"MySQL user '%s'@'%%' already exists" => "MySQL Benutzer '%s'@'%%' existiert bereits",
"Drop this user from MySQL." => "Lösche diesen Benutzer aus MySQL.",
+"Oracle username and/or password not valid" => "Oracle Benutzername und/oder Passwort ungültig",
"Offending command was: \"%s\", name: %s, password: %s" => "Fehlerhafter Befehl war: \"%s\", Name: %s, Passwort: %s",
"MS SQL username and/or password not valid: %s" => "MS SQL Benutzername und/oder Passwort ungültig: %s",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Ihr Web-Server ist noch nicht für eine Datei-Synchronisation konfiguriert, weil die WebDAV-Schnittstelle vermutlich defekt ist.",
diff --git a/lib/l10n/el.php b/lib/l10n/el.php
index 14b63a8184c..8637b8da269 100644
--- a/lib/l10n/el.php
+++ b/lib/l10n/el.php
@@ -24,7 +24,6 @@
"%s set the database host." => "%s ρυθμίση του κεντρικόυ υπολογιστή βάσης δεδομένων. ",
"PostgreSQL username and/or password not valid" => "Μη έγκυρος χρήστης και/ή συνθηματικό της PostgreSQL",
"You need to enter either an existing account or the administrator." => "Χρειάζεται να εισάγετε είτε έναν υπάρχον λογαριασμό ή του διαχειριστή.",
-"Oracle username and/or password not valid" => "Μη έγκυρος χρήστης και/ή συνθηματικό της Oracle",
"MySQL username and/or password not valid" => "Μη έγκυρος χρήστης και/ή συνθηματικό της MySQL",
"DB Error: \"%s\"" => "Σφάλμα Βάσης Δεδομένων: \"%s\"",
"Offending command was: \"%s\"" => "Η εντολη παραβατικοτητας ηταν: \"%s\"",
@@ -32,6 +31,7 @@
"Drop this user from MySQL" => "Απόρριψη αυτού του χρήστη από την MySQL",
"MySQL user '%s'@'%%' already exists" => "Ο χρήστης '%s'@'%%' της MySQL υπάρχει ήδη",
"Drop this user from MySQL." => "Απόρριψη αυτού του χρήστη από την MySQL",
+"Oracle username and/or password not valid" => "Μη έγκυρος χρήστης και/ή συνθηματικό της Oracle",
"Offending command was: \"%s\", name: %s, password: %s" => "Η εντολη παραβατικοτητας ηταν: \"%s\", ονομα: %s, κωδικος: %s",
"MS SQL username and/or password not valid: %s" => "Το όνομα χρήστη και/ή ο κωδικός της MS SQL δεν είναι έγκυρα: %s",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Ο διακομιστής σας δεν έχει ρυθμιστεί κατάλληλα ώστε να επιτρέπει τον συγχρονισμό αρχείων γιατί η διεπαφή WebDAV πιθανόν να είναι κατεστραμμένη.",
diff --git a/lib/l10n/es.php b/lib/l10n/es.php
index af96e693d1c..3b32036d3af 100644
--- a/lib/l10n/es.php
+++ b/lib/l10n/es.php
@@ -24,7 +24,7 @@
"%s set the database host." => "%s ingresar el host de la base de datos.",
"PostgreSQL username and/or password not valid" => "Usuario y/o contraseña de PostgreSQL no válidos",
"You need to enter either an existing account or the administrator." => "Tiene que ingresar una cuenta existente o la del administrador.",
-"Oracle username and/or password not valid" => "Usuario y/o contraseña de Oracle no válidos",
+"Oracle connection could not be established" => "No se pudo establecer la conexión a Oracle",
"MySQL username and/or password not valid" => "Usuario y/o contraseña de MySQL no válidos",
"DB Error: \"%s\"" => "Error BD: \"%s\"",
"Offending command was: \"%s\"" => "Comando infractor: \"%s\"",
@@ -32,6 +32,7 @@
"Drop this user from MySQL" => "Eliminar este usuario de MySQL",
"MySQL user '%s'@'%%' already exists" => "Usuario MySQL '%s'@'%%' ya existe",
"Drop this user from MySQL." => "Eliminar este usuario de MySQL.",
+"Oracle username and/or password not valid" => "Usuario y/o contraseña de Oracle no válidos",
"Offending command was: \"%s\", name: %s, password: %s" => "Comando infractor: \"%s\", nombre: %s, contraseña: %s",
"MS SQL username and/or password not valid: %s" => "Usuario y/o contraseña de MS SQL no válidos: %s",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Su servidor web aún no está configurado adecuadamente para permitir sincronización de archivos ya que la interfaz WebDAV parece no estar funcionando.",
diff --git a/lib/l10n/es_AR.php b/lib/l10n/es_AR.php
index e9da37e0a3d..1df1b16de65 100644
--- a/lib/l10n/es_AR.php
+++ b/lib/l10n/es_AR.php
@@ -24,7 +24,6 @@
"%s set the database host." => "%s Especifique la dirección de la Base de Datos",
"PostgreSQL username and/or password not valid" => "Nombre de usuario o contraseña de PostgradeSQL no válido.",
"You need to enter either an existing account or the administrator." => "Debe ingresar una cuenta existente o el administrador",
-"Oracle username and/or password not valid" => "El nombre de usuario y contraseña no son válidos",
"MySQL username and/or password not valid" => "Usuario y/o contraseña MySQL no válido",
"DB Error: \"%s\"" => "Error DB: \"%s\"",
"Offending command was: \"%s\"" => "El comando no comprendido es: \"%s\"",
@@ -32,6 +31,7 @@
"Drop this user from MySQL" => "Borrar este usuario de MySQL",
"MySQL user '%s'@'%%' already exists" => "Usuario MySQL '%s'@'%%' ya existente",
"Drop this user from MySQL." => "Borrar este usuario de MySQL",
+"Oracle username and/or password not valid" => "El nombre de usuario y contraseña no son válidos",
"Offending command was: \"%s\", name: %s, password: %s" => "El comando no comprendido es: \"%s\", nombre: \"%s\", contraseña: \"%s\"",
"MS SQL username and/or password not valid: %s" => "Nombre de usuario y contraseña de MS SQL no son válidas: %s",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Tu servidor web no está configurado todavía para permitir sincronización de archivos porque la interfaz WebDAV parece no funcionar.",
diff --git a/lib/l10n/et_EE.php b/lib/l10n/et_EE.php
index 90c9c416827..24fc98bde64 100644
--- a/lib/l10n/et_EE.php
+++ b/lib/l10n/et_EE.php
@@ -9,7 +9,7 @@
"Files need to be downloaded one by one." => "Failid tuleb alla laadida ükshaaval.",
"Back to Files" => "Tagasi failide juurde",
"Selected files too large to generate zip file." => "Valitud failid on ZIP-faili loomiseks liiga suured.",
-"couldn't be determined" => "Ei suuda tuvastada",
+"couldn't be determined" => "ei suudetud tuvastada",
"Application is not enabled" => "Rakendus pole sisse lülitatud",
"Authentication error" => "Autentimise viga",
"Token expired. Please reload page." => "Kontrollkood aegus. Paelun lae leht uuesti.",
@@ -24,7 +24,7 @@
"%s set the database host." => "%s määra andmebaasi server.",
"PostgreSQL username and/or password not valid" => "PostgreSQL kasutajatunnus ja/või parool pole õiged",
"You need to enter either an existing account or the administrator." => "Sisesta kas juba olemasolev konto või administrator.",
-"Oracle username and/or password not valid" => "Oracle kasutajatunnus ja/või parool pole õiged",
+"Oracle connection could not be established" => "Ei suuda luua ühendust Oracle baasiga",
"MySQL username and/or password not valid" => "MySQL kasutajatunnus ja/või parool pole õiged",
"DB Error: \"%s\"" => "Andmebaasi viga: \"%s\"",
"Offending command was: \"%s\"" => "Tõrkuv käsk oli: \"%s\"",
@@ -32,6 +32,7 @@
"Drop this user from MySQL" => "Kustuta see kasutaja MySQL-ist",
"MySQL user '%s'@'%%' already exists" => "MySQL kasutaja '%s'@'%%' on juba olemas",
"Drop this user from MySQL." => "Kustuta see kasutaja MySQL-ist.",
+"Oracle username and/or password not valid" => "Oracle kasutajatunnus ja/või parool pole õiged",
"Offending command was: \"%s\", name: %s, password: %s" => "Tõrkuv käsk oli: \"%s\", nimi: %s, parool: %s",
"MS SQL username and/or password not valid: %s" => "MS SQL kasutajatunnus ja/või parool pole õiged: %s",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Veebiserveri ei ole veel korralikult seadistatud võimaldamaks failide sünkroniseerimist, kuna WebDAV liides näib olevat mittetoimiv.",
diff --git a/lib/l10n/eu.php b/lib/l10n/eu.php
index 934a4d19ab5..05b68b062c5 100644
--- a/lib/l10n/eu.php
+++ b/lib/l10n/eu.php
@@ -24,7 +24,6 @@
"%s set the database host." => "%s sartu datu basearen hostalaria.",
"PostgreSQL username and/or password not valid" => "PostgreSQL erabiltzaile edota pasahitza ez dira egokiak.",
"You need to enter either an existing account or the administrator." => "Existitzen den kontu bat edo administradorearena jarri behar duzu.",
-"Oracle username and/or password not valid" => "Oracle erabiltzaile edota pasahitza ez dira egokiak.",
"MySQL username and/or password not valid" => "MySQL erabiltzaile edota pasahitza ez dira egokiak.",
"DB Error: \"%s\"" => "DB errorea: \"%s\"",
"Offending command was: \"%s\"" => "Errorea komando honek sortu du: \"%s\"",
@@ -32,6 +31,7 @@
"Drop this user from MySQL" => "Ezabatu erabiltzaile hau MySQLtik",
"MySQL user '%s'@'%%' already exists" => "MySQL '%s'@'%%' erabiltzailea dagoeneko existitzen da",
"Drop this user from MySQL." => "Ezabatu erabiltzaile hau MySQLtik.",
+"Oracle username and/or password not valid" => "Oracle erabiltzaile edota pasahitza ez dira egokiak.",
"Offending command was: \"%s\", name: %s, password: %s" => "Errorea komando honek sortu du: \"%s\", izena: %s, pasahitza: %s",
"MS SQL username and/or password not valid: %s" => "MS SQL erabiltzaile izena edota pasahitza ez dira egokiak: %s",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Zure web zerbitzaria ez dago oraindik ongi konfiguratuta fitxategien sinkronizazioa egiteko, WebDAV interfazea ongi ez dagoela dirudi.",
diff --git a/lib/l10n/fi_FI.php b/lib/l10n/fi_FI.php
index c2e83f66166..0caa7b12df6 100644
--- a/lib/l10n/fi_FI.php
+++ b/lib/l10n/fi_FI.php
@@ -22,13 +22,14 @@
"%s enter the database name." => "%s anna tietokannan nimi.",
"%s you may not use dots in the database name" => "%s et voi käyttää pisteitä tietokannan nimessä",
"PostgreSQL username and/or password not valid" => "PostgreSQL:n käyttäjätunnus ja/tai salasana on väärin",
-"Oracle username and/or password not valid" => "Oraclen käyttäjätunnus ja/tai salasana on väärin",
+"Oracle connection could not be established" => "Oracle-yhteyttä ei voitu muodostaa",
"MySQL username and/or password not valid" => "MySQL:n käyttäjätunnus ja/tai salasana on väärin",
"DB Error: \"%s\"" => "Tietokantavirhe: \"%s\"",
"MySQL user '%s'@'localhost' exists already." => "MySQL-käyttäjä '%s'@'localhost' on jo olemassa.",
"Drop this user from MySQL" => "Pudota tämä käyttäjä MySQL:stä",
"MySQL user '%s'@'%%' already exists" => "MySQL-käyttäjä '%s'@'%%' on jo olemassa",
"Drop this user from MySQL." => "Pudota tämä käyttäjä MySQL:stä.",
+"Oracle username and/or password not valid" => "Oraclen käyttäjätunnus ja/tai salasana on väärin",
"MS SQL username and/or password not valid: %s" => "MS SQL -käyttäjätunnus ja/tai -salasana on väärin: %s",
"Please double check the <a href='%s'>installation guides</a>." => "Lue tarkasti <a href='%s'>asennusohjeet</a>.",
"seconds ago" => "sekuntia sitten",
diff --git a/lib/l10n/fr.php b/lib/l10n/fr.php
index c0920179dbb..af4efc2b63f 100644
--- a/lib/l10n/fr.php
+++ b/lib/l10n/fr.php
@@ -24,7 +24,6 @@
"%s set the database host." => "%s spécifiez l'hôte de la base de données.",
"PostgreSQL username and/or password not valid" => "Nom d'utilisateur et/ou mot de passe de la base PostgreSQL invalide",
"You need to enter either an existing account or the administrator." => "Vous devez spécifier soit le nom d'un compte existant, soit celui de l'administrateur.",
-"Oracle username and/or password not valid" => "Nom d'utilisateur et/ou mot de passe de la base Oracle invalide",
"MySQL username and/or password not valid" => "Nom d'utilisateur et/ou mot de passe de la base MySQL invalide",
"DB Error: \"%s\"" => "Erreur de la base de données : \"%s\"",
"Offending command was: \"%s\"" => "La requête en cause est : \"%s\"",
@@ -32,6 +31,7 @@
"Drop this user from MySQL" => "Retirer cet utilisateur de la base MySQL",
"MySQL user '%s'@'%%' already exists" => "L'utilisateur MySQL '%s'@'%%' existe déjà",
"Drop this user from MySQL." => "Retirer cet utilisateur de la base MySQL.",
+"Oracle username and/or password not valid" => "Nom d'utilisateur et/ou mot de passe de la base Oracle invalide",
"Offending command was: \"%s\", name: %s, password: %s" => "La requête en cause est : \"%s\", nom : %s, mot de passe : %s",
"MS SQL username and/or password not valid: %s" => "Le nom d'utilisateur et/ou le mot de passe de la base MS SQL est invalide : %s",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Votre serveur web, n'est pas correctement configuré pour permettre la synchronisation des fichiers, car l'interface WebDav ne fonctionne pas comme il faut.",
diff --git a/lib/l10n/gl.php b/lib/l10n/gl.php
index 783826508c9..1b4db4b30af 100644
--- a/lib/l10n/gl.php
+++ b/lib/l10n/gl.php
@@ -24,7 +24,7 @@
"%s set the database host." => "%s estabeleza o servidor da base de datos",
"PostgreSQL username and/or password not valid" => "Nome de usuario e/ou contrasinal de PostgreSQL incorrecto",
"You need to enter either an existing account or the administrator." => "Deberá introducir unha conta existente ou o administrador.",
-"Oracle username and/or password not valid" => "Nome de usuario e/ou contrasinal de Oracle incorrecto",
+"Oracle connection could not be established" => "Non foi posíbel estabelecer a conexión con Oracle",
"MySQL username and/or password not valid" => "Nome de usuario e/ou contrasinal de MySQL incorrecto",
"DB Error: \"%s\"" => "Produciuse un erro na base de datos: «%s»",
"Offending command was: \"%s\"" => "A orde ofensiva foi: «%s»",
@@ -32,6 +32,7 @@
"Drop this user from MySQL" => "Omitir este usuario de MySQL",
"MySQL user '%s'@'%%' already exists" => "O usuario MySQL «%s»@«%%» xa existe.",
"Drop this user from MySQL." => "Omitir este usuario de MySQL.",
+"Oracle username and/or password not valid" => "Nome de usuario e/ou contrasinal de Oracle incorrecto",
"Offending command was: \"%s\", name: %s, password: %s" => "A orde ofensiva foi: «%s», nome: %s, contrasinal: %s",
"MS SQL username and/or password not valid: %s" => "Nome de usuario e/ou contrasinal de MS SQL incorrecto: %s",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "O seu servidor web non está aínda configurado adecuadamente para permitir a sincronización de ficheiros xa que semella que a interface WebDAV non está a funcionar.",
diff --git a/lib/l10n/hu_HU.php b/lib/l10n/hu_HU.php
index 841020183b0..3b5c886bd2c 100644
--- a/lib/l10n/hu_HU.php
+++ b/lib/l10n/hu_HU.php
@@ -24,7 +24,7 @@
"%s set the database host." => "%s adja meg az adatbázist szolgáltató számítógép nevét.",
"PostgreSQL username and/or password not valid" => "A PostgreSQL felhasználói név és/vagy jelszó érvénytelen",
"You need to enter either an existing account or the administrator." => "Vagy egy létező felhasználó vagy az adminisztrátor bejelentkezési nevét kell megadnia",
-"Oracle username and/or password not valid" => "Az Oracle felhasználói név és/vagy jelszó érvénytelen",
+"Oracle connection could not be established" => "Az Oracle kapcsolat nem hozható létre",
"MySQL username and/or password not valid" => "A MySQL felhasználói név és/vagy jelszó érvénytelen",
"DB Error: \"%s\"" => "Adatbázis hiba: \"%s\"",
"Offending command was: \"%s\"" => "A hibát ez a parancs okozta: \"%s\"",
@@ -32,6 +32,7 @@
"Drop this user from MySQL" => "Törölje ezt a felhasználót a MySQL-ből",
"MySQL user '%s'@'%%' already exists" => "A '%s'@'%%' MySQL felhasználó már létezik",
"Drop this user from MySQL." => "Törölje ezt a felhasználót a MySQL-ből.",
+"Oracle username and/or password not valid" => "Az Oracle felhasználói név és/vagy jelszó érvénytelen",
"Offending command was: \"%s\", name: %s, password: %s" => "A hibát okozó parancs ez volt: \"%s\", login név: %s, jelszó: %s",
"MS SQL username and/or password not valid: %s" => "Az MS SQL felhasználónév és/vagy jelszó érvénytelen: %s",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Az Ön webkiszolgálója nincs megfelelően beállítva az állományok szinkronizálásához, mert a WebDAV-elérés úgy tűnik, nem működik.",
diff --git a/lib/l10n/id.php b/lib/l10n/id.php
index 54b46cd8961..29843a95327 100644
--- a/lib/l10n/id.php
+++ b/lib/l10n/id.php
@@ -24,7 +24,6 @@
"%s set the database host." => "%s setel host basis data.",
"PostgreSQL username and/or password not valid" => "Nama pengguna dan/atau sandi PostgreSQL tidak valid",
"You need to enter either an existing account or the administrator." => "Anda harus memasukkan akun yang sudah ada atau administrator.",
-"Oracle username and/or password not valid" => "Nama pengguna dan/atau sandi Oracle tidak valid",
"MySQL username and/or password not valid" => "Nama pengguna dan/atau sandi MySQL tidak valid",
"DB Error: \"%s\"" => "Galat Basis Data: \"%s\"",
"Offending command was: \"%s\"" => "Perintah yang bermasalah: \"%s\"",
@@ -32,6 +31,7 @@
"Drop this user from MySQL" => "Hapus pengguna ini dari MySQL",
"MySQL user '%s'@'%%' already exists" => "Pengguna MySQL '%s'@'%%' sudah ada.",
"Drop this user from MySQL." => "Hapus pengguna ini dari MySQL.",
+"Oracle username and/or password not valid" => "Nama pengguna dan/atau sandi Oracle tidak valid",
"Offending command was: \"%s\", name: %s, password: %s" => "Perintah yang bermasalah: \"%s\", nama pengguna: %s, sandi: %s",
"MS SQL username and/or password not valid: %s" => "Nama pengguna dan/atau sandi MySQL tidak valid: %s",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Web server Anda belum dikonfigurasikan dengan baik untuk mengizinkan sinkronisasi berkas karena tampaknya antarmuka WebDAV rusak.",
diff --git a/lib/l10n/it.php b/lib/l10n/it.php
index 1db48dbc80d..db26ac82ae3 100644
--- a/lib/l10n/it.php
+++ b/lib/l10n/it.php
@@ -24,7 +24,7 @@
"%s set the database host." => "%s imposta l'host del database.",
"PostgreSQL username and/or password not valid" => "Nome utente e/o password di PostgreSQL non validi",
"You need to enter either an existing account or the administrator." => "È necessario inserire un account esistente o l'amministratore.",
-"Oracle username and/or password not valid" => "Nome utente e/o password di Oracle non validi",
+"Oracle connection could not be established" => "La connessione a Oracle non può essere stabilita",
"MySQL username and/or password not valid" => "Nome utente e/o password di MySQL non validi",
"DB Error: \"%s\"" => "Errore DB: \"%s\"",
"Offending command was: \"%s\"" => "Il comando non consentito era: \"%s\"",
@@ -32,6 +32,7 @@
"Drop this user from MySQL" => "Elimina questo utente da MySQL",
"MySQL user '%s'@'%%' already exists" => "L'utente MySQL '%s'@'%%' esiste già",
"Drop this user from MySQL." => "Elimina questo utente da MySQL.",
+"Oracle username and/or password not valid" => "Nome utente e/o password di Oracle non validi",
"Offending command was: \"%s\", name: %s, password: %s" => "Il comando non consentito era: \"%s\", nome: %s, password: %s",
"MS SQL username and/or password not valid: %s" => "Nome utente e/o password MS SQL non validi: %s",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Il tuo server web non è configurato correttamente per consentire la sincronizzazione dei file poiché l'interfaccia WebDAV sembra essere danneggiata.",
diff --git a/lib/l10n/ja_JP.php b/lib/l10n/ja_JP.php
index 3b97ffc431f..0e856b0497d 100644
--- a/lib/l10n/ja_JP.php
+++ b/lib/l10n/ja_JP.php
@@ -24,7 +24,6 @@
"%s set the database host." => "%s にデータベースホストを設定します。",
"PostgreSQL username and/or password not valid" => "PostgreSQLのユーザ名もしくはパスワードは有効ではありません",
"You need to enter either an existing account or the administrator." => "既存のアカウントもしくは管理者のどちらかを入力する必要があります。",
-"Oracle username and/or password not valid" => "Oracleのユーザ名もしくはパスワードは有効ではありません",
"MySQL username and/or password not valid" => "MySQLのユーザ名もしくはパスワードは有効ではありません",
"DB Error: \"%s\"" => "DBエラー: \"%s\"",
"Offending command was: \"%s\"" => "違反コマンド: \"%s\"",
@@ -32,6 +31,7 @@
"Drop this user from MySQL" => "MySQLからこのユーザを削除",
"MySQL user '%s'@'%%' already exists" => "MySQLのユーザ '%s'@'%%' はすでに存在します。",
"Drop this user from MySQL." => "MySQLからこのユーザを削除する。",
+"Oracle username and/or password not valid" => "Oracleのユーザ名もしくはパスワードは有効ではありません",
"Offending command was: \"%s\", name: %s, password: %s" => "違反コマンド: \"%s\"、名前: %s、パスワード: %s",
"MS SQL username and/or password not valid: %s" => "MS SQL サーバーのユーザー名/パスワードが正しくありません: %s",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "WebDAVインタフェースが動作していないと考えられるため、あなたのWEBサーバはまだファイルの同期を許可するように適切な設定がされていません。",
diff --git a/lib/l10n/ka_GE.php b/lib/l10n/ka_GE.php
index a55323832ec..93835e4ead7 100644
--- a/lib/l10n/ka_GE.php
+++ b/lib/l10n/ka_GE.php
@@ -24,7 +24,6 @@
"%s set the database host." => "%s მიუთითეთ ბაზის ჰოსტი.",
"PostgreSQL username and/or password not valid" => "PostgreSQL იუზერნეიმი და/ან პაროლი არ არის სწორი",
"You need to enter either an existing account or the administrator." => "თქვენ უნდა შეიყვანოთ არსებული მომხმარებელის სახელი ან ადმინისტრატორი.",
-"Oracle username and/or password not valid" => "Oracle იუზერნეიმი და/ან პაროლი არ არის სწორი",
"MySQL username and/or password not valid" => "MySQL იუზერნეიმი და/ან პაროლი არ არის სწორი",
"DB Error: \"%s\"" => "DB შეცდომა: \"%s\"",
"Offending command was: \"%s\"" => "Offending ბრძანება იყო: \"%s\"",
@@ -32,6 +31,7 @@
"Drop this user from MySQL" => "წაშალე ეს მომხამრებელი MySQL–იდან",
"MySQL user '%s'@'%%' already exists" => "MySQL მომხმარებელი '%s'@'%%' უკვე არსებობს",
"Drop this user from MySQL." => "წაშალე ეს მომხამრებელი MySQL–იდან",
+"Oracle username and/or password not valid" => "Oracle იუზერნეიმი და/ან პაროლი არ არის სწორი",
"Offending command was: \"%s\", name: %s, password: %s" => "Offending ბრძანება იყო: \"%s\", სახელი: %s, პაროლი: %s",
"MS SQL username and/or password not valid: %s" => "MS SQL მომხმარებელი და/ან პაროლი არ არის მართებული: %s",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "თქვენი web სერვერი არ არის კონფიგურირებული ფაილ სინქრონიზაციისთვის, რადგან WebDAV ინტერფეისი შეიძლება იყოს გატეხილი.",
diff --git a/lib/l10n/lv.php b/lib/l10n/lv.php
index 28b96c56e10..140c75af3ce 100644
--- a/lib/l10n/lv.php
+++ b/lib/l10n/lv.php
@@ -24,7 +24,6 @@
"%s set the database host." => "%s iestatiet datubāžu serveri.",
"PostgreSQL username and/or password not valid" => "Nav derīga PostgreSQL parole un/vai lietotājvārds",
"You need to enter either an existing account or the administrator." => "Jums jāievada vai nu esošs vai administratora konts.",
-"Oracle username and/or password not valid" => "Nav derīga Oracle parole un/vai lietotājvārds",
"MySQL username and/or password not valid" => "Nav derīga MySQL parole un/vai lietotājvārds",
"DB Error: \"%s\"" => "DB kļūda — “%s”",
"Offending command was: \"%s\"" => "Vainīgā komanda bija “%s”",
@@ -32,6 +31,7 @@
"Drop this user from MySQL" => "Izmest šo lietotāju no MySQL",
"MySQL user '%s'@'%%' already exists" => "MySQL lietotājs '%s'@'%%' jau eksistē",
"Drop this user from MySQL." => "Izmest šo lietotāju no MySQL.",
+"Oracle username and/or password not valid" => "Nav derīga Oracle parole un/vai lietotājvārds",
"Offending command was: \"%s\", name: %s, password: %s" => "Vainīgā komanda bija \"%s\", vārds: %s, parole: %s",
"MS SQL username and/or password not valid: %s" => "Nav derīga MySQL parole un/vai lietotājvārds — %s",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Jūsu serveris vēl nav pareizi iestatīts, lai ļautu sinhronizēt datnes, jo izskatās, ka WebDAV saskarne ir salauzta.",
diff --git a/lib/l10n/nb_NO.php b/lib/l10n/nb_NO.php
index fc95561d3b4..23146154c77 100644
--- a/lib/l10n/nb_NO.php
+++ b/lib/l10n/nb_NO.php
@@ -15,6 +15,8 @@
"Files" => "Filer",
"Text" => "Tekst",
"Images" => "Bilder",
+"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Din nettservev er ikke konfigurert korrekt for filsynkronisering. WebDAV ser ut til å ikke funkere.",
+"Please double check the <a href='%s'>installation guides</a>." => "Vennligst dobbelsjekk <a href='%s'>installasjonsguiden</a>.",
"seconds ago" => "sekunder siden",
"1 minute ago" => "1 minutt siden",
"%d minutes ago" => "%d minutter siden",
diff --git a/lib/l10n/nl.php b/lib/l10n/nl.php
index 0c387142619..2a6086a5968 100644
--- a/lib/l10n/nl.php
+++ b/lib/l10n/nl.php
@@ -24,7 +24,7 @@
"%s set the database host." => "%s instellen databaseservernaam.",
"PostgreSQL username and/or password not valid" => "PostgreSQL gebruikersnaam en/of wachtwoord ongeldig",
"You need to enter either an existing account or the administrator." => "Geef of een bestaand account op of het beheerdersaccount.",
-"Oracle username and/or password not valid" => "Oracle gebruikersnaam en/of wachtwoord ongeldig",
+"Oracle connection could not be established" => "Er kon geen verbinding met Oracle worden bereikt",
"MySQL username and/or password not valid" => "MySQL gebruikersnaam en/of wachtwoord ongeldig",
"DB Error: \"%s\"" => "DB Fout: \"%s\"",
"Offending command was: \"%s\"" => "Onjuiste commande was: \"%s\"",
@@ -32,6 +32,7 @@
"Drop this user from MySQL" => "Verwijder deze gebruiker uit MySQL",
"MySQL user '%s'@'%%' already exists" => "MySQL gebruiker '%s'@'%%' bestaat al",
"Drop this user from MySQL." => "Verwijder deze gebruiker uit MySQL.",
+"Oracle username and/or password not valid" => "Oracle gebruikersnaam en/of wachtwoord ongeldig",
"Offending command was: \"%s\", name: %s, password: %s" => "Onjuiste commando was: \"%s\", naam: %s, wachtwoord: %s",
"MS SQL username and/or password not valid: %s" => "MS SQL gebruikersnaam en/of wachtwoord niet geldig: %s",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Uw webserver is nog niet goed ingesteld voor bestandssynchronisatie omdat de WebDAV interface verbroken lijkt.",
diff --git a/lib/l10n/nn_NO.php b/lib/l10n/nn_NO.php
index f8f15c9fba6..8241573f9ae 100644
--- a/lib/l10n/nn_NO.php
+++ b/lib/l10n/nn_NO.php
@@ -3,7 +3,7 @@
"Personal" => "Personleg",
"Settings" => "Innstillingar",
"Users" => "Brukarar",
-"Apps" => "Applikasjonar",
+"Apps" => "Program",
"Admin" => "Administrer",
"Authentication error" => "Feil i autentisering",
"Files" => "Filer",
diff --git a/lib/l10n/pl.php b/lib/l10n/pl.php
index 4ac1c14439f..53a9290785c 100644
--- a/lib/l10n/pl.php
+++ b/lib/l10n/pl.php
@@ -24,7 +24,7 @@
"%s set the database host." => "%s ustaw hosta bazy danych.",
"PostgreSQL username and/or password not valid" => "PostgreSQL: Nazwa użytkownika i/lub hasło jest niepoprawne",
"You need to enter either an existing account or the administrator." => "Należy wprowadzić istniejące konto użytkownika lub administratora.",
-"Oracle username and/or password not valid" => "Oracle: Nazwa użytkownika i/lub hasło jest niepoprawne",
+"Oracle connection could not be established" => "Nie można ustanowić połączenia z bazą Oracle",
"MySQL username and/or password not valid" => "MySQL: Nazwa użytkownika i/lub hasło jest niepoprawne",
"DB Error: \"%s\"" => "Błąd DB: \"%s\"",
"Offending command was: \"%s\"" => "Niepoprawna komenda: \"%s\"",
@@ -32,6 +32,7 @@
"Drop this user from MySQL" => "Usuń tego użytkownika z MySQL",
"MySQL user '%s'@'%%' already exists" => "Użytkownik MySQL '%s'@'%%t' już istnieje",
"Drop this user from MySQL." => "Usuń tego użytkownika z MySQL.",
+"Oracle username and/or password not valid" => "Oracle: Nazwa użytkownika i/lub hasło jest niepoprawne",
"Offending command was: \"%s\", name: %s, password: %s" => "Niepoprawne polecania: \"%s\", nazwa: %s, hasło: %s",
"MS SQL username and/or password not valid: %s" => "Nazwa i/lub hasło serwera MS SQL jest niepoprawne: %s.",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Serwer internetowy nie jest jeszcze poprawnie skonfigurowany, aby umożliwić synchronizację plików, ponieważ interfejs WebDAV wydaje się być uszkodzony.",
diff --git a/lib/l10n/pt_BR.php b/lib/l10n/pt_BR.php
index 4c50f8de9e6..9606477d945 100644
--- a/lib/l10n/pt_BR.php
+++ b/lib/l10n/pt_BR.php
@@ -24,7 +24,7 @@
"%s set the database host." => "%s defina o host do banco de dados.",
"PostgreSQL username and/or password not valid" => "Nome de usuário e/ou senha PostgreSQL inválido(s)",
"You need to enter either an existing account or the administrator." => "Você precisa inserir uma conta existente ou o administrador.",
-"Oracle username and/or password not valid" => "Nome de usuário e/ou senha Oracle inválido(s)",
+"Oracle connection could not be established" => "Conexão Oracle não pode ser estabelecida",
"MySQL username and/or password not valid" => "Nome de usuário e/ou senha MySQL inválido(s)",
"DB Error: \"%s\"" => "Erro no BD: \"%s\"",
"Offending command was: \"%s\"" => "Comando ofensivo era: \"%s\"",
@@ -32,6 +32,7 @@
"Drop this user from MySQL" => "Derrubar este usuário do MySQL",
"MySQL user '%s'@'%%' already exists" => "Usuário MySQL '%s'@'%%' já existe",
"Drop this user from MySQL." => "Derrube este usuário do MySQL.",
+"Oracle username and/or password not valid" => "Nome de usuário e/ou senha Oracle inválido(s)",
"Offending command was: \"%s\", name: %s, password: %s" => "Comando ofensivo era: \"%s\", nome: %s, senha: %s",
"MS SQL username and/or password not valid: %s" => "Nome de usuário e/ou senha MS SQL inválido(s): %s",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Seu servidor web não está configurado corretamente para permitir sincronização de arquivos porque a interface WebDAV parece estar quebrada.",
diff --git a/lib/l10n/pt_PT.php b/lib/l10n/pt_PT.php
index b3befe96e03..176f4286c9d 100644
--- a/lib/l10n/pt_PT.php
+++ b/lib/l10n/pt_PT.php
@@ -24,7 +24,6 @@
"%s set the database host." => "%s defina o servidor da base de dados (geralmente localhost)",
"PostgreSQL username and/or password not valid" => "Nome de utilizador/password do PostgreSQL inválido",
"You need to enter either an existing account or the administrator." => "Precisa de introduzir uma conta existente ou de administrador",
-"Oracle username and/or password not valid" => "Nome de utilizador/password do Oracle inválida",
"MySQL username and/or password not valid" => "Nome de utilizador/password do MySQL inválida",
"DB Error: \"%s\"" => "Erro na BD: \"%s\"",
"Offending command was: \"%s\"" => "O comando gerador de erro foi: \"%s\"",
@@ -32,6 +31,7 @@
"Drop this user from MySQL" => "Eliminar este utilizador do MySQL",
"MySQL user '%s'@'%%' already exists" => "O utilizador '%s'@'%%' do MySQL já existe",
"Drop this user from MySQL." => "Eliminar este utilizador do MySQL",
+"Oracle username and/or password not valid" => "Nome de utilizador/password do Oracle inválida",
"Offending command was: \"%s\", name: %s, password: %s" => "O comando gerador de erro foi: \"%s\", nome: %s, password: %s",
"MS SQL username and/or password not valid: %s" => "Nome de utilizador/password do MySQL é inválido: %s",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "O seu servidor web não está configurado correctamente para autorizar sincronização de ficheiros, pois o interface WebDAV parece estar com problemas.",
diff --git a/lib/l10n/ru.php b/lib/l10n/ru.php
index e716f6d1c11..e077b688c09 100644
--- a/lib/l10n/ru.php
+++ b/lib/l10n/ru.php
@@ -24,7 +24,6 @@
"%s set the database host." => "%s задайте хост базы данных.",
"PostgreSQL username and/or password not valid" => "Неверное имя пользователя и/или пароль PostgreSQL",
"You need to enter either an existing account or the administrator." => "Вы должны войти или в существующий аккаунт или под администратором.",
-"Oracle username and/or password not valid" => "Неверное имя пользователя и/или пароль Oracle",
"MySQL username and/or password not valid" => "Неверное имя пользователя и/или пароль MySQL",
"DB Error: \"%s\"" => "Ошибка БД: \"%s\"",
"Offending command was: \"%s\"" => "Вызываемая команда была: \"%s\"",
@@ -32,6 +31,7 @@
"Drop this user from MySQL" => "Удалить этого пользователя из MySQL",
"MySQL user '%s'@'%%' already exists" => "Пользователь MySQL '%s'@'%%' уже существует",
"Drop this user from MySQL." => "Удалить этого пользователя из MySQL.",
+"Oracle username and/or password not valid" => "Неверное имя пользователя и/или пароль Oracle",
"Offending command was: \"%s\", name: %s, password: %s" => "Вызываемая команда была: \"%s\", имя: %s, пароль: %s",
"MS SQL username and/or password not valid: %s" => "Имя пользователя и/или пароль MS SQL не подходит: %s",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Ваш веб сервер до сих пор не настроен правильно для возможности синхронизации файлов, похоже что проблема в неисправности интерфейса WebDAV.",
diff --git a/lib/l10n/ru_RU.php b/lib/l10n/ru_RU.php
index 8fb568aee7e..7639a3cc97e 100644
--- a/lib/l10n/ru_RU.php
+++ b/lib/l10n/ru_RU.php
@@ -1,3 +1,4 @@
<?php $TRANSLATIONS = array(
-"Settings" => "Настройки"
+"Settings" => "Настройки",
+"Text" => "Текст"
);
diff --git a/lib/l10n/sk_SK.php b/lib/l10n/sk_SK.php
index e074ed78c3c..121b2405dcf 100644
--- a/lib/l10n/sk_SK.php
+++ b/lib/l10n/sk_SK.php
@@ -24,7 +24,6 @@
"%s set the database host." => "Zadajte názov počítača s databázou %s.",
"PostgreSQL username and/or password not valid" => "Používateľské meno a/alebo heslo pre PostgreSQL databázu je neplatné",
"You need to enter either an existing account or the administrator." => "Musíte zadať jestvujúci účet alebo administrátora.",
-"Oracle username and/or password not valid" => "Používateľské meno a/alebo heslo pre Oracle databázu je neplatné",
"MySQL username and/or password not valid" => "Používateľské meno a/alebo heslo pre MySQL databázu je neplatné",
"DB Error: \"%s\"" => "Chyba DB: \"%s\"",
"Offending command was: \"%s\"" => "Podozrivý príkaz bol: \"%s\"",
@@ -32,6 +31,7 @@
"Drop this user from MySQL" => "Zahodiť používateľa z MySQL.",
"MySQL user '%s'@'%%' already exists" => "Používateľ '%s'@'%%' už v MySQL existuje",
"Drop this user from MySQL." => "Zahodiť používateľa z MySQL.",
+"Oracle username and/or password not valid" => "Používateľské meno a/alebo heslo pre Oracle databázu je neplatné",
"Offending command was: \"%s\", name: %s, password: %s" => "Podozrivý príkaz bol: \"%s\", meno: %s, heslo: %s",
"MS SQL username and/or password not valid: %s" => "Používateľské meno, alebo heslo MS SQL nie je platné: %s",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Váš webový server nie je správne nastavený na synchronizáciu, pretože rozhranie WebDAV je poškodené.",
diff --git a/lib/l10n/sl.php b/lib/l10n/sl.php
index 0c42f44d2aa..7f8827d17f3 100644
--- a/lib/l10n/sl.php
+++ b/lib/l10n/sl.php
@@ -24,7 +24,6 @@
"%s set the database host." => "%s - vnos gostitelja podatkovne zbirke.",
"PostgreSQL username and/or password not valid" => "Uporabniško ime ali geslo PostgreSQL ni veljavno",
"You need to enter either an existing account or the administrator." => "Prijaviti se je treba v obstoječi ali pa skrbniški račun.",
-"Oracle username and/or password not valid" => "Uporabniško ime ali geslo Oracle ni veljavno",
"MySQL username and/or password not valid" => "Uporabniško ime ali geslo MySQL ni veljavno",
"DB Error: \"%s\"" => "Napaka podatkovne zbirke: \"%s\"",
"Offending command was: \"%s\"" => "Napačni ukaz je: \"%s\"",
@@ -32,6 +31,7 @@
"Drop this user from MySQL" => "Odstrani uporabnika s podatkovne zbirke MySQL",
"MySQL user '%s'@'%%' already exists" => "Uporabnik MySQL '%s'@'%%' že obstaja.",
"Drop this user from MySQL." => "Odstrani uporabnika s podatkovne zbirke MySQL",
+"Oracle username and/or password not valid" => "Uporabniško ime ali geslo Oracle ni veljavno",
"Offending command was: \"%s\", name: %s, password: %s" => "Napačni ukaz je: \"%s\", ime: %s, geslo: %s",
"MS SQL username and/or password not valid: %s" => "Uporabniško ime ali geslo MS SQL ni veljavno: %s",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Spletni stražnik še ni ustrezno nastavljen in ne omogoča usklajevanja, saj je nastavitev WebDAV okvarjena.",
diff --git a/lib/l10n/sq.php b/lib/l10n/sq.php
index 60d83ca48c3..04186f62102 100644
--- a/lib/l10n/sq.php
+++ b/lib/l10n/sq.php
@@ -24,7 +24,6 @@
"%s set the database host." => "%s caktoni pozicionin (host) e database-it.",
"PostgreSQL username and/or password not valid" => "Përdoruesi dhe/apo kodi i PostgreSQL i pavlefshëm",
"You need to enter either an existing account or the administrator." => "Duhet të përdorni një llogari ekzistuese ose llogarinë e administratorit.",
-"Oracle username and/or password not valid" => "Përdoruesi dhe/apo kodi i Oracle-it i pavlefshëm",
"MySQL username and/or password not valid" => "Përdoruesi dhe/apo kodi i MySQL-it i pavlefshëm.",
"DB Error: \"%s\"" => "Veprim i gabuar i DB-it: \"%s\"",
"Offending command was: \"%s\"" => "Komanda e gabuar ishte: \"%s\"",
@@ -32,6 +31,7 @@
"Drop this user from MySQL" => "Eliminoni këtë përdorues nga MySQL",
"MySQL user '%s'@'%%' already exists" => "Përdoruesi MySQL '%s'@'%%' ekziston",
"Drop this user from MySQL." => "Eliminoni këtë përdorues nga MySQL.",
+"Oracle username and/or password not valid" => "Përdoruesi dhe/apo kodi i Oracle-it i pavlefshëm",
"Offending command was: \"%s\", name: %s, password: %s" => "Komanda e gabuar ishte: \"%s\", përdoruesi: %s, kodi: %s",
"MS SQL username and/or password not valid: %s" => "Përdoruesi dhe/apo kodi i MS SQL i pavlefshëm: %s",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Serveri web i juaji nuk është konfiguruar akoma për të lejuar sinkronizimin e skedarëve sepse ndërfaqja WebDAV mund të jetë e dëmtuar.",
diff --git a/lib/l10n/tr.php b/lib/l10n/tr.php
index 641da2447ee..7996447b95d 100644
--- a/lib/l10n/tr.php
+++ b/lib/l10n/tr.php
@@ -24,7 +24,6 @@
"%s set the database host." => "%s veritabanı sunucu adını tanımla",
"PostgreSQL username and/or password not valid" => "PostgreSQL adi kullanici ve/veya parola yasal degildir. ",
"You need to enter either an existing account or the administrator." => "Bir konto veya kullanici birlemek ihtiyacin. ",
-"Oracle username and/or password not valid" => "Adi klullanici ve/veya parola Oracle mantikli değildir. ",
"MySQL username and/or password not valid" => "MySQL kullanıcı adı ve/veya parolası geçerli değil",
"DB Error: \"%s\"" => "DB Hata: ''%s''",
"Offending command was: \"%s\"" => "Komut rahasiz ''%s''. ",
@@ -32,6 +31,7 @@
"Drop this user from MySQL" => "Bu kullanici MySQLden list disari koymak. ",
"MySQL user '%s'@'%%' already exists" => "MySQL kullanici '%s @ % % zaten var (zaten yazili)",
"Drop this user from MySQL." => "Bu kulanıcıyı MySQL veritabanından kaldır",
+"Oracle username and/or password not valid" => "Adi klullanici ve/veya parola Oracle mantikli değildir. ",
"Offending command was: \"%s\", name: %s, password: %s" => "Hatalı komut: \"%s\", ad: %s, parola: %s",
"MS SQL username and/or password not valid: %s" => "MS SQL kullanıcı adı ve/veya parolası geçersiz: %s",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Web sunucunuz dosya transferi için düzgün bir şekilde yapılandırılmamış. WevDAV arabirimini sorunlu gözüküyor.",
diff --git a/lib/l10n/uk.php b/lib/l10n/uk.php
index a5448901247..676879629ef 100644
--- a/lib/l10n/uk.php
+++ b/lib/l10n/uk.php
@@ -24,7 +24,6 @@
"%s set the database host." => "%s встановити хост бази даних.",
"PostgreSQL username and/or password not valid" => "PostgreSQL ім'я користувача та/або пароль не дійсні",
"You need to enter either an existing account or the administrator." => "Вам потрібно ввести або існуючий обліковий запис або administrator.",
-"Oracle username and/or password not valid" => "Oracle ім'я користувача та/або пароль не дійсні",
"MySQL username and/or password not valid" => "MySQL ім'я користувача та/або пароль не дійсні",
"DB Error: \"%s\"" => "Помилка БД: \"%s\"",
"Offending command was: \"%s\"" => "Команда, що викликала проблему: \"%s\"",
@@ -32,6 +31,7 @@
"Drop this user from MySQL" => "Видалити цього користувача з MySQL",
"MySQL user '%s'@'%%' already exists" => "Користувач MySQL '%s'@'%%' вже існує",
"Drop this user from MySQL." => "Видалити цього користувача з MySQL.",
+"Oracle username and/or password not valid" => "Oracle ім'я користувача та/або пароль не дійсні",
"Offending command was: \"%s\", name: %s, password: %s" => "Команда, що викликала проблему: \"%s\", ім'я: %s, пароль: %s",
"MS SQL username and/or password not valid: %s" => "MS SQL ім'я користувача та/або пароль не дійсні: %s",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Ваш Web-сервер ще не налаштований належним чином для того, щоб дозволити синхронізацію файлів, через те що інтерфейс WebDAV, здається, зламаний.",
diff --git a/lib/l10n/zh_CN.php b/lib/l10n/zh_CN.php
index cab5142e5d5..61e405d8058 100644
--- a/lib/l10n/zh_CN.php
+++ b/lib/l10n/zh_CN.php
@@ -24,7 +24,6 @@
"%s set the database host." => "%s 设置数据库所在主机。",
"PostgreSQL username and/or password not valid" => "PostgreSQL 数据库用户名和/或密码无效",
"You need to enter either an existing account or the administrator." => "你需要输入一个数据库中已有的账户或管理员账户。",
-"Oracle username and/or password not valid" => "Oracle 数据库用户名和/或密码无效",
"MySQL username and/or password not valid" => "MySQL 数据库用户名和/或密码无效",
"DB Error: \"%s\"" => "数据库错误:\"%s\"",
"Offending command was: \"%s\"" => "冲突命令为:\"%s\"",
@@ -32,6 +31,7 @@
"Drop this user from MySQL" => "建议从 MySQL 数据库中丢弃 Drop 此用户",
"MySQL user '%s'@'%%' already exists" => "MySQL 用户 '%s'@'%%' 已存在",
"Drop this user from MySQL." => "建议从 MySQL 数据库中丢弃 Drop 此用户。",
+"Oracle username and/or password not valid" => "Oracle 数据库用户名和/或密码无效",
"Offending command was: \"%s\", name: %s, password: %s" => "冲突命令为:\"%s\",名称:%s,密码:%s",
"MS SQL username and/or password not valid: %s" => "MS SQL 用户名和/或密码无效:%s",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "您的Web服务器尚未正确设置以允许文件同步, 因为WebDAV的接口似乎已损坏.",
diff --git a/lib/l10n/zh_TW.php b/lib/l10n/zh_TW.php
index 5affb1ccf35..ec7310d4e4e 100644
--- a/lib/l10n/zh_TW.php
+++ b/lib/l10n/zh_TW.php
@@ -24,7 +24,6 @@
"%s set the database host." => "%s 設定資料庫主機。",
"PostgreSQL username and/or password not valid" => "PostgreSQL 用戶名和/或密碼無效",
"You need to enter either an existing account or the administrator." => "您必須輸入一個現有的帳號或管理員帳號。",
-"Oracle username and/or password not valid" => "Oracle 用戶名和/或密碼無效",
"MySQL username and/or password not valid" => "MySQL 用戶名和/或密碼無效",
"DB Error: \"%s\"" => "資料庫錯誤:\"%s\"",
"Offending command was: \"%s\"" => "有問題的指令是:\"%s\"",
@@ -32,6 +31,7 @@
"Drop this user from MySQL" => "在 MySQL 移除這個使用者",
"MySQL user '%s'@'%%' already exists" => "MySQL 使用者 '%s'@'%%' 已經存在",
"Drop this user from MySQL." => "在 MySQL 移除這個使用者。",
+"Oracle username and/or password not valid" => "Oracle 用戶名和/或密碼無效",
"Offending command was: \"%s\", name: %s, password: %s" => "有問題的指令是:\"%s\" ,使用者:\"%s\",密碼:\"%s\"",
"MS SQL username and/or password not valid: %s" => "MS SQL 使用者和/或密碼無效:%s",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "您的網頁伺服器尚未被正確設定來進行檔案同步,因為您的 WebDAV 界面似乎無法使用。",
diff --git a/lib/public/share.php b/lib/public/share.php
index a561319e9bd..03d662676c6 100644
--- a/lib/public/share.php
+++ b/lib/public/share.php
@@ -106,6 +106,111 @@ class Share {
}
return false;
}
+
+ /**
+ * @brief Prepare a path to be passed to DB as file_target
+ * @return string Prepared path
+ */
+ public static function prepFileTarget( $path ) {
+
+ // Paths in DB are stored with leading slashes, so add one if necessary
+ if ( substr( $path, 0, 1 ) !== '/' ) {
+
+ $path = '/' . $path;
+
+ }
+
+ return $path;
+
+ }
+
+ /**
+ * @brief Find which users can access a shared item
+ * @param $path to the file
+ * @param $user owner of the file
+ * @param include owner to the list of users with access to the file
+ * @return array
+ * @note $path needs to be relative to user data dir, e.g. 'file.txt'
+ * not '/admin/data/file.txt'
+ */
+ public static function getUsersSharingFile($path, $user, $includeOwner = false, $removeDuplicates = true) {
+
+ $path_parts = explode(DIRECTORY_SEPARATOR, trim($path, DIRECTORY_SEPARATOR));
+ $path = '';
+ $shares = array();
+ $publicShare = false;
+ $view = new \OC\Files\View('/' . $user . '/files/');
+ foreach ($path_parts as $p) {
+ $path .= '/' . $p;
+ $meta = $view->getFileInfo(\OC_Filesystem::normalizePath($path));
+ $source = $meta['fileid'];
+
+ // Fetch all shares of this file path from DB
+ $query = \OC_DB::prepare(
+ 'SELECT share_with
+ FROM
+ `*PREFIX*share`
+ WHERE
+ item_source = ? AND share_type = ?'
+ );
+
+ $result = $query->execute(array($source, self::SHARE_TYPE_USER));
+
+ if (\OC_DB::isError($result)) {
+ \OC_Log::write('OCP\Share', \OC_DB::getErrorMessage($result), \OC_Log::ERROR);
+ }
+
+ while ($row = $result->fetchRow()) {
+ $shares[] = $row['share_with'];
+ }
+
+ // We also need to take group shares into account
+
+ $query = \OC_DB::prepare(
+ 'SELECT share_with
+ FROM
+ `*PREFIX*share`
+ WHERE
+ item_source = ? AND share_type = ?'
+ );
+
+ $result = $query->execute(array($source, self::SHARE_TYPE_GROUP));
+
+ if (\OC_DB::isError($result)) {
+ \OC_Log::write('OCP\Share', \OC_DB::getErrorMessage($result), \OC_Log::ERROR);
+ }
+
+ while ($row = $result->fetchRow()) {
+ $usersInGroup = \OC_Group::usersInGroup($row['share_with']);
+ $shares = array_merge($shares, $usersInGroup);
+ }
+
+ //check for public link shares
+ $query = \OC_DB::prepare(
+ 'SELECT share_with
+ FROM
+ `*PREFIX*share`
+ WHERE
+ item_source = ? AND share_type = ?'
+ );
+
+ $result = $query->execute(array($source, self::SHARE_TYPE_LINK));
+
+ if (\OC_DB::isError($result)) {
+ \OC_Log::write('OCP\Share', \OC_DB::getErrorMessage($result), \OC_Log::ERROR);
+ }
+
+ if ($result->fetchRow()) {
+ $publicShare = true;
+ }
+ }
+ // Include owner in list of users, if requested
+ if ($includeOwner) {
+ $shares[] = $user;
+ }
+
+ return array("users" => array_unique($shares), "public" => $publicShare);
+ }
/**
* @brief Get the items of item type shared with the current user
@@ -132,7 +237,7 @@ class Share {
return self::getItems($itemType, $itemTarget, self::$shareTypeUserAndGroups, \OC_User::getUser(), null, $format,
$parameters, 1, $includeCollections);
}
-
+
/**
* @brief Get the item of item type shared with the current user by source
* @param string Item type
@@ -409,8 +514,16 @@ class Share {
'fileSource' => $item['file_source'],
'shareType' => $shareType,
'shareWith' => $shareWith,
+ 'itemParent' => $item['parent'],
));
self::delete($item['id']);
+ \OC_Hook::emit('OCP\Share', 'post_unshare', array(
+ 'itemType' => $itemType,
+ 'itemSource' => $itemSource,
+ 'shareType' => $shareType,
+ 'shareWith' => $shareWith,
+ 'itemParent' => $item['parent'],
+ ));
return true;
}
return false;
@@ -433,6 +546,11 @@ class Share {
foreach ($shares as $share) {
self::delete($share['id']);
}
+ \OC_Hook::emit('OCP\Share', 'post_unshareAll', array(
+ 'itemType' => $itemType,
+ 'itemSource' => $itemSource,
+ 'shares' => $shares
+ ));
return true;
}
return false;
@@ -1089,6 +1207,17 @@ class Share {
if ($shareType == self::SHARE_TYPE_GROUP) {
$groupItemTarget = self::generateTarget($itemType, $itemSource, $shareType, $shareWith['group'],
$uidOwner, $suggestedItemTarget);
+ \OC_Hook::emit('OCP\Share', 'pre_shared', array(
+ 'itemType' => $itemType,
+ 'itemSource' => $itemSource,
+ 'itemTarget' => $groupItemTarget,
+ 'shareType' => $shareType,
+ 'shareWith' => $shareWith['group'],
+ 'uidOwner' => $uidOwner,
+ 'permissions' => $permissions,
+ 'fileSource' => $fileSource,
+ 'token' => $token
+ ));
if (isset($fileSource)) {
if ($parentFolder) {
if ($parentFolder === true) {
@@ -1164,6 +1293,17 @@ class Share {
} else {
$itemTarget = self::generateTarget($itemType, $itemSource, $shareType, $shareWith, $uidOwner,
$suggestedItemTarget);
+ \OC_Hook::emit('OCP\Share', 'pre_shared', array(
+ 'itemType' => $itemType,
+ 'itemSource' => $itemSource,
+ 'itemTarget' => $itemTarget,
+ 'shareType' => $shareType,
+ 'shareWith' => $shareWith,
+ 'uidOwner' => $uidOwner,
+ 'permissions' => $permissions,
+ 'fileSource' => $fileSource,
+ 'token' => $token
+ ));
if (isset($fileSource)) {
if ($parentFolder) {
if ($parentFolder === true) {
diff --git a/lib/setup.php b/lib/setup.php
index f1ac6b8b2b8..a63cc664dbc 100644
--- a/lib/setup.php
+++ b/lib/setup.php
@@ -152,8 +152,12 @@ class OC_Setup {
self::setupOCIDatabase($dbhost, $dbuser, $dbpass, $dbname, $dbtableprefix, $dbtablespace, $username);
} catch (Exception $e) {
$error[] = array(
- 'error' => $l->t('Oracle username and/or password not valid'),
- 'hint' => $l->t('You need to enter either an existing account or the administrator.')
+ 'error' => $l->t('Oracle connection could not be established'),
+ 'hint' => $e->getMessage().' Check environment: ORACLE_HOME='.getenv('ORACLE_HOME')
+ .' ORACLE_SID='.getenv('ORACLE_SID')
+ .' LD_LIBRARY_PATH='.getenv('LD_LIBRARY_PATH')
+ .' NLS_LANG='.getenv('NLS_LANG')
+ .' tnsnames.ora is '.(is_readable(getenv('ORACLE_HOME').'/network/admin/tnsnames.ora')?'':'not ').'readable'
);
return $error;
}
@@ -452,9 +456,13 @@ class OC_Setup {
} else {
$easy_connect_string = '//'.$e_host.'/'.$e_dbname;
}
+ \OC_Log::write('setup oracle', 'connect string: ' . $easy_connect_string, \OC_Log::DEBUG);
$connection = @oci_connect($dbuser, $dbpass, $easy_connect_string);
if(!$connection) {
$e = oci_error();
+ if (is_array ($e) && isset ($e['message'])) {
+ throw new Exception($e['message']);
+ }
throw new Exception($l->t('Oracle username and/or password not valid'));
}
//check for roles creation rights in oracle
diff --git a/lib/user.php b/lib/user.php
index 226b716188d..26fe73f8bfe 100644
--- a/lib/user.php
+++ b/lib/user.php
@@ -32,7 +32,7 @@
* post_deleteUser(uid)
* pre_setPassword(&run, uid, password)
* post_setPassword(uid, password)
- * pre_login(&run, uid)
+ * pre_login(&run, uid, password)
* post_login(uid)
* logout()
*/
@@ -244,7 +244,7 @@ class OC_User {
*/
public static function login( $uid, $password ) {
$run = true;
- OC_Hook::emit( "OC_User", "pre_login", array( "run" => &$run, "uid" => $uid ));
+ OC_Hook::emit( "OC_User", "pre_login", array( "run" => &$run, "uid" => $uid, "password" => $password));
if( $run ) {
$uid = self::checkPassword( $uid, $password );
@@ -393,13 +393,14 @@ class OC_User {
* @brief Set password
* @param $uid The username
* @param $password The new password
+ * @param $recoveryPassword for the encryption app to reset encryption keys
* @returns true/false
*
* Change the password of a user
*/
- public static function setPassword( $uid, $password ) {
+ public static function setPassword( $uid, $password, $recoveryPassword = null ) {
$run = true;
- OC_Hook::emit( "OC_User", "pre_setPassword", array( "run" => &$run, "uid" => $uid, "password" => $password ));
+ OC_Hook::emit( "OC_User", "pre_setPassword", array( "run" => &$run, "uid" => $uid, "password" => $password, "recoveryPassword" => $recoveryPassword ));
if( $run ) {
$success = false;
@@ -412,7 +413,7 @@ class OC_User {
}
// invalidate all login cookies
OC_Preferences::deleteApp($uid, 'login_token');
- OC_Hook::emit( "OC_User", "post_setPassword", array( "uid" => $uid, "password" => $password ));
+ OC_Hook::emit( "OC_User", "post_setPassword", array( "uid" => $uid, "password" => $password, "recoveryPassword" => $recoveryPassword ));
return $success;
}
else{
@@ -610,6 +611,10 @@ class OC_User {
public static function isEnabled($userid) {
$sql = 'SELECT `userid` FROM `*PREFIX*preferences`'
.' WHERE `userid` = ? AND `appid` = ? AND `configkey` = ? AND `configvalue` = ?';
+ if (OC_Config::getValue( 'dbtype', 'sqlite' ) === 'oci') { //FIXME oracle hack
+ $sql = 'SELECT `userid` FROM `*PREFIX*preferences`'
+ .' WHERE `userid` = ? AND `appid` = ? AND `configkey` = ? AND to_char(`configvalue`) = ?';
+ }
$stmt = OC_DB::prepare($sql);
if ( ! OC_DB::isError($stmt) ) {
$result = $stmt->execute(array($userid, 'core', 'enabled', 'false'));
diff --git a/lib/user/database.php b/lib/user/database.php
index 63c64ed43d3..d70b620f2ab 100644
--- a/lib/user/database.php
+++ b/lib/user/database.php
@@ -136,7 +136,7 @@ class OC_User_Database extends OC_User_Backend {
*/
public function getDisplayName($uid) {
if( $this->userExists($uid) ) {
- $query = OC_DB::prepare( 'SELECT displayname FROM `*PREFIX*users` WHERE `uid` = ?' );
+ $query = OC_DB::prepare( 'SELECT `displayname` FROM `*PREFIX*users` WHERE `uid` = ?' );
$result = $query->execute( array( $uid ))->fetchAll();
$displayName = trim($result[0]['displayname'], ' ');
if ( !empty($displayName) ) {
diff --git a/lib/util.php b/lib/util.php
index f30cdf6a534..ce68568183b 100755
--- a/lib/util.php
+++ b/lib/util.php
@@ -77,7 +77,7 @@ class OC_Util {
public static function getVersion() {
// hint: We only can count up. Reset minor/patchlevel when
// updating major/minor version number.
- return array(5, 80, 02);
+ return array(5, 80, 04);
}
/**
@@ -173,7 +173,8 @@ class OC_Util {
//check for database drivers
if(!(is_callable('sqlite_open') or class_exists('SQLite3'))
and !is_callable('mysql_connect')
- and !is_callable('pg_connect')) {
+ and !is_callable('pg_connect')
+ and !is_callable('oci_connect')) {
$errors[]=array('error'=>'No database drivers (sqlite, mysql, or postgresql) installed.',
'hint'=>'');//TODO: sane hint
$web_server_restart= true;
diff --git a/lib/vcategories.php b/lib/vcategories.php
index 5975e688b75..91c72d5dfae 100644
--- a/lib/vcategories.php
+++ b/lib/vcategories.php
@@ -325,6 +325,37 @@ class OC_VCategories {
}
/**
+ * @brief Rename category.
+ * @param string $from The name of the existing category
+ * @param string $to The new name of the category.
+ * @returns bool
+ */
+ public function rename($from, $to) {
+ $id = $this->array_searchi($from, $this->categories);
+ if($id === false) {
+ OCP\Util::writeLog('core', __METHOD__.', category: ' . $from. ' does not exist', OCP\Util::DEBUG);
+ return false;
+ }
+
+ $sql = 'UPDATE `' . self::CATEGORY_TABLE . '` SET `category` = ? '
+ . 'WHERE `uid` = ? AND `type` = ? AND `id` = ?';
+ try {
+ $stmt = OCP\DB::prepare($sql);
+ $result = $stmt->execute(array($to, $this->user, $this->type, $id));
+ if (OC_DB::isError($result)) {
+ OC_Log::write('core', __METHOD__. 'DB error: ' . OC_DB::getErrorMessage($result), OC_Log::ERROR);
+ return false;
+ }
+ } catch(Exception $e) {
+ OCP\Util::writeLog('core', __METHOD__.', exception: '.$e->getMessage(),
+ OCP\Util::ERROR);
+ return false;
+ }
+ $this->categories[$id] = $to;
+ return true;
+ }
+
+ /**
* @brief Add a new category.
* @param $names A string with a name or an array of strings containing
* the name(s) of the categor(y|ies) to add.
diff --git a/lib/vobject/compoundproperty.php b/lib/vobject/compoundproperty.php
new file mode 100644
index 00000000000..d702ab802e0
--- /dev/null
+++ b/lib/vobject/compoundproperty.php
@@ -0,0 +1,70 @@
+<?php
+/**
+ * ownCloud - VObject Compound Property
+ *
+ * @author Thomas Tanghus
+ * @author Evert Pot (http://www.rooftopsolutions.nl/)
+ *
+ * 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/>.
+ *
+ */
+
+namespace OC\VObject;
+
+/**
+ * This class overrides \Sabre\VObject\Property::serialize() to not
+ * double escape commas and semi-colons in compound properties.
+*/
+class CompoundProperty extends \Sabre\VObject\Property\Compound {
+
+ /**
+ * Turns the object back into a serialized blob.
+ *
+ * @return string
+ */
+ public function serialize() {
+
+ $str = $this->name;
+ if ($this->group) {
+ $str = $this->group . '.' . $this->name;
+ }
+
+ foreach($this->parameters as $param) {
+ $str.=';' . $param->serialize();
+ }
+ $src = array(
+ "\n",
+ );
+ $out = array(
+ '\n',
+ );
+ $str.=':' . str_replace($src, $out, $this->value);
+
+ $out = '';
+ while(strlen($str) > 0) {
+ if (strlen($str) > 75) {
+ $out .= mb_strcut($str, 0, 75, 'utf-8') . "\r\n";
+ $str = ' ' . mb_strcut($str, 75, strlen($str), 'utf-8');
+ } else {
+ $out .= $str . "\r\n";
+ $str = '';
+ break;
+ }
+ }
+
+ return $out;
+
+ }
+
+} \ No newline at end of file