summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.htaccess4
m---------3rdparty0
-rw-r--r--apps/comments/activity/extension.php23
-rw-r--r--apps/dav/appinfo/application.php15
-rw-r--r--apps/dav/appinfo/info.xml2
-rw-r--r--apps/dav/appinfo/install.php1
-rw-r--r--apps/dav/appinfo/update.php1
-rw-r--r--apps/dav/appinfo/v1/caldav.php13
-rw-r--r--apps/dav/appinfo/v1/carddav.php13
-rw-r--r--apps/dav/lib/caldav/birthdayservice.php28
-rw-r--r--apps/dav/lib/carddav/plugin.php4
-rw-r--r--apps/dav/lib/connector/sabre/davaclplugin.php2
-rw-r--r--apps/dav/lib/connector/sabre/file.php4
-rw-r--r--apps/dav/lib/connector/sabre/serverfactory.php6
-rw-r--r--apps/dav/lib/connector/sabre/sharesplugin.php176
-rw-r--r--apps/dav/lib/connector/sabre/sharetypelist.php87
-rw-r--r--apps/dav/lib/server.php9
-rw-r--r--apps/dav/tests/unit/connector/sabre/file.php69
-rw-r--r--apps/dav/tests/unit/connector/sabre/sharesplugin.php257
-rw-r--r--apps/encryption/settings/settings-admin.php1
-rw-r--r--apps/encryption/templates/settings-admin.php100
-rw-r--r--apps/federation/backgroundjob/getsharedsecret.php25
-rw-r--r--apps/federation/backgroundjob/requestsharedsecret.php23
-rw-r--r--apps/federation/l10n/is.js10
-rw-r--r--apps/federation/l10n/is.json8
-rw-r--r--apps/federation/l10n/ru.js5
-rw-r--r--apps/federation/l10n/ru.json5
-rw-r--r--apps/federation/l10n/tr.js12
-rw-r--r--apps/federation/l10n/tr.json10
-rw-r--r--apps/federation/tests/backgroundjob/getsharedsecrettest.php27
-rw-r--r--apps/federation/tests/backgroundjob/requestsharedsecrettest.php26
-rw-r--r--apps/files/appinfo/application.php4
-rw-r--r--apps/files/controller/apicontroller.php54
-rw-r--r--apps/files/l10n/is.js21
-rw-r--r--apps/files/l10n/is.json21
-rw-r--r--apps/files/l10n/sl.js4
-rw-r--r--apps/files/l10n/sl.json4
-rw-r--r--apps/files/l10n/sv.js7
-rw-r--r--apps/files/l10n/sv.json7
-rw-r--r--apps/files/service/tagservice.php13
-rw-r--r--apps/files/tests/controller/apicontrollertest.php56
-rw-r--r--apps/files_external/3rdparty/.gitignore1
-rw-r--r--apps/files_external/3rdparty/composer.json4
-rw-r--r--apps/files_external/3rdparty/composer.lock29
-rw-r--r--apps/files_external/3rdparty/composer/ClassLoader.php8
-rw-r--r--apps/files_external/3rdparty/composer/autoload_classmap.php19
-rw-r--r--apps/files_external/3rdparty/composer/autoload_real.php15
-rw-r--r--apps/files_external/3rdparty/composer/installed.json29
-rw-r--r--apps/files_external/3rdparty/icewind/smb/README.md2
-rw-r--r--apps/files_external/3rdparty/icewind/smb/composer.json2
-rw-r--r--apps/files_external/3rdparty/icewind/smb/src/NativeShare.php10
-rw-r--r--apps/files_external/3rdparty/icewind/smb/src/NativeStream.php19
-rw-r--r--apps/files_external/3rdparty/icewind/streams-dummy/composer.json7
-rw-r--r--apps/files_external/3rdparty/icewind/streams/.travis.yml7
-rw-r--r--apps/files_external/3rdparty/icewind/streams/LICENCE21
-rw-r--r--apps/files_external/3rdparty/icewind/streams/README.md1
-rw-r--r--apps/files_external/3rdparty/icewind/streams/composer.json3
-rw-r--r--apps/files_external/3rdparty/icewind/streams/src/CallbackWrapper.php67
-rw-r--r--apps/files_external/3rdparty/icewind/streams/src/DirectoryFilter.php60
-rw-r--r--apps/files_external/3rdparty/icewind/streams/src/DirectoryWrapper.php88
-rw-r--r--apps/files_external/3rdparty/icewind/streams/src/File.php2
-rw-r--r--apps/files_external/3rdparty/icewind/streams/src/IteratorDirectory.php4
-rw-r--r--apps/files_external/3rdparty/icewind/streams/src/NullWrapper.php15
-rw-r--r--apps/files_external/3rdparty/icewind/streams/src/Path.php104
-rw-r--r--apps/files_external/3rdparty/icewind/streams/src/RetryWrapper.php66
-rw-r--r--apps/files_external/3rdparty/icewind/streams/src/SeekableWrapper.php92
-rw-r--r--apps/files_external/3rdparty/icewind/streams/src/Url.php64
-rw-r--r--apps/files_external/3rdparty/icewind/streams/src/UrlCallBack.php121
-rw-r--r--apps/files_external/3rdparty/icewind/streams/src/Wrapper.php31
-rw-r--r--apps/files_external/3rdparty/icewind/streams/tests/CallbackWrapper.php72
-rw-r--r--apps/files_external/3rdparty/icewind/streams/tests/IteratorDirectory.php130
-rw-r--r--apps/files_external/3rdparty/icewind/streams/tests/NullWrapper.php59
-rw-r--r--apps/files_external/3rdparty/icewind/streams/tests/Wrapper.php105
-rw-r--r--apps/files_external/3rdparty/icewind/streams/tests/bootstrap.php9
-rw-r--r--apps/files_external/3rdparty/icewind/streams/tests/phpunit.xml6
-rw-r--r--apps/files_external/l10n/sl.js3
-rw-r--r--apps/files_external/l10n/sl.json3
-rw-r--r--apps/files_external/lib/ftp.php5
-rw-r--r--apps/files_external/lib/google.php57
-rw-r--r--apps/files_external/lib/smb.php22
-rw-r--r--apps/files_sharing/js/share.js57
-rw-r--r--apps/files_sharing/js/sharedfilelist.js10
-rw-r--r--apps/files_sharing/l10n/is.js2
-rw-r--r--apps/files_sharing/l10n/is.json2
-rw-r--r--apps/files_sharing/l10n/sl.js8
-rw-r--r--apps/files_sharing/l10n/sl.json8
-rw-r--r--apps/files_sharing/tests/js/shareSpec.js33
-rw-r--r--apps/systemtags/l10n/pl.js12
-rw-r--r--apps/systemtags/l10n/pl.json12
-rw-r--r--apps/updatenotification/l10n/pl.js6
-rw-r--r--apps/updatenotification/l10n/pl.json6
-rw-r--r--apps/updatenotification/l10n/ru.js3
-rw-r--r--apps/updatenotification/l10n/ru.json3
-rw-r--r--apps/user_ldap/l10n/sl.js2
-rw-r--r--apps/user_ldap/l10n/sl.json2
-rw-r--r--apps/user_ldap/lib/user/user.php17
-rw-r--r--apps/user_ldap/tests/user/user.php1
-rw-r--r--build/integration/features/bootstrap/WebDav.php53
-rw-r--r--build/integration/features/webdav-related.feature73
-rw-r--r--core/css/share.css5
-rw-r--r--[-rwxr-xr-x]core/img/rating/s0.svg105
-rw-r--r--core/img/rating/s1.svg151
-rw-r--r--core/img/rating/s2.svg143
-rw-r--r--core/img/rating/s3.svg191
-rw-r--r--core/img/rating/s4.svg191
-rw-r--r--core/img/rating/s5.svg124
-rw-r--r--core/img/rating/s6.svg105
-rw-r--r--core/img/rating/s7.svg124
-rw-r--r--core/img/rating/s8.svg134
-rw-r--r--core/img/rating/s9.svg124
-rw-r--r--core/js/sharedialogshareelistview.js86
-rw-r--r--core/js/systemtags/systemtagsinputfield.js4
-rw-r--r--core/js/tests/specs/systemtags/systemtagsinputfieldSpec.js9
-rw-r--r--core/l10n/is.js3
-rw-r--r--core/l10n/is.json3
-rw-r--r--core/l10n/pt_BR.js1
-rw-r--r--core/l10n/pt_BR.json1
-rw-r--r--core/l10n/sv.js9
-rw-r--r--core/l10n/sv.json9
-rw-r--r--lib/base.php2
-rw-r--r--lib/l10n/de.js3
-rw-r--r--lib/l10n/de.json3
-rw-r--r--lib/l10n/en_GB.js3
-rw-r--r--lib/l10n/en_GB.json3
-rw-r--r--lib/l10n/he.js3
-rw-r--r--lib/l10n/he.json3
-rw-r--r--lib/l10n/it.js1
-rw-r--r--lib/l10n/it.json1
-rw-r--r--lib/l10n/nl.js3
-rw-r--r--lib/l10n/nl.json3
-rw-r--r--lib/l10n/pt_BR.js3
-rw-r--r--lib/l10n/pt_BR.json3
-rw-r--r--lib/l10n/sq.js1
-rw-r--r--lib/l10n/sq.json1
-rw-r--r--lib/private/filechunking.php77
-rw-r--r--lib/private/files/cache/wrapper/cachewrapper.php2
-rw-r--r--lib/private/installer.php19
-rw-r--r--lib/private/log/owncloud.php23
-rw-r--r--lib/private/route/router.php4
-rw-r--r--lib/private/setup.php40
-rw-r--r--lib/private/updater.php7
-rw-r--r--settings/l10n/is.js4
-rw-r--r--settings/l10n/is.json4
-rw-r--r--settings/l10n/ru.js8
-rw-r--r--settings/l10n/ru.json8
145 files changed, 2365 insertions, 2218 deletions
diff --git a/.htaccess b/.htaccess
index 4837df6adbe..df074f7f806 100644
--- a/.htaccess
+++ b/.htaccess
@@ -62,8 +62,8 @@
# Rewrite rules for `front_controller_active`
Options -MultiViews
- RewriteRule ^core/js/oc.js$ index.php/core/js/oc.js [PT,E=PATH_INFO:$1]
- RewriteRule ^core/preview.png$ index.php/core/preview.png [PT,E=PATH_INFO:$1]
+ RewriteRule ^core/js/oc.js$ index.php [PT,E=PATH_INFO:$1]
+ RewriteRule ^core/preview.png$ index.php [PT,E=PATH_INFO:$1]
RewriteCond %{REQUEST_FILENAME} !\.(css|js|svg|gif|png|html|ttf|woff|ico|jpg|jpeg)$
RewriteCond %{REQUEST_FILENAME} !core/img/favicon.ico$
RewriteCond %{REQUEST_FILENAME} !/remote.php
diff --git a/3rdparty b/3rdparty
-Subproject 0ee67806d6082675541c77d79b3f494d760e2c2
+Subproject ec111b90c429356dd99d7944d40478eb642a22f
diff --git a/apps/comments/activity/extension.php b/apps/comments/activity/extension.php
index b65f1911d17..6bf7cae5882 100644
--- a/apps/comments/activity/extension.php
+++ b/apps/comments/activity/extension.php
@@ -105,7 +105,7 @@ class Extension implements IExtension {
public function getTypeIcon($type) {
switch ($type) {
case self::APP_NAME:
- return false;
+ return 'icon-comment';
}
return false;
@@ -150,6 +150,9 @@ class Extension implements IExtension {
switch ($text) {
case self::ADD_COMMENT_SUBJECT:
+ if ($this->authorIsCurrentUser($params[0])) {
+ return (string) $l->t('You commented');
+ }
return (string) $l->t('%1$s commented', $params);
case self::ADD_COMMENT_MESSAGE:
return $this->convertParameterToComment($params[0], 120);
@@ -168,6 +171,9 @@ class Extension implements IExtension {
switch ($text) {
case self::ADD_COMMENT_SUBJECT:
+ if ($this->authorIsCurrentUser($params[0])) {
+ return (string) $l->t('You commented on %2$s', $params);
+ }
return (string) $l->t('%1$s commented on %2$s', $params);
case self::ADD_COMMENT_MESSAGE:
return $this->convertParameterToComment($params[0]);
@@ -177,6 +183,21 @@ class Extension implements IExtension {
}
/**
+ * Check if the author is the current user
+ *
+ * @param string $user Parameter e.g. `<user display-name="admin">admin</user>`
+ * @return bool
+ */
+ protected function authorIsCurrentUser($user) {
+ try {
+ return strip_tags($user) === $this->activityManager->getCurrentUserId();
+ } catch (\UnexpectedValueException $e) {
+ // FIXME this is awkward, but we have no access to the current user in emails
+ return false;
+ }
+ }
+
+ /**
* The extension can define the type of parameters for translation
*
* Currently known types are:
diff --git a/apps/dav/appinfo/application.php b/apps/dav/appinfo/application.php
index 1dae3d4efbf..d06daf97f54 100644
--- a/apps/dav/appinfo/application.php
+++ b/apps/dav/appinfo/application.php
@@ -210,4 +210,19 @@ class Application extends App {
$this->getContainer()->getServer()->getLogger()->logException($ex);
}
}
+
+ public function generateBirthdays() {
+ try {
+ /** @var BirthdayService $migration */
+ $migration = $this->getContainer()->query('BirthdayService');
+ $userManager = $this->getContainer()->getServer()->getUserManager();
+
+ $userManager->callForAllUsers(function($user) use($migration) {
+ /** @var IUser $user */
+ $migration->syncUser($user->getUID());
+ });
+ } catch (\Exception $ex) {
+ $this->getContainer()->getServer()->getLogger()->logException($ex);
+ }
+ }
}
diff --git a/apps/dav/appinfo/info.xml b/apps/dav/appinfo/info.xml
index 4f1e805d99e..82d0f7cf8a1 100644
--- a/apps/dav/appinfo/info.xml
+++ b/apps/dav/appinfo/info.xml
@@ -5,7 +5,7 @@
<description>ownCloud WebDAV endpoint</description>
<licence>AGPL</licence>
<author>owncloud.org</author>
- <version>0.2.1</version>
+ <version>0.2.2</version>
<default_enable/>
<types>
<filesystem/>
diff --git a/apps/dav/appinfo/install.php b/apps/dav/appinfo/install.php
index a7a3220b90f..dc5ae39226e 100644
--- a/apps/dav/appinfo/install.php
+++ b/apps/dav/appinfo/install.php
@@ -25,3 +25,4 @@ $app = new Application();
$app->setupCron();
$app->migrateAddressbooks();
$app->migrateCalendars();
+$app->generateBirthdays();
diff --git a/apps/dav/appinfo/update.php b/apps/dav/appinfo/update.php
index aaa36052cd2..fbd41d25f49 100644
--- a/apps/dav/appinfo/update.php
+++ b/apps/dav/appinfo/update.php
@@ -23,3 +23,4 @@ use OCA\Dav\AppInfo\Application;
$app = new Application();
$app->setupCron();
+$app->generateBirthdays();
diff --git a/apps/dav/appinfo/v1/caldav.php b/apps/dav/appinfo/v1/caldav.php
index f2c886e0fdd..e9b6e3759ab 100644
--- a/apps/dav/appinfo/v1/caldav.php
+++ b/apps/dav/appinfo/v1/caldav.php
@@ -23,6 +23,7 @@
// Backends
use OCA\DAV\CalDAV\CalDavBackend;
+use OCA\DAV\Connector\LegacyDAVACL;
use OCA\DAV\Connector\Sabre\Auth;
use OCA\DAV\Connector\Sabre\ExceptionLoggerPlugin;
use OCA\DAV\Connector\Sabre\MaintenancePlugin;
@@ -43,12 +44,14 @@ $principalBackend = new Principal(
$db = \OC::$server->getDatabaseConnection();
$calDavBackend = new CalDavBackend($db, $principalBackend);
+$debugging = \OC::$server->getConfig()->getSystemValue('debug', false);
+
// Root nodes
$principalCollection = new \Sabre\CalDAV\Principal\Collection($principalBackend);
-$principalCollection->disableListing = true; // Disable listing
+$principalCollection->disableListing = !$debugging; // Disable listing
$addressBookRoot = new CalendarRoot($principalBackend, $calDavBackend);
-$addressBookRoot->disableListing = true; // Disable listing
+$addressBookRoot->disableListing = !$debugging; // Disable listing
$nodes = array(
$principalCollection,
@@ -65,8 +68,10 @@ $server->addPlugin(new MaintenancePlugin());
$server->addPlugin(new \Sabre\DAV\Auth\Plugin($authBackend, 'ownCloud'));
$server->addPlugin(new \Sabre\CalDAV\Plugin());
-$acl = new \OCA\DAV\Connector\LegacyDAVACL();
-$server->addPlugin($acl);
+$server->addPlugin(new LegacyDAVACL());
+if ($debugging) {
+ $server->addPlugin(new Sabre\DAV\Browser\Plugin());
+}
$server->addPlugin(new \Sabre\CalDAV\ICSExportPlugin());
$server->addPlugin(new ExceptionLoggerPlugin('caldav', \OC::$server->getLogger()));
diff --git a/apps/dav/appinfo/v1/carddav.php b/apps/dav/appinfo/v1/carddav.php
index 44abcbaa190..bd5ed465dce 100644
--- a/apps/dav/appinfo/v1/carddav.php
+++ b/apps/dav/appinfo/v1/carddav.php
@@ -24,6 +24,7 @@
// Backends
use OCA\DAV\CardDAV\AddressBookRoot;
use OCA\DAV\CardDAV\CardDavBackend;
+use OCA\DAV\Connector\LegacyDAVACL;
use OCA\DAV\Connector\Sabre\Auth;
use OCA\DAV\Connector\Sabre\ExceptionLoggerPlugin;
use OCA\DAV\Connector\Sabre\MaintenancePlugin;
@@ -44,12 +45,14 @@ $principalBackend = new Principal(
$db = \OC::$server->getDatabaseConnection();
$cardDavBackend = new CardDavBackend($db, $principalBackend);
+$debugging = \OC::$server->getConfig()->getSystemValue('debug', false);
+
// Root nodes
$principalCollection = new \Sabre\CalDAV\Principal\Collection($principalBackend);
-$principalCollection->disableListing = true; // Disable listing
+$principalCollection->disableListing = !$debugging; // Disable listing
$addressBookRoot = new AddressBookRoot($principalBackend, $cardDavBackend);
-$addressBookRoot->disableListing = true; // Disable listing
+$addressBookRoot->disableListing = !$debugging; // Disable listing
$nodes = array(
$principalCollection,
@@ -65,8 +68,10 @@ $server->addPlugin(new MaintenancePlugin());
$server->addPlugin(new \Sabre\DAV\Auth\Plugin($authBackend, 'ownCloud'));
$server->addPlugin(new Plugin());
-$acl = new \OCA\DAV\Connector\LegacyDAVACL();
-$server->addPlugin($acl);
+$server->addPlugin(new LegacyDAVACL());
+if ($debugging) {
+ $server->addPlugin(new Sabre\DAV\Browser\Plugin());
+}
$server->addPlugin(new \Sabre\CardDAV\VCFExportPlugin());
$server->addPlugin(new ExceptionLoggerPlugin('carddav', \OC::$server->getLogger()));
diff --git a/apps/dav/lib/caldav/birthdayservice.php b/apps/dav/lib/caldav/birthdayservice.php
index 7e1df189c4e..274341949b3 100644
--- a/apps/dav/lib/caldav/birthdayservice.php
+++ b/apps/dav/lib/caldav/birthdayservice.php
@@ -50,8 +50,7 @@ class BirthdayService {
$book = $this->cardDavBackEnd->getAddressBookById($addressBookId);
$principalUri = $book['principaluri'];
- $calendarUri = self::BIRTHDAY_CALENDAR_URI;
- $calendar = $this->ensureCalendarExists($principalUri, $calendarUri, []);
+ $calendar = $this->ensureCalendarExists($principalUri);
$objectUri = $book['uri'] . '-' . $cardUri. '.ics';
$calendarData = $this->buildBirthdayFromContact($cardData);
$existing = $this->calDavBackEnd->getCalendarObject($calendar['id'], $objectUri);
@@ -77,32 +76,27 @@ class BirthdayService {
public function onCardDeleted($addressBookId, $cardUri) {
$book = $this->cardDavBackEnd->getAddressBookById($addressBookId);
$principalUri = $book['principaluri'];
- $calendarUri = self::BIRTHDAY_CALENDAR_URI;
- $calendar = $this->ensureCalendarExists($principalUri, $calendarUri, []);
+ $calendar = $this->ensureCalendarExists($principalUri);
$objectUri = $book['uri'] . '-' . $cardUri. '.ics';
$this->calDavBackEnd->deleteCalendarObject($calendar['id'], $objectUri);
}
/**
* @param string $principal
- * @param string $id
- * @param array $properties
* @return array|null
* @throws \Sabre\DAV\Exception\BadRequest
*/
- public function ensureCalendarExists($principal, $id, $properties) {
- $properties = array_merge([
- '{DAV:}displayname' => 'Contact birthdays',
- '{http://apple.com/ns/ical/}calendar-color' => '#FFFFCA',
- ], $properties);
-
- $book = $this->calDavBackEnd->getCalendarByUri($principal, $id);
+ public function ensureCalendarExists($principal) {
+ $book = $this->calDavBackEnd->getCalendarByUri($principal, self::BIRTHDAY_CALENDAR_URI);
if (!is_null($book)) {
return $book;
}
- $this->calDavBackEnd->createCalendar($principal, $id, $properties);
+ $this->calDavBackEnd->createCalendar($principal, self::BIRTHDAY_CALENDAR_URI, [
+ '{DAV:}displayname' => 'Contact birthdays',
+ '{http://apple.com/ns/ical/}calendar-color' => '#FFFFCA',
+ ]);
- return $this->calDavBackEnd->getCalendarByUri($principal, $id);
+ return $this->calDavBackEnd->getCalendarByUri($principal, self::BIRTHDAY_CALENDAR_URI);
}
/**
@@ -161,7 +155,9 @@ class BirthdayService {
* @param string $user
*/
public function syncUser($user) {
- $books = $this->cardDavBackEnd->getAddressBooksForUser('principals/users/'.$user);
+ $principal = 'principals/users/'.$user;
+ $this->ensureCalendarExists($principal);
+ $books = $this->cardDavBackEnd->getAddressBooksForUser($principal);
foreach($books as $book) {
$cards = $this->cardDavBackEnd->getCards($book['id']);
foreach($cards as $card) {
diff --git a/apps/dav/lib/carddav/plugin.php b/apps/dav/lib/carddav/plugin.php
index d94dce1db0e..e02cc5686b8 100644
--- a/apps/dav/lib/carddav/plugin.php
+++ b/apps/dav/lib/carddav/plugin.php
@@ -46,6 +46,10 @@ class Plugin extends \Sabre\CardDAV\Plugin {
list(, $principalId) = URLUtil::splitPath($principal);
return self::ADDRESSBOOK_ROOT . '/users/' . $principalId;
}
+ if (strrpos($principal, 'principals/groups', -strlen($principal)) !== false) {
+ list(, $principalId) = URLUtil::splitPath($principal);
+ return self::ADDRESSBOOK_ROOT . '/groups/' . $principalId;
+ }
if (strrpos($principal, 'principals/system', -strlen($principal)) !== false) {
list(, $principalId) = URLUtil::splitPath($principal);
return self::ADDRESSBOOK_ROOT . '/system/' . $principalId;
diff --git a/apps/dav/lib/connector/sabre/davaclplugin.php b/apps/dav/lib/connector/sabre/davaclplugin.php
index 4a9dd66161d..f5699b469c3 100644
--- a/apps/dav/lib/connector/sabre/davaclplugin.php
+++ b/apps/dav/lib/connector/sabre/davaclplugin.php
@@ -46,7 +46,7 @@ class DavAclPlugin extends \Sabre\DAVACL\Plugin {
function checkPrivileges($uri, $privileges, $recursion = self::R_PARENT, $throwExceptions = true) {
$access = parent::checkPrivileges($uri, $privileges, $recursion, false);
- if($access === false) {
+ if($access === false && $throwExceptions) {
/** @var INode $node */
$node = $this->server->tree->getNodeForPath($uri);
diff --git a/apps/dav/lib/connector/sabre/file.php b/apps/dav/lib/connector/sabre/file.php
index 59b3a6e7483..6b698c6e5a9 100644
--- a/apps/dav/lib/connector/sabre/file.php
+++ b/apps/dav/lib/connector/sabre/file.php
@@ -433,7 +433,7 @@ class File extends Node implements IFile {
list($partStorage, $partInternalPath) = $this->fileView->resolvePath($partFile);
- $chunk_handler->file_assemble($partStorage, $partInternalPath, $this->fileView->getAbsolutePath($targetPath));
+ $chunk_handler->file_assemble($partStorage, $partInternalPath);
// here is the final atomic rename
$renameOkay = $targetStorage->moveFromStorage($partStorage, $partInternalPath, $targetInternalPath);
@@ -452,7 +452,7 @@ class File extends Node implements IFile {
}
} else {
// assemble directly into the final file
- $chunk_handler->file_assemble($targetStorage, $targetInternalPath, $this->fileView->getAbsolutePath($targetPath));
+ $chunk_handler->file_assemble($targetStorage, $targetInternalPath);
}
// allow sync clients to send the mtime along in a header
diff --git a/apps/dav/lib/connector/sabre/serverfactory.php b/apps/dav/lib/connector/sabre/serverfactory.php
index 6ccec0bc0e8..080f889ae71 100644
--- a/apps/dav/lib/connector/sabre/serverfactory.php
+++ b/apps/dav/lib/connector/sabre/serverfactory.php
@@ -137,6 +137,12 @@ class ServerFactory {
if($this->userSession->isLoggedIn()) {
$server->addPlugin(new \OCA\DAV\Connector\Sabre\TagsPlugin($objectTree, $this->tagManager));
+ $server->addPlugin(new \OCA\DAV\Connector\Sabre\SharesPlugin(
+ $objectTree,
+ $this->userSession,
+ $userFolder,
+ \OC::$server->getShareManager()
+ ));
$server->addPlugin(new \OCA\DAV\Connector\Sabre\CommentPropertiesPlugin(\OC::$server->getCommentsManager(), $this->userSession));
$server->addPlugin(new \OCA\DAV\Connector\Sabre\FilesReportPlugin(
$objectTree,
diff --git a/apps/dav/lib/connector/sabre/sharesplugin.php b/apps/dav/lib/connector/sabre/sharesplugin.php
new file mode 100644
index 00000000000..f75c1378718
--- /dev/null
+++ b/apps/dav/lib/connector/sabre/sharesplugin.php
@@ -0,0 +1,176 @@
+<?php
+/**
+ * @author Vincent Petry <pvince81@owncloud.com>
+ *
+ * @copyright Copyright (c) 2016, ownCloud, Inc.
+ * @license AGPL-3.0
+ *
+ * This code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
+ *
+ * This program 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, version 3,
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ *
+ */
+namespace OCA\DAV\Connector\Sabre;
+
+use \Sabre\DAV\PropFind;
+use \Sabre\DAV\PropPatch;
+use OCP\IUserSession;
+use OCP\Share\IShare;
+use OCA\DAV\Connector\Sabre\ShareTypeList;
+
+/**
+ * Sabre Plugin to provide share-related properties
+ */
+class SharesPlugin extends \Sabre\DAV\ServerPlugin {
+
+ const NS_OWNCLOUD = 'http://owncloud.org/ns';
+ const SHARETYPES_PROPERTYNAME = '{http://owncloud.org/ns}share-types';
+
+ /**
+ * Reference to main server object
+ *
+ * @var \Sabre\DAV\Server
+ */
+ private $server;
+
+ /**
+ * @var \OCP\Share\IManager
+ */
+ private $shareManager;
+
+ /**
+ * @var \Sabre\DAV\Tree
+ */
+ private $tree;
+
+ /**
+ * @var string
+ */
+ private $userId;
+
+ /**
+ * @var \OCP\Files\Folder
+ */
+ private $userFolder;
+
+ /**
+ * @var IShare[]
+ */
+ private $cachedShareTypes;
+
+ /**
+ * @param \Sabre\DAV\Tree $tree tree
+ * @param IUserSession $userSession user session
+ * @param \OCP\Files\Folder $userFolder user home folder
+ * @param \OCP\Share\IManager $shareManager share manager
+ */
+ public function __construct(
+ \Sabre\DAV\Tree $tree,
+ IUserSession $userSession,
+ \OCP\Files\Folder $userFolder,
+ \OCP\Share\IManager $shareManager
+ ) {
+ $this->tree = $tree;
+ $this->shareManager = $shareManager;
+ $this->userFolder = $userFolder;
+ $this->userId = $userSession->getUser()->getUID();
+ $this->cachedShareTypes = [];
+ }
+
+ /**
+ * This initializes the plugin.
+ *
+ * This function is called by \Sabre\DAV\Server, after
+ * addPlugin is called.
+ *
+ * This method should set up the required event subscriptions.
+ *
+ * @param \Sabre\DAV\Server $server
+ */
+ public function initialize(\Sabre\DAV\Server $server) {
+ $server->xml->namespacesMap[self::NS_OWNCLOUD] = 'oc';
+ $server->xml->elementMap[self::SHARETYPES_PROPERTYNAME] = 'OCA\\DAV\\Connector\\Sabre\\ShareTypeList';
+ $server->protectedProperties[] = self::SHARETYPES_PROPERTYNAME;
+
+ $this->server = $server;
+ $this->server->on('propFind', array($this, 'handleGetProperties'));
+ }
+
+ /**
+ * Return a list of share types for outgoing shares
+ *
+ * @param \OCP\Files\Node $node file node
+ *
+ * @return int[] array of share types
+ */
+ private function getShareTypes(\OCP\Files\Node $node) {
+ $shareTypes = [];
+ $requestedShareTypes = [
+ \OCP\Share::SHARE_TYPE_USER,
+ \OCP\Share::SHARE_TYPE_GROUP,
+ \OCP\Share::SHARE_TYPE_LINK
+ ];
+ foreach ($requestedShareTypes as $requestedShareType) {
+ // one of each type is enough to find out about the types
+ $shares = $this->shareManager->getSharesBy(
+ $this->userId,
+ $requestedShareType,
+ $node,
+ false,
+ 1
+ );
+ if (!empty($shares)) {
+ $shareTypes[] = $requestedShareType;
+ }
+ }
+ return $shareTypes;
+ }
+
+ /**
+ * Adds shares to propfind response
+ *
+ * @param PropFind $propFind propfind object
+ * @param \Sabre\DAV\INode $sabreNode sabre node
+ */
+ public function handleGetProperties(
+ PropFind $propFind,
+ \Sabre\DAV\INode $sabreNode
+ ) {
+ if (!($sabreNode instanceof \OCA\DAV\Connector\Sabre\Node)) {
+ return;
+ }
+
+ // need prefetch ?
+ if ($sabreNode instanceof \OCA\DAV\Connector\Sabre\Directory
+ && $propFind->getDepth() !== 0
+ && !is_null($propFind->getStatus(self::SHARETYPES_PROPERTYNAME))
+ ) {
+ $folderNode = $this->userFolder->get($propFind->getPath());
+ $children = $folderNode->getDirectoryListing();
+
+ $this->cachedShareTypes[$folderNode->getId()] = $this->getShareTypes($folderNode);
+ foreach ($children as $childNode) {
+ $this->cachedShareTypes[$childNode->getId()] = $this->getShareTypes($childNode);
+ }
+ }
+
+ $propFind->handle(self::SHARETYPES_PROPERTYNAME, function() use ($sabreNode) {
+ if (isset($this->cachedShareTypes[$sabreNode->getId()])) {
+ $shareTypes = $this->cachedShareTypes[$sabreNode->getId()];
+ } else {
+ $node = $this->userFolder->get($sabreNode->getPath());
+ $shareTypes = $this->getShareTypes($node);
+ }
+
+ return new ShareTypeList($shareTypes);
+ });
+ }
+}
diff --git a/apps/dav/lib/connector/sabre/sharetypelist.php b/apps/dav/lib/connector/sabre/sharetypelist.php
new file mode 100644
index 00000000000..763586412ad
--- /dev/null
+++ b/apps/dav/lib/connector/sabre/sharetypelist.php
@@ -0,0 +1,87 @@
+<?php
+/**
+ * @author Vincent Petry <pvince81@owncloud.com>
+ *
+ * @copyright Copyright (c) 2016, ownCloud, Inc.
+ * @license AGPL-3.0
+ *
+ * This code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
+ *
+ * This program 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, version 3,
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+namespace OCA\DAV\Connector\Sabre;
+
+use Sabre\Xml\Element;
+use Sabre\Xml\Reader;
+use Sabre\Xml\Writer;
+
+/**
+ * ShareTypeList property
+ *
+ * This property contains multiple "share-type" elements, each containing a share type.
+ */
+class ShareTypeList implements Element {
+ const NS_OWNCLOUD = 'http://owncloud.org/ns';
+
+ /**
+ * Share types
+ *
+ * @var int[]
+ */
+ private $shareTypes;
+
+ /**
+ * @param int[] $shareTypes
+ */
+ public function __construct($shareTypes) {
+ $this->shareTypes = $shareTypes;
+ }
+
+ /**
+ * Returns the share types
+ *
+ * @return int[]
+ */
+ public function getShareTypes() {
+ return $this->shareTypes;
+ }
+
+ /**
+ * The deserialize method is called during xml parsing.
+ *
+ * @param Reader $reader
+ * @return mixed
+ */
+ static function xmlDeserialize(Reader $reader) {
+ $shareTypes = [];
+
+ foreach ($reader->parseInnerTree() as $elem) {
+ if ($elem['name'] === '{' . self::NS_OWNCLOUD . '}share-type') {
+ $shareTypes[] = (int)$elem['value'];
+ }
+ }
+ return new self($shareTypes);
+ }
+
+ /**
+ * The xmlSerialize metod is called during xml writing.
+ *
+ * @param Writer $writer
+ * @return void
+ */
+ function xmlSerialize(Writer $writer) {
+ foreach ($this->shareTypes as $shareType) {
+ $writer->writeElement('{' . self::NS_OWNCLOUD . '}share-type', $shareType);
+ }
+ }
+}
diff --git a/apps/dav/lib/server.php b/apps/dav/lib/server.php
index 05e81a1184c..f624137f316 100644
--- a/apps/dav/lib/server.php
+++ b/apps/dav/lib/server.php
@@ -28,6 +28,7 @@ use OCA\DAV\Connector\FedAuth;
use OCA\DAV\Connector\Sabre\Auth;
use OCA\DAV\Connector\Sabre\BlockLegacyClientPlugin;
use OCA\DAV\Connector\Sabre\DavAclPlugin;
+use OCA\DAV\Connector\Sabre\DummyGetResponsePlugin;
use OCA\DAV\Connector\Sabre\FilesPlugin;
use OCA\DAV\Files\CustomPropertiesBackend;
use OCP\IRequest;
@@ -68,7 +69,13 @@ class Server {
$event = new SabrePluginEvent($this->server);
$dispatcher->dispatch('OCA\DAV\Connector\Sabre::authInit', $event);
- $this->server->addPlugin(new \OCA\DAV\Connector\Sabre\DummyGetResponsePlugin());
+ // debugging
+ if(\OC::$server->getConfig()->getSystemValue('debug', false)) {
+ $this->server->addPlugin(new \Sabre\DAV\Browser\Plugin());
+ } else {
+ $this->server->addPlugin(new DummyGetResponsePlugin());
+ }
+
$this->server->addPlugin(new \OCA\DAV\Connector\Sabre\ExceptionLoggerPlugin('webdav', $logger));
$this->server->addPlugin(new \OCA\DAV\Connector\Sabre\LockPlugin());
$this->server->addPlugin(new \Sabre\DAV\Sync\Plugin());
diff --git a/apps/dav/tests/unit/connector/sabre/file.php b/apps/dav/tests/unit/connector/sabre/file.php
index 8bbef225483..eab7ece159c 100644
--- a/apps/dav/tests/unit/connector/sabre/file.php
+++ b/apps/dav/tests/unit/connector/sabre/file.php
@@ -422,6 +422,75 @@ class File extends \Test\TestCase {
);
}
+ /**
+ * Test that putting a file with chunks triggers create hooks
+ */
+ public function testPutChunkedFileTriggersHooks() {
+ HookHelper::setUpHooks();
+
+ $_SERVER['HTTP_OC_CHUNKED'] = true;
+ $this->assertNull($this->doPut('/foo.txt-chunking-12345-2-0'));
+ $this->assertNotEmpty($this->doPut('/foo.txt-chunking-12345-2-1'));
+
+ $this->assertCount(4, HookHelper::$hookCalls);
+ $this->assertHookCall(
+ HookHelper::$hookCalls[0],
+ Filesystem::signal_create,
+ '/foo.txt'
+ );
+ $this->assertHookCall(
+ HookHelper::$hookCalls[1],
+ Filesystem::signal_write,
+ '/foo.txt'
+ );
+ $this->assertHookCall(
+ HookHelper::$hookCalls[2],
+ Filesystem::signal_post_create,
+ '/foo.txt'
+ );
+ $this->assertHookCall(
+ HookHelper::$hookCalls[3],
+ Filesystem::signal_post_write,
+ '/foo.txt'
+ );
+ }
+
+ /**
+ * Test that putting a chunked file triggers update hooks
+ */
+ public function testPutOverwriteChunkedFileTriggersHooks() {
+ $view = \OC\Files\Filesystem::getView();
+ $view->file_put_contents('/foo.txt', 'some content that will be replaced');
+
+ HookHelper::setUpHooks();
+
+ $_SERVER['HTTP_OC_CHUNKED'] = true;
+ $this->assertNull($this->doPut('/foo.txt-chunking-12345-2-0'));
+ $this->assertNotEmpty($this->doPut('/foo.txt-chunking-12345-2-1'));
+
+ $this->assertCount(4, HookHelper::$hookCalls);
+ $this->assertHookCall(
+ HookHelper::$hookCalls[0],
+ Filesystem::signal_update,
+ '/foo.txt'
+ );
+ $this->assertHookCall(
+ HookHelper::$hookCalls[1],
+ Filesystem::signal_write,
+ '/foo.txt'
+ );
+ $this->assertHookCall(
+ HookHelper::$hookCalls[2],
+ Filesystem::signal_post_update,
+ '/foo.txt'
+ );
+ $this->assertHookCall(
+ HookHelper::$hookCalls[3],
+ Filesystem::signal_post_write,
+ '/foo.txt'
+ );
+ }
+
public static function cancellingHook($params) {
self::$hookCalls[] = array(
'signal' => Filesystem::signal_post_create,
diff --git a/apps/dav/tests/unit/connector/sabre/sharesplugin.php b/apps/dav/tests/unit/connector/sabre/sharesplugin.php
new file mode 100644
index 00000000000..9a1c6eec507
--- /dev/null
+++ b/apps/dav/tests/unit/connector/sabre/sharesplugin.php
@@ -0,0 +1,257 @@
+<?php
+/**
+ * @author Vincent Petry <pvince81@owncloud.com>
+ *
+ * @copyright Copyright (c) 2016, ownCloud, Inc.
+ * @license AGPL-3.0
+ *
+ * This code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
+ *
+ * This program 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, version 3,
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ *
+ */
+namespace OCA\DAV\Tests\Unit\Connector\Sabre;
+
+class SharesPlugin extends \Test\TestCase {
+
+ const SHARETYPES_PROPERTYNAME = \OCA\DAV\Connector\Sabre\SharesPlugin::SHARETYPES_PROPERTYNAME;
+
+ /**
+ * @var \Sabre\DAV\Server
+ */
+ private $server;
+
+ /**
+ * @var \Sabre\DAV\Tree
+ */
+ private $tree;
+
+ /**
+ * @var \OCP\Share\IManager
+ */
+ private $shareManager;
+
+ /**
+ * @var \OCP\Files\Folder
+ */
+ private $userFolder;
+
+ /**
+ * @var \OCA\DAV\Connector\Sabre\SharesPlugin
+ */
+ private $plugin;
+
+ public function setUp() {
+ parent::setUp();
+ $this->server = new \Sabre\DAV\Server();
+ $this->tree = $this->getMockBuilder('\Sabre\DAV\Tree')
+ ->disableOriginalConstructor()
+ ->getMock();
+ $this->shareManager = $this->getMock('\OCP\Share\IManager');
+ $user = $this->getMock('\OCP\IUser');
+ $user->expects($this->once())
+ ->method('getUID')
+ ->will($this->returnValue('user1'));
+ $userSession = $this->getMock('\OCP\IUserSession');
+ $userSession->expects($this->once())
+ ->method('getUser')
+ ->will($this->returnValue($user));
+
+ $this->userFolder = $this->getMock('\OCP\Files\Folder');
+
+ $this->plugin = new \OCA\DAV\Connector\Sabre\SharesPlugin(
+ $this->tree,
+ $userSession,
+ $this->userFolder,
+ $this->shareManager
+ );
+ $this->plugin->initialize($this->server);
+ }
+
+ /**
+ * @dataProvider sharesGetPropertiesDataProvider
+ */
+ public function testGetProperties($shareTypes) {
+ $sabreNode = $this->getMockBuilder('\OCA\DAV\Connector\Sabre\Node')
+ ->disableOriginalConstructor()
+ ->getMock();
+ $sabreNode->expects($this->any())
+ ->method('getId')
+ ->will($this->returnValue(123));
+ $sabreNode->expects($this->once())
+ ->method('getPath')
+ ->will($this->returnValue('/subdir'));
+
+ // node API nodes
+ $node = $this->getMock('\OCP\Files\Folder');
+
+ $this->userFolder->expects($this->once())
+ ->method('get')
+ ->with('/subdir')
+ ->will($this->returnValue($node));
+
+ $this->shareManager->expects($this->any())
+ ->method('getSharesBy')
+ ->with(
+ $this->equalTo('user1'),
+ $this->anything(),
+ $this->anything(),
+ $this->equalTo(false),
+ $this->equalTo(1)
+ )
+ ->will($this->returnCallback(function($userId, $requestedShareType, $node, $flag, $limit) use ($shareTypes){
+ if (in_array($requestedShareType, $shareTypes)) {
+ return ['dummyshare'];
+ }
+ return [];
+ }));
+
+ $propFind = new \Sabre\DAV\PropFind(
+ '/dummyPath',
+ [self::SHARETYPES_PROPERTYNAME],
+ 0
+ );
+
+ $this->plugin->handleGetProperties(
+ $propFind,
+ $sabreNode
+ );
+
+ $result = $propFind->getResultForMultiStatus();
+
+ $this->assertEmpty($result[404]);
+ unset($result[404]);
+ $this->assertEquals($shareTypes, $result[200][self::SHARETYPES_PROPERTYNAME]->getShareTypes());
+ }
+
+ /**
+ * @dataProvider sharesGetPropertiesDataProvider
+ */
+ public function testPreloadThenGetProperties($shareTypes) {
+ $sabreNode1 = $this->getMockBuilder('\OCA\DAV\Connector\Sabre\File')
+ ->disableOriginalConstructor()
+ ->getMock();
+ $sabreNode1->expects($this->any())
+ ->method('getId')
+ ->will($this->returnValue(111));
+ $sabreNode1->expects($this->never())
+ ->method('getPath');
+ $sabreNode2 = $this->getMockBuilder('\OCA\DAV\Connector\Sabre\File')
+ ->disableOriginalConstructor()
+ ->getMock();
+ $sabreNode2->expects($this->any())
+ ->method('getId')
+ ->will($this->returnValue(222));
+ $sabreNode2->expects($this->never())
+ ->method('getPath');
+
+ $sabreNode = $this->getMockBuilder('\OCA\DAV\Connector\Sabre\Directory')
+ ->disableOriginalConstructor()
+ ->getMock();
+ $sabreNode->expects($this->any())
+ ->method('getId')
+ ->will($this->returnValue(123));
+ // never, because we use getDirectoryListing from the Node API instead
+ $sabreNode->expects($this->never())
+ ->method('getChildren');
+ $sabreNode->expects($this->any())
+ ->method('getPath')
+ ->will($this->returnValue('/subdir'));
+
+ // node API nodes
+ $node = $this->getMock('\OCP\Files\Folder');
+ $node->expects($this->any())
+ ->method('getId')
+ ->will($this->returnValue(123));
+ $node1 = $this->getMock('\OCP\Files\File');
+ $node1->expects($this->any())
+ ->method('getId')
+ ->will($this->returnValue(111));
+ $node2 = $this->getMock('\OCP\Files\File');
+ $node2->expects($this->any())
+ ->method('getId')
+ ->will($this->returnValue(222));
+ $node->expects($this->once())
+ ->method('getDirectoryListing')
+ ->will($this->returnValue([$node1, $node2]));
+
+ $this->userFolder->expects($this->once())
+ ->method('get')
+ ->with('/subdir')
+ ->will($this->returnValue($node));
+
+ $this->shareManager->expects($this->any())
+ ->method('getSharesBy')
+ ->with(
+ $this->equalTo('user1'),
+ $this->anything(),
+ $this->anything(),
+ $this->equalTo(false),
+ $this->equalTo(1)
+ )
+ ->will($this->returnCallback(function($userId, $requestedShareType, $node, $flag, $limit) use ($shareTypes){
+ if ($node->getId() === 111 && in_array($requestedShareType, $shareTypes)) {
+ return ['dummyshare'];
+ }
+
+ return [];
+ }));
+
+ // simulate sabre recursive PROPFIND traversal
+ $propFindRoot = new \Sabre\DAV\PropFind(
+ '/subdir',
+ [self::SHARETYPES_PROPERTYNAME],
+ 1
+ );
+ $propFind1 = new \Sabre\DAV\PropFind(
+ '/subdir/test.txt',
+ [self::SHARETYPES_PROPERTYNAME],
+ 0
+ );
+ $propFind2 = new \Sabre\DAV\PropFind(
+ '/subdir/test2.txt',
+ [self::SHARETYPES_PROPERTYNAME],
+ 0
+ );
+
+ $this->plugin->handleGetProperties(
+ $propFindRoot,
+ $sabreNode
+ );
+ $this->plugin->handleGetProperties(
+ $propFind1,
+ $sabreNode1
+ );
+ $this->plugin->handleGetProperties(
+ $propFind2,
+ $sabreNode2
+ );
+
+ $result = $propFind1->getResultForMultiStatus();
+
+ $this->assertEmpty($result[404]);
+ unset($result[404]);
+ $this->assertEquals($shareTypes, $result[200][self::SHARETYPES_PROPERTYNAME]->getShareTypes());
+ }
+
+ function sharesGetPropertiesDataProvider() {
+ return [
+ [[]],
+ [[\OCP\Share::SHARE_TYPE_USER]],
+ [[\OCP\Share::SHARE_TYPE_GROUP]],
+ [[\OCP\Share::SHARE_TYPE_LINK]],
+ [[\OCP\Share::SHARE_TYPE_USER, \OCP\Share::SHARE_TYPE_GROUP]],
+ [[\OCP\Share::SHARE_TYPE_USER, \OCP\Share::SHARE_TYPE_GROUP, \OCP\Share::SHARE_TYPE_LINK]],
+ [[\OCP\Share::SHARE_TYPE_USER, \OCP\Share::SHARE_TYPE_LINK]],
+ [[\OCP\Share::SHARE_TYPE_GROUP, \OCP\Share::SHARE_TYPE_LINK]],
+ ];
+ }
+}
diff --git a/apps/encryption/settings/settings-admin.php b/apps/encryption/settings/settings-admin.php
index 6c7c0987fd7..79e900ebbdc 100644
--- a/apps/encryption/settings/settings-admin.php
+++ b/apps/encryption/settings/settings-admin.php
@@ -49,5 +49,6 @@ $encryptHomeStorage = $util->shouldEncryptHomeStorage();
$tmpl->assign('recoveryEnabled', $recoveryAdminEnabled);
$tmpl->assign('initStatus', $session->getStatus());
$tmpl->assign('encryptHomeStorage', $encryptHomeStorage);
+$tmpl->assign('masterKeyEnabled', $util->isMasterKeyEnabled());
return $tmpl->fetchPage();
diff --git a/apps/encryption/templates/settings-admin.php b/apps/encryption/templates/settings-admin.php
index e55aba6757c..9804db045cd 100644
--- a/apps/encryption/templates/settings-admin.php
+++ b/apps/encryption/templates/settings-admin.php
@@ -16,56 +16,58 @@ style('encryption', 'settings-admin');
<em><?php p( $l->t( "Enabling this option encrypts all files stored on the main storage, otherwise only files on external storage will be encrypted" ) ); ?></em>
</p>
<br />
- <p id="encryptionSetRecoveryKey">
- <?php $_["recoveryEnabled"] === '0' ? p($l->t("Enable recovery key")) : p($l->t("Disable recovery key")); ?>
- <span class="msg"></span>
- <br/>
- <em>
- <?php p($l->t("The recovery key is an extra encryption key that is used to encrypt files. It allows recovery of a user's files if the user forgets his or her password.")) ?>
- </em>
- <br/>
- <input type="password"
- name="encryptionRecoveryPassword"
- id="encryptionRecoveryPassword"
- placeholder="<?php p($l->t("Recovery key password")); ?>"/>
- <input type="password"
- name="encryptionRecoveryPassword"
- id="repeatEncryptionRecoveryPassword"
- placeholder="<?php p($l->t("Repeat recovery key password")); ?>"/>
- <input type="button"
- name="enableRecoveryKey"
- id="enableRecoveryKey"
- status="<?php p($_["recoveryEnabled"]) ?>"
- value="<?php $_["recoveryEnabled"] === '0' ? p($l->t("Enable recovery key")) : p($l->t("Disable recovery key")); ?>"/>
- </p>
- <br/><br/>
+ <?php if($_['masterKeyEnabled'] === false): ?>
+ <p id="encryptionSetRecoveryKey">
+ <?php $_["recoveryEnabled"] === '0' ? p($l->t("Enable recovery key")) : p($l->t("Disable recovery key")); ?>
+ <span class="msg"></span>
+ <br/>
+ <em>
+ <?php p($l->t("The recovery key is an extra encryption key that is used to encrypt files. It allows recovery of a user's files if the user forgets his or her password.")) ?>
+ </em>
+ <br/>
+ <input type="password"
+ name="encryptionRecoveryPassword"
+ id="encryptionRecoveryPassword"
+ placeholder="<?php p($l->t("Recovery key password")); ?>"/>
+ <input type="password"
+ name="encryptionRecoveryPassword"
+ id="repeatEncryptionRecoveryPassword"
+ placeholder="<?php p($l->t("Repeat recovery key password")); ?>"/>
+ <input type="button"
+ name="enableRecoveryKey"
+ id="enableRecoveryKey"
+ status="<?php p($_["recoveryEnabled"]) ?>"
+ value="<?php $_["recoveryEnabled"] === '0' ? p($l->t("Enable recovery key")) : p($l->t("Disable recovery key")); ?>"/>
+ </p>
+ <br/><br/>
- <p name="changeRecoveryPasswordBlock" id="encryptionChangeRecoveryKey" <?php if($_['recoveryEnabled'] === '0') print_unescaped('class="hidden"');?>>
- <?php p($l->t("Change recovery key password:")); ?>
- <span class="msg"></span>
- <br/>
- <input
- type="password"
- name="changeRecoveryPassword"
- id="oldEncryptionRecoveryPassword"
- placeholder="<?php p($l->t("Old recovery key password")); ?>"/>
- <br />
- <input
- type="password"
- name="changeRecoveryPassword"
- id="newEncryptionRecoveryPassword"
- placeholder="<?php p($l->t("New recovery key password")); ?>"/>
- <input
- type="password"
- name="changeRecoveryPassword"
- id="repeatedNewEncryptionRecoveryPassword"
- placeholder="<?php p($l->t("Repeat new recovery key password")); ?>"/>
+ <p name="changeRecoveryPasswordBlock" id="encryptionChangeRecoveryKey" <?php if($_['recoveryEnabled'] === '0') print_unescaped('class="hidden"');?>>
+ <?php p($l->t("Change recovery key password:")); ?>
+ <span class="msg"></span>
+ <br/>
+ <input
+ type="password"
+ name="changeRecoveryPassword"
+ id="oldEncryptionRecoveryPassword"
+ placeholder="<?php p($l->t("Old recovery key password")); ?>"/>
+ <br />
+ <input
+ type="password"
+ name="changeRecoveryPassword"
+ id="newEncryptionRecoveryPassword"
+ placeholder="<?php p($l->t("New recovery key password")); ?>"/>
+ <input
+ type="password"
+ name="changeRecoveryPassword"
+ id="repeatedNewEncryptionRecoveryPassword"
+ placeholder="<?php p($l->t("Repeat new recovery key password")); ?>"/>
- <button
- type="button"
- name="submitChangeRecoveryKey">
- <?php p($l->t("Change Password")); ?>
- </button>
- </p>
+ <button
+ type="button"
+ name="submitChangeRecoveryKey">
+ <?php p($l->t("Change Password")); ?>
+ </button>
+ </p>
+ <?php endif; ?>
<?php endif; ?>
</form>
diff --git a/apps/federation/backgroundjob/getsharedsecret.php b/apps/federation/backgroundjob/getsharedsecret.php
index d3dd00c74a2..66ab082c1a2 100644
--- a/apps/federation/backgroundjob/getsharedsecret.php
+++ b/apps/federation/backgroundjob/getsharedsecret.php
@@ -25,12 +25,13 @@ namespace OCA\Federation\BackgroundJob;
use GuzzleHttp\Exception\ClientException;
use OC\BackgroundJob\JobList;
-use OC\BackgroundJob\QueuedJob;
+use OC\BackgroundJob\Job;
use OCA\Federation\DbHandler;
use OCA\Federation\TrustedServers;
use OCP\AppFramework\Http;
use OCP\BackgroundJob\IJobList;
use OCP\Http\Client\IClient;
+use OCP\Http\Client\IResponse;
use OCP\ILogger;
use OCP\IURLGenerator;
@@ -41,7 +42,7 @@ use OCP\IURLGenerator;
*
* @package OCA\Federation\Backgroundjob
*/
-class GetSharedSecret extends QueuedJob{
+class GetSharedSecret extends Job{
/** @var IClient */
private $httpClient;
@@ -61,6 +62,9 @@ class GetSharedSecret extends QueuedJob{
/** @var ILogger */
private $logger;
+ /** @var bool */
+ protected $retainJob = false;
+
private $endPoint = '/ocs/v2.php/apps/federation/api/v1/shared-secret?format=json';
/**
@@ -79,7 +83,7 @@ class GetSharedSecret extends QueuedJob{
IJobList $jobList = null,
TrustedServers $trustedServers = null,
ILogger $logger = null,
- dbHandler $dbHandler = null
+ DbHandler $dbHandler = null
) {
$this->logger = $logger ? $logger : \OC::$server->getLogger();
$this->httpClient = $httpClient ? $httpClient : \OC::$server->getHTTPClientService()->newClient();
@@ -108,12 +112,15 @@ class GetSharedSecret extends QueuedJob{
* @param ILogger $logger
*/
public function execute($jobList, ILogger $logger = null) {
- $jobList->remove($this, $this->argument);
$target = $this->argument['url'];
// only execute if target is still in the list of trusted domains
if ($this->trustedServers->isTrustedServer($target)) {
$this->parentExecute($jobList, $logger);
}
+
+ if (!$this->retainJob) {
+ $jobList->remove($this, $this->argument);
+ }
}
/**
@@ -132,6 +139,7 @@ class GetSharedSecret extends QueuedJob{
$source = rtrim($source, '/');
$token = $argument['token'];
+ $result = null;
try {
$result = $this->httpClient->get(
$target . $this->endPoint,
@@ -156,7 +164,7 @@ class GetSharedSecret extends QueuedJob{
$this->logger->logException($e, ['app' => 'federation']);
}
} catch (\Exception $e) {
- $status = HTTP::STATUS_INTERNAL_SERVER_ERROR;
+ $status = Http::STATUS_INTERNAL_SERVER_ERROR;
$this->logger->logException($e, ['app' => 'federation']);
}
@@ -165,16 +173,13 @@ class GetSharedSecret extends QueuedJob{
$status !== Http::STATUS_OK
&& $status !== Http::STATUS_FORBIDDEN
) {
- $this->jobList->add(
- 'OCA\Federation\BackgroundJob\GetSharedSecret',
- $argument
- );
+ $this->retainJob = true;
} else {
// reset token if we received a valid response
$this->dbHandler->addToken($target, '');
}
- if ($status === Http::STATUS_OK) {
+ if ($status === Http::STATUS_OK && $result instanceof IResponse) {
$body = $result->getBody();
$result = json_decode($body, true);
if (isset($result['ocs']['data']['sharedSecret'])) {
diff --git a/apps/federation/backgroundjob/requestsharedsecret.php b/apps/federation/backgroundjob/requestsharedsecret.php
index 79b55fe4ee4..040e8e1d8e2 100644
--- a/apps/federation/backgroundjob/requestsharedsecret.php
+++ b/apps/federation/backgroundjob/requestsharedsecret.php
@@ -27,7 +27,7 @@ namespace OCA\Federation\BackgroundJob;
use GuzzleHttp\Exception\ClientException;
use OC\BackgroundJob\JobList;
-use OC\BackgroundJob\QueuedJob;
+use OC\BackgroundJob\Job;
use OCA\Federation\DbHandler;
use OCA\Federation\TrustedServers;
use OCP\AppFramework\Http;
@@ -43,7 +43,7 @@ use OCP\IURLGenerator;
*
* @package OCA\Federation\Backgroundjob
*/
-class RequestSharedSecret extends QueuedJob {
+class RequestSharedSecret extends Job {
/** @var IClient */
private $httpClient;
@@ -65,6 +65,9 @@ class RequestSharedSecret extends QueuedJob {
/** @var ILogger */
private $logger;
+ /** @var bool */
+ protected $retainJob = false;
+
/**
* RequestSharedSecret constructor.
*
@@ -79,7 +82,7 @@ class RequestSharedSecret extends QueuedJob {
IURLGenerator $urlGenerator = null,
IJobList $jobList = null,
TrustedServers $trustedServers = null,
- dbHandler $dbHandler = null
+ DbHandler $dbHandler = null
) {
$this->httpClient = $httpClient ? $httpClient : \OC::$server->getHTTPClientService()->newClient();
$this->jobList = $jobList ? $jobList : \OC::$server->getJobList();
@@ -109,15 +112,20 @@ class RequestSharedSecret extends QueuedJob {
* @param ILogger $logger
*/
public function execute($jobList, ILogger $logger = null) {
- $jobList->remove($this, $this->argument);
$target = $this->argument['url'];
// only execute if target is still in the list of trusted domains
if ($this->trustedServers->isTrustedServer($target)) {
$this->parentExecute($jobList, $logger);
}
+
+ if (!$this->retainJob) {
+ $jobList->remove($this, $this->argument);
+ }
}
/**
+ * call execute() method of parent
+ *
* @param JobList $jobList
* @param ILogger $logger
*/
@@ -155,7 +163,7 @@ class RequestSharedSecret extends QueuedJob {
$this->logger->logException($e, ['app' => 'federation']);
}
} catch (\Exception $e) {
- $status = HTTP::STATUS_INTERNAL_SERVER_ERROR;
+ $status = Http::STATUS_INTERNAL_SERVER_ERROR;
$this->logger->logException($e, ['app' => 'federation']);
}
@@ -164,10 +172,7 @@ class RequestSharedSecret extends QueuedJob {
$status !== Http::STATUS_OK
&& $status !== Http::STATUS_FORBIDDEN
) {
- $this->jobList->add(
- 'OCA\Federation\BackgroundJob\RequestSharedSecret',
- $argument
- );
+ $this->retainJob = true;
}
if ($status === Http::STATUS_FORBIDDEN) {
diff --git a/apps/federation/l10n/is.js b/apps/federation/l10n/is.js
new file mode 100644
index 00000000000..6c5c4444f5d
--- /dev/null
+++ b/apps/federation/l10n/is.js
@@ -0,0 +1,10 @@
+OC.L10N.register(
+ "federation",
+ {
+ "No ownCloud server found" : "Enginn ownCloud-þjónn fannst",
+ "Could not add server" : "Gat ekki bætt við þjóni",
+ "Trusted ownCloud Servers" : "Treystir ownCloud-þjónar",
+ "+ Add ownCloud server" : "+ Bæta við ownCloud-þjóni",
+ "ownCloud Server" : "ownCloud-þjónn"
+},
+"nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);");
diff --git a/apps/federation/l10n/is.json b/apps/federation/l10n/is.json
new file mode 100644
index 00000000000..7b54843d64b
--- /dev/null
+++ b/apps/federation/l10n/is.json
@@ -0,0 +1,8 @@
+{ "translations": {
+ "No ownCloud server found" : "Enginn ownCloud-þjónn fannst",
+ "Could not add server" : "Gat ekki bætt við þjóni",
+ "Trusted ownCloud Servers" : "Treystir ownCloud-þjónar",
+ "+ Add ownCloud server" : "+ Bæta við ownCloud-þjóni",
+ "ownCloud Server" : "ownCloud-þjónn"
+},"pluralForm" :"nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/ru.js b/apps/federation/l10n/ru.js
index d41e1f4391c..8e4b1372938 100644
--- a/apps/federation/l10n/ru.js
+++ b/apps/federation/l10n/ru.js
@@ -6,6 +6,9 @@ OC.L10N.register(
"No ownCloud server found" : "Сервер ownCloud не найден",
"Could not add server" : "Не удалось добавить сервер",
"Federation" : "Объединение",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "Объединение серверов ownCloud позволит Вам подключиться к другим доверенным серверам ownCloud для обмена директориями пользователей. Это будет использовано, например, для автоматического завершения внешних пользователей при объединенном общем доступе."
+ "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "Объединение серверов ownCloud позволит Вам подключиться к другим доверенным серверам ownCloud для обмена директориями пользователей. Это будет использовано, например, для автоматического завершения внешних пользователей при объединенном общем доступе.",
+ "Trusted ownCloud Servers" : "Доверенные серверы ownCloud",
+ "+ Add ownCloud server" : "+ Добавить сервер ownCloud",
+ "ownCloud Server" : "Сервер ownCloud"
},
"nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);");
diff --git a/apps/federation/l10n/ru.json b/apps/federation/l10n/ru.json
index 417d4be1559..526005e3d38 100644
--- a/apps/federation/l10n/ru.json
+++ b/apps/federation/l10n/ru.json
@@ -4,6 +4,9 @@
"No ownCloud server found" : "Сервер ownCloud не найден",
"Could not add server" : "Не удалось добавить сервер",
"Federation" : "Объединение",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "Объединение серверов ownCloud позволит Вам подключиться к другим доверенным серверам ownCloud для обмена директориями пользователей. Это будет использовано, например, для автоматического завершения внешних пользователей при объединенном общем доступе."
+ "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "Объединение серверов ownCloud позволит Вам подключиться к другим доверенным серверам ownCloud для обмена директориями пользователей. Это будет использовано, например, для автоматического завершения внешних пользователей при объединенном общем доступе.",
+ "Trusted ownCloud Servers" : "Доверенные серверы ownCloud",
+ "+ Add ownCloud server" : "+ Добавить сервер ownCloud",
+ "ownCloud Server" : "Сервер ownCloud"
},"pluralForm" :"nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);"
} \ No newline at end of file
diff --git a/apps/federation/l10n/tr.js b/apps/federation/l10n/tr.js
new file mode 100644
index 00000000000..af299744a92
--- /dev/null
+++ b/apps/federation/l10n/tr.js
@@ -0,0 +1,12 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Server added to the list of trusted ownClouds" : "Sunucu güvenilen ownCloud sunucuları listesine eklendi",
+ "Server is already in the list of trusted servers." : "Sunucu zaten güvenilen sunucu listesine eklenmiş.",
+ "No ownCloud server found" : "Hiçbir ownCloud sunucusu bulunamadı",
+ "Could not add server" : "Sunucu eklenemedi",
+ "Trusted ownCloud Servers" : "Güvenilen ownCloud Sunucuları",
+ "+ Add ownCloud server" : "ownCloud sunucusu ekle",
+ "ownCloud Server" : "ownCloud Sunucusu"
+},
+"nplurals=2; plural=(n > 1);");
diff --git a/apps/federation/l10n/tr.json b/apps/federation/l10n/tr.json
new file mode 100644
index 00000000000..2ed13eca58e
--- /dev/null
+++ b/apps/federation/l10n/tr.json
@@ -0,0 +1,10 @@
+{ "translations": {
+ "Server added to the list of trusted ownClouds" : "Sunucu güvenilen ownCloud sunucuları listesine eklendi",
+ "Server is already in the list of trusted servers." : "Sunucu zaten güvenilen sunucu listesine eklenmiş.",
+ "No ownCloud server found" : "Hiçbir ownCloud sunucusu bulunamadı",
+ "Could not add server" : "Sunucu eklenemedi",
+ "Trusted ownCloud Servers" : "Güvenilen ownCloud Sunucuları",
+ "+ Add ownCloud server" : "ownCloud sunucusu ekle",
+ "ownCloud Server" : "ownCloud Sunucusu"
+},"pluralForm" :"nplurals=2; plural=(n > 1);"
+} \ No newline at end of file
diff --git a/apps/federation/tests/backgroundjob/getsharedsecrettest.php b/apps/federation/tests/backgroundjob/getsharedsecrettest.php
index 08c8677415c..25f7502741d 100644
--- a/apps/federation/tests/backgroundjob/getsharedsecrettest.php
+++ b/apps/federation/tests/backgroundjob/getsharedsecrettest.php
@@ -95,8 +95,9 @@ class GetSharedSecretTest extends TestCase {
* @dataProvider dataTestExecute
*
* @param bool $isTrustedServer
+ * @param bool $retainBackgroundJob
*/
- public function testExecute($isTrustedServer) {
+ public function testExecute($isTrustedServer, $retainBackgroundJob) {
/** @var GetSharedSecret |\PHPUnit_Framework_MockObject_MockObject $getSharedSecret */
$getSharedSecret = $this->getMockBuilder('OCA\Federation\BackgroundJob\GetSharedSecret')
->setConstructorArgs(
@@ -111,7 +112,6 @@ class GetSharedSecretTest extends TestCase {
)->setMethods(['parentExecute'])->getMock();
$this->invokePrivate($getSharedSecret, 'argument', [['url' => 'url']]);
- $this->jobList->expects($this->once())->method('remove');
$this->trustedServers->expects($this->once())->method('isTrustedServer')
->with('url')->willReturn($isTrustedServer);
if ($isTrustedServer) {
@@ -119,6 +119,12 @@ class GetSharedSecretTest extends TestCase {
} else {
$getSharedSecret->expects($this->never())->method('parentExecute');
}
+ $this->invokePrivate($getSharedSecret, 'retainJob', [$retainBackgroundJob]);
+ if ($retainBackgroundJob) {
+ $this->jobList->expects($this->never())->method('remove');
+ } else {
+ $this->jobList->expects($this->once())->method('remove');
+ }
$getSharedSecret->execute($this->jobList);
@@ -126,8 +132,9 @@ class GetSharedSecretTest extends TestCase {
public function dataTestExecute() {
return [
- [true],
- [false]
+ [true, true],
+ [true, false],
+ [false, false],
];
}
@@ -167,12 +174,9 @@ class GetSharedSecretTest extends TestCase {
$statusCode !== Http::STATUS_OK
&& $statusCode !== Http::STATUS_FORBIDDEN
) {
- $this->jobList->expects($this->once())->method('add')
- ->with('OCA\Federation\BackgroundJob\GetSharedSecret', $argument);
$this->dbHandler->expects($this->never())->method('addToken');
} else {
$this->dbHandler->expects($this->once())->method('addToken')->with($target, '');
- $this->jobList->expects($this->never())->method('add');
}
if ($statusCode === Http::STATUS_OK) {
@@ -185,6 +189,15 @@ class GetSharedSecretTest extends TestCase {
}
$this->invokePrivate($this->getSharedSecret, 'run', [$argument]);
+ if (
+ $statusCode !== Http::STATUS_OK
+ && $statusCode !== Http::STATUS_FORBIDDEN
+ ) {
+ $this->assertTrue($this->invokePrivate($this->getSharedSecret, 'retainJob'));
+ } else {
+ $this->assertFalse($this->invokePrivate($this->getSharedSecret, 'retainJob'));
+ }
+
}
public function dataTestRun() {
diff --git a/apps/federation/tests/backgroundjob/requestsharedsecrettest.php b/apps/federation/tests/backgroundjob/requestsharedsecrettest.php
index 45f79e05249..5b4a1f87a5f 100644
--- a/apps/federation/tests/backgroundjob/requestsharedsecrettest.php
+++ b/apps/federation/tests/backgroundjob/requestsharedsecrettest.php
@@ -75,8 +75,9 @@ class RequestSharedSecretTest extends TestCase {
* @dataProvider dataTestExecute
*
* @param bool $isTrustedServer
+ * @param bool $retainBackgroundJob
*/
- public function testExecute($isTrustedServer) {
+ public function testExecute($isTrustedServer, $retainBackgroundJob) {
/** @var RequestSharedSecret |\PHPUnit_Framework_MockObject_MockObject $requestSharedSecret */
$requestSharedSecret = $this->getMockBuilder('OCA\Federation\BackgroundJob\RequestSharedSecret')
->setConstructorArgs(
@@ -90,7 +91,6 @@ class RequestSharedSecretTest extends TestCase {
)->setMethods(['parentExecute'])->getMock();
$this->invokePrivate($requestSharedSecret, 'argument', [['url' => 'url']]);
- $this->jobList->expects($this->once())->method('remove');
$this->trustedServers->expects($this->once())->method('isTrustedServer')
->with('url')->willReturn($isTrustedServer);
if ($isTrustedServer) {
@@ -98,6 +98,12 @@ class RequestSharedSecretTest extends TestCase {
} else {
$requestSharedSecret->expects($this->never())->method('parentExecute');
}
+ $this->invokePrivate($requestSharedSecret, 'retainJob', [$retainBackgroundJob]);
+ if ($retainBackgroundJob) {
+ $this->jobList->expects($this->never())->method('remove');
+ } else {
+ $this->jobList->expects($this->once())->method('remove');
+ }
$requestSharedSecret->execute($this->jobList);
@@ -105,8 +111,9 @@ class RequestSharedSecretTest extends TestCase {
public function dataTestExecute() {
return [
- [true],
- [false]
+ [true, true],
+ [true, false],
+ [false, false],
];
}
@@ -146,17 +153,22 @@ class RequestSharedSecretTest extends TestCase {
$statusCode !== Http::STATUS_OK
&& $statusCode !== Http::STATUS_FORBIDDEN
) {
- $this->jobList->expects($this->once())->method('add')
- ->with('OCA\Federation\BackgroundJob\RequestSharedSecret', $argument);
$this->dbHandler->expects($this->never())->method('addToken');
}
if ($statusCode === Http::STATUS_FORBIDDEN) {
- $this->jobList->expects($this->never())->method('add');
$this->dbHandler->expects($this->once())->method('addToken')->with($target, '');
}
$this->invokePrivate($this->requestSharedSecret, 'run', [$argument]);
+ if (
+ $statusCode !== Http::STATUS_OK
+ && $statusCode !== Http::STATUS_FORBIDDEN
+ ) {
+ $this->assertTrue($this->invokePrivate($this->requestSharedSecret, 'retainJob'));
+ } else {
+ $this->assertFalse($this->invokePrivate($this->requestSharedSecret, 'retainJob'));
+ }
}
public function dataTestRun() {
diff --git a/apps/files/appinfo/application.php b/apps/files/appinfo/application.php
index bc6dc9fb9ed..593e0533c80 100644
--- a/apps/files/appinfo/application.php
+++ b/apps/files/appinfo/application.php
@@ -40,8 +40,10 @@ class Application extends App {
return new ApiController(
$c->query('AppName'),
$c->query('Request'),
+ $server->getUserSession(),
$c->query('TagService'),
- $server->getPreviewManager()
+ $server->getPreviewManager(),
+ $server->getShareManager()
);
});
diff --git a/apps/files/controller/apicontroller.php b/apps/files/controller/apicontroller.php
index c96d92a046b..43abf2ff458 100644
--- a/apps/files/controller/apicontroller.php
+++ b/apps/files/controller/apicontroller.php
@@ -34,6 +34,10 @@ use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\Http\DataDisplayResponse;
use OCA\Files\Service\TagService;
use OCP\IPreview;
+use OCP\Share\IManager;
+use OCP\Files\FileInfo;
+use OCP\Files\Node;
+use OCP\IUserSession;
/**
* Class ApiController
@@ -43,8 +47,12 @@ use OCP\IPreview;
class ApiController extends Controller {
/** @var TagService */
private $tagService;
+ /** @var IManager **/
+ private $shareManager;
/** @var IPreview */
private $previewManager;
+ /** IUserSession */
+ private $userSession;
/**
* @param string $appName
@@ -54,11 +62,15 @@ class ApiController extends Controller {
*/
public function __construct($appName,
IRequest $request,
+ IUserSession $userSession,
TagService $tagService,
- IPreview $previewManager){
+ IPreview $previewManager,
+ IManager $shareManager) {
parent::__construct($appName, $request);
+ $this->userSession = $userSession;
$this->tagService = $tagService;
$this->previewManager = $previewManager;
+ $this->shareManager = $shareManager;
}
/**
@@ -132,8 +144,10 @@ class ApiController extends Controller {
*/
public function getFilesByTag($tagName) {
$files = array();
- $fileInfos = $this->tagService->getFilesByTag($tagName);
- foreach ($fileInfos as &$fileInfo) {
+ $nodes = $this->tagService->getFilesByTag($tagName);
+ foreach ($nodes as &$node) {
+ $shareTypes = $this->getShareTypes($node);
+ $fileInfo = $node->getFileInfo();
$file = \OCA\Files\Helper::formatFileInfo($fileInfo);
$parts = explode('/', dirname($fileInfo->getPath()), 4);
if(isset($parts[3])) {
@@ -142,9 +156,43 @@ class ApiController extends Controller {
$file['path'] = '/';
}
$file['tags'] = [$tagName];
+ if (!empty($shareTypes)) {
+ $file['shareTypes'] = $shareTypes;
+ }
$files[] = $file;
}
return new DataResponse(['files' => $files]);
}
+ /**
+ * Return a list of share types for outgoing shares
+ *
+ * @param Node $node file node
+ *
+ * @return int[] array of share types
+ */
+ private function getShareTypes(Node $node) {
+ $userId = $this->userSession->getUser()->getUID();
+ $shareTypes = [];
+ $requestedShareTypes = [
+ \OCP\Share::SHARE_TYPE_USER,
+ \OCP\Share::SHARE_TYPE_GROUP,
+ \OCP\Share::SHARE_TYPE_LINK
+ ];
+ foreach ($requestedShareTypes as $requestedShareType) {
+ // one of each type is enough to find out about the types
+ $shares = $this->shareManager->getSharesBy(
+ $userId,
+ $requestedShareType,
+ $node,
+ false,
+ 1
+ );
+ if (!empty($shares)) {
+ $shareTypes[] = $requestedShareType;
+ }
+ }
+ return $shareTypes;
+ }
+
}
diff --git a/apps/files/l10n/is.js b/apps/files/l10n/is.js
index 893337356e4..ff30045d6f7 100644
--- a/apps/files/l10n/is.js
+++ b/apps/files/l10n/is.js
@@ -4,6 +4,7 @@ OC.L10N.register(
"Storage not available" : "Geymsla ekki tiltæk",
"Storage invalid" : "Ógild geymsla",
"Unknown error" : "Óþekkt villa",
+ "Unable to set upload directory." : "Gat ekki sett innhleðslumöppu.",
"Invalid Token" : "Ógilt teikn",
"No file was uploaded. Unknown error" : "Engin skrá var send inn. Óþekkt villa.",
"There is no error, the file uploaded with success" : "Engin villa, innsending heppnaðist",
@@ -14,6 +15,9 @@ OC.L10N.register(
"Missing a temporary folder" : "Vantar bráðabirgðamöppu",
"Failed to write to disk" : "Tókst ekki að skrifa á disk",
"Not enough storage available" : "Ekki er nægilegt geymslupláss tiltækt",
+ "The target folder has been moved or deleted." : "Markmappan hefur verið færð eða henni eytt.",
+ "Upload failed. Could not find uploaded file" : "Innsending mistókst. Fann ekki innsendu skrána",
+ "Upload failed. Could not get file info." : "Innsending mistókst. Gat ekki nálgast skráarupplýsingar.",
"Invalid directory." : "Ógild mappa.",
"Files" : "Skrár",
"All files" : "Allar skrár",
@@ -21,7 +25,11 @@ OC.L10N.register(
"Home" : "Heim",
"Close" : "Loka",
"Upload cancelled." : "Hætt við innsendingu.",
+ "Unable to upload {filename} as it is a directory or has 0 bytes" : "Tókst ekki að hlaða inn {filename} þar sem þetta er mappa eða er 0 bæti",
"Total file size {size1} exceeds upload limit {size2}" : "Heildarskráastærð {size1} er meiri en leyfilegt innsendingahámark {size2}",
+ "Not enough free space, you are uploading {size1} but only {size2} is left" : "Ekki nægilegt laust pláss, þú ert að senda inn {size1} en einungis {size2} eru eftir",
+ "Error uploading file \"{fileName}\": {message}" : "Villa við að senda inn skrána \"{fileName}\": {message}",
+ "Could not get result from server." : "Fékk ekki niðurstöður frá þjóni.",
"File upload is in progress. Leaving the page now will cancel the upload." : "Innsending í gangi. Ef þú ferð af þessari síðu mun innsending hætta.",
"Actions" : "Aðgerðir",
"Download" : "Niðurhal",
@@ -38,6 +46,8 @@ OC.L10N.register(
"Could not move \"{file}\", target exists" : "Gat ekki fært \"{file}\", markskrá er til",
"Could not move \"{file}\"" : "Gat ekki fært \"{file}\"",
"{newName} already exists" : "{newName} er þegar til",
+ "Could not rename \"{fileName}\", it does not exist any more" : "Gat ekki endurnefnt \"{fileName}\", það er ekki lengur til staðar",
+ "The name \"{targetName}\" is already used in the folder \"{dir}\". Please choose a different name." : "Heitið \"{targetName}\" er nú þegar notað í \"{dir}\" möppunni. Veldu eitthvað annað nafn.",
"Could not rename \"{fileName}\"" : "Gat ekki endurnefnt \"{fileName}\"",
"Could not create file \"{file}\"" : "Gat ekki búið til skrána \"{file}\"",
"Could not create file \"{file}\" because it already exists" : "Gat ekki búið til skrána \"{file}\" vegna þess að hún er þegar til",
@@ -56,6 +66,8 @@ OC.L10N.register(
"New" : "Nýtt",
"\"{name}\" is an invalid file name." : "\"{name}\" er ógilt skráarheiti.",
"File name cannot be empty." : "Heiti skráar má ekki vera tómt",
+ "Storage of {owner} is full, files can not be updated or synced anymore!" : "Geymslupláss {owner} er fullt, ekki er lengur hægt að uppfæra eða samstilla skrár!",
+ "Your storage is full, files can not be updated or synced anymore!" : "Geymsluplássið þitt er fullt, ekki er lengur hægt að uppfæra eða samstilla skrár!",
"Storage of {owner} is almost full ({usedSpacePercent}%)" : "Geymslupláss {owner} er næstum fullt ({usedSpacePercent}%)",
"Your storage is almost full ({usedSpacePercent}%)" : "Geymsluplássið þitt er næstum fullt ({usedSpacePercent}%)",
"_matches '{filter}'_::_match '{filter}'_" : ["samsvarar '{filter}'","samsvara '{filter}'"],
@@ -68,6 +80,11 @@ OC.L10N.register(
"{newname} already exists" : "{newname} er þegar til",
"Upload" : "Senda inn",
"An error occurred while trying to update the tags" : "Villa kom upp við að reyna að uppfæra merkin",
+ "A new file or folder has been <strong>created</strong>" : "Skjal eða mappa hefur verið <strong>búin til</strong>",
+ "A file or folder has been <strong>changed</strong>" : "Skjali eða möppu hefur verið <strong>breytt</strong>",
+ "Limit notifications about creation and changes to your <strong>favorite files</strong> <em>(Stream only)</em>" : "Takmarka tilkynningar um gerð og breytingar á <strong>eftirlætisskrám</strong> <em>(einungis streymi)</em>",
+ "A file or folder has been <strong>deleted</strong>" : "Skjali eða möppu hefur verið <strong>eytt</strong>",
+ "A file or folder has been <strong>restored</strong>" : "Skjal eða mappa hefur verið <strong>endurheimt</strong>",
"You created %1$s" : "Þú bjóst til %1$s",
"%2$s created %1$s" : "%2$s bjó til %1$s",
"%1$s was created in a public folder" : "%1$s var búið til í opinni möppu",
@@ -85,10 +102,14 @@ OC.L10N.register(
"Maximum upload size" : "Hámarksstærð innsendingar",
"max. possible: " : "hámark mögulegt: ",
"Save" : "Vista",
+ "With PHP-FPM it might take 5 minutes for changes to be applied." : "Með PHP-FPM getur það tekið 5 mínútur fyrir breytingar að verða virkar.",
+ "Missing permissions to edit from here." : "Vantar heimildir til að breyta einhverju héðan.",
"Settings" : "Stillingar",
"WebDAV" : "WebDAV",
+ "Use this address to <a href=\"%s\" target=\"_blank\">access your Files via WebDAV</a>" : "Notaðu þetta vistfang til að <a href=\"%s\" target=\"_blank\">nálgast skrárnar þínar með WebDAV</a>",
"Cancel upload" : "Hætta við innsendingu",
"No files in here" : "Engar skrár hér",
+ "Upload some content or sync with your devices!" : "Sendu inn eitthvað efni eða samstilltu við tækin þín!",
"No entries found in this folder" : "Engar skrár fundust í þessari möppu",
"Select all" : "Velja allt",
"Upload too large" : "Innsend skrá er of stór",
diff --git a/apps/files/l10n/is.json b/apps/files/l10n/is.json
index 6e53bd0df5d..2d7cafdf4c0 100644
--- a/apps/files/l10n/is.json
+++ b/apps/files/l10n/is.json
@@ -2,6 +2,7 @@
"Storage not available" : "Geymsla ekki tiltæk",
"Storage invalid" : "Ógild geymsla",
"Unknown error" : "Óþekkt villa",
+ "Unable to set upload directory." : "Gat ekki sett innhleðslumöppu.",
"Invalid Token" : "Ógilt teikn",
"No file was uploaded. Unknown error" : "Engin skrá var send inn. Óþekkt villa.",
"There is no error, the file uploaded with success" : "Engin villa, innsending heppnaðist",
@@ -12,6 +13,9 @@
"Missing a temporary folder" : "Vantar bráðabirgðamöppu",
"Failed to write to disk" : "Tókst ekki að skrifa á disk",
"Not enough storage available" : "Ekki er nægilegt geymslupláss tiltækt",
+ "The target folder has been moved or deleted." : "Markmappan hefur verið færð eða henni eytt.",
+ "Upload failed. Could not find uploaded file" : "Innsending mistókst. Fann ekki innsendu skrána",
+ "Upload failed. Could not get file info." : "Innsending mistókst. Gat ekki nálgast skráarupplýsingar.",
"Invalid directory." : "Ógild mappa.",
"Files" : "Skrár",
"All files" : "Allar skrár",
@@ -19,7 +23,11 @@
"Home" : "Heim",
"Close" : "Loka",
"Upload cancelled." : "Hætt við innsendingu.",
+ "Unable to upload {filename} as it is a directory or has 0 bytes" : "Tókst ekki að hlaða inn {filename} þar sem þetta er mappa eða er 0 bæti",
"Total file size {size1} exceeds upload limit {size2}" : "Heildarskráastærð {size1} er meiri en leyfilegt innsendingahámark {size2}",
+ "Not enough free space, you are uploading {size1} but only {size2} is left" : "Ekki nægilegt laust pláss, þú ert að senda inn {size1} en einungis {size2} eru eftir",
+ "Error uploading file \"{fileName}\": {message}" : "Villa við að senda inn skrána \"{fileName}\": {message}",
+ "Could not get result from server." : "Fékk ekki niðurstöður frá þjóni.",
"File upload is in progress. Leaving the page now will cancel the upload." : "Innsending í gangi. Ef þú ferð af þessari síðu mun innsending hætta.",
"Actions" : "Aðgerðir",
"Download" : "Niðurhal",
@@ -36,6 +44,8 @@
"Could not move \"{file}\", target exists" : "Gat ekki fært \"{file}\", markskrá er til",
"Could not move \"{file}\"" : "Gat ekki fært \"{file}\"",
"{newName} already exists" : "{newName} er þegar til",
+ "Could not rename \"{fileName}\", it does not exist any more" : "Gat ekki endurnefnt \"{fileName}\", það er ekki lengur til staðar",
+ "The name \"{targetName}\" is already used in the folder \"{dir}\". Please choose a different name." : "Heitið \"{targetName}\" er nú þegar notað í \"{dir}\" möppunni. Veldu eitthvað annað nafn.",
"Could not rename \"{fileName}\"" : "Gat ekki endurnefnt \"{fileName}\"",
"Could not create file \"{file}\"" : "Gat ekki búið til skrána \"{file}\"",
"Could not create file \"{file}\" because it already exists" : "Gat ekki búið til skrána \"{file}\" vegna þess að hún er þegar til",
@@ -54,6 +64,8 @@
"New" : "Nýtt",
"\"{name}\" is an invalid file name." : "\"{name}\" er ógilt skráarheiti.",
"File name cannot be empty." : "Heiti skráar má ekki vera tómt",
+ "Storage of {owner} is full, files can not be updated or synced anymore!" : "Geymslupláss {owner} er fullt, ekki er lengur hægt að uppfæra eða samstilla skrár!",
+ "Your storage is full, files can not be updated or synced anymore!" : "Geymsluplássið þitt er fullt, ekki er lengur hægt að uppfæra eða samstilla skrár!",
"Storage of {owner} is almost full ({usedSpacePercent}%)" : "Geymslupláss {owner} er næstum fullt ({usedSpacePercent}%)",
"Your storage is almost full ({usedSpacePercent}%)" : "Geymsluplássið þitt er næstum fullt ({usedSpacePercent}%)",
"_matches '{filter}'_::_match '{filter}'_" : ["samsvarar '{filter}'","samsvara '{filter}'"],
@@ -66,6 +78,11 @@
"{newname} already exists" : "{newname} er þegar til",
"Upload" : "Senda inn",
"An error occurred while trying to update the tags" : "Villa kom upp við að reyna að uppfæra merkin",
+ "A new file or folder has been <strong>created</strong>" : "Skjal eða mappa hefur verið <strong>búin til</strong>",
+ "A file or folder has been <strong>changed</strong>" : "Skjali eða möppu hefur verið <strong>breytt</strong>",
+ "Limit notifications about creation and changes to your <strong>favorite files</strong> <em>(Stream only)</em>" : "Takmarka tilkynningar um gerð og breytingar á <strong>eftirlætisskrám</strong> <em>(einungis streymi)</em>",
+ "A file or folder has been <strong>deleted</strong>" : "Skjali eða möppu hefur verið <strong>eytt</strong>",
+ "A file or folder has been <strong>restored</strong>" : "Skjal eða mappa hefur verið <strong>endurheimt</strong>",
"You created %1$s" : "Þú bjóst til %1$s",
"%2$s created %1$s" : "%2$s bjó til %1$s",
"%1$s was created in a public folder" : "%1$s var búið til í opinni möppu",
@@ -83,10 +100,14 @@
"Maximum upload size" : "Hámarksstærð innsendingar",
"max. possible: " : "hámark mögulegt: ",
"Save" : "Vista",
+ "With PHP-FPM it might take 5 minutes for changes to be applied." : "Með PHP-FPM getur það tekið 5 mínútur fyrir breytingar að verða virkar.",
+ "Missing permissions to edit from here." : "Vantar heimildir til að breyta einhverju héðan.",
"Settings" : "Stillingar",
"WebDAV" : "WebDAV",
+ "Use this address to <a href=\"%s\" target=\"_blank\">access your Files via WebDAV</a>" : "Notaðu þetta vistfang til að <a href=\"%s\" target=\"_blank\">nálgast skrárnar þínar með WebDAV</a>",
"Cancel upload" : "Hætta við innsendingu",
"No files in here" : "Engar skrár hér",
+ "Upload some content or sync with your devices!" : "Sendu inn eitthvað efni eða samstilltu við tækin þín!",
"No entries found in this folder" : "Engar skrár fundust í þessari möppu",
"Select all" : "Velja allt",
"Upload too large" : "Innsend skrá er of stór",
diff --git a/apps/files/l10n/sl.js b/apps/files/l10n/sl.js
index 9e4a72eb848..2c6c38892b2 100644
--- a/apps/files/l10n/sl.js
+++ b/apps/files/l10n/sl.js
@@ -114,8 +114,8 @@ OC.L10N.register(
"Select all" : "izberi vse",
"Upload too large" : "Prekoračenje omejitve velikosti",
"The files you are trying to upload exceed the maximum size for file uploads on this server." : "Datoteke, ki jih želite poslati, presegajo največjo dovoljeno velikost na strežniku.",
- "No favorites" : "Ni priljubljenih",
- "Files and folders you mark as favorite will show up here" : "Datoteke ali mape, ki so označene kot priljubljene, bodo izpisane tukaj.",
+ "No favorites" : "Ni priljubljenih predmetov",
+ "Files and folders you mark as favorite will show up here" : "Datoteke ali mape, ki so označene kot priljubljene, bodo zbrane na tem mestu.",
"Text file" : "Besedilna datoteka",
"New text file.txt" : "Nova datoteka.txt"
},
diff --git a/apps/files/l10n/sl.json b/apps/files/l10n/sl.json
index 2b4478db185..8d5b4002a13 100644
--- a/apps/files/l10n/sl.json
+++ b/apps/files/l10n/sl.json
@@ -112,8 +112,8 @@
"Select all" : "izberi vse",
"Upload too large" : "Prekoračenje omejitve velikosti",
"The files you are trying to upload exceed the maximum size for file uploads on this server." : "Datoteke, ki jih želite poslati, presegajo največjo dovoljeno velikost na strežniku.",
- "No favorites" : "Ni priljubljenih",
- "Files and folders you mark as favorite will show up here" : "Datoteke ali mape, ki so označene kot priljubljene, bodo izpisane tukaj.",
+ "No favorites" : "Ni priljubljenih predmetov",
+ "Files and folders you mark as favorite will show up here" : "Datoteke ali mape, ki so označene kot priljubljene, bodo zbrane na tem mestu.",
"Text file" : "Besedilna datoteka",
"New text file.txt" : "Nova datoteka.txt"
},"pluralForm" :"nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);"
diff --git a/apps/files/l10n/sv.js b/apps/files/l10n/sv.js
index 14e86cfdfc7..1ad6ebade5f 100644
--- a/apps/files/l10n/sv.js
+++ b/apps/files/l10n/sv.js
@@ -28,6 +28,7 @@ OC.L10N.register(
"Unable to upload {filename} as it is a directory or has 0 bytes" : "Kan inte ladda upp {filename} eftersom den antingen är en mapp eller har 0 bytes.",
"Total file size {size1} exceeds upload limit {size2}" : "Totala filstorleken {size1} överskrider uppladdningsgränsen {size2}",
"Not enough free space, you are uploading {size1} but only {size2} is left" : "Inte tillräckligt med ledigt utrymme, du laddar upp {size1} men endast {size2} finns kvar.",
+ "Error uploading file \"{fileName}\": {message}" : "Fel vid uppladdning av fil \"{fileName}\": {message}",
"Could not get result from server." : "Gick inte att hämta resultat från server.",
"File upload is in progress. Leaving the page now will cancel the upload." : "Filuppladdning pågår. Lämnar du sidan så avbryts uppladdningen.",
"Actions" : "Åtgärder",
@@ -69,6 +70,7 @@ OC.L10N.register(
"Your storage is full, files can not be updated or synced anymore!" : "Ditt lagringsutrymme är fullt, filer kan inte längre uppdateras eller synkroniseras!",
"Storage of {owner} is almost full ({usedSpacePercent}%)" : "Lagring av {owner} är nästan full ({usedSpacePercent}%)",
"Your storage is almost full ({usedSpacePercent}%)" : "Ditt lagringsutrymme är nästan fullt ({usedSpacePercent}%)",
+ "_matches '{filter}'_::_match '{filter}'_" : ["matchar '{filter}'","matcha '{filter}'"],
"Path" : "sökväg",
"_%n byte_::_%n bytes_" : ["%n bytes","%n bytes"],
"Favorited" : "Favoriserad",
@@ -80,6 +82,7 @@ OC.L10N.register(
"An error occurred while trying to update the tags" : "Ett fel uppstod när uppdatera taggarna",
"A new file or folder has been <strong>created</strong>" : "En ny fil eller mapp har blivit <strong>skapad</strong>",
"A file or folder has been <strong>changed</strong>" : "En ny fil eller mapp har blivit <strong>ändrad</strong>",
+ "Limit notifications about creation and changes to your <strong>favorite files</strong> <em>(Stream only)</em>" : "Begränsa notiser om skapande och ändringar till dina <strong>favoritfiler</strong> <em>(Endast ström)</em>",
"A file or folder has been <strong>deleted</strong>" : "En ny fil eller mapp har blivit <strong>raderad</strong>",
"A file or folder has been <strong>restored</strong>" : "En ny fil eller mapp har blivit <strong>återskapad</strong>",
"You created %1$s" : "Du skapade %1$s",
@@ -107,12 +110,12 @@ OC.L10N.register(
"Cancel upload" : "Avbryt uppladdning",
"No files in here" : "Inga filer kunde hittas",
"Upload some content or sync with your devices!" : "Ladda upp innehåll eller synkronisera med dina enheter!",
- "No entries found in this folder" : "nga Filer hittades i denna mapp",
+ "No entries found in this folder" : "Inga innehåll hittades i denna mapp",
"Select all" : "Välj allt",
"Upload too large" : "För stor uppladdning",
"The files you are trying to upload exceed the maximum size for file uploads on this server." : "Filerna du försöker ladda upp överstiger den maximala storleken för filöverföringar på servern.",
"No favorites" : "Inga favoriter",
- "Files and folders you mark as favorite will show up here" : "Filer och mappar du markerat som favoriter kommer visas här",
+ "Files and folders you mark as favorite will show up here" : "Filer och mappar du markerat som favoriter kommer att visas här",
"Text file" : "Textfil",
"New text file.txt" : "nytextfil.txt"
},
diff --git a/apps/files/l10n/sv.json b/apps/files/l10n/sv.json
index 0a1c43788f0..37d62ecd885 100644
--- a/apps/files/l10n/sv.json
+++ b/apps/files/l10n/sv.json
@@ -26,6 +26,7 @@
"Unable to upload {filename} as it is a directory or has 0 bytes" : "Kan inte ladda upp {filename} eftersom den antingen är en mapp eller har 0 bytes.",
"Total file size {size1} exceeds upload limit {size2}" : "Totala filstorleken {size1} överskrider uppladdningsgränsen {size2}",
"Not enough free space, you are uploading {size1} but only {size2} is left" : "Inte tillräckligt med ledigt utrymme, du laddar upp {size1} men endast {size2} finns kvar.",
+ "Error uploading file \"{fileName}\": {message}" : "Fel vid uppladdning av fil \"{fileName}\": {message}",
"Could not get result from server." : "Gick inte att hämta resultat från server.",
"File upload is in progress. Leaving the page now will cancel the upload." : "Filuppladdning pågår. Lämnar du sidan så avbryts uppladdningen.",
"Actions" : "Åtgärder",
@@ -67,6 +68,7 @@
"Your storage is full, files can not be updated or synced anymore!" : "Ditt lagringsutrymme är fullt, filer kan inte längre uppdateras eller synkroniseras!",
"Storage of {owner} is almost full ({usedSpacePercent}%)" : "Lagring av {owner} är nästan full ({usedSpacePercent}%)",
"Your storage is almost full ({usedSpacePercent}%)" : "Ditt lagringsutrymme är nästan fullt ({usedSpacePercent}%)",
+ "_matches '{filter}'_::_match '{filter}'_" : ["matchar '{filter}'","matcha '{filter}'"],
"Path" : "sökväg",
"_%n byte_::_%n bytes_" : ["%n bytes","%n bytes"],
"Favorited" : "Favoriserad",
@@ -78,6 +80,7 @@
"An error occurred while trying to update the tags" : "Ett fel uppstod när uppdatera taggarna",
"A new file or folder has been <strong>created</strong>" : "En ny fil eller mapp har blivit <strong>skapad</strong>",
"A file or folder has been <strong>changed</strong>" : "En ny fil eller mapp har blivit <strong>ändrad</strong>",
+ "Limit notifications about creation and changes to your <strong>favorite files</strong> <em>(Stream only)</em>" : "Begränsa notiser om skapande och ändringar till dina <strong>favoritfiler</strong> <em>(Endast ström)</em>",
"A file or folder has been <strong>deleted</strong>" : "En ny fil eller mapp har blivit <strong>raderad</strong>",
"A file or folder has been <strong>restored</strong>" : "En ny fil eller mapp har blivit <strong>återskapad</strong>",
"You created %1$s" : "Du skapade %1$s",
@@ -105,12 +108,12 @@
"Cancel upload" : "Avbryt uppladdning",
"No files in here" : "Inga filer kunde hittas",
"Upload some content or sync with your devices!" : "Ladda upp innehåll eller synkronisera med dina enheter!",
- "No entries found in this folder" : "nga Filer hittades i denna mapp",
+ "No entries found in this folder" : "Inga innehåll hittades i denna mapp",
"Select all" : "Välj allt",
"Upload too large" : "För stor uppladdning",
"The files you are trying to upload exceed the maximum size for file uploads on this server." : "Filerna du försöker ladda upp överstiger den maximala storleken för filöverföringar på servern.",
"No favorites" : "Inga favoriter",
- "Files and folders you mark as favorite will show up here" : "Filer och mappar du markerat som favoriter kommer visas här",
+ "Files and folders you mark as favorite will show up here" : "Filer och mappar du markerat som favoriter kommer att visas här",
"Text file" : "Textfil",
"New text file.txt" : "nytextfil.txt"
},"pluralForm" :"nplurals=2; plural=(n != 1);"
diff --git a/apps/files/service/tagservice.php b/apps/files/service/tagservice.php
index e1425c46615..57cad43a539 100644
--- a/apps/files/service/tagservice.php
+++ b/apps/files/service/tagservice.php
@@ -25,6 +25,7 @@
namespace OCA\Files\Service;
use OC\Files\FileInfo;
+use OCP\Files\Node;
/**
* Service class to manage tags on files.
@@ -93,7 +94,7 @@ class TagService {
* Get all files for the given tag
*
* @param string $tagName tag name to filter by
- * @return FileInfo[] list of matching files
+ * @return Node[] list of matching files
* @throws \Exception if the tag does not exist
*/
public function getFilesByTag($tagName) {
@@ -103,15 +104,11 @@ class TagService {
return [];
}
- $fileInfos = [];
+ $allNodes = [];
foreach ($fileIds as $fileId) {
- $nodes = $this->homeFolder->getById((int) $fileId);
- foreach ($nodes as $node) {
- /** @var \OC\Files\Node\Node $node */
- $fileInfos[] = $node->getFileInfo();
- }
+ $allNodes = array_merge($allNodes, $this->homeFolder->getById((int) $fileId));
}
- return $fileInfos;
+ return $allNodes;
}
}
diff --git a/apps/files/tests/controller/apicontrollertest.php b/apps/files/tests/controller/apicontrollertest.php
index 6fb8340ead8..a9b248a36fe 100644
--- a/apps/files/tests/controller/apicontrollertest.php
+++ b/apps/files/tests/controller/apicontrollertest.php
@@ -51,14 +51,27 @@ class ApiControllerTest extends TestCase {
private $preview;
/** @var ApiController */
private $apiController;
+ /** @var \OCP\Share\IManager */
+ private $shareManager;
public function setUp() {
$this->request = $this->getMockBuilder('\OCP\IRequest')
->disableOriginalConstructor()
->getMock();
+ $user = $this->getMock('\OCP\IUser');
+ $user->expects($this->any())
+ ->method('getUID')
+ ->will($this->returnValue('user1'));
+ $userSession = $this->getMock('\OCP\IUserSession');
+ $userSession->expects($this->any())
+ ->method('getUser')
+ ->will($this->returnValue($user));
$this->tagService = $this->getMockBuilder('\OCA\Files\Service\TagService')
->disableOriginalConstructor()
->getMock();
+ $this->shareManager = $this->getMockBuilder('\OCP\Share\IManager')
+ ->disableOriginalConstructor()
+ ->getMock();
$this->preview = $this->getMockBuilder('\OCP\IPreview')
->disableOriginalConstructor()
->getMock();
@@ -66,8 +79,10 @@ class ApiControllerTest extends TestCase {
$this->apiController = new ApiController(
$this->appName,
$this->request,
+ $userSession,
$this->tagService,
- $this->preview
+ $this->preview,
+ $this->shareManager
);
}
@@ -101,10 +116,32 @@ class ApiControllerTest extends TestCase {
->disableOriginalConstructor()
->getMock()
);
+ $node = $this->getMockBuilder('\OC\Files\Node\File')
+ ->disableOriginalConstructor()
+ ->getMock();
+ $node->expects($this->once())
+ ->method('getFileInfo')
+ ->will($this->returnValue($fileInfo));
$this->tagService->expects($this->once())
->method('getFilesByTag')
->with($this->equalTo([$tagName]))
- ->will($this->returnValue([$fileInfo]));
+ ->will($this->returnValue([$node]));
+
+ $this->shareManager->expects($this->any())
+ ->method('getSharesBy')
+ ->with(
+ $this->equalTo('user1'),
+ $this->anything(),
+ $node,
+ $this->equalTo(false),
+ $this->equalTo(1)
+ )
+ ->will($this->returnCallback(function($userId, $shareType) {
+ if ($shareType === \OCP\Share::SHARE_TYPE_USER || $shareType === \OCP\Share::SHARE_TYPE_LINK) {
+ return ['dummy_share'];
+ }
+ return [];
+ }));
$expected = new DataResponse([
'files' => [
@@ -124,6 +161,7 @@ class ApiControllerTest extends TestCase {
'MyTagName'
]
],
+ 'shareTypes' => [\OCP\Share::SHARE_TYPE_USER, \OCP\Share::SHARE_TYPE_LINK]
],
],
]);
@@ -166,10 +204,22 @@ class ApiControllerTest extends TestCase {
->disableOriginalConstructor()
->getMock()
);
+ $node1 = $this->getMockBuilder('\OC\Files\Node\File')
+ ->disableOriginalConstructor()
+ ->getMock();
+ $node1->expects($this->once())
+ ->method('getFileInfo')
+ ->will($this->returnValue($fileInfo1));
+ $node2 = $this->getMockBuilder('\OC\Files\Node\File')
+ ->disableOriginalConstructor()
+ ->getMock();
+ $node2->expects($this->once())
+ ->method('getFileInfo')
+ ->will($this->returnValue($fileInfo2));
$this->tagService->expects($this->once())
->method('getFilesByTag')
->with($this->equalTo([$tagName]))
- ->will($this->returnValue([$fileInfo1, $fileInfo2]));
+ ->will($this->returnValue([$node1, $node2]));
$expected = new DataResponse([
'files' => [
diff --git a/apps/files_external/3rdparty/.gitignore b/apps/files_external/3rdparty/.gitignore
index c8d4e6eed0b..b56af237c35 100644
--- a/apps/files_external/3rdparty/.gitignore
+++ b/apps/files_external/3rdparty/.gitignore
@@ -2,3 +2,4 @@ example.php
icewind/smb/tests
icewind/smb/install_libsmbclient.sh
icewind/smb/.travis.yml
+icewind/streams/tests
diff --git a/apps/files_external/3rdparty/composer.json b/apps/files_external/3rdparty/composer.json
index 4c130404add..b0267ba3438 100644
--- a/apps/files_external/3rdparty/composer.json
+++ b/apps/files_external/3rdparty/composer.json
@@ -8,8 +8,8 @@
"classmap-authoritative": true
},
"require": {
- "icewind/smb": "1.0.5",
- "icewind/streams": "0.2"
+ "icewind/smb": "1.0.8",
+ "icewind/streams": "0.4"
}
}
diff --git a/apps/files_external/3rdparty/composer.lock b/apps/files_external/3rdparty/composer.lock
index 7bfb48a2c0d..13931ad757d 100644
--- a/apps/files_external/3rdparty/composer.lock
+++ b/apps/files_external/3rdparty/composer.lock
@@ -4,25 +4,25 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
- "hash": "669663944c7232473a1c51a6d160319d",
- "content-hash": "7612ced4391f6287fb3e50534500d217",
+ "hash": "1671a5ec7bef407432d42775f898dc34",
+ "content-hash": "9d995f0d55bee8a3b344a3c685e7b4a4",
"packages": [
{
"name": "icewind/smb",
- "version": "v1.0.5",
+ "version": "v1.0.8",
"source": {
"type": "git",
"url": "https://github.com/icewind1991/SMB.git",
- "reference": "acb94a0a85290d653cd64c883175b855ada5022f"
+ "reference": "764f3fc793a904eb937d619ad097fb076ff199cd"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/icewind1991/SMB/zipball/acb94a0a85290d653cd64c883175b855ada5022f",
- "reference": "acb94a0a85290d653cd64c883175b855ada5022f",
+ "url": "https://api.github.com/repos/icewind1991/SMB/zipball/764f3fc793a904eb937d619ad097fb076ff199cd",
+ "reference": "764f3fc793a904eb937d619ad097fb076ff199cd",
"shasum": ""
},
"require": {
- "icewind/streams": "0.2.*",
+ "icewind/streams": ">=0.2.0",
"php": ">=5.3"
},
"require-dev": {
@@ -47,27 +47,28 @@
}
],
"description": "php wrapper for smbclient and libsmbclient-php",
- "time": "2016-01-20 13:12:36"
+ "time": "2016-03-17 13:29:58"
},
{
"name": "icewind/streams",
- "version": "0.2",
+ "version": "0.4.0",
"source": {
"type": "git",
"url": "https://github.com/icewind1991/Streams.git",
- "reference": "5aae45f2ddd3d1a6e2a496dd5d1e7857bfeb605a"
+ "reference": "9ca40274645a967ecc3408b0ca2e6255ead1d1d3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/icewind1991/Streams/zipball/5aae45f2ddd3d1a6e2a496dd5d1e7857bfeb605a",
- "reference": "5aae45f2ddd3d1a6e2a496dd5d1e7857bfeb605a",
+ "url": "https://api.github.com/repos/icewind1991/Streams/zipball/9ca40274645a967ecc3408b0ca2e6255ead1d1d3",
+ "reference": "9ca40274645a967ecc3408b0ca2e6255ead1d1d3",
"shasum": ""
},
"require": {
"php": ">=5.3"
},
"require-dev": {
- "satooshi/php-coveralls": "dev-master"
+ "phpunit/phpunit": "^4.8",
+ "satooshi/php-coveralls": "v1.0.0"
},
"type": "library",
"autoload": {
@@ -87,7 +88,7 @@
}
],
"description": "A set of generic stream wrappers",
- "time": "2014-07-30 23:46:15"
+ "time": "2016-03-17 12:32:25"
}
],
"packages-dev": [],
diff --git a/apps/files_external/3rdparty/composer/ClassLoader.php b/apps/files_external/3rdparty/composer/ClassLoader.php
index 5e1469e8307..ff6ecfb822f 100644
--- a/apps/files_external/3rdparty/composer/ClassLoader.php
+++ b/apps/files_external/3rdparty/composer/ClassLoader.php
@@ -13,9 +13,7 @@
namespace Composer\Autoload;
/**
- * ClassLoader implements a PSR-0 class loader
- *
- * See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md
+ * ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
*
* $loader = new \Composer\Autoload\ClassLoader();
*
@@ -39,6 +37,8 @@ namespace Composer\Autoload;
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Jordi Boggiano <j.boggiano@seld.be>
+ * @see http://www.php-fig.org/psr/psr-0/
+ * @see http://www.php-fig.org/psr/psr-4/
*/
class ClassLoader
{
@@ -147,7 +147,7 @@ class ClassLoader
* appending or prepending to the ones previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
- * @param array|string $paths The PSR-0 base directories
+ * @param array|string $paths The PSR-4 base directories
* @param bool $prepend Whether to prepend the directories
*
* @throws \InvalidArgumentException
diff --git a/apps/files_external/3rdparty/composer/autoload_classmap.php b/apps/files_external/3rdparty/composer/autoload_classmap.php
index 5b0f2511e12..942dbce7336 100644
--- a/apps/files_external/3rdparty/composer/autoload_classmap.php
+++ b/apps/files_external/3rdparty/composer/autoload_classmap.php
@@ -52,12 +52,23 @@ return array(
'Icewind\\SMB\\TimeZoneProvider' => $vendorDir . '/icewind/smb/src/TimeZoneProvider.php',
'Icewind\\Streams\\CallbackWrapper' => $vendorDir . '/icewind/streams/src/CallbackWrapper.php',
'Icewind\\Streams\\Directory' => $vendorDir . '/icewind/streams/src/Directory.php',
+ 'Icewind\\Streams\\DirectoryFilter' => $vendorDir . '/icewind/streams/src/DirectoryFilter.php',
+ 'Icewind\\Streams\\DirectoryWrapper' => $vendorDir . '/icewind/streams/src/DirectoryWrapper.php',
'Icewind\\Streams\\File' => $vendorDir . '/icewind/streams/src/File.php',
'Icewind\\Streams\\IteratorDirectory' => $vendorDir . '/icewind/streams/src/IteratorDirectory.php',
'Icewind\\Streams\\NullWrapper' => $vendorDir . '/icewind/streams/src/NullWrapper.php',
- 'Icewind\\Streams\\Tests\\CallbackWrapper' => $vendorDir . '/icewind/streams/tests/CallbackWrapper.php',
- 'Icewind\\Streams\\Tests\\IteratorDirectory' => $vendorDir . '/icewind/streams/tests/IteratorDirectory.php',
- 'Icewind\\Streams\\Tests\\NullWrapper' => $vendorDir . '/icewind/streams/tests/NullWrapper.php',
- 'Icewind\\Streams\\Tests\\Wrapper' => $vendorDir . '/icewind/streams/tests/Wrapper.php',
+ 'Icewind\\Streams\\Path' => $vendorDir . '/icewind/streams/src/Path.php',
+ 'Icewind\\Streams\\RetryWrapper' => $vendorDir . '/icewind/streams/src/RetryWrapper.php',
+ 'Icewind\\Streams\\SeekableWrapper' => $vendorDir . '/icewind/streams/src/SeekableWrapper.php',
+ 'Icewind\\Streams\\Tests\\DirectoryFilter' => $vendorDir . '/icewind/streams/tests/DirectoryFilter.php',
+ 'Icewind\\Streams\\Tests\\DirectoryWrapper' => $vendorDir . '/icewind/streams/tests/DirectoryWrapper.php',
+ 'Icewind\\Streams\\Tests\\DirectoryWrapperDummy' => $vendorDir . '/icewind/streams/tests/DirectoryWrapper.php',
+ 'Icewind\\Streams\\Tests\\DirectoryWrapperNull' => $vendorDir . '/icewind/streams/tests/DirectoryWrapper.php',
+ 'Icewind\\Streams\\Tests\\PartialWrapper' => $vendorDir . '/icewind/streams/tests/RetryWrapper.php',
+ 'Icewind\\Streams\\Tests\\RetryWrapper' => $vendorDir . '/icewind/streams/tests/RetryWrapper.php',
+ 'Icewind\\Streams\\Tests\\SeekableWrapper' => $vendorDir . '/icewind/streams/tests/SeekableWrapper.php',
+ 'Icewind\\Streams\\Tests\\UrlCallBack' => $vendorDir . '/icewind/streams/tests/UrlCallBack.php',
+ 'Icewind\\Streams\\Url' => $vendorDir . '/icewind/streams/src/Url.php',
+ 'Icewind\\Streams\\UrlCallback' => $vendorDir . '/icewind/streams/src/UrlCallBack.php',
'Icewind\\Streams\\Wrapper' => $vendorDir . '/icewind/streams/src/Wrapper.php',
);
diff --git a/apps/files_external/3rdparty/composer/autoload_real.php b/apps/files_external/3rdparty/composer/autoload_real.php
index 9e8b3b558e5..6f27fffb9da 100644
--- a/apps/files_external/3rdparty/composer/autoload_real.php
+++ b/apps/files_external/3rdparty/composer/autoload_real.php
@@ -23,16 +23,6 @@ class ComposerAutoloaderInit98fe9b281934250b3a93f69a5ce843b3
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInit98fe9b281934250b3a93f69a5ce843b3', 'loadClassLoader'));
- $map = require __DIR__ . '/autoload_namespaces.php';
- foreach ($map as $namespace => $path) {
- $loader->set($namespace, $path);
- }
-
- $map = require __DIR__ . '/autoload_psr4.php';
- foreach ($map as $namespace => $path) {
- $loader->setPsr4($namespace, $path);
- }
-
$classMap = require __DIR__ . '/autoload_classmap.php';
if ($classMap) {
$loader->addClassMap($classMap);
@@ -44,8 +34,3 @@ class ComposerAutoloaderInit98fe9b281934250b3a93f69a5ce843b3
return $loader;
}
}
-
-function composerRequire98fe9b281934250b3a93f69a5ce843b3($file)
-{
- require $file;
-}
diff --git a/apps/files_external/3rdparty/composer/installed.json b/apps/files_external/3rdparty/composer/installed.json
index 6e0b5d0d8f9..48f8c555c34 100644
--- a/apps/files_external/3rdparty/composer/installed.json
+++ b/apps/files_external/3rdparty/composer/installed.json
@@ -1,26 +1,27 @@
[
{
"name": "icewind/streams",
- "version": "0.2",
- "version_normalized": "0.2.0.0",
+ "version": "0.4.0",
+ "version_normalized": "0.4.0.0",
"source": {
"type": "git",
"url": "https://github.com/icewind1991/Streams.git",
- "reference": "5aae45f2ddd3d1a6e2a496dd5d1e7857bfeb605a"
+ "reference": "9ca40274645a967ecc3408b0ca2e6255ead1d1d3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/icewind1991/Streams/zipball/5aae45f2ddd3d1a6e2a496dd5d1e7857bfeb605a",
- "reference": "5aae45f2ddd3d1a6e2a496dd5d1e7857bfeb605a",
+ "url": "https://api.github.com/repos/icewind1991/Streams/zipball/9ca40274645a967ecc3408b0ca2e6255ead1d1d3",
+ "reference": "9ca40274645a967ecc3408b0ca2e6255ead1d1d3",
"shasum": ""
},
"require": {
"php": ">=5.3"
},
"require-dev": {
- "satooshi/php-coveralls": "dev-master"
+ "phpunit/phpunit": "^4.8",
+ "satooshi/php-coveralls": "v1.0.0"
},
- "time": "2014-07-30 23:46:15",
+ "time": "2016-03-17 12:32:25",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -43,28 +44,28 @@
},
{
"name": "icewind/smb",
- "version": "v1.0.5",
- "version_normalized": "1.0.5.0",
+ "version": "v1.0.8",
+ "version_normalized": "1.0.8.0",
"source": {
"type": "git",
"url": "https://github.com/icewind1991/SMB.git",
- "reference": "acb94a0a85290d653cd64c883175b855ada5022f"
+ "reference": "764f3fc793a904eb937d619ad097fb076ff199cd"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/icewind1991/SMB/zipball/acb94a0a85290d653cd64c883175b855ada5022f",
- "reference": "acb94a0a85290d653cd64c883175b855ada5022f",
+ "url": "https://api.github.com/repos/icewind1991/SMB/zipball/764f3fc793a904eb937d619ad097fb076ff199cd",
+ "reference": "764f3fc793a904eb937d619ad097fb076ff199cd",
"shasum": ""
},
"require": {
- "icewind/streams": "0.2.*",
+ "icewind/streams": ">=0.2.0",
"php": ">=5.3"
},
"require-dev": {
"phpunit/phpunit": "^4.8",
"satooshi/php-coveralls": "v1.0.0"
},
- "time": "2016-01-20 13:12:36",
+ "time": "2016-03-17 13:29:58",
"type": "library",
"installation-source": "source",
"autoload": {
diff --git a/apps/files_external/3rdparty/icewind/smb/README.md b/apps/files_external/3rdparty/icewind/smb/README.md
index a0864717b09..32f3c650f87 100644
--- a/apps/files_external/3rdparty/icewind/smb/README.md
+++ b/apps/files_external/3rdparty/icewind/smb/README.md
@@ -75,7 +75,7 @@ $share = $server->getShare('test');
$content = $share->dir('test');
foreach ($content as $info) {
- echo $name->getName() . "\n";
+ echo $info->getName() . "\n";
echo "\tsize :" . $info->getSize() . "\n";
}
```
diff --git a/apps/files_external/3rdparty/icewind/smb/composer.json b/apps/files_external/3rdparty/icewind/smb/composer.json
index 2e1fd35f7a6..4ac8b27e725 100644
--- a/apps/files_external/3rdparty/icewind/smb/composer.json
+++ b/apps/files_external/3rdparty/icewind/smb/composer.json
@@ -10,7 +10,7 @@
],
"require" : {
"php": ">=5.3",
- "icewind/streams": "0.2.*"
+ "icewind/streams": ">=0.2.0"
},
"require-dev": {
"satooshi/php-coveralls" : "v1.0.0",
diff --git a/apps/files_external/3rdparty/icewind/smb/src/NativeShare.php b/apps/files_external/3rdparty/icewind/smb/src/NativeShare.php
index 0b184fd585c..27d975514a3 100644
--- a/apps/files_external/3rdparty/icewind/smb/src/NativeShare.php
+++ b/apps/files_external/3rdparty/icewind/smb/src/NativeShare.php
@@ -239,8 +239,9 @@ class NativeShare extends AbstractShare {
*/
public function read($source) {
$this->connect();
- $handle = $this->state->open($this->buildUrl($source), 'r');
- return NativeStream::wrap($this->state, $handle, 'r');
+ $url = $this->buildUrl($source);
+ $handle = $this->state->open($url, 'r');
+ return NativeStream::wrap($this->state, $handle, 'r', $url);
}
/**
@@ -254,8 +255,9 @@ class NativeShare extends AbstractShare {
*/
public function write($source) {
$this->connect();
- $handle = $this->state->create($this->buildUrl($source));
- return NativeStream::wrap($this->state, $handle, 'w');
+ $url = $this->buildUrl($source);
+ $handle = $this->state->create($url);
+ return NativeStream::wrap($this->state, $handle, 'w', $url);
}
/**
diff --git a/apps/files_external/3rdparty/icewind/smb/src/NativeStream.php b/apps/files_external/3rdparty/icewind/smb/src/NativeStream.php
index 07bd2f1e797..481395b025a 100644
--- a/apps/files_external/3rdparty/icewind/smb/src/NativeStream.php
+++ b/apps/files_external/3rdparty/icewind/smb/src/NativeStream.php
@@ -7,6 +7,7 @@
namespace Icewind\SMB;
+use Icewind\SMB\Exception\Exception;
use Icewind\SMB\Exception\InvalidRequestException;
use Icewind\Streams\File;
@@ -32,19 +33,26 @@ class NativeStream implements File {
private $eof = false;
/**
+ * @var string
+ */
+ private $url;
+
+ /**
* Wrap a stream from libsmbclient-php into a regular php stream
*
* @param \Icewind\SMB\NativeState $state
* @param resource $smbStream
* @param string $mode
+ * @param string $url
* @return resource
*/
- public static function wrap($state, $smbStream, $mode) {
+ public static function wrap($state, $smbStream, $mode, $url) {
stream_wrapper_register('nativesmb', '\Icewind\SMB\NativeStream');
$context = stream_context_create(array(
'nativesmb' => array(
'state' => $state,
- 'handle' => $smbStream
+ 'handle' => $smbStream,
+ 'url' => $url
)
));
$fh = fopen('nativesmb://', $mode, false, $context);
@@ -68,6 +76,7 @@ class NativeStream implements File {
$context = stream_context_get_options($this->context);
$this->state = $context['nativesmb']['state'];
$this->handle = $context['nativesmb']['handle'];
+ $this->url = $context['nativesmb']['url'];
return true;
}
@@ -89,7 +98,11 @@ class NativeStream implements File {
}
public function stream_stat() {
- return $this->state->fstat($this->handle);
+ try {
+ return $this->state->stat($this->url);
+ } catch (Exception $e) {
+ return false;
+ }
}
public function stream_tell() {
diff --git a/apps/files_external/3rdparty/icewind/streams-dummy/composer.json b/apps/files_external/3rdparty/icewind/streams-dummy/composer.json
new file mode 100644
index 00000000000..ad6a6a1b1c1
--- /dev/null
+++ b/apps/files_external/3rdparty/icewind/streams-dummy/composer.json
@@ -0,0 +1,7 @@
+{
+ "name": "icewind/streams-dummy",
+ "provide": {
+ "icewind/streams": "0.2"
+ }
+}
+
diff --git a/apps/files_external/3rdparty/icewind/streams/.travis.yml b/apps/files_external/3rdparty/icewind/streams/.travis.yml
index dfa52767dda..d2e1afaad67 100644
--- a/apps/files_external/3rdparty/icewind/streams/.travis.yml
+++ b/apps/files_external/3rdparty/icewind/streams/.travis.yml
@@ -1,13 +1,14 @@
language: php
php:
- - 5.3
- 5.4
- 5.5
+ - 5.6
+ - 7.0
- hhvm
matrix:
- allow_failures:
- - php: hhvm # due to facebook/hhvm#3321
+ allow_failures:
+ - php: hhvm # due to facebook/hhvm#3321
env:
global:
diff --git a/apps/files_external/3rdparty/icewind/streams/LICENCE b/apps/files_external/3rdparty/icewind/streams/LICENCE
new file mode 100644
index 00000000000..a194b9117b8
--- /dev/null
+++ b/apps/files_external/3rdparty/icewind/streams/LICENCE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Robin Appelman
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/apps/files_external/3rdparty/icewind/streams/README.md b/apps/files_external/3rdparty/icewind/streams/README.md
index 54f6d19a560..ca13db28e44 100644
--- a/apps/files_external/3rdparty/icewind/streams/README.md
+++ b/apps/files_external/3rdparty/icewind/streams/README.md
@@ -2,6 +2,7 @@
[![Build Status](https://travis-ci.org/icewind1991/Streams.svg?branch=master)](https://travis-ci.org/icewind1991/Streams)
[![Coverage Status](https://img.shields.io/coveralls/icewind1991/Streams.svg)](https://coveralls.io/r/icewind1991/Streams?branch=master)
+[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/icewind1991/Streams/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/icewind1991/Streams/?branch=master)
Generic stream wrappers for php.
diff --git a/apps/files_external/3rdparty/icewind/streams/composer.json b/apps/files_external/3rdparty/icewind/streams/composer.json
index 86d3c834258..f2f3e0fc255 100644
--- a/apps/files_external/3rdparty/icewind/streams/composer.json
+++ b/apps/files_external/3rdparty/icewind/streams/composer.json
@@ -12,7 +12,8 @@
"php": ">=5.3"
},
"require-dev" : {
- "satooshi/php-coveralls": "dev-master"
+ "satooshi/php-coveralls": "v1.0.0",
+ "phpunit/phpunit": "^4.8"
},
"autoload" : {
"psr-4": {
diff --git a/apps/files_external/3rdparty/icewind/streams/src/CallbackWrapper.php b/apps/files_external/3rdparty/icewind/streams/src/CallbackWrapper.php
index fd99aa6ebe8..c5847b95fdb 100644
--- a/apps/files_external/3rdparty/icewind/streams/src/CallbackWrapper.php
+++ b/apps/files_external/3rdparty/icewind/streams/src/CallbackWrapper.php
@@ -13,10 +13,11 @@ namespace Icewind\Streams;
* The following options should be passed in the context when opening the stream
* [
* 'callback' => [
- * 'source' => resource
- * 'read' => function($count){} (optional)
- * 'write' => function($data){} (optional)
- * 'close' => function(){} (optional)
+ * 'source' => resource
+ * 'read' => function($count){} (optional)
+ * 'write' => function($data){} (optional)
+ * 'close' => function(){} (optional)
+ * 'readdir' => function(){} (optional)
* ]
* ]
*
@@ -39,54 +40,56 @@ class CallbackWrapper extends Wrapper {
protected $closeCallback;
/**
+ * @var callable
+ */
+ protected $readDirCallBack;
+
+ /**
* Wraps a stream with the provided callbacks
*
* @param resource $source
* @param callable $read (optional)
* @param callable $write (optional)
* @param callable $close (optional)
+ * @param callable $readDir (optional)
* @return resource
*
* @throws \BadMethodCallException
*/
- public static function wrap($source, $read = null, $write = null, $close = null) {
+ public static function wrap($source, $read = null, $write = null, $close = null, $readDir = null) {
$context = stream_context_create(array(
'callback' => array(
'source' => $source,
'read' => $read,
'write' => $write,
- 'close' => $close
+ 'close' => $close,
+ 'readDir' => $readDir
)
));
- stream_wrapper_register('callback', '\Icewind\Streams\CallbackWrapper');
- try {
- $wrapped = fopen('callback://', 'r+', false, $context);
- } catch (\BadMethodCallException $e) {
- stream_wrapper_unregister('callback');
- throw $e;
- }
- stream_wrapper_unregister('callback');
- return $wrapped;
+ return Wrapper::wrapSource($source, $context, 'callback', '\Icewind\Streams\CallbackWrapper');
}
- public function stream_open($path, $mode, $options, &$opened_path) {
+ protected function open() {
$context = $this->loadContext('callback');
- if (isset($context['read']) and is_callable($context['read'])) {
- $this->readCallback = $context['read'];
- }
- if (isset($context['write']) and is_callable($context['write'])) {
- $this->writeCallback = $context['write'];
- }
- if (isset($context['close']) and is_callable($context['close'])) {
- $this->closeCallback = $context['close'];
- }
+ $this->readCallback = $context['read'];
+ $this->writeCallback = $context['write'];
+ $this->closeCallback = $context['close'];
+ $this->readDirCallBack = $context['readDir'];
return true;
}
+ public function dir_opendir($path, $options) {
+ return $this->open();
+ }
+
+ public function stream_open($path, $mode, $options, &$opened_path) {
+ return $this->open();
+ }
+
public function stream_read($count) {
$result = parent::stream_read($count);
- if ($this->readCallback) {
+ if (is_callable($this->readCallback)) {
call_user_func($this->readCallback, $count);
}
return $result;
@@ -94,7 +97,7 @@ class CallbackWrapper extends Wrapper {
public function stream_write($data) {
$result = parent::stream_write($data);
- if ($this->writeCallback) {
+ if (is_callable($this->writeCallback)) {
call_user_func($this->writeCallback, $data);
}
return $result;
@@ -102,9 +105,17 @@ class CallbackWrapper extends Wrapper {
public function stream_close() {
$result = parent::stream_close();
- if ($this->closeCallback) {
+ if (is_callable($this->closeCallback)) {
call_user_func($this->closeCallback);
}
return $result;
}
+
+ public function dir_readdir() {
+ $result = parent::dir_readdir();
+ if (is_callable($this->readDirCallBack)) {
+ call_user_func($this->readDirCallBack);
+ }
+ return $result;
+ }
}
diff --git a/apps/files_external/3rdparty/icewind/streams/src/DirectoryFilter.php b/apps/files_external/3rdparty/icewind/streams/src/DirectoryFilter.php
new file mode 100644
index 00000000000..4b869699000
--- /dev/null
+++ b/apps/files_external/3rdparty/icewind/streams/src/DirectoryFilter.php
@@ -0,0 +1,60 @@
+<?php
+/**
+ * Copyright (c) 2015 Robin Appelman <icewind@owncloud.com>
+ * This file is licensed under the Licensed under the MIT license:
+ * http://opensource.org/licenses/MIT
+ */
+
+namespace Icewind\Streams;
+
+/**
+ * Wrapper allows filtering of directories
+ *
+ * The filter callback will be called for each entry in the folder
+ * when the callback return false the entry will be filtered out
+ */
+class DirectoryFilter extends DirectoryWrapper {
+ /**
+ * @var callable
+ */
+ private $filter;
+
+ /**
+ * @param string $path
+ * @param array $options
+ * @return bool
+ */
+ public function dir_opendir($path, $options) {
+ $context = $this->loadContext('filter');
+ $this->filter = $context['filter'];
+ return true;
+ }
+
+ /**
+ * @return string
+ */
+ public function dir_readdir() {
+ $file = readdir($this->source);
+ $filter = $this->filter;
+ // keep reading untill we have an accepted entry or we're at the end of the folder
+ while ($file !== false && $filter($file) === false) {
+ $file = readdir($this->source);
+ }
+ return $file;
+ }
+
+ /**
+ * @param resource $source
+ * @param callable $filter
+ * @return resource
+ */
+ public static function wrap($source, callable $filter) {
+ $options = array(
+ 'filter' => array(
+ 'source' => $source,
+ 'filter' => $filter
+ )
+ );
+ return self::wrapWithOptions($options, '\Icewind\Streams\DirectoryFilter');
+ }
+}
diff --git a/apps/files_external/3rdparty/icewind/streams/src/DirectoryWrapper.php b/apps/files_external/3rdparty/icewind/streams/src/DirectoryWrapper.php
new file mode 100644
index 00000000000..63e4805a807
--- /dev/null
+++ b/apps/files_external/3rdparty/icewind/streams/src/DirectoryWrapper.php
@@ -0,0 +1,88 @@
+<?php
+/**
+ * Copyright (c) 2015 Robin Appelman <icewind@owncloud.com>
+ * This file is licensed under the Licensed under the MIT license:
+ * http://opensource.org/licenses/MIT
+ */
+
+namespace Icewind\Streams;
+
+class DirectoryWrapper implements Directory {
+ /**
+ * @var resource
+ */
+ public $context;
+
+ /**
+ * @var resource
+ */
+ protected $source;
+
+ /**
+ * Load the source from the stream context and return the context options
+ *
+ * @param string $name
+ * @return array
+ * @throws \Exception
+ */
+ protected function loadContext($name) {
+ $context = stream_context_get_options($this->context);
+ if (isset($context[$name])) {
+ $context = $context[$name];
+ } else {
+ throw new \BadMethodCallException('Invalid context, "' . $name . '" options not set');
+ }
+ if (isset($context['source']) and is_resource($context['source'])) {
+ $this->source = $context['source'];
+ } else {
+ throw new \BadMethodCallException('Invalid context, source not set');
+ }
+ return $context;
+ }
+
+ /**
+ * @param string $path
+ * @param array $options
+ * @return bool
+ */
+ public function dir_opendir($path, $options) {
+ $this->loadContext('dir');
+ return true;
+ }
+
+ /**
+ * @return string
+ */
+ public function dir_readdir() {
+ return readdir($this->source);
+ }
+
+ /**
+ * @return bool
+ */
+ public function dir_closedir() {
+ closedir($this->source);
+ return true;
+ }
+
+ /**
+ * @return bool
+ */
+ public function dir_rewinddir() {
+ rewinddir($this->source);
+ return true;
+ }
+
+ /**
+ * @param array $options the options for the context to wrap the stream with
+ * @param string $class
+ * @return resource
+ */
+ protected static function wrapWithOptions($options, $class) {
+ $context = stream_context_create($options);
+ stream_wrapper_register('dirwrapper', $class);
+ $wrapped = opendir('dirwrapper://', $context);
+ stream_wrapper_unregister('dirwrapper');
+ return $wrapped;
+ }
+}
diff --git a/apps/files_external/3rdparty/icewind/streams/src/File.php b/apps/files_external/3rdparty/icewind/streams/src/File.php
index 6202ef4a4b4..252b7b8971f 100644
--- a/apps/files_external/3rdparty/icewind/streams/src/File.php
+++ b/apps/files_external/3rdparty/icewind/streams/src/File.php
@@ -21,7 +21,7 @@ interface File {
public function stream_open($path, $mode, $options, &$opened_path);
/**
- * @param string $offset
+ * @param int $offset
* @param int $whence
* @return bool
*/
diff --git a/apps/files_external/3rdparty/icewind/streams/src/IteratorDirectory.php b/apps/files_external/3rdparty/icewind/streams/src/IteratorDirectory.php
index c4eac5d4ed3..6dfa42a8b68 100644
--- a/apps/files_external/3rdparty/icewind/streams/src/IteratorDirectory.php
+++ b/apps/files_external/3rdparty/icewind/streams/src/IteratorDirectory.php
@@ -45,9 +45,9 @@ class IteratorDirectory implements Directory {
} else {
throw new \BadMethodCallException('Invalid context, "' . $name . '" options not set');
}
- if (isset($context['iterator']) and $context['iterator'] instanceof \Iterator) {
+ if (isset($context['iterator'])) {
$this->iterator = $context['iterator'];
- } else if (isset($context['array']) and is_array($context['array'])) {
+ } else if (isset($context['array'])) {
$this->iterator = new \ArrayIterator($context['array']);
} else {
throw new \BadMethodCallException('Invalid context, iterator or array not set');
diff --git a/apps/files_external/3rdparty/icewind/streams/src/NullWrapper.php b/apps/files_external/3rdparty/icewind/streams/src/NullWrapper.php
index 8cbaaa756d3..b6c71d98fc4 100644
--- a/apps/files_external/3rdparty/icewind/streams/src/NullWrapper.php
+++ b/apps/files_external/3rdparty/icewind/streams/src/NullWrapper.php
@@ -24,19 +24,16 @@ class NullWrapper extends Wrapper {
'null' => array(
'source' => $source)
));
- stream_wrapper_register('null', '\Icewind\Streams\NullWrapper');
- try {
- $wrapped = fopen('null://', 'r+', false, $context);
- } catch (\BadMethodCallException $e) {
- stream_wrapper_unregister('null');
- throw $e;
- }
- stream_wrapper_unregister('null');
- return $wrapped;
+ return Wrapper::wrapSource($source, $context, 'null', '\Icewind\Streams\NullWrapper');
}
public function stream_open($path, $mode, $options, &$opened_path) {
$this->loadContext('null');
return true;
}
+
+ public function dir_opendir($path, $options) {
+ $this->loadContext('null');
+ return true;
+ }
}
diff --git a/apps/files_external/3rdparty/icewind/streams/src/Path.php b/apps/files_external/3rdparty/icewind/streams/src/Path.php
new file mode 100644
index 00000000000..46d2156b69a
--- /dev/null
+++ b/apps/files_external/3rdparty/icewind/streams/src/Path.php
@@ -0,0 +1,104 @@
+<?php
+/**
+ * Copyright (c) 2014 Robin Appelman <icewind@owncloud.com>
+ * This file is licensed under the Licensed under the MIT license:
+ * http://opensource.org/licenses/MIT
+ */
+
+namespace Icewind\Streams;
+
+/**
+ * A string-like object that automatically registers a stream wrapper when used and removes the stream wrapper when no longer used
+ *
+ * Can optionally pass context options to the stream wrapper
+ */
+class Path {
+
+ /**
+ * @var bool
+ */
+ protected $registered = false;
+
+ /**
+ * @var string
+ */
+ protected $protocol;
+
+ /**
+ * @var string
+ */
+ protected $class;
+
+ /**
+ * @var array
+ */
+ protected $contextOptions;
+
+ /**
+ * @param string $class
+ * @param array $contextOptions
+ */
+ public function __construct($class, $contextOptions = array()) {
+ $this->class = $class;
+ $this->contextOptions = $contextOptions;
+ }
+
+ public function getProtocol() {
+ if (!$this->protocol) {
+ $this->protocol = 'auto' . uniqid();
+ }
+ return $this->protocol;
+ }
+
+ public function wrapPath($path) {
+ return $this->getProtocol() . '://' . $path;
+ }
+
+ protected function register() {
+ if (!$this->registered) {
+ $this->appendDefaultContent($this->getProtocol(), $this->contextOptions);
+ stream_wrapper_register($this->getProtocol(), $this->class);
+ $this->registered = true;
+ }
+ }
+
+ protected function unregister() {
+ stream_wrapper_unregister($this->getProtocol());
+ $this->unsetDefaultContent($this->getProtocol());
+ $this->registered = false;
+ }
+
+ /**
+ * Add values to the default stream context
+ *
+ * @param string $key
+ * @param array $values
+ */
+ protected function appendDefaultContent($key, $values) {
+ $context = stream_context_get_default();
+ $defaults = stream_context_get_options($context);
+ $defaults[$key] = $values;
+ stream_context_set_default($defaults);
+ }
+
+ /**
+ * Remove values from the default stream context
+ *
+ * @param string $key
+ */
+ protected function unsetDefaultContent($key) {
+ $context = stream_context_get_default();
+ $defaults = stream_context_get_options($context);
+ unset($defaults[$key]);
+ stream_context_set_default($defaults);
+ }
+
+ public function __toString() {
+ $this->register();
+ return $this->protocol . '://';
+ }
+
+ public function __destruct() {
+ $this->unregister();
+ }
+}
diff --git a/apps/files_external/3rdparty/icewind/streams/src/RetryWrapper.php b/apps/files_external/3rdparty/icewind/streams/src/RetryWrapper.php
new file mode 100644
index 00000000000..84b43f6bd02
--- /dev/null
+++ b/apps/files_external/3rdparty/icewind/streams/src/RetryWrapper.php
@@ -0,0 +1,66 @@
+<?php
+/**
+ * Copyright (c) 2016 Robin Appelman <icewind@owncloud.com>
+ * This file is licensed under the Licensed under the MIT license:
+ * http://opensource.org/licenses/MIT
+ */
+
+namespace Icewind\Streams;
+
+/**
+ * Wrapper that retries reads/writes to remote streams that dont deliver/recieve all requested data at once
+ */
+class RetryWrapper extends Wrapper {
+
+ /**
+ * Wraps a stream with the provided callbacks
+ *
+ * @param resource $source
+ * @return resource
+ */
+ public static function wrap($source) {
+ $context = stream_context_create(array(
+ 'retry' => array(
+ 'source' => $source
+ )
+ ));
+ return Wrapper::wrapSource($source, $context, 'retry', '\Icewind\Streams\RetryWrapper');
+ }
+
+ protected function open() {
+ $this->loadContext('retry');
+ return true;
+ }
+
+ public function dir_opendir($path, $options) {
+ return false;
+ }
+
+ public function stream_open($path, $mode, $options, &$opened_path) {
+ return $this->open();
+ }
+
+ public function stream_read($count) {
+ $result = parent::stream_read($count);
+
+ $bytesReceived = strlen($result);
+ while ($bytesReceived < $count && !$this->stream_eof()) {
+ $result .= parent::stream_read($count - $bytesReceived);
+ $bytesReceived = strlen($result);
+ }
+
+ return $result;
+ }
+
+ public function stream_write($data) {
+ $bytesToSend = strlen($data);
+ $result = parent::stream_write($data);
+
+ while ($result < $bytesToSend && !$this->stream_eof()) {
+ $dataLeft = substr($data, $result);
+ $result += parent::stream_write($dataLeft);
+ }
+
+ return $result;
+ }
+}
diff --git a/apps/files_external/3rdparty/icewind/streams/src/SeekableWrapper.php b/apps/files_external/3rdparty/icewind/streams/src/SeekableWrapper.php
new file mode 100644
index 00000000000..d41fd73ec9c
--- /dev/null
+++ b/apps/files_external/3rdparty/icewind/streams/src/SeekableWrapper.php
@@ -0,0 +1,92 @@
+<?php
+/**
+ * Copyright (c) 2014 Robin Appelman <icewind@owncloud.com>
+ * This file is licensed under the Licensed under the MIT license:
+ * http://opensource.org/licenses/MIT
+ */
+
+namespace Icewind\Streams;
+
+/**
+ * Wrapper that provides callbacks for write, read and close
+ *
+ * The following options should be passed in the context when opening the stream
+ * [
+ * 'callback' => [
+ * 'source' => resource
+ * ]
+ * ]
+ *
+ * All callbacks are called after the operation is executed on the source stream
+ */
+class SeekableWrapper extends Wrapper {
+ /**
+ * @var resource
+ */
+ protected $cache;
+
+ /**
+ * Wraps a stream to make it seekable
+ *
+ * @param resource $source
+ * @return resource
+ *
+ * @throws \BadMethodCallException
+ */
+ public static function wrap($source) {
+ $context = stream_context_create(array(
+ 'callback' => array(
+ 'source' => $source
+ )
+ ));
+ return Wrapper::wrapSource($source, $context, 'callback', '\Icewind\Streams\SeekableWrapper');
+ }
+
+ public function dir_opendir($path, $options) {
+ return false;
+ }
+
+ public function stream_open($path, $mode, $options, &$opened_path) {
+ $this->loadContext('callback');
+ $this->cache = fopen('php://temp', 'w+');
+ return true;
+ }
+
+ protected function readTill($position) {
+ $current = ftell($this->source);
+ if ($position > $current) {
+ $data = parent::stream_read($position - $current);
+ $cachePosition = ftell($this->cache);
+ fseek($this->cache, $current);
+ fwrite($this->cache, $data);
+ fseek($this->cache, $cachePosition);
+ }
+ }
+
+ public function stream_read($count) {
+ $current = ftell($this->cache);
+ $this->readTill($current + $count);
+ return fread($this->cache, $count);
+ }
+
+ public function stream_seek($offset, $whence = SEEK_SET) {
+ if ($whence === SEEK_SET) {
+ $target = $offset;
+ } else if ($whence === SEEK_CUR) {
+ $current = ftell($this->cache);
+ $target = $current + $offset;
+ } else {
+ return false;
+ }
+ $this->readTill($target);
+ return fseek($this->cache, $target) === 0;
+ }
+
+ public function stream_tell() {
+ return ftell($this->cache);
+ }
+
+ public function stream_eof() {
+ return parent::stream_eof() and (ftell($this->source) === ftell($this->cache));
+ }
+}
diff --git a/apps/files_external/3rdparty/icewind/streams/src/Url.php b/apps/files_external/3rdparty/icewind/streams/src/Url.php
new file mode 100644
index 00000000000..d6822608a33
--- /dev/null
+++ b/apps/files_external/3rdparty/icewind/streams/src/Url.php
@@ -0,0 +1,64 @@
+<?php
+/**
+ * Copyright (c) 2014 Robin Appelman <icewind@owncloud.com>
+ * This file is licensed under the Licensed under the MIT license:
+ * http://opensource.org/licenses/MIT
+ */
+
+namespace Icewind\Streams;
+
+/**
+ * Interface for stream wrappers that implement url functions such as unlink, stat
+ */
+interface Url {
+ /**
+ * @param string $path
+ * @param array $options
+ * @return bool
+ */
+ public function dir_opendir($path, $options);
+
+ /**
+ * @param string $path
+ * @param string $mode
+ * @param int $options
+ * @param string &$opened_path
+ * @return bool
+ */
+ public function stream_open($path, $mode, $options, &$opened_path);
+
+ /**
+ * @param string $path
+ * @param int $mode
+ * @param int $options
+ * @return bool
+ */
+ public function mkdir($path, $mode, $options);
+
+ /**
+ * @param string $source
+ * @param string $target
+ * @return bool
+ */
+ public function rename($source, $target);
+
+ /**
+ * @param string $path
+ * @param int $options
+ * @return bool
+ */
+ public function rmdir($path, $options);
+
+ /**
+ * @param string
+ * @return bool
+ */
+ public function unlink($path);
+
+ /**
+ * @param string $path
+ * @param int $flags
+ * @return array
+ */
+ public function url_stat($path, $flags);
+}
diff --git a/apps/files_external/3rdparty/icewind/streams/src/UrlCallBack.php b/apps/files_external/3rdparty/icewind/streams/src/UrlCallBack.php
new file mode 100644
index 00000000000..580bfc6ba22
--- /dev/null
+++ b/apps/files_external/3rdparty/icewind/streams/src/UrlCallBack.php
@@ -0,0 +1,121 @@
+<?php
+/**
+ * Copyright (c) 2014 Robin Appelman <icewind@owncloud.com>
+ * This file is licensed under the Licensed under the MIT license:
+ * http://opensource.org/licenses/MIT
+ */
+
+namespace Icewind\Streams;
+
+/**
+ * Wrapper that provides callbacks for url actions such as fopen, unlink, rename
+ *
+ * Usage:
+ *
+ * $path = UrlCallBack('/path/so/source', function(){
+ * echo 'fopen';
+ * }, function(){
+ * echo 'opendir';
+ * }, function(){
+ * echo 'mkdir';
+ * }, function(){
+ * echo 'rename';
+ * }, function(){
+ * echo 'rmdir';
+ * }, function(){
+ * echo 'unlink';
+ * }, function(){
+ * echo 'stat';
+ * });
+ *
+ * mkdir($path);
+ * ...
+ *
+ * All callbacks are called after the operation is executed on the source stream
+ */
+class UrlCallback extends Wrapper implements Url {
+
+ /**
+ * @param string $source
+ * @param callable $fopen
+ * @param callable $opendir
+ * @param callable $mkdir
+ * @param callable $rename
+ * @param callable $rmdir
+ * @param callable $unlink
+ * @param callable $stat
+ * @return \Icewind\Streams\Path
+ *
+ * @throws \BadMethodCallException
+ * @throws \Exception
+ */
+ public static function wrap($source, $fopen = null, $opendir = null, $mkdir = null, $rename = null, $rmdir = null,
+ $unlink = null, $stat = null) {
+ $options = array(
+ 'source' => $source,
+ 'fopen' => $fopen,
+ 'opendir' => $opendir,
+ 'mkdir' => $mkdir,
+ 'rename' => $rename,
+ 'rmdir' => $rmdir,
+ 'unlink' => $unlink,
+ 'stat' => $stat
+ );
+ return new Path('\Icewind\Streams\UrlCallBack', $options);
+ }
+
+ protected function loadContext($url) {
+ list($protocol) = explode('://', $url);
+ $options = stream_context_get_options($this->context);
+ return $options[$protocol];
+ }
+
+ protected function callCallBack($context, $callback) {
+ if (is_callable($context[$callback])) {
+ call_user_func($context[$callback]);
+ }
+ }
+
+ public function stream_open($path, $mode, $options, &$opened_path) {
+ $context = $this->loadContext($path);
+ $this->callCallBack($context, 'fopen');
+ $this->setSourceStream(fopen($context['source'], $mode));
+ return true;
+ }
+
+ public function dir_opendir($path, $options) {
+ $context = $this->loadContext($path);
+ $this->callCallBack($context, 'opendir');
+ $this->setSourceStream(opendir($context['source']));
+ return true;
+ }
+
+ public function mkdir($path, $mode, $options) {
+ $context = $this->loadContext($path);
+ $this->callCallBack($context, 'mkdir');
+ return mkdir($context['source'], $mode, $options & STREAM_MKDIR_RECURSIVE);
+ }
+
+ public function rmdir($path, $options) {
+ $context = $this->loadContext($path);
+ $this->callCallBack($context, 'rmdir');
+ return rmdir($context['source']);
+ }
+
+ public function rename($source, $target) {
+ $context = $this->loadContext($source);
+ $this->callCallBack($context, 'rename');
+ list(, $target) = explode('://', $target);
+ return rename($context['source'], $target);
+ }
+
+ public function unlink($path) {
+ $context = $this->loadContext($path);
+ $this->callCallBack($context, 'unlink');
+ return unlink($context['source']);
+ }
+
+ public function url_stat($path, $flags) {
+ throw new \Exception('stat is not supported due to php bug 50526');
+ }
+}
diff --git a/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php b/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php
index 2e3a6e6cd88..53de2942ca9 100644
--- a/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php
+++ b/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php
@@ -12,7 +12,7 @@ namespace Icewind\Streams;
*
* This wrapper itself doesn't implement any functionality but is just a base class for other wrappers to extend
*/
-abstract class Wrapper implements File {
+abstract class Wrapper implements File, Directory {
/**
* @var resource
*/
@@ -25,6 +25,22 @@ abstract class Wrapper implements File {
*/
protected $source;
+ protected static function wrapSource($source, $context, $protocol, $class) {
+ try {
+ stream_wrapper_register($protocol, $class);
+ if (@rewinddir($source) === false) {
+ $wrapped = fopen($protocol . '://', 'r+', false, $context);
+ } else {
+ $wrapped = opendir($protocol . '://', $context);
+ }
+ } catch (\BadMethodCallException $e) {
+ stream_wrapper_unregister($protocol);
+ throw $e;
+ }
+ stream_wrapper_unregister($protocol);
+ return $wrapped;
+ }
+
/**
* Load the source from the stream context and return the context options
*
@@ -107,4 +123,17 @@ abstract class Wrapper implements File {
public function stream_close() {
return fclose($this->source);
}
+
+ public function dir_readdir() {
+ return readdir($this->source);
+ }
+
+ public function dir_closedir() {
+ closedir($this->source);
+ return true;
+ }
+
+ public function dir_rewinddir() {
+ return rewind($this->source);
+ }
}
diff --git a/apps/files_external/3rdparty/icewind/streams/tests/CallbackWrapper.php b/apps/files_external/3rdparty/icewind/streams/tests/CallbackWrapper.php
deleted file mode 100644
index 229b629dcd9..00000000000
--- a/apps/files_external/3rdparty/icewind/streams/tests/CallbackWrapper.php
+++ /dev/null
@@ -1,72 +0,0 @@
-<?php
-/**
- * Copyright (c) 2014 Robin Appelman <icewind@owncloud.com>
- * This file is licensed under the Licensed under the MIT license:
- * http://opensource.org/licenses/MIT
- */
-
-namespace Icewind\Streams\Tests;
-
-class CallbackWrapper extends Wrapper {
-
- /**
- * @param resource $source
- * @param callable $read
- * @param callable $write
- * @param callable $close
- * @return resource
- */
- protected function wrapSource($source, $read = null, $write = null, $close = null) {
- return \Icewind\Streams\CallbackWrapper::wrap($source, $read, $write, $close);
- }
-
- /**
- * @expectedException \BadMethodCallException
- */
- public function testWrapInvalidSource() {
- $this->wrapSource('foo');
- }
-
- public function testReadCallback() {
- $called = false;
- $callBack = function () use (&$called) {
- $called = true;
- };
-
- $source = fopen('php://temp', 'r+');
- fwrite($source, 'foobar');
- rewind($source);
-
- $wrapped = $this->wrapSource($source, $callBack);
- $this->assertEquals('foo', fread($wrapped, 3));
- $this->assertTrue($called);
- }
-
- public function testWriteCallback() {
- $lastData = '';
- $callBack = function ($data) use (&$lastData) {
- $lastData = $data;
- };
-
- $source = fopen('php://temp', 'r+');
-
- $wrapped = $this->wrapSource($source, null, $callBack);
- fwrite($wrapped, 'foobar');
- $this->assertEquals('foobar', $lastData);
- }
-
- public function testCloseCallback() {
- $called = false;
- $callBack = function () use (&$called) {
- $called = true;
- };
-
- $source = fopen('php://temp', 'r+');
- fwrite($source, 'foobar');
- rewind($source);
-
- $wrapped = $this->wrapSource($source, null, null, $callBack);
- fclose($wrapped);
- $this->assertTrue($called);
- }
-}
diff --git a/apps/files_external/3rdparty/icewind/streams/tests/IteratorDirectory.php b/apps/files_external/3rdparty/icewind/streams/tests/IteratorDirectory.php
deleted file mode 100644
index 0d990468368..00000000000
--- a/apps/files_external/3rdparty/icewind/streams/tests/IteratorDirectory.php
+++ /dev/null
@@ -1,130 +0,0 @@
-<?php
-/**
- * Copyright (c) 2014 Robin Appelman <icewind@owncloud.com>
- * This file is licensed under the Licensed under the MIT license:
- * http://opensource.org/licenses/MIT
- */
-
-namespace Icewind\Streams\Tests;
-
-class IteratorDirectory extends \PHPUnit_Framework_TestCase {
-
- /**
- * @param \Iterator | array $source
- * @return resource
- */
- protected function wrapSource($source) {
- return \Icewind\Streams\IteratorDirectory::wrap($source);
- }
-
- /**
- * @expectedException \BadMethodCallException
- */
- public function testNoContext() {
- $context = stream_context_create(array());
- stream_wrapper_register('iterator', '\Icewind\Streams\IteratorDirectory');
- try {
- opendir('iterator://', $context);
- stream_wrapper_unregister('iterator');
- } catch (\Exception $e) {
- stream_wrapper_unregister('iterator');
- throw $e;
- }
- }
-
- /**
- * @expectedException \BadMethodCallException
- */
- public function testInvalidSource() {
- $context = stream_context_create(array(
- 'dir' => array(
- 'array' => 2
- )
- ));
- stream_wrapper_register('iterator', '\Icewind\Streams\IteratorDirectory');
- try {
- opendir('iterator://', $context);
- stream_wrapper_unregister('iterator');
- } catch (\Exception $e) {
- stream_wrapper_unregister('iterator');
- throw $e;
- }
- }
-
- /**
- * @expectedException \BadMethodCallException
- */
- public function testWrapInvalidSource() {
- $this->wrapSource(2);
- }
-
- public function fileListProvider() {
- $longList = array_fill(0, 500, 'foo');
- return array(
- array(
- array(
- 'foo',
- 'bar',
- 'qwerty'
- )
- ),
- array(
- array(
- 'with spaces',
- 'under_scores',
- '日本語',
- 'character %$_',
- '.',
- '0',
- 'double "quotes"',
- "single 'quotes'"
- )
- ),
- array(
- array(
- 'single item'
- )
- ),
- array(
- $longList
- ),
- array(
- array()
- )
- );
- }
-
- protected function basicTest($fileList, $dh) {
- $result = array();
-
- while (($file = readdir($dh)) !== false) {
- $result[] = $file;
- }
-
- $this->assertEquals($fileList, $result);
-
- rewinddir($dh);
- if (count($fileList)) {
- $this->assertEquals($fileList[0], readdir($dh));
- } else {
- $this->assertFalse(readdir($dh));
- }
- }
-
- /**
- * @dataProvider fileListProvider
- */
- public function testBasicIterator($fileList) {
- $iterator = new \ArrayIterator($fileList);
- $dh = $this->wrapSource($iterator);
- $this->basicTest($fileList, $dh);
- }
-
- /**
- * @dataProvider fileListProvider
- */
- public function testBasicArray($fileList) {
- $dh = $this->wrapSource($fileList);
- $this->basicTest($fileList, $dh);
- }
-}
diff --git a/apps/files_external/3rdparty/icewind/streams/tests/NullWrapper.php b/apps/files_external/3rdparty/icewind/streams/tests/NullWrapper.php
deleted file mode 100644
index ba42b4dfea1..00000000000
--- a/apps/files_external/3rdparty/icewind/streams/tests/NullWrapper.php
+++ /dev/null
@@ -1,59 +0,0 @@
-<?php
-/**
- * Copyright (c) 2014 Robin Appelman <icewind@owncloud.com>
- * This file is licensed under the Licensed under the MIT license:
- * http://opensource.org/licenses/MIT
- */
-
-namespace Icewind\Streams\Tests;
-
-class NullWrapper extends Wrapper {
-
- /**
- * @param resource $source
- * @return resource
- */
- protected function wrapSource($source) {
- return \Icewind\Streams\NullWrapper::wrap($source);
- }
-
- /**
- * @expectedException \BadMethodCallException
- */
- public function testNoContext() {
- stream_wrapper_register('null', '\Icewind\Streams\NullWrapper');
- $context = stream_context_create(array());
- try {
- fopen('null://', 'r+', false, $context);
- stream_wrapper_unregister('null');
- } catch (\Exception $e) {
- stream_wrapper_unregister('null');
- throw $e;
- }
- }
-
- /**
- * @expectedException \BadMethodCallException
- */
- public function testNoSource() {
- stream_wrapper_register('null', '\Icewind\Streams\NullWrapper');
- $context = stream_context_create(array(
- 'null' => array(
- 'source' => 'bar'
- )
- ));
- try {
- fopen('null://', 'r+', false, $context);
- } catch (\Exception $e) {
- stream_wrapper_unregister('null');
- throw $e;
- }
- }
-
- /**
- * @expectedException \BadMethodCallException
- */
- public function testWrapInvalidSource() {
- $this->wrapSource('foo');
- }
-}
diff --git a/apps/files_external/3rdparty/icewind/streams/tests/Wrapper.php b/apps/files_external/3rdparty/icewind/streams/tests/Wrapper.php
deleted file mode 100644
index 6bb644dd611..00000000000
--- a/apps/files_external/3rdparty/icewind/streams/tests/Wrapper.php
+++ /dev/null
@@ -1,105 +0,0 @@
-<?php
-/**
- * Copyright (c) 2014 Robin Appelman <icewind@owncloud.com>
- * This file is licensed under the Licensed under the MIT license:
- * http://opensource.org/licenses/MIT
- */
-
-namespace Icewind\Streams\Tests;
-
-abstract class Wrapper extends \PHPUnit_Framework_TestCase {
- /**
- * @param resource $source
- * @return resource
- */
- abstract protected function wrapSource($source);
-
- public function testRead() {
- $source = fopen('php://temp', 'r+');
- fwrite($source, 'foobar');
- rewind($source);
-
- $wrapped = $this->wrapSource($source);
- $this->assertEquals('foo', fread($wrapped, 3));
- $this->assertEquals('bar', fread($wrapped, 3));
- $this->assertEquals('', fread($wrapped, 3));
- }
-
- public function testWrite() {
- $source = fopen('php://temp', 'r+');
- rewind($source);
-
- $wrapped = $this->wrapSource($source);
-
- $this->assertEquals(6, fwrite($wrapped, 'foobar'));
- rewind($source);
- $this->assertEquals('foobar', stream_get_contents($source));
- }
-
- public function testClose() {
- $source = fopen('php://temp', 'r+');
- rewind($source);
-
- $wrapped = $this->wrapSource($source);
-
- fclose($wrapped);
- $this->assertFalse(is_resource($source));
- }
-
- public function testSeekTell() {
- $source = fopen('php://temp', 'r+');
- fwrite($source, 'foobar');
- rewind($source);
-
- $wrapped = $this->wrapSource($source);
-
- $this->assertEquals(0, ftell($wrapped));
-
- fseek($wrapped, 2);
- $this->assertEquals(2, ftell($source));
- $this->assertEquals(2, ftell($wrapped));
-
- fseek($wrapped, 2, SEEK_CUR);
- $this->assertEquals(4, ftell($source));
- $this->assertEquals(4, ftell($wrapped));
-
- fseek($wrapped, -1, SEEK_END);
- $this->assertEquals(5, ftell($source));
- $this->assertEquals(5, ftell($wrapped));
- }
-
- public function testStat() {
- $source = fopen(__FILE__, 'r+');
- $wrapped = $this->wrapSource($source);
- $this->assertEquals(stat(__FILE__), fstat($wrapped));
- }
-
- public function testTruncate() {
- if (version_compare(phpversion(), '5.4.0', '<')) {
- $this->markTestSkipped('php <5.4 doesn\'t support truncate for stream wrappers');
- }
- $source = fopen('php://temp', 'r+');
- fwrite($source, 'foobar');
- rewind($source);
- $wrapped = $this->wrapSource($source);
-
- ftruncate($wrapped, 2);
- $this->assertEquals('fo', fread($wrapped, 10));
- }
-
- public function testLock() {
- $source = tmpfile();
- $wrapped = $this->wrapSource($source);
- if (!flock($wrapped, LOCK_EX)) {
- $this->fail('Unable to acquire lock');
- }
- }
-
- public function testStreamOptions() {
- $source = fopen('php://temp', 'r+');
- $wrapped = $this->wrapSource($source);
- stream_set_blocking($wrapped, 0);
- stream_set_timeout($wrapped, 1, 0);
- stream_set_write_buffer($wrapped, 0);
- }
-}
diff --git a/apps/files_external/3rdparty/icewind/streams/tests/bootstrap.php b/apps/files_external/3rdparty/icewind/streams/tests/bootstrap.php
deleted file mode 100644
index 2c17fd57feb..00000000000
--- a/apps/files_external/3rdparty/icewind/streams/tests/bootstrap.php
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-/**
- * Copyright (c) 2014 Robin Appelman <icewind@owncloud.com>
- * This file is licensed under the Licensed under the MIT license:
- * http://opensource.org/licenses/MIT
- */
-
-date_default_timezone_set('UTC');
-require_once __DIR__ . '/../vendor/autoload.php';
diff --git a/apps/files_external/3rdparty/icewind/streams/tests/phpunit.xml b/apps/files_external/3rdparty/icewind/streams/tests/phpunit.xml
deleted file mode 100644
index e3d96352c43..00000000000
--- a/apps/files_external/3rdparty/icewind/streams/tests/phpunit.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<phpunit bootstrap="bootstrap.php">
- <testsuite name='Stream'>
- <directory suffix='.php'>./</directory>
- </testsuite>
-</phpunit>
diff --git a/apps/files_external/l10n/sl.js b/apps/files_external/l10n/sl.js
index c3711b1e0ca..b6fcffb1e0b 100644
--- a/apps/files_external/l10n/sl.js
+++ b/apps/files_external/l10n/sl.js
@@ -9,6 +9,9 @@ OC.L10N.register(
"Storage with id \"%i\" not found" : "Shrambe z ID \"%i\" ni mogoče najti.",
"Invalid mount point" : "Neveljavna priklopna točka",
"Invalid storage backend \"%s\"" : "Neveljaven ozadnji program shrambe \"%s\"",
+ "Not permitted to use backend \"%s\"" : "Uporaba ozadnjega programa \"%s\" ni dovoljena.",
+ "Not permitted to use authentication mechanism \"%s\"" : "Uporaba načina overitve \"%s\" ni dovoljena.",
+ "Unsatisfied backend parameters" : "Nezadovoljivi parametri ozadnjega programa",
"Unsatisfied authentication mechanism parameters" : "Nezadovoljivi parametri mehanizma overitve",
"Insufficient data: %s" : "Nepopolni podatki: %s",
"%s" : "%s",
diff --git a/apps/files_external/l10n/sl.json b/apps/files_external/l10n/sl.json
index 3f68c848ba4..faa848795f1 100644
--- a/apps/files_external/l10n/sl.json
+++ b/apps/files_external/l10n/sl.json
@@ -7,6 +7,9 @@
"Storage with id \"%i\" not found" : "Shrambe z ID \"%i\" ni mogoče najti.",
"Invalid mount point" : "Neveljavna priklopna točka",
"Invalid storage backend \"%s\"" : "Neveljaven ozadnji program shrambe \"%s\"",
+ "Not permitted to use backend \"%s\"" : "Uporaba ozadnjega programa \"%s\" ni dovoljena.",
+ "Not permitted to use authentication mechanism \"%s\"" : "Uporaba načina overitve \"%s\" ni dovoljena.",
+ "Unsatisfied backend parameters" : "Nezadovoljivi parametri ozadnjega programa",
"Unsatisfied authentication mechanism parameters" : "Nezadovoljivi parametri mehanizma overitve",
"Insufficient data: %s" : "Nepopolni podatki: %s",
"%s" : "%s",
diff --git a/apps/files_external/lib/ftp.php b/apps/files_external/lib/ftp.php
index 125888ef722..338e2c14fa4 100644
--- a/apps/files_external/lib/ftp.php
+++ b/apps/files_external/lib/ftp.php
@@ -30,6 +30,8 @@
namespace OC\Files\Storage;
+use Icewind\Streams\RetryWrapper;
+
class FTP extends \OC\Files\Storage\StreamWrapper{
private $password;
private $user;
@@ -105,7 +107,8 @@ class FTP extends \OC\Files\Storage\StreamWrapper{
case 'ab':
//these are supported by the wrapper
$context = stream_context_create(array('ftp' => array('overwrite' => true)));
- return fopen($this->constructUrl($path), $mode, false, $context);
+ $handle = fopen($this->constructUrl($path), $mode, false, $context);
+ return RetryWrapper::wrap($handle);
case 'r+':
case 'w+':
case 'wb+':
diff --git a/apps/files_external/lib/google.php b/apps/files_external/lib/google.php
index 5e5716cf438..b79f42d1e00 100644
--- a/apps/files_external/lib/google.php
+++ b/apps/files_external/lib/google.php
@@ -490,18 +490,27 @@ class Google extends \OC\Files\Storage\Common {
$path = self::$tempFiles[$tmpFile];
$parentFolder = $this->getDriveFile(dirname($path));
if ($parentFolder) {
- // TODO Research resumable upload
$mimetype = \OC::$server->getMimeTypeDetector()->detect($tmpFile);
- $data = file_get_contents($tmpFile);
$params = array(
- 'data' => $data,
'mimeType' => $mimetype,
'uploadType' => 'media'
);
$result = false;
+
+ $chunkSizeBytes = 10 * 1024 * 1024;
+
+ $useChunking = false;
+ $size = filesize($tmpFile);
+ if ($size > $chunkSizeBytes) {
+ $useChunking = true;
+ } else {
+ $params['data'] = file_get_contents($tmpFile);
+ }
+
if ($this->file_exists($path)) {
$file = $this->getDriveFile($path);
- $result = $this->service->files->update($file->getId(), $file, $params);
+ $this->client->setDefer($useChunking);
+ $request = $this->service->files->update($file->getId(), $file, $params);
} else {
$file = new \Google_Service_Drive_DriveFile();
$file->setTitle(basename($path));
@@ -509,8 +518,46 @@ class Google extends \OC\Files\Storage\Common {
$parent = new \Google_Service_Drive_ParentReference();
$parent->setId($parentFolder->getId());
$file->setParents(array($parent));
- $result = $this->service->files->insert($file, $params);
+ $this->client->setDefer($useChunking);
+ $request = $this->service->files->insert($file, $params);
+ }
+
+ if ($useChunking) {
+ // Create a media file upload to represent our upload process.
+ $media = new \Google_Http_MediaFileUpload(
+ $this->client,
+ $request,
+ 'text/plain',
+ null,
+ true,
+ $chunkSizeBytes
+ );
+ $media->setFileSize($size);
+
+ // Upload the various chunks. $status will be false until the process is
+ // complete.
+ $status = false;
+ $handle = fopen($tmpFile, 'rb');
+ while (!$status && !feof($handle)) {
+ $chunk = fread($handle, $chunkSizeBytes);
+ $status = $media->nextChunk($chunk);
+ }
+
+ // The final value of $status will be the data from the API for the object
+ // that has been uploaded.
+ $result = false;
+ if ($status !== false) {
+ $result = $status;
+ }
+
+ fclose($handle);
+ } else {
+ $result = $request;
}
+
+ // Reset to the client to execute requests immediately in the future.
+ $this->client->setDefer(false);
+
if ($result) {
$this->setDriveFile($path, $result);
}
diff --git a/apps/files_external/lib/smb.php b/apps/files_external/lib/smb.php
index 25acae95fa3..08c4b25a088 100644
--- a/apps/files_external/lib/smb.php
+++ b/apps/files_external/lib/smb.php
@@ -349,6 +349,28 @@ class SMB extends Common {
}
}
+ public function isReadable($path) {
+ try {
+ $info = $this->getFileInfo($path);
+ return !$info->isHidden();
+ } catch (NotFoundException $e) {
+ return false;
+ } catch (ForbiddenException $e) {
+ return false;
+ }
+ }
+
+ public function isUpdatable($path) {
+ try {
+ $info = $this->getFileInfo($path);
+ return !$info->isHidden() && !$info->isReadOnly();
+ } catch (NotFoundException $e) {
+ return false;
+ } catch (ForbiddenException $e) {
+ return false;
+ }
+ }
+
/**
* check if smbclient is installed
*/
diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js
index 2711b2392e9..5ec7824758f 100644
--- a/apps/files_sharing/js/share.js
+++ b/apps/files_sharing/js/share.js
@@ -60,6 +60,9 @@
if (fileData.recipientsDisplayName) {
tr.attr('data-share-recipients', fileData.recipientsDisplayName);
}
+ if (fileData.shareTypes) {
+ tr.attr('data-share-types', fileData.shareTypes.join(','));
+ }
return tr;
};
@@ -77,6 +80,7 @@
fileList._getWebdavProperties = function() {
var props = oldGetWebdavProperties.apply(this, arguments);
props.push('{' + NS_OC + '}owner-display-name');
+ props.push('{' + NS_OC + '}share-types');
return props;
};
@@ -88,40 +92,45 @@
if (permissionsProp && permissionsProp.indexOf('S') >= 0) {
data.shareOwner = props['{' + NS_OC + '}owner-display-name'];
}
+
+ var shareTypesProp = props['{' + NS_OC + '}share-types'];
+ if (shareTypesProp) {
+ data.shareTypes = _.chain(shareTypesProp).filter(function(xmlvalue) {
+ return (xmlvalue.namespaceURI === NS_OC && xmlvalue.nodeName.split(':')[1] === 'share-type');
+ }).map(function(xmlvalue) {
+ return parseInt(xmlvalue.textContent || xmlvalue.text, 10);
+ }).value();
+ }
+
return data;
});
// use delegate to catch the case with multiple file lists
fileList.$el.on('fileActionsReady', function(ev){
- var fileList = ev.fileList;
var $files = ev.$files;
- function updateIcons($files) {
- if (!$files) {
- // if none specified, update all
- $files = fileList.$fileList.find('tr');
+ _.each($files, function(file) {
+ var $tr = $(file);
+ var shareTypes = $tr.attr('data-share-types');
+ if (shareTypes) {
+ var hasLink = false;
+ var hasShares = false;
+ _.each(shareTypes.split(',') || [], function(shareType) {
+ shareType = parseInt(shareType, 10);
+ if (shareType === OC.Share.SHARE_TYPE_LINK) {
+ hasLink = true;
+ } else if (shareType === OC.Share.SHARE_TYPE_USER) {
+ hasShares = true;
+ } else if (shareType === OC.Share.SHARE_TYPE_GROUP) {
+ hasShares = true;
+ }
+ });
+ OCA.Sharing.Util._updateFileActionIcon($tr, hasShares, hasLink);
}
- _.each($files, function(file) {
- var $tr = $(file);
- var shareStatus = OC.Share.statuses[$tr.data('id')];
- OCA.Sharing.Util._updateFileActionIcon($tr, !!shareStatus, shareStatus && shareStatus.link);
- });
- }
-
- if (!OCA.Sharing.sharesLoaded){
- OC.Share.loadIcons('file', fileList, function() {
- // since we don't know which files are affected, just refresh them all
- updateIcons();
- });
- // assume that we got all shares, so switching directories
- // will not invalidate that list
- OCA.Sharing.sharesLoaded = true;
- }
- else{
- updateIcons($files);
- }
+ });
});
+
fileList.$el.on('changeDirectory', function() {
OCA.Sharing.sharesLoaded = false;
});
diff --git a/apps/files_sharing/js/sharedfilelist.js b/apps/files_sharing/js/sharedfilelist.js
index a799d4a94c2..da0f957ed99 100644
--- a/apps/files_sharing/js/sharedfilelist.js
+++ b/apps/files_sharing/js/sharedfilelist.js
@@ -286,6 +286,8 @@
// using a hash to make them unique,
// this is only a list to be displayed
data.recipients = {};
+ // share types
+ data.shareTypes = {};
// counter is cheaper than calling _.keys().length
data.recipientsCount = 0;
data.mtime = file.share.stime;
@@ -308,6 +310,8 @@
data.recipientsCount++;
}
+ data.shareTypes[file.share.type] = true;
+
delete file.share;
return memo;
}, {})
@@ -324,6 +328,12 @@
data.recipientsCount
);
delete data.recipientsCount;
+ if (self._sharedWithUser) {
+ // only for outgoing shres
+ delete data.shareTypes;
+ } else {
+ data.shareTypes = _.keys(data.shareTypes);
+ }
})
// Finish the chain by getting the result
.value();
diff --git a/apps/files_sharing/l10n/is.js b/apps/files_sharing/l10n/is.js
index fa95da0ffe2..1b5e7e23be1 100644
--- a/apps/files_sharing/l10n/is.js
+++ b/apps/files_sharing/l10n/is.js
@@ -28,7 +28,7 @@ OC.L10N.register(
"Invalid ownCloud url" : "Ógild ownCloud-slóð",
"Shared by" : "Deilt af",
"Sharing" : "Deiling",
- "A file or folder has been <strong>shared</strong>" : "Skjali eð möppu hefur verið <strong>deilt</strong>",
+ "A file or folder has been <strong>shared</strong>" : "Skjali eða möppu hefur verið <strong>deilt</strong>",
"A file or folder was shared from <strong>another server</strong>" : "Skjali eð möppu hefur verið deilt <strong>frá öðrum þjóni</strong>",
"A public shared file or folder was <strong>downloaded</strong>" : "Skrá eða mappa í almenningsaðgangi var <strong>sótt</strong>",
"You received a new remote share %2$s from %1$s" : "Þú tókst við nýrri fjartengdri sameign %2$s frá %1$s",
diff --git a/apps/files_sharing/l10n/is.json b/apps/files_sharing/l10n/is.json
index 8ddb01882ab..c80c91d55dc 100644
--- a/apps/files_sharing/l10n/is.json
+++ b/apps/files_sharing/l10n/is.json
@@ -26,7 +26,7 @@
"Invalid ownCloud url" : "Ógild ownCloud-slóð",
"Shared by" : "Deilt af",
"Sharing" : "Deiling",
- "A file or folder has been <strong>shared</strong>" : "Skjali eð möppu hefur verið <strong>deilt</strong>",
+ "A file or folder has been <strong>shared</strong>" : "Skjali eða möppu hefur verið <strong>deilt</strong>",
"A file or folder was shared from <strong>another server</strong>" : "Skjali eð möppu hefur verið deilt <strong>frá öðrum þjóni</strong>",
"A public shared file or folder was <strong>downloaded</strong>" : "Skrá eða mappa í almenningsaðgangi var <strong>sótt</strong>",
"You received a new remote share %2$s from %1$s" : "Þú tókst við nýrri fjartengdri sameign %2$s frá %1$s",
diff --git a/apps/files_sharing/l10n/sl.js b/apps/files_sharing/l10n/sl.js
index 4c2bb507745..5c7e5bc3974 100644
--- a/apps/files_sharing/l10n/sl.js
+++ b/apps/files_sharing/l10n/sl.js
@@ -10,14 +10,14 @@ OC.L10N.register(
"Couldn't add remote share" : "Ni mogoče dodati oddaljenega mesta za souporabo",
"Shared with you" : "V souporabi z vami",
"Shared with others" : "V souporabi z drugimi",
- "Shared by link" : "Souporaba s povezavo",
+ "Shared by link" : "V souporabi prek povezave",
"Federated sharing" : "Souporaba zveznega oblaka",
"Nothing shared with you yet" : "Datotek drugih uporabnikov še ni v souporabi",
- "Files and folders others share with you will show up here" : "Datoteke in mape, katerih souporabo z vami dovolijo drugi, bodo izpisane na tem mestu",
+ "Files and folders others share with you will show up here" : "Datoteke in mape, katerih souporabo z vami omogočijo drugi, bodo zbrane na tem mestu.",
"Nothing shared yet" : "Souporabe datotek še niste omogočili",
- "Files and folders you share will show up here" : "Datoteke in mape, katerih souporabo z drugimi dovolite vi, bodo izpisane na tem mestu",
+ "Files and folders you share will show up here" : "Datoteke in mape, ki ste jih označili za souporabo z drugimi, bodo zbrane na tem mestu.",
"No shared links" : "Ni povezav za souporabo",
- "Files and folders you share by link will show up here" : "Datoteke in mape, katerih souporabo preko povezave z drugimi dovolite vi, bodo izpisane na tem mestu",
+ "Files and folders you share by link will show up here" : "Datoteke in mape, ki ste jih označili za souporabo prek povezave, bodo zbrane na tem mestu.",
"Do you want to add the remote share {name} from {owner}@{remote}?" : "Ali želite dodati oddaljeno mesto souporabe {name} na {owner}@{remote}?",
"Remote share" : "Oddaljeno mesto za souporabo",
"Remote share password" : "Geslo za mesto za oddaljeno souporabo",
diff --git a/apps/files_sharing/l10n/sl.json b/apps/files_sharing/l10n/sl.json
index 289db98a66a..05d65c56ccb 100644
--- a/apps/files_sharing/l10n/sl.json
+++ b/apps/files_sharing/l10n/sl.json
@@ -8,14 +8,14 @@
"Couldn't add remote share" : "Ni mogoče dodati oddaljenega mesta za souporabo",
"Shared with you" : "V souporabi z vami",
"Shared with others" : "V souporabi z drugimi",
- "Shared by link" : "Souporaba s povezavo",
+ "Shared by link" : "V souporabi prek povezave",
"Federated sharing" : "Souporaba zveznega oblaka",
"Nothing shared with you yet" : "Datotek drugih uporabnikov še ni v souporabi",
- "Files and folders others share with you will show up here" : "Datoteke in mape, katerih souporabo z vami dovolijo drugi, bodo izpisane na tem mestu",
+ "Files and folders others share with you will show up here" : "Datoteke in mape, katerih souporabo z vami omogočijo drugi, bodo zbrane na tem mestu.",
"Nothing shared yet" : "Souporabe datotek še niste omogočili",
- "Files and folders you share will show up here" : "Datoteke in mape, katerih souporabo z drugimi dovolite vi, bodo izpisane na tem mestu",
+ "Files and folders you share will show up here" : "Datoteke in mape, ki ste jih označili za souporabo z drugimi, bodo zbrane na tem mestu.",
"No shared links" : "Ni povezav za souporabo",
- "Files and folders you share by link will show up here" : "Datoteke in mape, katerih souporabo preko povezave z drugimi dovolite vi, bodo izpisane na tem mestu",
+ "Files and folders you share by link will show up here" : "Datoteke in mape, ki ste jih označili za souporabo prek povezave, bodo zbrane na tem mestu.",
"Do you want to add the remote share {name} from {owner}@{remote}?" : "Ali želite dodati oddaljeno mesto souporabe {name} na {owner}@{remote}?",
"Remote share" : "Oddaljeno mesto za souporabo",
"Remote share password" : "Geslo za mesto za oddaljeno souporabo",
diff --git a/apps/files_sharing/tests/js/shareSpec.js b/apps/files_sharing/tests/js/shareSpec.js
index 7607ada50ba..c488bd94fab 100644
--- a/apps/files_sharing/tests/js/shareSpec.js
+++ b/apps/files_sharing/tests/js/shareSpec.js
@@ -53,35 +53,21 @@ describe('OCA.Sharing.Util tests', function() {
permissions: OC.PERMISSION_ALL,
etag: 'abc',
shareOwner: 'User One',
- isShareMountPoint: false
+ isShareMountPoint: false,
+ shareTypes: [OC.Share.SHARE_TYPE_USER]
}];
-
- OCA.Sharing.sharesLoaded = true;
- OC.Share.statuses = {
- 1: {link: false, path: '/subdir'}
- };
});
afterEach(function() {
delete OCA.Sharing.sharesLoaded;
delete OC.Share.droppedDown;
fileList.destroy();
fileList = null;
- OC.Share.statuses = {};
- OC.Share.currentShares = {};
});
describe('Sharing data in table row', function() {
// TODO: test data-permissions, data-share-owner, etc
});
describe('Share action icon', function() {
- beforeEach(function() {
- OC.Share.statuses = {1: {link: false, path: '/subdir'}};
- OCA.Sharing.sharesLoaded = true;
- });
- afterEach(function() {
- OC.Share.statuses = {};
- OCA.Sharing.sharesLoaded = false;
- });
it('do not shows share text when not shared', function() {
var $action, $tr;
OC.Share.statuses = {};
@@ -93,7 +79,8 @@ describe('OCA.Sharing.Util tests', function() {
mimetype: 'httpd/unix-directory',
size: 12,
permissions: OC.PERMISSION_ALL,
- etag: 'abc'
+ etag: 'abc',
+ shareTypes: []
}]);
$tr = fileList.$el.find('tbody tr:first');
$action = $tr.find('.action-share');
@@ -111,7 +98,8 @@ describe('OCA.Sharing.Util tests', function() {
mimetype: 'text/plain',
size: 12,
permissions: OC.PERMISSION_ALL,
- etag: 'abc'
+ etag: 'abc',
+ shareTypes: [OC.Share.SHARE_TYPE_USER]
}]);
$tr = fileList.$el.find('tbody tr:first');
$action = $tr.find('.action-share');
@@ -131,7 +119,8 @@ describe('OCA.Sharing.Util tests', function() {
mimetype: 'text/plain',
size: 12,
permissions: OC.PERMISSION_ALL,
- etag: 'abc'
+ etag: 'abc',
+ shareTypes: [OC.Share.SHARE_TYPE_LINK]
}]);
$tr = fileList.$el.find('tbody tr:first');
$action = $tr.find('.action-share');
@@ -151,7 +140,8 @@ describe('OCA.Sharing.Util tests', function() {
size: 12,
permissions: OC.PERMISSION_ALL,
shareOwner: 'User One',
- etag: 'abc'
+ etag: 'abc',
+ shareTypes: [OC.Share.SHARE_TYPE_USER]
}]);
$tr = fileList.$el.find('tbody tr:first');
$action = $tr.find('.action-share');
@@ -171,7 +161,8 @@ describe('OCA.Sharing.Util tests', function() {
size: 12,
permissions: OC.PERMISSION_ALL,
recipientsDisplayName: 'User One, User Two',
- etag: 'abc'
+ etag: 'abc',
+ shareTypes: [OC.Share.SHARE_TYPE_USER]
}]);
$tr = fileList.$el.find('tbody tr:first');
$action = $tr.find('.action-share');
diff --git a/apps/systemtags/l10n/pl.js b/apps/systemtags/l10n/pl.js
index ad361c38b81..6089dad7704 100644
--- a/apps/systemtags/l10n/pl.js
+++ b/apps/systemtags/l10n/pl.js
@@ -1,9 +1,19 @@
OC.L10N.register(
"systemtags",
{
+ "<strong>System tags</strong> for a file have been modified" : "<strong>System etykiet</strong> dla pliku został zmieniony",
+ "%1$s assigned system tag %3$s" : "%1$s przypisywalny system etykiet%3$s",
+ "%1$s unassigned system tag %3$s" : "%1$s nieprzypisany system etykiet%3$s",
+ "%1$s created system tag %2$s" : "%1$s stworzony system etykiet%2$s",
+ "%1$s deleted system tag %2$s" : "%1$s usunięty system etykiet%2$s",
+ "%1$s updated system tag %3$s to %2$s" : "%1$s zaktualizowany system etykiet%3$s do %2$s",
+ "%1$s assigned system tag %3$s to %2$s" : "%1$s przypisywalny system etykiet%3$s do %2$s",
+ "%1$s unassigned system tag %3$s from %2$s" : "%1$s nieprzypisany system etykiet %3$s z %2$s",
+ "%s (not-assignable)" : "%s (nieprzypisalny)",
"%s (invisible)" : "%s (niewidoczny)",
- "Tags" : "Tagi",
+ "Tags" : "Etykiety",
"Tagged files" : "Otagowane pliki",
+ "No files found for the selected tags" : "Nie znaleziono plików dla wybranych etykiet",
"No files in here" : "Brak plików",
"No entries found in this folder" : "Brak wpisów w tym folderze",
"Name" : "Nazwa",
diff --git a/apps/systemtags/l10n/pl.json b/apps/systemtags/l10n/pl.json
index ba17954a472..8005083201e 100644
--- a/apps/systemtags/l10n/pl.json
+++ b/apps/systemtags/l10n/pl.json
@@ -1,7 +1,17 @@
{ "translations": {
+ "<strong>System tags</strong> for a file have been modified" : "<strong>System etykiet</strong> dla pliku został zmieniony",
+ "%1$s assigned system tag %3$s" : "%1$s przypisywalny system etykiet%3$s",
+ "%1$s unassigned system tag %3$s" : "%1$s nieprzypisany system etykiet%3$s",
+ "%1$s created system tag %2$s" : "%1$s stworzony system etykiet%2$s",
+ "%1$s deleted system tag %2$s" : "%1$s usunięty system etykiet%2$s",
+ "%1$s updated system tag %3$s to %2$s" : "%1$s zaktualizowany system etykiet%3$s do %2$s",
+ "%1$s assigned system tag %3$s to %2$s" : "%1$s przypisywalny system etykiet%3$s do %2$s",
+ "%1$s unassigned system tag %3$s from %2$s" : "%1$s nieprzypisany system etykiet %3$s z %2$s",
+ "%s (not-assignable)" : "%s (nieprzypisalny)",
"%s (invisible)" : "%s (niewidoczny)",
- "Tags" : "Tagi",
+ "Tags" : "Etykiety",
"Tagged files" : "Otagowane pliki",
+ "No files found for the selected tags" : "Nie znaleziono plików dla wybranych etykiet",
"No files in here" : "Brak plików",
"No entries found in this folder" : "Brak wpisów w tym folderze",
"Name" : "Nazwa",
diff --git a/apps/updatenotification/l10n/pl.js b/apps/updatenotification/l10n/pl.js
index b685ad4a963..3439aae077a 100644
--- a/apps/updatenotification/l10n/pl.js
+++ b/apps/updatenotification/l10n/pl.js
@@ -1,10 +1,14 @@
OC.L10N.register(
"updatenotification",
{
+ "Updated channel" : "Zaktualizowano kanał",
"{version} is available. Get more information on how to update." : "Wersja {version} jest dostępna. Dowiedz się jak zaktualizować.",
"Updater" : "Aktualizator",
"A new version is available: %s" : "Dostępna jest nowa wersja: %s",
"Open updater" : "Otwórz aktualizator",
- "Update channel:" : "Kanał aktualizacji:"
+ "Your version is up to date." : "Posiadasz aktualną wersję.",
+ "Checked on %s" : "Sprawdzone na %s",
+ "Update channel:" : "Kanał aktualizacji:",
+ "You can always update to a newer version / experimental channel. But you can never downgrade to a more stable channel." : "Możesz zawsze zaktualizować swoją wersję do nowego / ekperymentalnego kanału. Jednakże nie możesz powrócić do poprzedniej stabilniejszej wersji. "
},
"nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);");
diff --git a/apps/updatenotification/l10n/pl.json b/apps/updatenotification/l10n/pl.json
index 0a4ebdc6d95..f866a42188a 100644
--- a/apps/updatenotification/l10n/pl.json
+++ b/apps/updatenotification/l10n/pl.json
@@ -1,8 +1,12 @@
{ "translations": {
+ "Updated channel" : "Zaktualizowano kanał",
"{version} is available. Get more information on how to update." : "Wersja {version} jest dostępna. Dowiedz się jak zaktualizować.",
"Updater" : "Aktualizator",
"A new version is available: %s" : "Dostępna jest nowa wersja: %s",
"Open updater" : "Otwórz aktualizator",
- "Update channel:" : "Kanał aktualizacji:"
+ "Your version is up to date." : "Posiadasz aktualną wersję.",
+ "Checked on %s" : "Sprawdzone na %s",
+ "Update channel:" : "Kanał aktualizacji:",
+ "You can always update to a newer version / experimental channel. But you can never downgrade to a more stable channel." : "Możesz zawsze zaktualizować swoją wersję do nowego / ekperymentalnego kanału. Jednakże nie możesz powrócić do poprzedniej stabilniejszej wersji. "
},"pluralForm" :"nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"
} \ No newline at end of file
diff --git a/apps/updatenotification/l10n/ru.js b/apps/updatenotification/l10n/ru.js
index eb40bd09f54..ae10ea5a821 100644
--- a/apps/updatenotification/l10n/ru.js
+++ b/apps/updatenotification/l10n/ru.js
@@ -1,10 +1,13 @@
OC.L10N.register(
"updatenotification",
{
+ "Updated channel" : "Обновленный канал",
"{version} is available. Get more information on how to update." : "Доступна версия {version}. Получить дополнительную информацию о порядке обновления.",
"Updater" : "Обновление",
"A new version is available: %s" : "Доступна новая версия: %s",
"Open updater" : "Открыть окно обновления",
+ "Your version is up to date." : "Версия не требует обновления.",
+ "Checked on %s" : "Проверено %s",
"Update channel:" : "Канал обновлений:",
"You can always update to a newer version / experimental channel. But you can never downgrade to a more stable channel." : "Вы всегда можете переключится на экспериментальный канал обновлений для получения новейшей версии. Но учтите, что вы не сможете переключиться обратно на канал обновлений для стабильных версий. "
},
diff --git a/apps/updatenotification/l10n/ru.json b/apps/updatenotification/l10n/ru.json
index 584c27c455d..7d71a5c43e7 100644
--- a/apps/updatenotification/l10n/ru.json
+++ b/apps/updatenotification/l10n/ru.json
@@ -1,8 +1,11 @@
{ "translations": {
+ "Updated channel" : "Обновленный канал",
"{version} is available. Get more information on how to update." : "Доступна версия {version}. Получить дополнительную информацию о порядке обновления.",
"Updater" : "Обновление",
"A new version is available: %s" : "Доступна новая версия: %s",
"Open updater" : "Открыть окно обновления",
+ "Your version is up to date." : "Версия не требует обновления.",
+ "Checked on %s" : "Проверено %s",
"Update channel:" : "Канал обновлений:",
"You can always update to a newer version / experimental channel. But you can never downgrade to a more stable channel." : "Вы всегда можете переключится на экспериментальный канал обновлений для получения новейшей версии. Но учтите, что вы не сможете переключиться обратно на канал обновлений для стабильных версий. "
},"pluralForm" :"nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);"
diff --git a/apps/user_ldap/l10n/sl.js b/apps/user_ldap/l10n/sl.js
index 77a8f64a7ef..0fd05945d55 100644
--- a/apps/user_ldap/l10n/sl.js
+++ b/apps/user_ldap/l10n/sl.js
@@ -3,6 +3,7 @@ OC.L10N.register(
{
"Failed to clear the mappings." : "Čiščenje preslikav je spodletelo.",
"Failed to delete the server configuration" : "Brisanje nastavitev strežnika je spodletelo.",
+ "The configuration is invalid: anonymous bind is not allowed." : "Nastavitev ni veljavna: brezimne povezave niso dovoljene.",
"The configuration is valid and the connection could be established!" : "Nastavitev je veljavna, zato je povezavo mogoče vzpostaviti!",
"The configuration is valid, but the Bind failed. Please check the server settings and credentials." : "Nastavitev je veljavna, vendar pa je vez spodletela. Preveriti je treba nastavitve strežnika in ustreznost poveril.",
"The configuration is invalid. Please have a look at the logs for further details." : "Nastavitev ni veljavna. Več podrobnosti o napaki je zabeleženih v dnevniku.",
@@ -16,6 +17,7 @@ OC.L10N.register(
"Configuration OK" : "Nastavitev je ustrezna",
"Select groups" : "Izberi skupine",
"Select object classes" : "Izbor razredov predmeta",
+ "Please check the credentials, they seem to be wrong." : "Preverite poverila! Najverjetneje so napačna.",
"{nthServer}. Server" : "{nthServer}. strežnik",
"More than 1,000 directory entries available." : "Na voljo je več kot 1000 vnosov imenika",
"Do you really want to delete the current Server Configuration?" : "Ali res želite izbrisati trenutne nastavitve strežnika?",
diff --git a/apps/user_ldap/l10n/sl.json b/apps/user_ldap/l10n/sl.json
index c3bec20d8c1..2e1501e1e54 100644
--- a/apps/user_ldap/l10n/sl.json
+++ b/apps/user_ldap/l10n/sl.json
@@ -1,6 +1,7 @@
{ "translations": {
"Failed to clear the mappings." : "Čiščenje preslikav je spodletelo.",
"Failed to delete the server configuration" : "Brisanje nastavitev strežnika je spodletelo.",
+ "The configuration is invalid: anonymous bind is not allowed." : "Nastavitev ni veljavna: brezimne povezave niso dovoljene.",
"The configuration is valid and the connection could be established!" : "Nastavitev je veljavna, zato je povezavo mogoče vzpostaviti!",
"The configuration is valid, but the Bind failed. Please check the server settings and credentials." : "Nastavitev je veljavna, vendar pa je vez spodletela. Preveriti je treba nastavitve strežnika in ustreznost poveril.",
"The configuration is invalid. Please have a look at the logs for further details." : "Nastavitev ni veljavna. Več podrobnosti o napaki je zabeleženih v dnevniku.",
@@ -14,6 +15,7 @@
"Configuration OK" : "Nastavitev je ustrezna",
"Select groups" : "Izberi skupine",
"Select object classes" : "Izbor razredov predmeta",
+ "Please check the credentials, they seem to be wrong." : "Preverite poverila! Najverjetneje so napačna.",
"{nthServer}. Server" : "{nthServer}. strežnik",
"More than 1,000 directory entries available." : "Na voljo je več kot 1000 vnosov imenika",
"Do you really want to delete the current Server Configuration?" : "Ali res želite izbrisati trenutne nastavitve strežnika?",
diff --git a/apps/user_ldap/lib/user/user.php b/apps/user_ldap/lib/user/user.php
index 43ff6014c9f..9bf505c5c22 100644
--- a/apps/user_ldap/lib/user/user.php
+++ b/apps/user_ldap/lib/user/user.php
@@ -217,7 +217,11 @@ class User {
foreach ($attrs as $attr) {
if(isset($ldapEntry[$attr])) {
$this->avatarImage = $ldapEntry[$attr][0];
- $this->updateAvatar();
+ // the call to the method that saves the avatar in the file
+ // system must be postponed after the login. It is to ensure
+ // external mounts are mounted properly (e.g. with login
+ // credentials from the session).
+ \OCP\Util::connectHook('OC_User', 'post_login', $this, 'updateAvatarPostLogin');
break;
}
}
@@ -462,6 +466,17 @@ class User {
}
/**
+ * called by a post_login hook to save the avatar picture
+ *
+ * @param array $params
+ */
+ public function updateAvatarPostLogin($params) {
+ if(isset($params['uid']) && $params['uid'] === $this->getUsername()) {
+ $this->updateAvatar();
+ }
+ }
+
+ /**
* @brief attempts to get an image from LDAP and sets it as ownCloud avatar
* @return null
*/
diff --git a/apps/user_ldap/tests/user/user.php b/apps/user_ldap/tests/user/user.php
index ca8d81a4b79..ed04520aa74 100644
--- a/apps/user_ldap/tests/user/user.php
+++ b/apps/user_ldap/tests/user/user.php
@@ -798,6 +798,7 @@ class Test_User_User extends \Test\TestCase {
}
$userMock->processAttributes($record);
+ \OC_Hook::emit('OC_User', 'post_login', array('uid' => $uid));
}
public function emptyHomeFolderAttributeValueProvider() {
diff --git a/build/integration/features/bootstrap/WebDav.php b/build/integration/features/bootstrap/WebDav.php
index 95a05f4ed6f..b56a1b7d2f6 100644
--- a/build/integration/features/bootstrap/WebDav.php
+++ b/build/integration/features/bootstrap/WebDav.php
@@ -190,7 +190,7 @@ trait WebDav {
*/
public function theSingleResponseShouldContainAPropertyWithValue($key, $expectedValue) {
$keys = $this->response;
- if (!isset($keys[$key])) {
+ if (!array_key_exists($key, $keys)) {
throw new \Exception("Cannot find property \"$key\" with \"$expectedValue\"");
}
@@ -200,6 +200,57 @@ trait WebDav {
}
}
+ /**
+ * @Then the response should contain a share-types property with
+ */
+ public function theResponseShouldContainAShareTypesPropertyWith($table)
+ {
+ $keys = $this->response;
+ if (!array_key_exists('{http://owncloud.org/ns}share-types', $keys)) {
+ throw new \Exception("Cannot find property \"{http://owncloud.org/ns}share-types\"");
+ }
+
+ $foundTypes = [];
+ $data = $keys['{http://owncloud.org/ns}share-types'];
+ foreach ($data as $item) {
+ if ($item['name'] !== '{http://owncloud.org/ns}share-type') {
+ throw new \Exception('Invalid property found: "' . $item['name'] . '"');
+ }
+
+ $foundTypes[] = $item['value'];
+ }
+
+ foreach ($table->getRows() as $row) {
+ $key = array_search($row[0], $foundTypes);
+ if ($key === false) {
+ throw new \Exception('Expected type ' . $row[0] . ' not found');
+ }
+
+ unset($foundTypes[$key]);
+ }
+
+ if ($foundTypes !== []) {
+ throw new \Exception('Found more share types then specified: ' . $foundTypes);
+ }
+ }
+
+ /**
+ * @Then the response should contain an empty property :property
+ * @param string $property
+ * @throws \Exception
+ */
+ public function theResponseShouldContainAnEmptyProperty($property) {
+ $properties = $this->response;
+ if (!array_key_exists($property, $properties)) {
+ throw new \Exception("Cannot find property \"$property\"");
+ }
+
+ if ($properties[$property] !== null) {
+ throw new \Exception("Property \"$property\" is not empty");
+ }
+ }
+
+
/*Returns the elements of a propfind, $folderDepth requires 1 to see elements without children*/
public function listFolder($user, $path, $folderDepth, $properties = null){
$fullUrl = substr($this->baseUrl, 0, -4);
diff --git a/build/integration/features/webdav-related.feature b/build/integration/features/webdav-related.feature
index 019df3436f8..ee841f9eb5b 100644
--- a/build/integration/features/webdav-related.feature
+++ b/build/integration/features/webdav-related.feature
@@ -168,3 +168,76 @@ Feature: webdav-related
When As an "user0"
And Downloading file "/myChunkedFile.txt"
Then Downloaded content should be "AAAAABBBBBCCCCC"
+
+ Scenario: A file that is not shared does not have a share-types property
+ Given user "user0" exists
+ And user "user0" created a folder "/test"
+ When as "user0" gets properties of folder "/test" with
+ |{http://owncloud.org/ns}share-types|
+ Then the response should contain an empty property "{http://owncloud.org/ns}share-types"
+
+ Scenario: A file that is shared to a user has a share-types property
+ Given user "user0" exists
+ And user "user1" exists
+ And user "user0" created a folder "/test"
+ And as "user0" creating a share with
+ | path | test |
+ | shareType | 0 |
+ | permissions | 31 |
+ | shareWith | user1 |
+ When as "user0" gets properties of folder "/test" with
+ |{http://owncloud.org/ns}share-types|
+ Then the response should contain a share-types property with
+ | 0 |
+
+ Scenario: A file that is shared to a group has a share-types property
+ Given user "user0" exists
+ And group "group1" exists
+ And user "user0" created a folder "/test"
+ And as "user0" creating a share with
+ | path | test |
+ | shareType | 1 |
+ | permissions | 31 |
+ | shareWith | group1 |
+ When as "user0" gets properties of folder "/test" with
+ |{http://owncloud.org/ns}share-types|
+ Then the response should contain a share-types property with
+ | 1 |
+
+ Scenario: A file that is shared by link has a share-types property
+ Given user "user0" exists
+ And user "user0" created a folder "/test"
+ And as "user0" creating a share with
+ | path | test |
+ | shareType | 3 |
+ | permissions | 31 |
+ When as "user0" gets properties of folder "/test" with
+ |{http://owncloud.org/ns}share-types|
+ Then the response should contain a share-types property with
+ | 3 |
+
+ Scenario: A file that is shared by user,group and link has a share-types property
+ Given user "user0" exists
+ And user "user1" exists
+ And group "group2" exists
+ And user "user0" created a folder "/test"
+ And as "user0" creating a share with
+ | path | test |
+ | shareType | 0 |
+ | permissions | 31 |
+ | shareWith | user1 |
+ And as "user0" creating a share with
+ | path | test |
+ | shareType | 1 |
+ | permissions | 31 |
+ | shareWith | group2 |
+ And as "user0" creating a share with
+ | path | test |
+ | shareType | 3 |
+ | permissions | 31 |
+ When as "user0" gets properties of folder "/test" with
+ |{http://owncloud.org/ns}share-types|
+ Then the response should contain a share-types property with
+ | 0 |
+ | 1 |
+ | 3 |
diff --git a/core/css/share.css b/core/css/share.css
index 55ee5996a75..047bb5eba50 100644
--- a/core/css/share.css
+++ b/core/css/share.css
@@ -63,6 +63,11 @@
white-space: normal;
}
+#shareWithList .shareOption {
+ white-space: nowrap;
+ display: inline-block;
+}
+
#shareWithList .unshare img, #shareWithList .showCruds img {
vertical-align:text-bottom; /* properly align icons */
}
diff --git a/core/img/rating/s0.svg b/core/img/rating/s0.svg
index 8554b5e93a4..80e3f91cc09 100755..100644
--- a/core/img/rating/s0.svg
+++ b/core/img/rating/s0.svg
@@ -1,104 +1 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- height="20.937906"
- width="120.39989"
- version="1.1"
- id="svg3386"
- inkscape:version="0.91 r13725"
- sodipodi:docname="star.svg">
- <metadata
- id="metadata3396">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <defs
- id="defs3394" />
- <sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="0"
- inkscape:pageshadow="2"
- inkscape:window-width="1301"
- inkscape:window-height="744"
- id="namedview3392"
- showgrid="false"
- inkscape:zoom="6.8977273"
- inkscape:cx="45.793885"
- inkscape:cy="3.4967853"
- inkscape:window-x="65"
- inkscape:window-y="24"
- inkscape:window-maximized="1"
- inkscape:current-layer="svg3386"
- fit-margin-right="2.4"
- fit-margin-top="0"
- fit-margin-left="0"
- fit-margin-bottom="0" />
- <g
- transform="matrix(0.068322,0,0,0.068322,-8.114184,-50.963429)"
- id="g3388"
- style="opacity:0.5">
- <path
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- transform="translate(-21.071,-112.5)"
- id="path3390"
- inkscape:connector-curvature="0" />
- </g>
- <g
- id="g3414"
- transform="matrix(0.068322,0,0,0.068322,15.885816,-50.963429)"
- style="opacity:0.5">
- <path
- id="path3416"
- transform="translate(-21.071,-112.5)"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- inkscape:connector-curvature="0" />
- </g>
- <g
- style="opacity:0.5"
- transform="matrix(0.068322,0,0,0.068322,39.885816,-50.963429)"
- id="g3418">
- <path
- inkscape:connector-curvature="0"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- transform="translate(-21.071,-112.5)"
- id="path3420" />
- </g>
- <g
- id="g3422"
- transform="matrix(0.068322,0,0,0.068322,63.885816,-50.963429)"
- style="opacity:0.5">
- <path
- id="path3424"
- transform="translate(-21.071,-112.5)"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- inkscape:connector-curvature="0" />
- </g>
- <g
- style="opacity:0.5"
- transform="matrix(0.068322,0,0,0.068322,87.885816,-50.963429)"
- id="g3426">
- <path
- inkscape:connector-curvature="0"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- transform="translate(-21.071,-112.5)"
- id="path3428" />
- </g>
-</svg>
+<svg xmlns="http://www.w3.org/2000/svg" height="20.938" width="120.4"><path d="M13.017 0l2.945 7.383L24 8.015l-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.957-7.703L2 7.97l7.932-.52zM37.017 0l2.945 7.383L48 8.015l-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.957-7.703L26 7.97l7.932-.52zM61.017 0l2.945 7.383L72 8.015l-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.957-7.703L50 7.97l7.932-.52zM85.017 0l2.945 7.383L96 8.015l-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.957-7.703L74 7.97l7.932-.52zM109.017 0l2.945 7.383 8.038.632-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.957-7.703L98 7.97l7.932-.52z" opacity=".5"/></svg> \ No newline at end of file
diff --git a/core/img/rating/s1.svg b/core/img/rating/s1.svg
index 6433544b385..230fbdb1a31 100644
--- a/core/img/rating/s1.svg
+++ b/core/img/rating/s1.svg
@@ -1,150 +1 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- height="20.937906"
- width="120.39989"
- version="1.1"
- id="svg3386"
- inkscape:version="0.91 r13725"
- sodipodi:docname="s1.svg">
- <metadata
- id="metadata3396">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <defs
- id="defs3394" />
- <sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="0"
- inkscape:pageshadow="2"
- inkscape:window-width="1301"
- inkscape:window-height="744"
- id="namedview3392"
- showgrid="false"
- inkscape:zoom="9.4269191"
- inkscape:cx="38.984104"
- inkscape:cy="18.955289"
- inkscape:window-x="65"
- inkscape:window-y="24"
- inkscape:window-maximized="1"
- inkscape:current-layer="svg3386"
- fit-margin-right="2.4"
- fit-margin-top="0"
- fit-margin-left="0"
- fit-margin-bottom="0" />
- <g
- id="g3414"
- transform="matrix(0.068322,0,0,0.068322,15.885816,-50.963429)"
- style="opacity:0.5">
- <path
- id="path3416"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- transform="translate(-21.071,-112.5)"
- inkscape:connector-curvature="0" />
- </g>
- <g
- style="opacity:0.5"
- transform="matrix(0.068322,0,0,0.068322,39.885816,-50.963429)"
- id="g3418">
- <path
- inkscape:connector-curvature="0"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- transform="translate(-21.071,-112.5)"
- id="path3420" />
- </g>
- <g
- id="g3422"
- transform="matrix(0.068322,0,0,0.068322,63.885816,-50.963429)"
- style="opacity:0.5">
- <path
- id="path3424"
- transform="translate(-21.071,-112.5)"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- inkscape:connector-curvature="0" />
- </g>
- <g
- style="opacity:0.5"
- transform="matrix(0.068322,0,0,0.068322,87.885816,-50.963429)"
- id="g3426">
- <path
- inkscape:connector-curvature="0"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- transform="translate(-21.071,-112.5)"
- id="path3428" />
- </g>
- <g
- id="g3598"
- transform="matrix(0.068322,0,0,0.068322,-6.4963717,-79.55292)">
- <path
- id="path3600"
- transform="translate(-21.071,-112.5)"
- d="m 330.36,858.43 0.002,108.06 -1.2e-4,34.0994 0,44.8919 0,55.7498 0,1.5791 -100.15676,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- inkscape:connector-curvature="0"
- style="fill:#ffcc00"
- sodipodi:nodetypes="ccccccccccc" />
- <path
- sodipodi:nodetypes="ccccccccccc"
- style="fill:#ffcc00"
- inkscape:connector-curvature="0"
- d="m 330.36,858.43 0.002,108.06 -1.2e-4,34.0994 0,44.8919 0,55.7498 0,1.5791 -100.15676,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- id="path3632"
- transform="translate(-21.071,-112.5)" />
- </g>
- <g
- style="opacity:0.5"
- id="g3628"
- transform="matrix(0.068322,0,0,0.068322,18.299536,-76.846754)">
- <path
- inkscape:connector-curvature="0"
- id="path3630"
- d="m 191.28867,713.3247 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.7499 -98.85277,-62.0789 0,-0.4454 0,-52.2072 0,-30.059 0,-52.6358 z"
- sodipodi:nodetypes="ccccccccccc" />
- </g>
- <g
- id="g3643">
- <path
- inkscape:connector-curvature="0"
- id="path3640"
- d="m -77.090424,1124.7733 43.111002,108.06 117.640004,9.2572 -89.4450037,74.392 27.5499997,114.7499 -98.852772,-62.0789 0,-0.4454 0,-52.2072 0,-30.059 0,-52.6358 z"
- sodipodi:nodetypes="ccccccccccc"
- style="opacity:0.5"
- transform="matrix(0.068322,0,0,0.068322,18.299536,-76.846754)" />
- <g
- id="g3634"
- transform="matrix(0.068322,0,0,0.068322,-8.0875596,-50.934802)">
- <path
- id="path3636"
- transform="translate(-21.071,-112.5)"
- d="m 330.36,858.43 0.002,108.06 -1.2e-4,34.0994 0,44.8919 0,55.7498 0,1.5791 -100.15676,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- inkscape:connector-curvature="0"
- style="fill:#ffcc00"
- sodipodi:nodetypes="ccccccccccc" />
- <path
- sodipodi:nodetypes="ccccccccccc"
- style="fill:#ffcc00"
- inkscape:connector-curvature="0"
- d="m 330.36,858.43 0.002,108.06 -1.2e-4,34.0994 0,44.8919 0,55.7498 0,1.5791 -100.15676,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- id="path3638"
- transform="translate(-21.071,-112.5)" />
- </g>
- </g>
-</svg>
+<svg xmlns="http://www.w3.org/2000/svg" height="20.938" width="120.4"><path d="M37.017 0l2.945 7.383L48 8.015l-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.957-7.703L26 7.97l7.932-.52zM61.017 0l2.945 7.383L72 8.015l-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.957-7.703L50 7.97l7.932-.52zM85.017 0l2.945 7.383L96 8.015l-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.957-7.703L74 7.97l7.932-.52zM109.017 0l2.945 7.383 8.038.632-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.957-7.703L98 7.97l7.932-.52z" opacity=".5"/><g fill="#fc0"><path d="M14.635-28.59v16.697L7.792-7.68l1.957-7.704-6.132-5.236 7.93-.52z"/><path d="M14.635-28.59v16.697L7.792-7.68l1.957-7.704-6.132-5.236 7.93-.52z"/></g><path d="M31.37-28.11l2.944 7.382 8.038.632-6.11 5.083 1.88 7.84-6.753-4.24v-9.249zM13.033 0l2.945 7.383 8.037.632-6.11 5.083 1.882 7.84-6.754-4.24v-9.25z" opacity=".5"/><g fill="#fc0"><path d="M13.044.03V16.724L6.2 20.938l1.957-7.704-6.13-5.236 7.93-.52z"/><path d="M13.044.03V16.724L6.2 20.938l1.957-7.704-6.13-5.236 7.93-.52z"/></g></svg> \ No newline at end of file
diff --git a/core/img/rating/s2.svg b/core/img/rating/s2.svg
index 2a8472d182b..3bb8636d5ca 100644
--- a/core/img/rating/s2.svg
+++ b/core/img/rating/s2.svg
@@ -1,142 +1 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- height="20.937906"
- width="120.39989"
- version="1.1"
- id="svg3386"
- inkscape:version="0.91 r13725"
- sodipodi:docname="s2.svg">
- <metadata
- id="metadata3396">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <defs
- id="defs3394" />
- <sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="0"
- inkscape:pageshadow="2"
- inkscape:window-width="1301"
- inkscape:window-height="744"
- id="namedview3392"
- showgrid="false"
- inkscape:zoom="9.4269191"
- inkscape:cx="38.984104"
- inkscape:cy="18.955289"
- inkscape:window-x="65"
- inkscape:window-y="24"
- inkscape:window-maximized="1"
- inkscape:current-layer="svg3386"
- fit-margin-right="2.4"
- fit-margin-top="0"
- fit-margin-left="0"
- fit-margin-bottom="0" />
- <g
- id="g3414"
- transform="matrix(0.068322,0,0,0.068322,15.885816,-50.963429)"
- style="opacity:0.5">
- <path
- id="path3416"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- transform="translate(-21.071,-112.5)"
- inkscape:connector-curvature="0" />
- </g>
- <g
- style="opacity:0.5"
- transform="matrix(0.068322,0,0,0.068322,39.885816,-50.963429)"
- id="g3418">
- <path
- inkscape:connector-curvature="0"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- transform="translate(-21.071,-112.5)"
- id="path3420" />
- </g>
- <g
- id="g3422"
- transform="matrix(0.068322,0,0,0.068322,63.885816,-50.963429)"
- style="opacity:0.5">
- <path
- id="path3424"
- transform="translate(-21.071,-112.5)"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- inkscape:connector-curvature="0" />
- </g>
- <g
- style="opacity:0.5"
- transform="matrix(0.068322,0,0,0.068322,87.885816,-50.963429)"
- id="g3426">
- <path
- inkscape:connector-curvature="0"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- transform="translate(-21.071,-112.5)"
- id="path3428" />
- </g>
- <g
- id="g3598"
- transform="matrix(0.068322,0,0,0.068322,-6.4963717,-79.55292)">
- <path
- id="path3600"
- transform="translate(-21.071,-112.5)"
- d="m 330.36,858.43 0.002,108.06 -1.2e-4,34.0994 0,44.8919 0,55.7498 0,1.5791 -100.15676,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- inkscape:connector-curvature="0"
- style="fill:#ffcc00"
- sodipodi:nodetypes="ccccccccccc" />
- <path
- sodipodi:nodetypes="ccccccccccc"
- style="fill:#ffcc00"
- inkscape:connector-curvature="0"
- d="m 330.36,858.43 0.002,108.06 -1.2e-4,34.0994 0,44.8919 0,55.7498 0,1.5791 -100.15676,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- id="path3632"
- transform="translate(-21.071,-112.5)" />
- </g>
- <g
- style="opacity:0.5"
- id="g3628"
- transform="matrix(0.068322,0,0,0.068322,18.299536,-76.846754)">
- <path
- inkscape:connector-curvature="0"
- id="path3630"
- d="m 191.28867,713.3247 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.7499 -98.85277,-62.0789 0,-0.4454 0,-52.2072 0,-30.059 0,-52.6358 z"
- sodipodi:nodetypes="ccccccccccc" />
- </g>
- <g
- id="g3795"
- transform="matrix(0.068322,0,0,0.068322,34.47137,-78.576908)">
- <path
- id="path3797"
- transform="translate(-21.071,-112.5)"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- inkscape:connector-curvature="0"
- style="fill:#ffcc00" />
- </g>
- <g
- transform="matrix(0.068322,0,0,0.068322,-8.0871839,-50.963429)"
- id="g3807">
- <path
- style="fill:#ffcc00"
- inkscape:connector-curvature="0"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- transform="translate(-21.071,-112.5)"
- id="path3809" />
- </g>
-</svg>
+<svg xmlns="http://www.w3.org/2000/svg" height="20.938" width="120.4"><path d="M37.017 0l2.945 7.383L48 8.015l-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.957-7.703L26 7.97l7.932-.52zM61.017 0l2.945 7.383L72 8.015l-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.957-7.703L50 7.97l7.932-.52zM85.017 0l2.945 7.383L96 8.015l-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.957-7.703L74 7.97l7.932-.52zM109.017 0l2.945 7.383 8.038.632-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.957-7.703L98 7.97l7.932-.52z" opacity=".5"/><g fill="#fc0"><path d="M14.635-28.59v16.697L7.792-7.68l1.957-7.704-6.132-5.236 7.93-.52z"/><path d="M14.635-28.59v16.697L7.792-7.68l1.957-7.704-6.132-5.236 7.93-.52z"/></g><path d="M31.37-28.11l2.944 7.382 8.038.632-6.11 5.083 1.88 7.84-6.753-4.24v-9.249z" opacity=".5"/><path d="M55.603-27.613l2.945 7.382 8.037.632-6.11 5.082 1.882 7.84-6.723-4.24-6.874 4.212 1.956-7.704-6.13-5.236 7.93-.52zM13.044 0l2.945 7.383 8.037.632-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.958-7.703-6.13-5.236 7.93-.52z" fill="#fc0"/></svg> \ No newline at end of file
diff --git a/core/img/rating/s3.svg b/core/img/rating/s3.svg
index f635cbd5360..b2903747cf0 100644
--- a/core/img/rating/s3.svg
+++ b/core/img/rating/s3.svg
@@ -1,190 +1 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- height="20.937906"
- width="120.39989"
- version="1.1"
- id="svg3386"
- inkscape:version="0.91 r13725"
- sodipodi:docname="s3.svg">
- <metadata
- id="metadata3396">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <defs
- id="defs3394" />
- <sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="0"
- inkscape:pageshadow="2"
- inkscape:window-width="1301"
- inkscape:window-height="744"
- id="namedview3392"
- showgrid="false"
- inkscape:zoom="9.4269191"
- inkscape:cx="38.984104"
- inkscape:cy="18.955289"
- inkscape:window-x="65"
- inkscape:window-y="24"
- inkscape:window-maximized="1"
- inkscape:current-layer="svg3386"
- fit-margin-right="2.4"
- fit-margin-top="0"
- fit-margin-left="0"
- fit-margin-bottom="0" />
- <g
- style="opacity:0.5"
- transform="matrix(0.068322,0,0,0.068322,39.885816,-50.963429)"
- id="g3418">
- <path
- inkscape:connector-curvature="0"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- transform="translate(-21.071,-112.5)"
- id="path3420" />
- </g>
- <g
- id="g3422"
- transform="matrix(0.068322,0,0,0.068322,63.885816,-50.963429)"
- style="opacity:0.5">
- <path
- id="path3424"
- transform="translate(-21.071,-112.5)"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- inkscape:connector-curvature="0" />
- </g>
- <g
- style="opacity:0.5"
- transform="matrix(0.068322,0,0,0.068322,87.885816,-50.963429)"
- id="g3426">
- <path
- inkscape:connector-curvature="0"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- transform="translate(-21.071,-112.5)"
- id="path3428" />
- </g>
- <g
- id="g3598"
- transform="matrix(0.068322,0,0,0.068322,-6.4963717,-79.55292)">
- <path
- id="path3600"
- transform="translate(-21.071,-112.5)"
- d="m 330.36,858.43 0.002,108.06 -1.2e-4,34.0994 0,44.8919 0,55.7498 0,1.5791 -100.15676,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- inkscape:connector-curvature="0"
- style="fill:#ffcc00"
- sodipodi:nodetypes="ccccccccccc" />
- <path
- sodipodi:nodetypes="ccccccccccc"
- style="fill:#ffcc00"
- inkscape:connector-curvature="0"
- d="m 330.36,858.43 0.002,108.06 -1.2e-4,34.0994 0,44.8919 0,55.7498 0,1.5791 -100.15676,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- id="path3632"
- transform="translate(-21.071,-112.5)" />
- </g>
- <g
- style="opacity:0.5"
- id="g3628"
- transform="matrix(0.068322,0,0,0.068322,18.299536,-76.846754)">
- <path
- inkscape:connector-curvature="0"
- id="path3630"
- d="m 191.28867,713.3247 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.7499 -98.85277,-62.0789 0,-0.4454 0,-52.2072 0,-30.059 0,-52.6358 z"
- sodipodi:nodetypes="ccccccccccc" />
- </g>
- <g
- id="g3643"
- transform="translate(-23.019185,-30.869046)">
- <path
- inkscape:connector-curvature="0"
- id="path3640"
- d="m -77.090424,1124.7733 43.111002,108.06 117.640004,9.2572 -89.4450037,74.392 27.5499997,114.7499 -98.852772,-62.0789 0,-0.4454 0,-52.2072 0,-30.059 0,-52.6358 z"
- sodipodi:nodetypes="ccccccccccc"
- style="opacity:0.5"
- transform="matrix(0.068322,0,0,0.068322,18.299536,-76.846754)" />
- <g
- id="g3634"
- transform="matrix(0.068322,0,0,0.068322,-8.0875596,-50.934802)">
- <path
- id="path3636"
- transform="translate(-21.071,-112.5)"
- d="m 330.36,858.43 0.002,108.06 -1.2e-4,34.0994 0,44.8919 0,55.7498 0,1.5791 -100.15676,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- inkscape:connector-curvature="0"
- style="fill:#ffcc00"
- sodipodi:nodetypes="ccccccccccc" />
- <path
- sodipodi:nodetypes="ccccccccccc"
- style="fill:#ffcc00"
- inkscape:connector-curvature="0"
- d="m 330.36,858.43 0.002,108.06 -1.2e-4,34.0994 0,44.8919 0,55.7498 0,1.5791 -100.15676,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- id="path3638"
- transform="translate(-21.071,-112.5)" />
- </g>
- </g>
- <g
- id="g3795"
- transform="matrix(0.068322,0,0,0.068322,34.47137,-78.576908)">
- <path
- id="path3797"
- transform="translate(-21.071,-112.5)"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- inkscape:connector-curvature="0"
- style="fill:#ffcc00" />
- </g>
- <g
- transform="matrix(0.068322,0,0,0.068322,-8.0871839,-50.963429)"
- id="g3807">
- <path
- style="fill:#ffcc00"
- inkscape:connector-curvature="0"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- transform="translate(-21.071,-112.5)"
- id="path3809" />
- </g>
- <g
- transform="translate(23.973367,2.324588e-7)"
- id="g3830">
- <path
- transform="matrix(0.068322,0,0,0.068322,18.299536,-76.846754)"
- style="opacity:0.5"
- sodipodi:nodetypes="ccccccccccc"
- d="m -77.090424,1124.7733 43.111002,108.06 117.640004,9.2572 -89.4450037,74.392 27.5499997,114.7499 -98.852772,-62.0789 0,-0.4454 0,-52.2072 0,-30.059 0,-52.6358 z"
- id="path3832"
- inkscape:connector-curvature="0" />
- <g
- transform="matrix(0.068322,0,0,0.068322,-8.0875596,-50.934802)"
- id="g3834">
- <path
- sodipodi:nodetypes="ccccccccccc"
- style="fill:#ffcc00"
- inkscape:connector-curvature="0"
- d="m 330.36,858.43 0.002,108.06 -1.2e-4,34.0994 0,44.8919 0,55.7498 0,1.5791 -100.15676,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- transform="translate(-21.071,-112.5)"
- id="path3836" />
- <path
- transform="translate(-21.071,-112.5)"
- id="path3838"
- d="m 330.36,858.43 0.002,108.06 -1.2e-4,34.0994 0,44.8919 0,55.7498 0,1.5791 -100.15676,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- inkscape:connector-curvature="0"
- style="fill:#ffcc00"
- sodipodi:nodetypes="ccccccccccc" />
- </g>
- </g>
-</svg>
+<svg xmlns="http://www.w3.org/2000/svg" height="20.938" width="120.4"><path d="M61.017 0l2.945 7.383L72 8.015l-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.957-7.703L50 7.97l7.932-.52zM85.017 0l2.945 7.383L96 8.015l-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.957-7.703L74 7.97l7.932-.52zM109.017 0l2.945 7.383 8.038.632-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.957-7.703L98 7.97l7.932-.52z" opacity=".5"/><g fill="#fc0"><path d="M14.635-28.59v16.697L7.792-7.68l1.957-7.704-6.132-5.236 7.93-.52z"/><path d="M14.635-28.59v16.697L7.792-7.68l1.957-7.704-6.132-5.236 7.93-.52z"/></g><path d="M31.37-28.11l2.944 7.382 8.038.632-6.11 5.083 1.88 7.84-6.753-4.24v-9.249zM-9.987-30.87l2.946 7.384 8.036.632-6.11 5.083 1.88 7.84-6.752-4.242v-9.248z" opacity=".5"/><g fill="#fc0"><path d="M-9.976-30.84v16.695l-6.842 4.213 1.956-7.705-6.13-5.236 7.93-.52z"/><path d="M-9.976-30.84v16.695l-6.842 4.213 1.956-7.705-6.13-5.236 7.93-.52z"/></g><path d="M55.603-27.613l2.945 7.382 8.037.632-6.11 5.082 1.882 7.84-6.723-4.24-6.874 4.212 1.956-7.704-6.13-5.236 7.93-.52zM13.044 0l2.945 7.383 8.037.632-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.958-7.703-6.13-5.236 7.93-.52z" fill="#fc0"/><g><path d="M37.006 0l2.945 7.383 8.04.632-6.112 5.083 1.882 7.84-6.754-4.24v-9.25z" opacity=".5"/><g fill="#fc0"><path d="M37.017.03V16.724l-6.843 4.213 1.957-7.704L26 7.998l7.932-.52z"/><path d="M37.017.03V16.724l-6.843 4.213 1.957-7.704L26 7.998l7.932-.52z"/></g></g></svg> \ No newline at end of file
diff --git a/core/img/rating/s4.svg b/core/img/rating/s4.svg
index c64cf9059b1..18c48698f88 100644
--- a/core/img/rating/s4.svg
+++ b/core/img/rating/s4.svg
@@ -1,190 +1 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- height="20.937906"
- width="120.39989"
- version="1.1"
- id="svg3386"
- inkscape:version="0.91 r13725"
- sodipodi:docname="s4.svg">
- <metadata
- id="metadata3396">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <defs
- id="defs3394" />
- <sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="0"
- inkscape:pageshadow="2"
- inkscape:window-width="1301"
- inkscape:window-height="744"
- id="namedview3392"
- showgrid="false"
- inkscape:zoom="9.4269191"
- inkscape:cx="38.984104"
- inkscape:cy="18.955289"
- inkscape:window-x="65"
- inkscape:window-y="24"
- inkscape:window-maximized="1"
- inkscape:current-layer="svg3386"
- fit-margin-right="2.4"
- fit-margin-top="0"
- fit-margin-left="0"
- fit-margin-bottom="0" />
- <g
- style="opacity:0.5"
- transform="matrix(0.068322,0,0,0.068322,39.885816,-50.963429)"
- id="g3418">
- <path
- inkscape:connector-curvature="0"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- transform="translate(-21.071,-112.5)"
- id="path3420" />
- </g>
- <g
- id="g3422"
- transform="matrix(0.068322,0,0,0.068322,63.885816,-50.963429)"
- style="opacity:0.5">
- <path
- id="path3424"
- transform="translate(-21.071,-112.5)"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- inkscape:connector-curvature="0" />
- </g>
- <g
- style="opacity:0.5"
- transform="matrix(0.068322,0,0,0.068322,87.885816,-50.963429)"
- id="g3426">
- <path
- inkscape:connector-curvature="0"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- transform="translate(-21.071,-112.5)"
- id="path3428" />
- </g>
- <g
- id="g3598"
- transform="matrix(0.068322,0,0,0.068322,-6.4963717,-79.55292)">
- <path
- id="path3600"
- transform="translate(-21.071,-112.5)"
- d="m 330.36,858.43 0.002,108.06 -1.2e-4,34.0994 0,44.8919 0,55.7498 0,1.5791 -100.15676,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- inkscape:connector-curvature="0"
- style="fill:#ffcc00"
- sodipodi:nodetypes="ccccccccccc" />
- <path
- sodipodi:nodetypes="ccccccccccc"
- style="fill:#ffcc00"
- inkscape:connector-curvature="0"
- d="m 330.36,858.43 0.002,108.06 -1.2e-4,34.0994 0,44.8919 0,55.7498 0,1.5791 -100.15676,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- id="path3632"
- transform="translate(-21.071,-112.5)" />
- </g>
- <g
- style="opacity:0.5"
- id="g3628"
- transform="matrix(0.068322,0,0,0.068322,18.299536,-76.846754)">
- <path
- inkscape:connector-curvature="0"
- id="path3630"
- d="m 191.28867,713.3247 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.7499 -98.85277,-62.0789 0,-0.4454 0,-52.2072 0,-30.059 0,-52.6358 z"
- sodipodi:nodetypes="ccccccccccc" />
- </g>
- <g
- id="g3643"
- transform="translate(-23.019185,-30.869046)">
- <path
- inkscape:connector-curvature="0"
- id="path3640"
- d="m -77.090424,1124.7733 43.111002,108.06 117.640004,9.2572 -89.4450037,74.392 27.5499997,114.7499 -98.852772,-62.0789 0,-0.4454 0,-52.2072 0,-30.059 0,-52.6358 z"
- sodipodi:nodetypes="ccccccccccc"
- style="opacity:0.5"
- transform="matrix(0.068322,0,0,0.068322,18.299536,-76.846754)" />
- <g
- id="g3634"
- transform="matrix(0.068322,0,0,0.068322,-8.0875596,-50.934802)">
- <path
- id="path3636"
- transform="translate(-21.071,-112.5)"
- d="m 330.36,858.43 0.002,108.06 -1.2e-4,34.0994 0,44.8919 0,55.7498 0,1.5791 -100.15676,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- inkscape:connector-curvature="0"
- style="fill:#ffcc00"
- sodipodi:nodetypes="ccccccccccc" />
- <path
- sodipodi:nodetypes="ccccccccccc"
- style="fill:#ffcc00"
- inkscape:connector-curvature="0"
- d="m 330.36,858.43 0.002,108.06 -1.2e-4,34.0994 0,44.8919 0,55.7498 0,1.5791 -100.15676,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- id="path3638"
- transform="translate(-21.071,-112.5)" />
- </g>
- </g>
- <g
- id="g3795"
- transform="matrix(0.068322,0,0,0.068322,15.885816,-50.963429)">
- <path
- id="path3797"
- transform="translate(-21.071,-112.5)"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- inkscape:connector-curvature="0"
- style="fill:#ffcc00" />
- </g>
- <g
- transform="matrix(0.068322,0,0,0.068322,-8.0871839,-50.963429)"
- id="g3807">
- <path
- style="fill:#ffcc00"
- inkscape:connector-curvature="0"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- transform="translate(-21.071,-112.5)"
- id="path3809" />
- </g>
- <g
- transform="translate(43.598018,-24.822532)"
- id="g3830">
- <path
- transform="matrix(0.068322,0,0,0.068322,18.299536,-76.846754)"
- style="opacity:0.5"
- sodipodi:nodetypes="ccccccccccc"
- d="m -77.090424,1124.7733 43.111002,108.06 117.640004,9.2572 -89.4450037,74.392 27.5499997,114.7499 -98.852772,-62.0789 0,-0.4454 0,-52.2072 0,-30.059 0,-52.6358 z"
- id="path3832"
- inkscape:connector-curvature="0" />
- <g
- transform="matrix(0.068322,0,0,0.068322,-8.0875596,-50.934802)"
- id="g3834">
- <path
- sodipodi:nodetypes="ccccccccccc"
- style="fill:#ffcc00"
- inkscape:connector-curvature="0"
- d="m 330.36,858.43 0.002,108.06 -1.2e-4,34.0994 0,44.8919 0,55.7498 0,1.5791 -100.15676,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- transform="translate(-21.071,-112.5)"
- id="path3836" />
- <path
- transform="translate(-21.071,-112.5)"
- id="path3838"
- d="m 330.36,858.43 0.002,108.06 -1.2e-4,34.0994 0,44.8919 0,55.7498 0,1.5791 -100.15676,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- inkscape:connector-curvature="0"
- style="fill:#ffcc00"
- sodipodi:nodetypes="ccccccccccc" />
- </g>
- </g>
-</svg>
+<svg xmlns="http://www.w3.org/2000/svg" height="20.938" width="120.4"><path d="M61.017 0l2.945 7.383L72 8.015l-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.957-7.703L50 7.97l7.932-.52zM85.017 0l2.945 7.383L96 8.015l-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.957-7.703L74 7.97l7.932-.52zM109.017 0l2.945 7.383 8.038.632-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.957-7.703L98 7.97l7.932-.52z" opacity=".5"/><g fill="#fc0"><path d="M14.635-28.59v16.697L7.792-7.68l1.957-7.704-6.132-5.236 7.93-.52z"/><path d="M14.635-28.59v16.697L7.792-7.68l1.957-7.704-6.132-5.236 7.93-.52z"/></g><path d="M31.37-28.11l2.944 7.382 8.038.632-6.11 5.083 1.88 7.84-6.753-4.24v-9.249zM-9.987-30.87l2.946 7.384 8.036.632-6.11 5.083 1.88 7.84-6.752-4.242v-9.248z" opacity=".5"/><g fill="#fc0"><path d="M-9.976-30.84v16.695l-6.842 4.213 1.956-7.705-6.13-5.236 7.93-.52z"/><path d="M-9.976-30.84v16.695l-6.842 4.213 1.956-7.705-6.13-5.236 7.93-.52z"/></g><path d="M37.017 0l2.945 7.383L48 8.015l-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.957-7.703L26 7.97l7.932-.52zM13.044 0l2.945 7.383 8.037.632-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.958-7.703-6.13-5.236 7.93-.52z" fill="#fc0"/><g><path d="M56.63-24.823l2.946 7.383 8.037.633-6.11 5.082 1.882 7.84-6.754-4.24v-9.248z" opacity=".5"/><g fill="#fc0"><path d="M56.642-24.794V-8.098L49.8-3.885l1.955-7.704-6.13-5.235 7.93-.52z"/><path d="M56.642-24.794V-8.098L49.8-3.885l1.955-7.704-6.13-5.235 7.93-.52z"/></g></g></svg> \ No newline at end of file
diff --git a/core/img/rating/s5.svg b/core/img/rating/s5.svg
index 61dcaceafc0..b91b3462fc2 100644
--- a/core/img/rating/s5.svg
+++ b/core/img/rating/s5.svg
@@ -1,123 +1 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- height="20.937906"
- width="120.39989"
- version="1.1"
- id="svg3386"
- inkscape:version="0.91 r13725"
- sodipodi:docname="s5.svg">
- <metadata
- id="metadata3396">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <defs
- id="defs3394" />
- <sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="0"
- inkscape:pageshadow="2"
- inkscape:window-width="1301"
- inkscape:window-height="744"
- id="namedview3392"
- showgrid="false"
- inkscape:zoom="9.4269191"
- inkscape:cx="72.929447"
- inkscape:cy="23.198457"
- inkscape:window-x="65"
- inkscape:window-y="24"
- inkscape:window-maximized="1"
- inkscape:current-layer="svg3386"
- fit-margin-right="2.4"
- fit-margin-top="0"
- fit-margin-left="0"
- fit-margin-bottom="0" />
- <g
- id="g3422"
- transform="matrix(0.068322,0,0,0.068322,63.885816,-50.963429)"
- style="opacity:0.5">
- <path
- id="path3424"
- transform="translate(-21.071,-112.5)"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- inkscape:connector-curvature="0" />
- </g>
- <g
- style="opacity:0.5"
- transform="matrix(0.068322,0,0,0.068322,87.885816,-50.963429)"
- id="g3426">
- <path
- inkscape:connector-curvature="0"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- transform="translate(-21.071,-112.5)"
- id="path3428" />
- </g>
- <g
- id="g3795"
- transform="matrix(0.068322,0,0,0.068322,15.885816,-50.963429)">
- <path
- id="path3797"
- transform="translate(-21.071,-112.5)"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- inkscape:connector-curvature="0"
- style="fill:#ffcc00" />
- </g>
- <g
- transform="matrix(0.068322,0,0,0.068322,-8.0871839,-50.963429)"
- id="g3807">
- <path
- style="fill:#ffcc00"
- inkscape:connector-curvature="0"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- transform="translate(-21.071,-112.5)"
- id="path3809" />
- </g>
- <g
- transform="translate(47.973367,2.324588e-7)"
- id="g3830">
- <path
- transform="matrix(0.068322,0,0,0.068322,18.299536,-76.846754)"
- style="opacity:0.5"
- sodipodi:nodetypes="ccccccccccc"
- d="m -77.090424,1124.7733 43.111002,108.06 117.640004,9.2572 -89.4450037,74.392 27.5499997,114.7499 -98.852772,-62.0789 0,-0.4454 0,-52.2072 0,-30.059 0,-52.6358 z"
- id="path3832"
- inkscape:connector-curvature="0" />
- <g
- transform="matrix(0.068322,0,0,0.068322,-8.0875596,-50.934802)"
- id="g3834">
- <path
- sodipodi:nodetypes="ccccccccccc"
- style="fill:#ffcc00"
- inkscape:connector-curvature="0"
- d="m 330.36,858.43 0.002,108.06 -1.2e-4,34.0994 0,44.8919 0,55.7498 0,1.5791 -100.15676,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- transform="translate(-21.071,-112.5)"
- id="path3836" />
- <path
- transform="translate(-21.071,-112.5)"
- id="path3838"
- d="m 330.36,858.43 0.002,108.06 -1.2e-4,34.0994 0,44.8919 0,55.7498 0,1.5791 -100.15676,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- inkscape:connector-curvature="0"
- style="fill:#ffcc00"
- sodipodi:nodetypes="ccccccccccc" />
- </g>
- </g>
-</svg>
+<svg xmlns="http://www.w3.org/2000/svg" height="20.938" width="120.4"><path d="M85.017 0l2.945 7.383L96 8.015l-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.957-7.703L74 7.97l7.932-.52zM109.017 0l2.945 7.383 8.038.632-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.957-7.703L98 7.97l7.932-.52z" opacity=".5"/><path d="M37.017 0l2.945 7.383L48 8.015l-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.957-7.703L26 7.97l7.932-.52zM13.044 0l2.945 7.383 8.037.632-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.958-7.703-6.13-5.236 7.93-.52z" fill="#fc0"/><path d="M61.006 0l2.945 7.383 8.04.632-6.112 5.083 1.882 7.84-6.754-4.24v-9.25z" opacity=".5"/><g fill="#fc0"><path d="M61.017.03V16.724l-6.843 4.213 1.957-7.704L50 7.998l7.932-.52z"/><path d="M61.017.03V16.724l-6.843 4.213 1.957-7.704L50 7.998l7.932-.52z"/></g></svg> \ No newline at end of file
diff --git a/core/img/rating/s6.svg b/core/img/rating/s6.svg
index ac18dd9f8a8..2ff92a27d74 100644
--- a/core/img/rating/s6.svg
+++ b/core/img/rating/s6.svg
@@ -1,104 +1 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- height="20.937906"
- width="120.39989"
- version="1.1"
- id="svg3386"
- inkscape:version="0.91 r13725"
- sodipodi:docname="s6.svg">
- <metadata
- id="metadata3396">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <defs
- id="defs3394" />
- <sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="0"
- inkscape:pageshadow="2"
- inkscape:window-width="1301"
- inkscape:window-height="744"
- id="namedview3392"
- showgrid="false"
- inkscape:zoom="9.4269191"
- inkscape:cx="72.929447"
- inkscape:cy="23.198457"
- inkscape:window-x="65"
- inkscape:window-y="24"
- inkscape:window-maximized="1"
- inkscape:current-layer="svg3386"
- fit-margin-right="2.4"
- fit-margin-top="0"
- fit-margin-left="0"
- fit-margin-bottom="0" />
- <g
- id="g3422"
- transform="matrix(0.068322,0,0,0.068322,63.885816,-50.963429)"
- style="opacity:0.5">
- <path
- id="path3424"
- transform="translate(-21.071,-112.5)"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- inkscape:connector-curvature="0" />
- </g>
- <g
- style="opacity:0.5"
- transform="matrix(0.068322,0,0,0.068322,87.885816,-50.963429)"
- id="g3426">
- <path
- inkscape:connector-curvature="0"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- transform="translate(-21.071,-112.5)"
- id="path3428" />
- </g>
- <g
- id="g3795"
- transform="matrix(0.068322,0,0,0.068322,15.885816,-50.963429)">
- <path
- id="path3797"
- transform="translate(-21.071,-112.5)"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- inkscape:connector-curvature="0"
- style="fill:#ffcc00" />
- </g>
- <g
- transform="matrix(0.068322,0,0,0.068322,-8.0871839,-50.963429)"
- id="g3807">
- <path
- style="fill:#ffcc00"
- inkscape:connector-curvature="0"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- transform="translate(-21.071,-112.5)"
- id="path3809" />
- </g>
- <g
- transform="matrix(0.068322,0,0,0.068322,39.885816,-50.963429)"
- id="g3897">
- <path
- style="fill:#ffcc00"
- inkscape:connector-curvature="0"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- transform="translate(-21.071,-112.5)"
- id="path3899" />
- </g>
-</svg>
+<svg xmlns="http://www.w3.org/2000/svg" height="20.938" width="120.4"><path d="M85.017 0l2.945 7.383L96 8.015l-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.957-7.703L74 7.97l7.932-.52zM109.017 0l2.945 7.383 8.038.632-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.957-7.703L98 7.97l7.932-.52z" opacity=".5"/><path d="M37.017 0l2.945 7.383L48 8.015l-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.957-7.703L26 7.97l7.932-.52zM13.044 0l2.945 7.383 8.037.632-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.958-7.703-6.13-5.236 7.93-.52zM61.017 0l2.945 7.383L72 8.015l-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.957-7.703L50 7.97l7.932-.52z" fill="#fc0"/></svg> \ No newline at end of file
diff --git a/core/img/rating/s7.svg b/core/img/rating/s7.svg
index 2a877ded108..4ed9fcac9e5 100644
--- a/core/img/rating/s7.svg
+++ b/core/img/rating/s7.svg
@@ -1,123 +1 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- height="20.937906"
- width="120.39989"
- version="1.1"
- id="svg3386"
- inkscape:version="0.91 r13725"
- sodipodi:docname="s7.svg">
- <metadata
- id="metadata3396">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <defs
- id="defs3394" />
- <sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="0"
- inkscape:pageshadow="2"
- inkscape:window-width="1301"
- inkscape:window-height="744"
- id="namedview3392"
- showgrid="false"
- inkscape:zoom="9.4269191"
- inkscape:cx="72.929447"
- inkscape:cy="23.198457"
- inkscape:window-x="65"
- inkscape:window-y="24"
- inkscape:window-maximized="1"
- inkscape:current-layer="svg3386"
- fit-margin-right="2.4"
- fit-margin-top="0"
- fit-margin-left="0"
- fit-margin-bottom="0" />
- <g
- style="opacity:0.5"
- transform="matrix(0.068322,0,0,0.068322,87.885816,-50.963429)"
- id="g3426">
- <path
- inkscape:connector-curvature="0"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- transform="translate(-21.071,-112.5)"
- id="path3428" />
- </g>
- <g
- id="g3795"
- transform="matrix(0.068322,0,0,0.068322,15.885816,-50.963429)">
- <path
- id="path3797"
- transform="translate(-21.071,-112.5)"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- inkscape:connector-curvature="0"
- style="fill:#ffcc00" />
- </g>
- <g
- transform="matrix(0.068322,0,0,0.068322,-8.0871839,-50.963429)"
- id="g3807">
- <path
- style="fill:#ffcc00"
- inkscape:connector-curvature="0"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- transform="translate(-21.071,-112.5)"
- id="path3809" />
- </g>
- <g
- transform="translate(71.973367,2.324588e-7)"
- id="g3830">
- <path
- transform="matrix(0.068322,0,0,0.068322,18.299536,-76.846754)"
- style="opacity:0.5"
- sodipodi:nodetypes="ccccccccccc"
- d="m -77.090424,1124.7733 43.111002,108.06 117.640004,9.2572 -89.4450037,74.392 27.5499997,114.7499 -98.852772,-62.0789 0,-0.4454 0,-52.2072 0,-30.059 0,-52.6358 z"
- id="path3832"
- inkscape:connector-curvature="0" />
- <g
- transform="matrix(0.068322,0,0,0.068322,-8.0875596,-50.934802)"
- id="g3834">
- <path
- sodipodi:nodetypes="ccccccccccc"
- style="fill:#ffcc00"
- inkscape:connector-curvature="0"
- d="m 330.36,858.43 0.002,108.06 -1.2e-4,34.0994 0,44.8919 0,55.7498 0,1.5791 -100.15676,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- transform="translate(-21.071,-112.5)"
- id="path3836" />
- <path
- transform="translate(-21.071,-112.5)"
- id="path3838"
- d="m 330.36,858.43 0.002,108.06 -1.2e-4,34.0994 0,44.8919 0,55.7498 0,1.5791 -100.15676,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- inkscape:connector-curvature="0"
- style="fill:#ffcc00"
- sodipodi:nodetypes="ccccccccccc" />
- </g>
- </g>
- <g
- transform="matrix(0.068322,0,0,0.068322,39.885816,-50.963429)"
- id="g3897">
- <path
- style="fill:#ffcc00"
- inkscape:connector-curvature="0"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- transform="translate(-21.071,-112.5)"
- id="path3899" />
- </g>
-</svg>
+<svg xmlns="http://www.w3.org/2000/svg" height="20.938" width="120.4"><path d="M109.017 0l2.945 7.383 8.038.632-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.957-7.703L98 7.97l7.932-.52z" opacity=".5"/><path d="M37.017 0l2.945 7.383L48 8.015l-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.957-7.703L26 7.97l7.932-.52zM13.044 0l2.945 7.383 8.037.632-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.958-7.703-6.13-5.236 7.93-.52z" fill="#fc0"/><path d="M85.006 0l2.945 7.383 8.04.632-6.112 5.083 1.882 7.84-6.754-4.24v-9.25z" opacity=".5"/><g fill="#fc0"><path d="M85.017.03V16.724l-6.843 4.213 1.957-7.704L74 7.998l7.932-.52z"/><path d="M85.017.03V16.724l-6.843 4.213 1.957-7.704L74 7.998l7.932-.52z"/></g><g><path d="M61.017 0l2.945 7.383L72 8.015l-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.957-7.703L50 7.97l7.932-.52z" fill="#fc0"/></g></svg> \ No newline at end of file
diff --git a/core/img/rating/s8.svg b/core/img/rating/s8.svg
index de2ef87fb28..9aa6fa00622 100644
--- a/core/img/rating/s8.svg
+++ b/core/img/rating/s8.svg
@@ -1,133 +1 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- height="20.937906"
- width="120.39989"
- version="1.1"
- id="svg3386"
- inkscape:version="0.91 r13725"
- sodipodi:docname="s8.svg">
- <metadata
- id="metadata3396">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <defs
- id="defs3394" />
- <sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="0"
- inkscape:pageshadow="2"
- inkscape:window-width="1301"
- inkscape:window-height="744"
- id="namedview3392"
- showgrid="false"
- inkscape:zoom="9.4269191"
- inkscape:cx="72.929447"
- inkscape:cy="23.198457"
- inkscape:window-x="65"
- inkscape:window-y="24"
- inkscape:window-maximized="1"
- inkscape:current-layer="svg3386"
- fit-margin-right="2.4"
- fit-margin-top="0"
- fit-margin-left="0"
- fit-margin-bottom="0" />
- <g
- style="opacity:0.5"
- transform="matrix(0.068322,0,0,0.068322,87.885816,-50.963429)"
- id="g3426">
- <path
- inkscape:connector-curvature="0"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- transform="translate(-21.071,-112.5)"
- id="path3428" />
- </g>
- <g
- id="g3795"
- transform="matrix(0.068322,0,0,0.068322,15.885816,-50.963429)">
- <path
- id="path3797"
- transform="translate(-21.071,-112.5)"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- inkscape:connector-curvature="0"
- style="fill:#ffcc00" />
- </g>
- <g
- transform="matrix(0.068322,0,0,0.068322,-8.0871839,-50.963429)"
- id="g3807">
- <path
- style="fill:#ffcc00"
- inkscape:connector-curvature="0"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- transform="translate(-21.071,-112.5)"
- id="path3809" />
- </g>
- <g
- transform="translate(77.595564,-29.808254)"
- id="g3830">
- <path
- transform="matrix(0.068322,0,0,0.068322,18.299536,-76.846754)"
- style="opacity:0.5"
- sodipodi:nodetypes="ccccccccccc"
- d="m -77.090424,1124.7733 43.111002,108.06 117.640004,9.2572 -89.4450037,74.392 27.5499997,114.7499 -98.852772,-62.0789 0,-0.4454 0,-52.2072 0,-30.059 0,-52.6358 z"
- id="path3832"
- inkscape:connector-curvature="0" />
- <g
- transform="matrix(0.068322,0,0,0.068322,-8.0875596,-50.934802)"
- id="g3834">
- <path
- sodipodi:nodetypes="ccccccccccc"
- style="fill:#ffcc00"
- inkscape:connector-curvature="0"
- d="m 330.36,858.43 0.002,108.06 -1.2e-4,34.0994 0,44.8919 0,55.7498 0,1.5791 -100.15676,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- transform="translate(-21.071,-112.5)"
- id="path3836" />
- <path
- transform="translate(-21.071,-112.5)"
- id="path3838"
- d="m 330.36,858.43 0.002,108.06 -1.2e-4,34.0994 0,44.8919 0,55.7498 0,1.5791 -100.15676,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- inkscape:connector-curvature="0"
- style="fill:#ffcc00"
- sodipodi:nodetypes="ccccccccccc" />
- </g>
- </g>
- <g
- transform="matrix(0.068322,0,0,0.068322,39.885816,-50.963429)"
- id="g3897">
- <path
- style="fill:#ffcc00"
- inkscape:connector-curvature="0"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- transform="translate(-21.071,-112.5)"
- id="path3899" />
- </g>
- <g
- id="g3939"
- transform="matrix(0.068322,0,0,0.068322,63.885816,-50.963429)">
- <path
- id="path3941"
- transform="translate(-21.071,-112.5)"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- inkscape:connector-curvature="0"
- style="fill:#ffcc00" />
- </g>
-</svg>
+<svg xmlns="http://www.w3.org/2000/svg" height="20.938" width="120.4"><path d="M109.017 0l2.945 7.383 8.038.632-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.957-7.703L98 7.97l7.932-.52z" opacity=".5"/><path d="M37.017 0l2.945 7.383L48 8.015l-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.957-7.703L26 7.97l7.932-.52zM13.044 0l2.945 7.383 8.037.632-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.958-7.703-6.13-5.236 7.93-.52z" fill="#fc0"/><path d="M90.628-29.808l2.946 7.383 8.037.632-6.11 5.083 1.882 7.84-6.754-4.242v-9.246z" opacity=".5"/><g fill="#fc0"><path d="M90.64-29.78v16.697L83.795-8.87l1.957-7.704-6.13-5.236 7.93-.52z"/><path d="M90.64-29.78v16.697L83.795-8.87l1.957-7.704-6.13-5.236 7.93-.52z"/></g><path d="M61.017 0l2.945 7.383L72 8.015l-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.957-7.703L50 7.97l7.932-.52z" fill="#fc0"/><g><path d="M85.017 0l2.945 7.383L96 8.015l-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.957-7.703L74 7.97l7.932-.52z" fill="#fc0"/></g></svg> \ No newline at end of file
diff --git a/core/img/rating/s9.svg b/core/img/rating/s9.svg
index 4e93283d0f3..f72b5c86490 100644
--- a/core/img/rating/s9.svg
+++ b/core/img/rating/s9.svg
@@ -1,123 +1 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- height="20.937906"
- width="120.39989"
- version="1.1"
- id="svg3386"
- inkscape:version="0.91 r13725"
- sodipodi:docname="s9.svg">
- <metadata
- id="metadata3396">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <defs
- id="defs3394" />
- <sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="0"
- inkscape:pageshadow="2"
- inkscape:window-width="1301"
- inkscape:window-height="744"
- id="namedview3392"
- showgrid="false"
- inkscape:zoom="9.4269191"
- inkscape:cx="72.929447"
- inkscape:cy="23.198457"
- inkscape:window-x="65"
- inkscape:window-y="24"
- inkscape:window-maximized="1"
- inkscape:current-layer="svg3386"
- fit-margin-right="2.4"
- fit-margin-top="0"
- fit-margin-left="0"
- fit-margin-bottom="0" />
- <g
- id="g3795"
- transform="matrix(0.068322,0,0,0.068322,15.885816,-50.963429)">
- <path
- id="path3797"
- transform="translate(-21.071,-112.5)"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- inkscape:connector-curvature="0"
- style="fill:#ffcc00" />
- </g>
- <g
- transform="matrix(0.068322,0,0,0.068322,-8.0871839,-50.963429)"
- id="g3807">
- <path
- style="fill:#ffcc00"
- inkscape:connector-curvature="0"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- transform="translate(-21.071,-112.5)"
- id="path3809" />
- </g>
- <g
- transform="translate(95.973367,2.324588e-7)"
- id="g3830">
- <path
- transform="matrix(0.068322,0,0,0.068322,18.299536,-76.846754)"
- style="opacity:0.5"
- sodipodi:nodetypes="ccccccccccc"
- d="m -77.090424,1124.7733 43.111002,108.06 117.640004,9.2572 -89.4450037,74.392 27.5499997,114.7499 -98.852772,-62.0789 0,-0.4454 0,-52.2072 0,-30.059 0,-52.6358 z"
- id="path3832"
- inkscape:connector-curvature="0" />
- <g
- transform="matrix(0.068322,0,0,0.068322,-8.0875596,-50.934802)"
- id="g3834">
- <path
- sodipodi:nodetypes="ccccccccccc"
- style="fill:#ffcc00"
- inkscape:connector-curvature="0"
- d="m 330.36,858.43 0.002,108.06 -1.2e-4,34.0994 0,44.8919 0,55.7498 0,1.5791 -100.15676,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- transform="translate(-21.071,-112.5)"
- id="path3836" />
- <path
- transform="translate(-21.071,-112.5)"
- id="path3838"
- d="m 330.36,858.43 0.002,108.06 -1.2e-4,34.0994 0,44.8919 0,55.7498 0,1.5791 -100.15676,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- inkscape:connector-curvature="0"
- style="fill:#ffcc00"
- sodipodi:nodetypes="ccccccccccc" />
- </g>
- </g>
- <g
- transform="matrix(0.068322,0,0,0.068322,39.885816,-50.963429)"
- id="g3897">
- <path
- style="fill:#ffcc00"
- inkscape:connector-curvature="0"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- transform="translate(-21.071,-112.5)"
- id="path3899" />
- </g>
- <g
- id="g3939"
- transform="matrix(0.068322,0,0,0.068322,63.885816,-50.963429)">
- <path
- id="path3941"
- transform="translate(-21.071,-112.5)"
- d="m 330.36,858.43 43.111,108.06 117.64,9.2572 -89.445,74.392 27.55,114.75 -98.391,-62.079 -100.62,61.66 28.637,-112.76 -89.734,-76.638 116.09,-7.6094 z"
- inkscape:connector-curvature="0"
- style="fill:#ffcc00" />
- </g>
-</svg>
+<svg xmlns="http://www.w3.org/2000/svg" height="20.938" width="120.4"><path d="M37.017 0l2.945 7.383L48 8.015l-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.957-7.703L26 7.97l7.932-.52zM13.044 0l2.945 7.383 8.037.632-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.958-7.703-6.13-5.236 7.93-.52z" fill="#fc0"/><path d="M109.006 0l2.945 7.383 8.04.632-6.112 5.083 1.882 7.84-6.754-4.24v-9.25z" opacity=".5"/><g fill="#fc0"><path d="M109.017.03V16.724l-6.843 4.213 1.957-7.704L98 7.998l7.932-.52z"/><path d="M109.017.03V16.724l-6.843 4.213 1.957-7.704L98 7.998l7.932-.52z"/></g><path d="M61.017 0l2.945 7.383L72 8.015l-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.957-7.703L50 7.97l7.932-.52z" fill="#fc0"/><g><path d="M85.017 0l2.945 7.383L96 8.015l-6.11 5.083 1.88 7.84-6.72-4.24-6.876 4.21 1.957-7.703L74 7.97l7.932-.52z" fill="#fc0"/></g></svg> \ No newline at end of file
diff --git a/core/js/sharedialogshareelistview.js b/core/js/sharedialogshareelistview.js
index 49580cc888b..e4edbf24c08 100644
--- a/core/js/sharedialogshareelistview.js
+++ b/core/js/sharedialogshareelistview.js
@@ -16,42 +16,56 @@
var TEMPLATE =
'<ul id="shareWithList" class="shareWithList">' +
'{{#each sharees}}' +
- ' <li data-share-id="{{shareId}}" data-share-type="{{shareType}}" data-share-with="{{shareWith}}">' +
- ' <a href="#" class="unshare"><span class="icon-loading-small hidden"></span><span class="icon icon-delete"></span><span class="hidden-visually">{{unshareLabel}}</span></a>' +
- ' {{#if avatarEnabled}}' +
- ' <div class="avatar {{#if modSeed}}imageplaceholderseed{{/if}}" data-username="{{shareWith}}" {{#if modSeed}}data-seed="{{shareWith}} {{shareType}}"{{/if}}></div>' +
- ' {{/if}}' +
- ' <span class="has-tooltip username" title="{{shareWith}}">{{shareWithDisplayName}}</span>' +
- ' {{#if mailNotificationEnabled}} {{#unless isRemoteShare}}' +
- ' <input id="mail-{{cid}}-{{shareWith}}" type="checkbox" name="mailNotification" class="mailNotification checkbox" {{#if wasMailSent}}checked="checked"{{/if}} />' +
- ' <label for="mail-{{cid}}-{{shareWith}}">{{notifyByMailLabel}}</label>' +
- ' {{/unless}} {{/if}}' +
- ' {{#if isResharingAllowed}} {{#if sharePermissionPossible}} {{#unless isRemoteShare}}' +
- ' <input id="canShare-{{cid}}-{{shareWith}}" type="checkbox" name="share" class="permissions checkbox" {{#if hasSharePermission}}checked="checked"{{/if}} data-permissions="{{sharePermission}}" />' +
- ' <label for="canShare-{{cid}}-{{shareWith}}">{{canShareLabel}}</label>' +
- ' {{/unless}} {{/if}} {{/if}}' +
- ' {{#if editPermissionPossible}}' +
- ' <input id="canEdit-{{cid}}-{{shareWith}}" type="checkbox" name="edit" class="permissions checkbox" {{#if hasEditPermission}}checked="checked"{{/if}} />' +
- ' <label for="canEdit-{{cid}}-{{shareWith}}">{{canEditLabel}}</label>' +
- ' {{/if}}' +
- ' {{#unless isRemoteShare}}' +
- ' <a href="#" class="showCruds"><img class="svg" alt="{{crudsLabel}}" src="{{triangleSImage}}"/></a>' +
- ' <div class="cruds hidden">' +
- ' {{#if createPermissionPossible}}' +
- ' <input id="canCreate-{{cid}}-{{shareWith}}" type="checkbox" name="create" class="permissions checkbox" {{#if hasCreatePermission}}checked="checked"{{/if}} data-permissions="{{createPermission}}"/>' +
- ' <label for="canCreate-{{cid}}-{{shareWith}}">{{createPermissionLabel}}</label>' +
- ' {{/if}}' +
- ' {{#if updatePermissionPossible}}' +
- ' <input id="canUpdate-{{cid}}-{{shareWith}}" type="checkbox" name="update" class="permissions checkbox" {{#if hasUpdatePermission}}checked="checked"{{/if}} data-permissions="{{updatePermission}}"/>' +
- ' <label for="canUpdate-{{cid}}-{{shareWith}}">{{updatePermissionLabel}}</label>' +
- ' {{/if}}' +
- ' {{#if deletePermissionPossible}} {{#unless isRemoteShare}}' +
- ' <input id="canDelete-{{cid}}-{{shareWith}}" type="checkbox" name="delete" class="permissions checkbox" {{#if hasDeletePermission}}checked="checked"{{/if}} data-permissions="{{deletePermission}}"/>' +
- ' <label for="canDelete-{{cid}}-{{shareWith}}">{{deletePermissionLabel}}</label>' +
- ' {{/unless}} {{/if}}' +
- ' </div>' +
- ' {{/unless}}' +
- ' </li>' +
+ '<li data-share-id="{{shareId}}" data-share-type="{{shareType}}" data-share-with="{{shareWith}}">' +
+ '<a href="#" class="unshare"><span class="icon-loading-small hidden"></span><span class="icon icon-delete"></span><span class="hidden-visually">{{unshareLabel}}</span></a>' +
+ '{{#if avatarEnabled}}' +
+ '<div class="avatar {{#if modSeed}}imageplaceholderseed{{/if}}" data-username="{{shareWith}}" {{#if modSeed}}data-seed="{{shareWith}} {{shareType}}"{{/if}}></div>' +
+ '{{/if}}' +
+ '<span class="has-tooltip username" title="{{shareWith}}">{{shareWithDisplayName}}</span>' +
+ '{{#if mailNotificationEnabled}} {{#unless isRemoteShare}}' +
+ '<span class="shareOption">' +
+ '<input id="mail-{{cid}}-{{shareWith}}" type="checkbox" name="mailNotification" class="mailNotification checkbox" {{#if wasMailSent}}checked="checked"{{/if}} />' +
+ '<label for="mail-{{cid}}-{{shareWith}}">{{notifyByMailLabel}}</label>' +
+ '</span>' +
+ '{{/unless}} {{/if}}' +
+ '{{#if isResharingAllowed}} {{#if sharePermissionPossible}} {{#unless isRemoteShare}}' +
+ '<span class="shareOption">' +
+ '<input id="canShare-{{cid}}-{{shareWith}}" type="checkbox" name="share" class="permissions checkbox" {{#if hasSharePermission}}checked="checked"{{/if}} data-permissions="{{sharePermission}}" />' +
+ '<label for="canShare-{{cid}}-{{shareWith}}">{{canShareLabel}}</label>' +
+ '</span>' +
+ '{{/unless}} {{/if}} {{/if}}' +
+ '{{#if editPermissionPossible}}' +
+ '<span class="shareOption">' +
+ '<input id="canEdit-{{cid}}-{{shareWith}}" type="checkbox" name="edit" class="permissions checkbox" {{#if hasEditPermission}}checked="checked"{{/if}} />' +
+ '<label for="canEdit-{{cid}}-{{shareWith}}">{{canEditLabel}}</label>' +
+ '{{#unless isRemoteShare}}' +
+ '<a href="#" class="showCruds"><img class="svg" alt="{{crudsLabel}}" src="{{triangleSImage}}"/></a>' +
+ '{{/unless}}' +
+ '</span>' +
+ '{{/if}}' +
+ '{{#unless isRemoteShare}}' +
+ '<div class="cruds hidden">' +
+ '{{#if createPermissionPossible}}' +
+ '<span class="shareOption">' +
+ '<input id="canCreate-{{cid}}-{{shareWith}}" type="checkbox" name="create" class="permissions checkbox" {{#if hasCreatePermission}}checked="checked"{{/if}} data-permissions="{{createPermission}}"/>' +
+ '<label for="canCreate-{{cid}}-{{shareWith}}">{{createPermissionLabel}}</label>' +
+ '</span>' +
+ '{{/if}}' +
+ '{{#if updatePermissionPossible}}' +
+ '<span class="shareOption">' +
+ '<input id="canUpdate-{{cid}}-{{shareWith}}" type="checkbox" name="update" class="permissions checkbox" {{#if hasUpdatePermission}}checked="checked"{{/if}} data-permissions="{{updatePermission}}"/>' +
+ '<label for="canUpdate-{{cid}}-{{shareWith}}">{{updatePermissionLabel}}</label>' +
+ '</span>' +
+ '{{/if}}' +
+ '{{#if deletePermissionPossible}} {{#unless isRemoteShare}}' +
+ '<span class="shareOption">' +
+ '<input id="canDelete-{{cid}}-{{shareWith}}" type="checkbox" name="delete" class="permissions checkbox" {{#if hasDeletePermission}}checked="checked"{{/if}} data-permissions="{{deletePermission}}"/>' +
+ '<label for="canDelete-{{cid}}-{{shareWith}}">{{deletePermissionLabel}}</label>' +
+ '</span>' +
+ '{{/unless}} {{/if}}' +
+ '</div>' +
+ '{{/unless}}' +
+ '</li>' +
'{{/each}}' +
'</ul>'
;
diff --git a/core/js/systemtags/systemtagsinputfield.js b/core/js/systemtags/systemtagsinputfield.js
index 148d52b57dd..45dc5b7b03e 100644
--- a/core/js/systemtags/systemtagsinputfield.js
+++ b/core/js/systemtags/systemtagsinputfield.js
@@ -320,7 +320,9 @@
*/
_createSearchChoice: function(term) {
term = term.trim();
- if (this.collection.filterByName(term).length) {
+ if (this.collection.filter(function(entry) {
+ return entry.get('name') === term;
+ }).length) {
return;
}
if (!this._newTag) {
diff --git a/core/js/tests/specs/systemtags/systemtagsinputfieldSpec.js b/core/js/tests/specs/systemtags/systemtagsinputfieldSpec.js
index aadf0de53f2..22bf0d2c82a 100644
--- a/core/js/tests/specs/systemtags/systemtagsinputfieldSpec.js
+++ b/core/js/tests/specs/systemtags/systemtagsinputfieldSpec.js
@@ -85,6 +85,15 @@ describe('OC.SystemTags.SystemTagsInputField tests', function() {
expect(result.userVisible).toEqual(true);
expect(result.userAssignable).toEqual(true);
});
+ it('creates dummy tag when user types non-matching name even with prefix of existing tag', function() {
+ var opts = select2Stub.getCall(0).args[0];
+ var result = opts.createSearchChoice('ab');
+ expect(result.id).toEqual(-1);
+ expect(result.name).toEqual('ab');
+ expect(result.isNew).toEqual(true);
+ expect(result.userVisible).toEqual(true);
+ expect(result.userAssignable).toEqual(true);
+ });
it('creates the real tag and fires select event after user selects the dummy tag', function() {
var selectHandler = sinon.stub();
view.on('select', selectHandler);
diff --git a/core/l10n/is.js b/core/l10n/is.js
index 57090fe4c93..3137ab3ed4b 100644
--- a/core/l10n/is.js
+++ b/core/l10n/is.js
@@ -89,6 +89,7 @@ OC.L10N.register(
"<a href=\"{docUrl}\">There were problems with the code integrity check. More information…</a>" : "<a href=\"{docUrl}\">Það komu upp vandamál með athugun á áreiðanleika kóða. Nánari upplýsingar…</a>",
"Settings" : "Stillingar",
"Saving..." : "Er að vista ...",
+ "Dismiss" : "Hafna",
"seconds ago" : "sekúndum síðan",
"The link to reset your password has been sent to your email. If you do not receive it within a reasonable amount of time, check your spam/junk folders.<br>If it is not there ask your local administrator." : "Tengillinn til að endurstilla lykilorðið þitt hefur verið sendur á netfangið þitt. Ef þú færð ekki póstinn innan hæfilegs tíma, athugaðu þá ruslpóstmöppuna.<br>Ef hann er ekki þar, spurðu þá kerfisstjórann þinn.",
"Your files are encrypted. If you haven't enabled the recovery key, there will be no way to get your data back after your password is reset.<br />If you are not sure what to do, please contact your administrator before you continue. <br />Do you really want to continue?" : "Skrárnar þínar eru dulritaðar. Ef þú hefur ekki virkjað endurheimtingarlykilinn, þá verður engin leið til að fá gögnin þín til baka eftir lykilorðið þitt er endurstillt.<br />Ef þú ert ekki viss hvað eigi að gera, skaltu hafa samband við kerfisstjórann áður en þú heldur áfram. <br />Viltu halda áfram?",
@@ -181,6 +182,7 @@ OC.L10N.register(
"({scope})" : "({scope})",
"Delete" : "Eyða",
"Rename" : "Endurnefna",
+ "Collaborative tags" : "Samstarfsmerkingar",
"The object type is not specified." : "Tegund hlutar ekki tilgreind",
"Enter new" : "Sláðu inn nýtt",
"Add" : "Bæta við",
@@ -192,6 +194,7 @@ OC.L10N.register(
"sunny" : "sólríkt",
"Hello {name}, the weather is {weather}" : "Halló {name},veðrið er {weather}",
"Hello {name}" : "Halló {name}",
+ "new" : "nýtt",
"_download %n file_::_download %n files_" : ["sækja %n skrá","sækja %n skrár"],
"The upgrade is in progress, leaving this page might interrupt the process in some environments." : "Uppfærslan er í gangi, ef farið er af þessari síðu gæti það truflað ferlið á sumum kerfum.",
"Updating {productName} to version {version}, this may take a while." : "Uppfæri {productName} í útgáfu {version}, þetta getur tekið smá stund.",
diff --git a/core/l10n/is.json b/core/l10n/is.json
index 978f09804a0..407d9d6395a 100644
--- a/core/l10n/is.json
+++ b/core/l10n/is.json
@@ -87,6 +87,7 @@
"<a href=\"{docUrl}\">There were problems with the code integrity check. More information…</a>" : "<a href=\"{docUrl}\">Það komu upp vandamál með athugun á áreiðanleika kóða. Nánari upplýsingar…</a>",
"Settings" : "Stillingar",
"Saving..." : "Er að vista ...",
+ "Dismiss" : "Hafna",
"seconds ago" : "sekúndum síðan",
"The link to reset your password has been sent to your email. If you do not receive it within a reasonable amount of time, check your spam/junk folders.<br>If it is not there ask your local administrator." : "Tengillinn til að endurstilla lykilorðið þitt hefur verið sendur á netfangið þitt. Ef þú færð ekki póstinn innan hæfilegs tíma, athugaðu þá ruslpóstmöppuna.<br>Ef hann er ekki þar, spurðu þá kerfisstjórann þinn.",
"Your files are encrypted. If you haven't enabled the recovery key, there will be no way to get your data back after your password is reset.<br />If you are not sure what to do, please contact your administrator before you continue. <br />Do you really want to continue?" : "Skrárnar þínar eru dulritaðar. Ef þú hefur ekki virkjað endurheimtingarlykilinn, þá verður engin leið til að fá gögnin þín til baka eftir lykilorðið þitt er endurstillt.<br />Ef þú ert ekki viss hvað eigi að gera, skaltu hafa samband við kerfisstjórann áður en þú heldur áfram. <br />Viltu halda áfram?",
@@ -179,6 +180,7 @@
"({scope})" : "({scope})",
"Delete" : "Eyða",
"Rename" : "Endurnefna",
+ "Collaborative tags" : "Samstarfsmerkingar",
"The object type is not specified." : "Tegund hlutar ekki tilgreind",
"Enter new" : "Sláðu inn nýtt",
"Add" : "Bæta við",
@@ -190,6 +192,7 @@
"sunny" : "sólríkt",
"Hello {name}, the weather is {weather}" : "Halló {name},veðrið er {weather}",
"Hello {name}" : "Halló {name}",
+ "new" : "nýtt",
"_download %n file_::_download %n files_" : ["sækja %n skrá","sækja %n skrár"],
"The upgrade is in progress, leaving this page might interrupt the process in some environments." : "Uppfærslan er í gangi, ef farið er af þessari síðu gæti það truflað ferlið á sumum kerfum.",
"Updating {productName} to version {version}, this may take a while." : "Uppfæri {productName} í útgáfu {version}, þetta getur tekið smá stund.",
diff --git a/core/l10n/pt_BR.js b/core/l10n/pt_BR.js
index ae8a7762b0a..9202160293e 100644
--- a/core/l10n/pt_BR.js
+++ b/core/l10n/pt_BR.js
@@ -123,6 +123,7 @@ OC.L10N.register(
"This server has no working Internet connection. This means that some of the features like mounting external storage, notifications about updates or installation of third-party apps will not work. Accessing files remotely and sending of notification emails might not work, either. We suggest to enable Internet connection for this server if you want to have all features." : "Este servidor não tem nenhuma conexão com a Internet. Isto significa que algumas das características como a montagem de armazenamento externo, notificações sobre atualizações ou instalação de aplicativos de terceiros não vai funcionar. Acessar arquivos remotamente e envio de e-mails de notificação pode não funcionar, também. Sugerimos permitir conexão com a Internet para este servidor, se você quer ter todas as funcionalidades.",
"No memory cache has been configured. To enhance your performance please configure a memcache if available. Further information can be found in our <a target=\"_blank\" href=\"{docLink}\">documentation</a>." : "Nenhuma memória cache foi configurada. Para melhorar o seu desempenho, por favor configure um cache de memória, se disponível. Mais informação podem ser encontradas em nossa <a target=\"_blank\" href=\"{docLink}\">documentação</a>.",
"/dev/urandom is not readable by PHP which is highly discouraged for security reasons. Further information can be found in our <a target=\"_blank\" href=\"{docLink}\">documentation</a>." : "/dev/urandom não pode ser lido pelo PHP o que é altamente desencorajado por razões de segurança. Mais informações podem ser encontradas na nossa <a target=\"_blank\" href=\"{docLink}\">documentação</a>.",
+ "You are currently running PHP {version}. We encourage you to upgrade your PHP version to take advantage of <a target=\"_blank\" href=\"{phpLink}\">performance and security updates provided by the PHP Group</a> as soon as your distribution supports it." : "Você está atualmente executando o PHP {version}. Nós o encorajamos a atualizar a versão do seu PHP para aproveitar as mais recentes <a target=\"_blank\" href=\"{phpLink}\">atualizações de desempenho e segurança fornecidas pelo PHP Group</a> suportadas pela sua distribuição.",
"The reverse proxy headers configuration is incorrect, or you are accessing ownCloud from a trusted proxy. If you are not accessing ownCloud from a trusted proxy, this is a security issue and can allow an attacker to spoof their IP address as visible to ownCloud. Further information can be found in our <a target=\"_blank\" href=\"{docLink}\">documentation</a>." : "A configuração de cabeçalhos do proxy reverso está incorreta, ou você está acessando ownCloud de um proxy confiável. Se você não está acessando ownCloud de um proxy confiável, esta é uma questão de segurança e pode permitir a um invasor falsificar seu endereço IP como visível para ownCloud. Mais informação pode ser encontrada na nossa <a target=\"_blank\" href=\"{docLink}\">documentação</a>.",
"Memcached is configured as distributed cache, but the wrong PHP module \"memcache\" is installed. \\OC\\Memcache\\Memcached only supports \"memcached\" and not \"memcache\". See the <a target=\"_blank\" href=\"{wikiLink}\">memcached wiki about both modules</a>." : "Memcached está configurado como cache distribuído, mas o módulo PHP \"memcache\" errado está instalado. \\OC\\Memcache\\Memcached suporta apenas \"memcached\" e não \"memcache\". Veja a <a target=\"_blank\" href=\"{wikiLink}\">o wiki sobre memcached sobre ambos os módulos</a>.",
"Some files have not passed the integrity check. Further information on how to resolve this issue can be found in our <a target=\"_blank\" href=\"{docLink}\">documentation</a>. (<a href=\"{codeIntegrityDownloadEndpoint}\">List of invalid files…</a> / <a href=\"{rescanEndpoint}\">Rescan…</a>)" : "Alguns arquivos não passaram na verificação de integridade. Mais informações sobre como resolver este problema podem ser encontradas na nossa <a target=\"_blank\" href=\"{docLink}\">documentação</a>. (<a href=\"{codeIntegrityDownloadEndpoint}\">Lista de arquivos inválidos…</a> / <a href=\"{rescanEndpoint}\">Reexaminar…</a>)",
diff --git a/core/l10n/pt_BR.json b/core/l10n/pt_BR.json
index 599a49a941d..e65ab25e1a7 100644
--- a/core/l10n/pt_BR.json
+++ b/core/l10n/pt_BR.json
@@ -121,6 +121,7 @@
"This server has no working Internet connection. This means that some of the features like mounting external storage, notifications about updates or installation of third-party apps will not work. Accessing files remotely and sending of notification emails might not work, either. We suggest to enable Internet connection for this server if you want to have all features." : "Este servidor não tem nenhuma conexão com a Internet. Isto significa que algumas das características como a montagem de armazenamento externo, notificações sobre atualizações ou instalação de aplicativos de terceiros não vai funcionar. Acessar arquivos remotamente e envio de e-mails de notificação pode não funcionar, também. Sugerimos permitir conexão com a Internet para este servidor, se você quer ter todas as funcionalidades.",
"No memory cache has been configured. To enhance your performance please configure a memcache if available. Further information can be found in our <a target=\"_blank\" href=\"{docLink}\">documentation</a>." : "Nenhuma memória cache foi configurada. Para melhorar o seu desempenho, por favor configure um cache de memória, se disponível. Mais informação podem ser encontradas em nossa <a target=\"_blank\" href=\"{docLink}\">documentação</a>.",
"/dev/urandom is not readable by PHP which is highly discouraged for security reasons. Further information can be found in our <a target=\"_blank\" href=\"{docLink}\">documentation</a>." : "/dev/urandom não pode ser lido pelo PHP o que é altamente desencorajado por razões de segurança. Mais informações podem ser encontradas na nossa <a target=\"_blank\" href=\"{docLink}\">documentação</a>.",
+ "You are currently running PHP {version}. We encourage you to upgrade your PHP version to take advantage of <a target=\"_blank\" href=\"{phpLink}\">performance and security updates provided by the PHP Group</a> as soon as your distribution supports it." : "Você está atualmente executando o PHP {version}. Nós o encorajamos a atualizar a versão do seu PHP para aproveitar as mais recentes <a target=\"_blank\" href=\"{phpLink}\">atualizações de desempenho e segurança fornecidas pelo PHP Group</a> suportadas pela sua distribuição.",
"The reverse proxy headers configuration is incorrect, or you are accessing ownCloud from a trusted proxy. If you are not accessing ownCloud from a trusted proxy, this is a security issue and can allow an attacker to spoof their IP address as visible to ownCloud. Further information can be found in our <a target=\"_blank\" href=\"{docLink}\">documentation</a>." : "A configuração de cabeçalhos do proxy reverso está incorreta, ou você está acessando ownCloud de um proxy confiável. Se você não está acessando ownCloud de um proxy confiável, esta é uma questão de segurança e pode permitir a um invasor falsificar seu endereço IP como visível para ownCloud. Mais informação pode ser encontrada na nossa <a target=\"_blank\" href=\"{docLink}\">documentação</a>.",
"Memcached is configured as distributed cache, but the wrong PHP module \"memcache\" is installed. \\OC\\Memcache\\Memcached only supports \"memcached\" and not \"memcache\". See the <a target=\"_blank\" href=\"{wikiLink}\">memcached wiki about both modules</a>." : "Memcached está configurado como cache distribuído, mas o módulo PHP \"memcache\" errado está instalado. \\OC\\Memcache\\Memcached suporta apenas \"memcached\" e não \"memcache\". Veja a <a target=\"_blank\" href=\"{wikiLink}\">o wiki sobre memcached sobre ambos os módulos</a>.",
"Some files have not passed the integrity check. Further information on how to resolve this issue can be found in our <a target=\"_blank\" href=\"{docLink}\">documentation</a>. (<a href=\"{codeIntegrityDownloadEndpoint}\">List of invalid files…</a> / <a href=\"{rescanEndpoint}\">Rescan…</a>)" : "Alguns arquivos não passaram na verificação de integridade. Mais informações sobre como resolver este problema podem ser encontradas na nossa <a target=\"_blank\" href=\"{docLink}\">documentação</a>. (<a href=\"{codeIntegrityDownloadEndpoint}\">Lista de arquivos inválidos…</a> / <a href=\"{rescanEndpoint}\">Reexaminar…</a>)",
diff --git a/core/l10n/sv.js b/core/l10n/sv.js
index 559a38d456a..7687a5ab7dc 100644
--- a/core/l10n/sv.js
+++ b/core/l10n/sv.js
@@ -8,26 +8,35 @@ OC.L10N.register(
"Maintenance mode is kept active" : "Underhållsläget förblir aktivt",
"Updating database schema" : "Uppdaterar databasschema",
"Updated database" : "Uppdaterade databasen",
+ "Checking whether the database schema can be updated (this can take a long time depending on the database size)" : "Kontrollerar om databasschema kan uppdateras (detta kan ta lång tid beroende på databasens storlek)",
"Checked database schema update" : "Kontrollerade uppdatering av databasschemat",
"Checking updates of apps" : "Kontrollerar uppdatering utav appar",
+ "Checking whether the database schema for %s can be updated (this can take a long time depending on the database size)" : "Kontrollerar om databasschema för %s kan uppdateras (detta kan ta lång tid beroende på databasens storlek)",
"Checked database schema update for apps" : "Kontrollerade uppdatering av databasschemat för applikationer",
"Updated \"%s\" to %s" : "Uppdaterade \"%s\" till %s",
"Repair warning: " : "Reperationsvarning:",
"Repair error: " : "Reperationsfel:",
"Set log level to debug" : "Sätter loggingsnivå till \"debug\"",
"Reset log level" : "Återställer loggningsnivå",
+ "Starting code integrity check" : "Startar integritetskontroll av kod",
+ "Finished code integrity check" : "Slutförde integritetskontroll av kod",
"%s (3rdparty)" : "%s (3rdparty)",
"%s (incompatible)" : "%s (incompatible)",
+ "Following apps have been disabled: %s" : "Följande appar har inaktiverats: %s",
"Already up to date" : "Redan uppdaterad",
"Please select a file." : "Vänligen välj en fil.",
"File is too big" : "Filen är för stor",
+ "Invalid file provided" : "En ogiltig fil tillhandahölls",
"No image or file provided" : "Ingen bild eller fil har tillhandahållits",
"Unknown filetype" : "Okänd filtyp",
"Invalid image" : "Ogiltig bild",
"An error occurred. Please contact your admin." : "Ett fel har inträffat. Kontakta din administratör.",
"No temporary profile picture available, try again" : "Ingen temporär profilbild finns tillgänglig, försök igen",
"No crop data provided" : "Ingen beskärdata har angivits",
+ "No valid crop data provided" : "Ingen giltig beskärningsdata tillhandahölls",
+ "Crop is not square" : "Beskärning är inte kvadratisk",
"Couldn't reset password because the token is invalid" : "Kunde inte återställa lösenordet på grund av felaktig token",
+ "Couldn't reset password because the token is expired" : "Lösenord kunde inte återställas eftersom \"token\" har utgått",
"Couldn't send reset email. Please make sure your username is correct." : "Kunde inte skicka återställningsmail. Vänligen kontrollera att ditt användarnamn är korrekt.",
"%s password reset" : "%s återställ lösenord",
"Couldn't send reset email. Please contact your administrator." : "Kunde inte skicka återställningsmail. Vänligen kontakta din administratör.",
diff --git a/core/l10n/sv.json b/core/l10n/sv.json
index 1969118737c..5ca31cca2bc 100644
--- a/core/l10n/sv.json
+++ b/core/l10n/sv.json
@@ -6,26 +6,35 @@
"Maintenance mode is kept active" : "Underhållsläget förblir aktivt",
"Updating database schema" : "Uppdaterar databasschema",
"Updated database" : "Uppdaterade databasen",
+ "Checking whether the database schema can be updated (this can take a long time depending on the database size)" : "Kontrollerar om databasschema kan uppdateras (detta kan ta lång tid beroende på databasens storlek)",
"Checked database schema update" : "Kontrollerade uppdatering av databasschemat",
"Checking updates of apps" : "Kontrollerar uppdatering utav appar",
+ "Checking whether the database schema for %s can be updated (this can take a long time depending on the database size)" : "Kontrollerar om databasschema för %s kan uppdateras (detta kan ta lång tid beroende på databasens storlek)",
"Checked database schema update for apps" : "Kontrollerade uppdatering av databasschemat för applikationer",
"Updated \"%s\" to %s" : "Uppdaterade \"%s\" till %s",
"Repair warning: " : "Reperationsvarning:",
"Repair error: " : "Reperationsfel:",
"Set log level to debug" : "Sätter loggingsnivå till \"debug\"",
"Reset log level" : "Återställer loggningsnivå",
+ "Starting code integrity check" : "Startar integritetskontroll av kod",
+ "Finished code integrity check" : "Slutförde integritetskontroll av kod",
"%s (3rdparty)" : "%s (3rdparty)",
"%s (incompatible)" : "%s (incompatible)",
+ "Following apps have been disabled: %s" : "Följande appar har inaktiverats: %s",
"Already up to date" : "Redan uppdaterad",
"Please select a file." : "Vänligen välj en fil.",
"File is too big" : "Filen är för stor",
+ "Invalid file provided" : "En ogiltig fil tillhandahölls",
"No image or file provided" : "Ingen bild eller fil har tillhandahållits",
"Unknown filetype" : "Okänd filtyp",
"Invalid image" : "Ogiltig bild",
"An error occurred. Please contact your admin." : "Ett fel har inträffat. Kontakta din administratör.",
"No temporary profile picture available, try again" : "Ingen temporär profilbild finns tillgänglig, försök igen",
"No crop data provided" : "Ingen beskärdata har angivits",
+ "No valid crop data provided" : "Ingen giltig beskärningsdata tillhandahölls",
+ "Crop is not square" : "Beskärning är inte kvadratisk",
"Couldn't reset password because the token is invalid" : "Kunde inte återställa lösenordet på grund av felaktig token",
+ "Couldn't reset password because the token is expired" : "Lösenord kunde inte återställas eftersom \"token\" har utgått",
"Couldn't send reset email. Please make sure your username is correct." : "Kunde inte skicka återställningsmail. Vänligen kontrollera att ditt användarnamn är korrekt.",
"%s password reset" : "%s återställ lösenord",
"Couldn't send reset email. Please contact your administrator." : "Kunde inte skicka återställningsmail. Vänligen kontakta din administratör.",
diff --git a/lib/base.php b/lib/base.php
index 7659148c140..16db8f4dcd2 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -823,7 +823,7 @@ class OC {
}
$request = \OC::$server->getRequest();
- $requestPath = $request->getPathInfo();
+ $requestPath = $request->getRawPathInfo();
if (substr($requestPath, -3) !== '.js') { // we need these files during the upgrade
self::checkMaintenanceMode();
self::checkUpgrade();
diff --git a/lib/l10n/de.js b/lib/l10n/de.js
index 2acca36fb89..9d4c5435d4f 100644
--- a/lib/l10n/de.js
+++ b/lib/l10n/de.js
@@ -65,6 +65,7 @@ OC.L10N.register(
"Authentication error" : "Authentifizierungsfehler",
"Token expired. Please reload page." : "Token abgelaufen. Bitte lade die Seite neu.",
"Unknown user" : "Unbekannter Benutzer",
+ "%s enter the database username and name." : "%s bitte gib den Datenbank Benutzernamen und den Datenbank Namen ein.",
"%s enter the database username." : "%s gib den Datenbank-Benutzernamen an.",
"%s enter the database name." : "%s gib den Datenbanknamen an.",
"%s you may not use dots in the database name" : "%s Der Datenbankname darf keine Punkte enthalten",
@@ -140,6 +141,8 @@ OC.L10N.register(
"Adjusting this setting in php.ini will make ownCloud run again" : "Durch das Anpassen dieser Einstellung in der php.ini wird ownCloud wieder laufen",
"mbstring.func_overload is set to \"%s\" instead of the expected value \"0\"" : "mbstring.func_overload ist nicht auf den erwarteten Wert „0“, sondern stattdessen auf „%s“ gesetzt",
"To fix this issue set <code>mbstring.func_overload</code> to <code>0</code> in your php.ini" : "Bitte setze zum Beheben dieses Problems <code>mbstring.func_overload</code> in Deiner php.ini auf <code>0</code>.",
+ "libxml2 2.7.0 is at least required. Currently %s is installed." : "libxml2 2.7.0 wird benötigt. Zur Zeit ist %s installiert.",
+ "To fix this issue update your libxml2 version and restart your web server." : "Um diesen Fehler zu beheben, aktualisiere bitte die libxml2 Version und starte deinen Browser neu.",
"PHP is apparently set up to strip inline doc blocks. This will make several core apps inaccessible." : "PHP ist offenbar so konfiguriert, dass PHPDoc-Blöcke in der Anweisung entfernt werden. Dadurch sind mehrere Kern-Apps nicht erreichbar.",
"This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Dies wird wahrscheinlich durch Zwischenspeicher/Beschleuniger wie etwa Zend OPcache oder eAccelerator verursacht.",
"PHP modules have been installed, but they are still listed as missing?" : "PHP-Module wurden installiert, werden aber als noch fehlend gelistet?",
diff --git a/lib/l10n/de.json b/lib/l10n/de.json
index 4514234f8d2..f85bdde4db1 100644
--- a/lib/l10n/de.json
+++ b/lib/l10n/de.json
@@ -63,6 +63,7 @@
"Authentication error" : "Authentifizierungsfehler",
"Token expired. Please reload page." : "Token abgelaufen. Bitte lade die Seite neu.",
"Unknown user" : "Unbekannter Benutzer",
+ "%s enter the database username and name." : "%s bitte gib den Datenbank Benutzernamen und den Datenbank Namen ein.",
"%s enter the database username." : "%s gib den Datenbank-Benutzernamen an.",
"%s enter the database name." : "%s gib den Datenbanknamen an.",
"%s you may not use dots in the database name" : "%s Der Datenbankname darf keine Punkte enthalten",
@@ -138,6 +139,8 @@
"Adjusting this setting in php.ini will make ownCloud run again" : "Durch das Anpassen dieser Einstellung in der php.ini wird ownCloud wieder laufen",
"mbstring.func_overload is set to \"%s\" instead of the expected value \"0\"" : "mbstring.func_overload ist nicht auf den erwarteten Wert „0“, sondern stattdessen auf „%s“ gesetzt",
"To fix this issue set <code>mbstring.func_overload</code> to <code>0</code> in your php.ini" : "Bitte setze zum Beheben dieses Problems <code>mbstring.func_overload</code> in Deiner php.ini auf <code>0</code>.",
+ "libxml2 2.7.0 is at least required. Currently %s is installed." : "libxml2 2.7.0 wird benötigt. Zur Zeit ist %s installiert.",
+ "To fix this issue update your libxml2 version and restart your web server." : "Um diesen Fehler zu beheben, aktualisiere bitte die libxml2 Version und starte deinen Browser neu.",
"PHP is apparently set up to strip inline doc blocks. This will make several core apps inaccessible." : "PHP ist offenbar so konfiguriert, dass PHPDoc-Blöcke in der Anweisung entfernt werden. Dadurch sind mehrere Kern-Apps nicht erreichbar.",
"This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Dies wird wahrscheinlich durch Zwischenspeicher/Beschleuniger wie etwa Zend OPcache oder eAccelerator verursacht.",
"PHP modules have been installed, but they are still listed as missing?" : "PHP-Module wurden installiert, werden aber als noch fehlend gelistet?",
diff --git a/lib/l10n/en_GB.js b/lib/l10n/en_GB.js
index a83ae8e9f1a..6d9df892737 100644
--- a/lib/l10n/en_GB.js
+++ b/lib/l10n/en_GB.js
@@ -65,6 +65,7 @@ OC.L10N.register(
"Authentication error" : "Authentication error",
"Token expired. Please reload page." : "Token expired. Please reload page.",
"Unknown user" : "Unknown user",
+ "%s enter the database username and name." : "%s enter the database username and name.",
"%s enter the database username." : "%s enter the database username.",
"%s enter the database name." : "%s enter the database name.",
"%s you may not use dots in the database name" : "%s you may not use dots in the database name",
@@ -140,6 +141,8 @@ OC.L10N.register(
"Adjusting this setting in php.ini will make ownCloud run again" : "Adjusting this setting in php.ini will make ownCloud run again",
"mbstring.func_overload is set to \"%s\" instead of the expected value \"0\"" : "mbstring.func_overload is set to \"%s\" instead of the expected value \"0\"",
"To fix this issue set <code>mbstring.func_overload</code> to <code>0</code> in your php.ini" : "To fix this issue set <code>mbstring.func_overload</code> to <code>0</code> in your php.ini",
+ "libxml2 2.7.0 is at least required. Currently %s is installed." : "libxml2 2.7.0 is at least required. Currently %s is installed.",
+ "To fix this issue update your libxml2 version and restart your web server." : "To fix this issue update your libxml2 version and restart your web server.",
"PHP is apparently set up to strip inline doc blocks. This will make several core apps inaccessible." : "PHP is apparently set up to strip inline doc blocks. This will make several core apps inaccessible.",
"This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator.",
"PHP modules have been installed, but they are still listed as missing?" : "PHP modules have been installed, but they are still listed as missing?",
diff --git a/lib/l10n/en_GB.json b/lib/l10n/en_GB.json
index 00ed1000ecd..f7ff8b5fe2a 100644
--- a/lib/l10n/en_GB.json
+++ b/lib/l10n/en_GB.json
@@ -63,6 +63,7 @@
"Authentication error" : "Authentication error",
"Token expired. Please reload page." : "Token expired. Please reload page.",
"Unknown user" : "Unknown user",
+ "%s enter the database username and name." : "%s enter the database username and name.",
"%s enter the database username." : "%s enter the database username.",
"%s enter the database name." : "%s enter the database name.",
"%s you may not use dots in the database name" : "%s you may not use dots in the database name",
@@ -138,6 +139,8 @@
"Adjusting this setting in php.ini will make ownCloud run again" : "Adjusting this setting in php.ini will make ownCloud run again",
"mbstring.func_overload is set to \"%s\" instead of the expected value \"0\"" : "mbstring.func_overload is set to \"%s\" instead of the expected value \"0\"",
"To fix this issue set <code>mbstring.func_overload</code> to <code>0</code> in your php.ini" : "To fix this issue set <code>mbstring.func_overload</code> to <code>0</code> in your php.ini",
+ "libxml2 2.7.0 is at least required. Currently %s is installed." : "libxml2 2.7.0 is at least required. Currently %s is installed.",
+ "To fix this issue update your libxml2 version and restart your web server." : "To fix this issue update your libxml2 version and restart your web server.",
"PHP is apparently set up to strip inline doc blocks. This will make several core apps inaccessible." : "PHP is apparently set up to strip inline doc blocks. This will make several core apps inaccessible.",
"This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator.",
"PHP modules have been installed, but they are still listed as missing?" : "PHP modules have been installed, but they are still listed as missing?",
diff --git a/lib/l10n/he.js b/lib/l10n/he.js
index e2ffb22d015..e4a87242399 100644
--- a/lib/l10n/he.js
+++ b/lib/l10n/he.js
@@ -53,6 +53,9 @@ OC.L10N.register(
"Archives of type %s are not supported" : "ארכיבים מסוג %s אינם נתמכים",
"Failed to open archive when installing app" : "פתיחת ארכיב נכשלה בתהליך התקנת היישום",
"App does not provide an info.xml file" : "היישום לא סיפק קובץ info.xml",
+ "Signature could not get checked. Please contact the app developer and check your admin screen." : "חתימה לא ניתנת לבדיקה. יש ליצור קשר עם מפתח היישום ולבדוק את מסך הניהול.",
+ "App can't be installed because of not allowed code in the App" : "היישום לא ניתן להתקנה בשל קוד אסור ביישום",
+ "App can't be installed because it is not compatible with this version of ownCloud" : "היישום לא ניתן להתקנה כיוון שהוא אינו תואם את גרסת ה- ownCloud הזו",
"Application is not enabled" : "יישומים אינם מופעלים",
"Authentication error" : "שגיאת הזדהות",
"Token expired. Please reload page." : "פג תוקף. נא לטעון שוב את הדף.",
diff --git a/lib/l10n/he.json b/lib/l10n/he.json
index 27bff3f62cc..2decc2acd56 100644
--- a/lib/l10n/he.json
+++ b/lib/l10n/he.json
@@ -51,6 +51,9 @@
"Archives of type %s are not supported" : "ארכיבים מסוג %s אינם נתמכים",
"Failed to open archive when installing app" : "פתיחת ארכיב נכשלה בתהליך התקנת היישום",
"App does not provide an info.xml file" : "היישום לא סיפק קובץ info.xml",
+ "Signature could not get checked. Please contact the app developer and check your admin screen." : "חתימה לא ניתנת לבדיקה. יש ליצור קשר עם מפתח היישום ולבדוק את מסך הניהול.",
+ "App can't be installed because of not allowed code in the App" : "היישום לא ניתן להתקנה בשל קוד אסור ביישום",
+ "App can't be installed because it is not compatible with this version of ownCloud" : "היישום לא ניתן להתקנה כיוון שהוא אינו תואם את גרסת ה- ownCloud הזו",
"Application is not enabled" : "יישומים אינם מופעלים",
"Authentication error" : "שגיאת הזדהות",
"Token expired. Please reload page." : "פג תוקף. נא לטעון שוב את הדף.",
diff --git a/lib/l10n/it.js b/lib/l10n/it.js
index c71410adfb9..bfb0c6c363b 100644
--- a/lib/l10n/it.js
+++ b/lib/l10n/it.js
@@ -65,6 +65,7 @@ OC.L10N.register(
"Authentication error" : "Errore di autenticazione",
"Token expired. Please reload page." : "Token scaduto. Ricarica la pagina.",
"Unknown user" : "Utente sconosciuto",
+ "%s enter the database username and name." : "%s digita il nome utente e il nome del database.",
"%s enter the database username." : "%s digita il nome utente del database.",
"%s enter the database name." : "%s digita il nome del database.",
"%s you may not use dots in the database name" : "%s non dovresti utilizzare punti nel nome del database",
diff --git a/lib/l10n/it.json b/lib/l10n/it.json
index cac001c5021..bd9c763447a 100644
--- a/lib/l10n/it.json
+++ b/lib/l10n/it.json
@@ -63,6 +63,7 @@
"Authentication error" : "Errore di autenticazione",
"Token expired. Please reload page." : "Token scaduto. Ricarica la pagina.",
"Unknown user" : "Utente sconosciuto",
+ "%s enter the database username and name." : "%s digita il nome utente e il nome del database.",
"%s enter the database username." : "%s digita il nome utente del database.",
"%s enter the database name." : "%s digita il nome del database.",
"%s you may not use dots in the database name" : "%s non dovresti utilizzare punti nel nome del database",
diff --git a/lib/l10n/nl.js b/lib/l10n/nl.js
index 38830e67cb4..7aa504bc2a6 100644
--- a/lib/l10n/nl.js
+++ b/lib/l10n/nl.js
@@ -65,6 +65,7 @@ OC.L10N.register(
"Authentication error" : "Authenticatie fout",
"Token expired. Please reload page." : "Token verlopen. Herlaad de pagina.",
"Unknown user" : "Onbekende gebruiker",
+ "%s enter the database username and name." : "%s voer de database gebruikersnaam en naam in .",
"%s enter the database username." : "%s opgeven database gebruikersnaam.",
"%s enter the database name." : "%s opgeven databasenaam.",
"%s you may not use dots in the database name" : "%s er mogen geen puntjes in de databasenaam voorkomen",
@@ -140,6 +141,8 @@ OC.L10N.register(
"Adjusting this setting in php.ini will make ownCloud run again" : "Het in php.ini bijstellen hiervan laat ownCloud weer werken",
"mbstring.func_overload is set to \"%s\" instead of the expected value \"0\"" : "mbstring.func_overload is ingesteld op \"%s\" in plaats van op de verwachte waarde \"0\"",
"To fix this issue set <code>mbstring.func_overload</code> to <code>0</code> in your php.ini" : "Om dit op te lossen stel <code>mbstring.func_overload</code> in op <code>0</code> in uw php.ini",
+ "libxml2 2.7.0 is at least required. Currently %s is installed." : "De laagste toegestane libxml2 versie is 2.7.0. Momenteel is %s is geïnstalleerd.",
+ "To fix this issue update your libxml2 version and restart your web server." : "Om dit te herstellen, moet u de libxml2 versie bijwerken en uw webserver herstarten.",
"PHP is apparently set up to strip inline doc blocks. This will make several core apps inaccessible." : "PHP is blijkbaar zo ingesteld dat inline doc blokken worden gestript. Hierdoor worden verschillende kernmodules onbruikbaar.",
"This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Dit wordt vermoedelijk veroorzaakt door een cache/accelerator, zoals Zend OPcache of eAccelerator.",
"PHP modules have been installed, but they are still listed as missing?" : "PHP modules zijn geïnstalleerd, maar worden ze nog steeds als ontbrekend aangegeven?",
diff --git a/lib/l10n/nl.json b/lib/l10n/nl.json
index b8a5720d81b..1ab3f219b59 100644
--- a/lib/l10n/nl.json
+++ b/lib/l10n/nl.json
@@ -63,6 +63,7 @@
"Authentication error" : "Authenticatie fout",
"Token expired. Please reload page." : "Token verlopen. Herlaad de pagina.",
"Unknown user" : "Onbekende gebruiker",
+ "%s enter the database username and name." : "%s voer de database gebruikersnaam en naam in .",
"%s enter the database username." : "%s opgeven database gebruikersnaam.",
"%s enter the database name." : "%s opgeven databasenaam.",
"%s you may not use dots in the database name" : "%s er mogen geen puntjes in de databasenaam voorkomen",
@@ -138,6 +139,8 @@
"Adjusting this setting in php.ini will make ownCloud run again" : "Het in php.ini bijstellen hiervan laat ownCloud weer werken",
"mbstring.func_overload is set to \"%s\" instead of the expected value \"0\"" : "mbstring.func_overload is ingesteld op \"%s\" in plaats van op de verwachte waarde \"0\"",
"To fix this issue set <code>mbstring.func_overload</code> to <code>0</code> in your php.ini" : "Om dit op te lossen stel <code>mbstring.func_overload</code> in op <code>0</code> in uw php.ini",
+ "libxml2 2.7.0 is at least required. Currently %s is installed." : "De laagste toegestane libxml2 versie is 2.7.0. Momenteel is %s is geïnstalleerd.",
+ "To fix this issue update your libxml2 version and restart your web server." : "Om dit te herstellen, moet u de libxml2 versie bijwerken en uw webserver herstarten.",
"PHP is apparently set up to strip inline doc blocks. This will make several core apps inaccessible." : "PHP is blijkbaar zo ingesteld dat inline doc blokken worden gestript. Hierdoor worden verschillende kernmodules onbruikbaar.",
"This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Dit wordt vermoedelijk veroorzaakt door een cache/accelerator, zoals Zend OPcache of eAccelerator.",
"PHP modules have been installed, but they are still listed as missing?" : "PHP modules zijn geïnstalleerd, maar worden ze nog steeds als ontbrekend aangegeven?",
diff --git a/lib/l10n/pt_BR.js b/lib/l10n/pt_BR.js
index faa690f29c2..a426eb91623 100644
--- a/lib/l10n/pt_BR.js
+++ b/lib/l10n/pt_BR.js
@@ -65,6 +65,7 @@ OC.L10N.register(
"Authentication error" : "Erro de autenticação",
"Token expired. Please reload page." : "Token expirou. Por favor recarregue a página.",
"Unknown user" : "Usuário desconhecido",
+ "%s enter the database username and name." : "%s insira o nome de usuário e o nome do banco de dados.",
"%s enter the database username." : "%s insira o nome de usuário do banco de dados.",
"%s enter the database name." : "%s insira o nome do banco de dados.",
"%s you may not use dots in the database name" : "%s você não pode usar pontos no nome do banco de dados",
@@ -140,6 +141,8 @@ OC.L10N.register(
"Adjusting this setting in php.ini will make ownCloud run again" : "Ajustando esta configuração no php.ini irá fazer o ownCloud rodar novamente",
"mbstring.func_overload is set to \"%s\" instead of the expected value \"0\"" : "mbstring.func_overload está definido para \"%s\" em vez do valor esperado \"0\"",
"To fix this issue set <code>mbstring.func_overload</code> to <code>0</code> in your php.ini" : "Para corrigir esse problema defina <code>mbstring.func_overload</code> para <code>0</code> em seu php.ini",
+ "libxml2 2.7.0 is at least required. Currently %s is installed." : "A libxml2 2.7.0 é a mínima versão requerida. Atualmente a versão %s está instalada.",
+ "To fix this issue update your libxml2 version and restart your web server." : "Para corrigir este problema, atualize a versão da sua libxml2 e reinicie seu servidor web.",
"PHP is apparently set up to strip inline doc blocks. This will make several core apps inaccessible." : "PHP está, aparentemente, configurado para retirar blocos doc inline. Isso fará com que vários aplicativos do núcleo fiquem inacessíveis.",
"This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Isso provavelmente é causado por uma cache/acelerador, como Zend OPcache ou eAccelerator.",
"PHP modules have been installed, but they are still listed as missing?" : "Módulos do PHP foram instalados, mas eles ainda estão listados como desaparecidos?",
diff --git a/lib/l10n/pt_BR.json b/lib/l10n/pt_BR.json
index 60d9ea436b7..640601559cf 100644
--- a/lib/l10n/pt_BR.json
+++ b/lib/l10n/pt_BR.json
@@ -63,6 +63,7 @@
"Authentication error" : "Erro de autenticação",
"Token expired. Please reload page." : "Token expirou. Por favor recarregue a página.",
"Unknown user" : "Usuário desconhecido",
+ "%s enter the database username and name." : "%s insira o nome de usuário e o nome do banco de dados.",
"%s enter the database username." : "%s insira o nome de usuário do banco de dados.",
"%s enter the database name." : "%s insira o nome do banco de dados.",
"%s you may not use dots in the database name" : "%s você não pode usar pontos no nome do banco de dados",
@@ -138,6 +139,8 @@
"Adjusting this setting in php.ini will make ownCloud run again" : "Ajustando esta configuração no php.ini irá fazer o ownCloud rodar novamente",
"mbstring.func_overload is set to \"%s\" instead of the expected value \"0\"" : "mbstring.func_overload está definido para \"%s\" em vez do valor esperado \"0\"",
"To fix this issue set <code>mbstring.func_overload</code> to <code>0</code> in your php.ini" : "Para corrigir esse problema defina <code>mbstring.func_overload</code> para <code>0</code> em seu php.ini",
+ "libxml2 2.7.0 is at least required. Currently %s is installed." : "A libxml2 2.7.0 é a mínima versão requerida. Atualmente a versão %s está instalada.",
+ "To fix this issue update your libxml2 version and restart your web server." : "Para corrigir este problema, atualize a versão da sua libxml2 e reinicie seu servidor web.",
"PHP is apparently set up to strip inline doc blocks. This will make several core apps inaccessible." : "PHP está, aparentemente, configurado para retirar blocos doc inline. Isso fará com que vários aplicativos do núcleo fiquem inacessíveis.",
"This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Isso provavelmente é causado por uma cache/acelerador, como Zend OPcache ou eAccelerator.",
"PHP modules have been installed, but they are still listed as missing?" : "Módulos do PHP foram instalados, mas eles ainda estão listados como desaparecidos?",
diff --git a/lib/l10n/sq.js b/lib/l10n/sq.js
index 3e336129b79..95c2f8139d6 100644
--- a/lib/l10n/sq.js
+++ b/lib/l10n/sq.js
@@ -65,6 +65,7 @@ OC.L10N.register(
"Authentication error" : "Gabim mirëfilltësimi",
"Token expired. Please reload page." : "Token-i ka skaduar. Ju lutemi, ringarkoni faqen.",
"Unknown user" : "Përdorues i panjohur",
+ "%s enter the database username and name." : "%s jepni emrin e bazës së të dhënave dhe emrin e përdoruesit për të.",
"%s enter the database username." : "%s jepni emrin e përdoruesit të bazës së të dhënave.",
"%s enter the database name." : "%s jepni emrin e bazës së të dhënave.",
"%s you may not use dots in the database name" : "%s s’mund të përdorni pika te emri i bazës së të dhënave",
diff --git a/lib/l10n/sq.json b/lib/l10n/sq.json
index 927db5685be..d714fe9cf24 100644
--- a/lib/l10n/sq.json
+++ b/lib/l10n/sq.json
@@ -63,6 +63,7 @@
"Authentication error" : "Gabim mirëfilltësimi",
"Token expired. Please reload page." : "Token-i ka skaduar. Ju lutemi, ringarkoni faqen.",
"Unknown user" : "Përdorues i panjohur",
+ "%s enter the database username and name." : "%s jepni emrin e bazës së të dhënave dhe emrin e përdoruesit për të.",
"%s enter the database username." : "%s jepni emrin e përdoruesit të bazës së të dhënave.",
"%s enter the database name." : "%s jepni emrin e bazës së të dhënave.",
"%s you may not use dots in the database name" : "%s s’mund të përdorni pika te emri i bazës së të dhënave",
diff --git a/lib/private/filechunking.php b/lib/private/filechunking.php
index 32cbb7559f0..604a607336c 100644
--- a/lib/private/filechunking.php
+++ b/lib/private/filechunking.php
@@ -146,92 +146,25 @@ class OC_FileChunking {
$cache->remove($prefix.$index);
}
- public function signature_split($orgfile, $input) {
- $info = unpack('n', fread($input, 2));
- $blocksize = $info[1];
- $this->info['transferid'] = mt_rand();
- $count = 0;
- $needed = array();
- $cache = $this->getCache();
- $prefix = $this->getPrefix();
- while (!feof($orgfile)) {
- $new_md5 = fread($input, 16);
- if (feof($input)) {
- break;
- }
- $data = fread($orgfile, $blocksize);
- $org_md5 = md5($data, true);
- if ($org_md5 == $new_md5) {
- $cache->set($prefix.$count, $data);
- } else {
- $needed[] = $count;
- }
- $count++;
- }
- return array(
- 'transferid' => $this->info['transferid'],
- 'needed' => $needed,
- 'count' => $count,
- );
- }
-
/**
* Assembles the chunks into the file specified by the path.
* Also triggers the relevant hooks and proxies.
*
- * @param \OC\Files\Storage\Storage $storage
+ * @param \OC\Files\Storage\Storage $storage storage
* @param string $path target path relative to the storage
- * @param string $absolutePath
- * @return bool assembled file size or false if file could not be created
+ * @return bool true on success or false if file could not be created
*
* @throws \OC\ServerNotAvailableException
*/
- public function file_assemble($storage, $path, $absolutePath) {
- $data = '';
+ public function file_assemble($storage, $path) {
// use file_put_contents as method because that best matches what this function does
if (\OC\Files\Filesystem::isValidPath($path)) {
- $exists = $storage->file_exists($path);
- $run = true;
- $hookPath = \OC\Files\Filesystem::getView()->getRelativePath($absolutePath);
- if(!$exists) {
- OC_Hook::emit(
- \OC\Files\Filesystem::CLASSNAME,
- \OC\Files\Filesystem::signal_create,
- array(
- \OC\Files\Filesystem::signal_param_path => $hookPath,
- \OC\Files\Filesystem::signal_param_run => &$run
- )
- );
- }
- OC_Hook::emit(
- \OC\Files\Filesystem::CLASSNAME,
- \OC\Files\Filesystem::signal_write,
- array(
- \OC\Files\Filesystem::signal_param_path => $hookPath,
- \OC\Files\Filesystem::signal_param_run => &$run
- )
- );
- if(!$run) {
- return false;
- }
$target = $storage->fopen($path, 'w');
- if($target) {
+ if ($target) {
$count = $this->assemble($target);
fclose($target);
- if(!$exists) {
- OC_Hook::emit(
- \OC\Files\Filesystem::CLASSNAME,
- \OC\Files\Filesystem::signal_post_create,
- array( \OC\Files\Filesystem::signal_param_path => $hookPath)
- );
- }
- OC_Hook::emit(
- \OC\Files\Filesystem::CLASSNAME,
- \OC\Files\Filesystem::signal_post_write,
- array( \OC\Files\Filesystem::signal_param_path => $hookPath)
- );
return $count > 0;
- }else{
+ } else {
return false;
}
}
diff --git a/lib/private/files/cache/wrapper/cachewrapper.php b/lib/private/files/cache/wrapper/cachewrapper.php
index 4080883419e..883f4709358 100644
--- a/lib/private/files/cache/wrapper/cachewrapper.php
+++ b/lib/private/files/cache/wrapper/cachewrapper.php
@@ -54,7 +54,7 @@ class CacheWrapper extends Cache {
/**
* get the stored metadata of a file or folder
*
- * @param string /int $file
+ * @param string|int $file
* @return ICacheEntry|false
*/
public function get($file) {
diff --git a/lib/private/installer.php b/lib/private/installer.php
index 36fda28cd27..c026383e26e 100644
--- a/lib/private/installer.php
+++ b/lib/private/installer.php
@@ -526,8 +526,12 @@ class OC_Installer{
* Installs shipped apps
*
* This function installs all apps found in the 'apps' directory that should be enabled by default;
+ * @param bool $softErrors When updating we ignore errors and simply log them, better to have a
+ * working ownCloud at the end instead of an aborted update.
+ * @return array Array of error messages (appid => Exception)
*/
- public static function installShippedApps() {
+ public static function installShippedApps($softErrors = false) {
+ $errors = [];
foreach(OC::$APPSROOTS as $app_dir) {
if($dir = opendir( $app_dir['path'] )) {
while( false !== ( $filename = readdir( $dir ))) {
@@ -538,7 +542,16 @@ class OC_Installer{
$enabled = isset($info['default_enable']);
if (($enabled || in_array($filename, \OC::$server->getAppManager()->getAlwaysEnabledApps()))
&& \OC::$server->getConfig()->getAppValue($filename, 'enabled') !== 'no') {
- OC_Installer::installShippedApp($filename);
+ if ($softErrors) {
+ try {
+ OC_Installer::installShippedApp($filename);
+ } catch (\Doctrine\DBAL\Exception\TableExistsException $e) {
+ $errors[$filename] = $e;
+ continue;
+ }
+ } else {
+ OC_Installer::installShippedApp($filename);
+ }
\OC::$server->getConfig()->setAppValue($filename, 'enabled', 'yes');
}
}
@@ -548,6 +561,8 @@ class OC_Installer{
closedir( $dir );
}
}
+
+ return $errors;
}
/**
diff --git a/lib/private/log/owncloud.php b/lib/private/log/owncloud.php
index 6399d7ee588..ec4af29dc84 100644
--- a/lib/private/log/owncloud.php
+++ b/lib/private/log/owncloud.php
@@ -88,14 +88,21 @@ class OC_Log_Owncloud {
$remoteAddr = $request->getRemoteAddress();
// remove username/passwords from URLs before writing the to the log file
$time = $time->format($format);
- $minLevel=min($config->getValue( "loglevel", \OCP\Util::WARN ), \OCP\Util::ERROR);
- if($minLevel == \OCP\Util::DEBUG) {
- $url = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '--';
- $method = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : '--';
- $entry = compact('reqId', 'remoteAddr', 'app', 'message', 'level', 'time', 'method', 'url');
- } else {
- $entry = compact('reqId', 'remoteAddr', 'app', 'message', 'level', 'time');
- }
+ $url = ($request->getRequestUri() !== '') ? $request->getRequestUri() : '--';
+ $method = is_string($request->getMethod()) ? $request->getMethod() : '--';
+ $userObj = \OC::$server->getUserSession()->getUser();
+ $user = !is_null($userObj) ? $userObj->getUID() : '--';
+ $entry = compact(
+ 'reqId',
+ 'remoteAddr',
+ 'app',
+ 'message',
+ 'level',
+ 'time',
+ 'method',
+ 'url',
+ 'user'
+ );
$entry = json_encode($entry);
$handle = @fopen(self::$logFile, 'a');
@chmod(self::$logFile, 0640);
diff --git a/lib/private/route/router.php b/lib/private/route/router.php
index 13f7a7a1cfb..03bee3d2037 100644
--- a/lib/private/route/router.php
+++ b/lib/private/route/router.php
@@ -110,6 +110,10 @@ class Router implements IRouter {
* @param null|string $app
*/
public function loadRoutes($app = null) {
+ if(is_string($app)) {
+ $app = \OC_App::cleanAppId($app);
+ }
+
$requestedApp = $app;
if ($this->loaded) {
return;
diff --git a/lib/private/setup.php b/lib/private/setup.php
index 5988a0b2d1d..6303d0d47f3 100644
--- a/lib/private/setup.php
+++ b/lib/private/setup.php
@@ -411,32 +411,32 @@ class Setup {
$htaccessContent = file_get_contents($setupHelper->pathToHtaccess());
$content = "#### DO NOT CHANGE ANYTHING ABOVE THIS LINE ####\n";
- if (strpos($htaccessContent, 'ErrorDocument 403') === false) {
+ if(strpos($htaccessContent, $content) === false) {
//custom 403 error page
$content.= "\nErrorDocument 403 ".\OC::$WEBROOT."/core/templates/403.php";
- }
- if (strpos($htaccessContent, 'ErrorDocument 404') === false) {
+
//custom 404 error page
$content.= "\nErrorDocument 404 ".\OC::$WEBROOT."/core/templates/404.php";
- }
- // Add rewrite base
- $webRoot = !empty(\OC::$WEBROOT) ? \OC::$WEBROOT : '/';
- $content .= "\n<IfModule mod_rewrite.c>";
- $content .= "\n RewriteRule . index.php [PT,E=PATH_INFO:$1]";
- $content .= "\n RewriteBase ".$webRoot;
- $content .= "\n <IfModule mod_env.c>";
- $content .= "\n SetEnv front_controller_active true";
- $content .= "\n <IfModule mod_dir.c>";
- $content .= "\n DirectorySlash off";
- $content .= "\n </IfModule>";
- $content.="\n </IfModule>";
- $content.="\n</IfModule>";
-
- if ($content !== '') {
- //suppress errors in case we don't have permissions for it
- @file_put_contents($setupHelper->pathToHtaccess(), $content . "\n", FILE_APPEND);
+ // Add rewrite base
+ $webRoot = !empty(\OC::$WEBROOT) ? \OC::$WEBROOT : '/';
+ $content .= "\n<IfModule mod_rewrite.c>";
+ $content .= "\n RewriteRule . index.php [PT,E=PATH_INFO:$1]";
+ $content .= "\n RewriteBase ".$webRoot;
+ $content .= "\n <IfModule mod_env.c>";
+ $content .= "\n SetEnv front_controller_active true";
+ $content .= "\n <IfModule mod_dir.c>";
+ $content .= "\n DirectorySlash off";
+ $content .= "\n </IfModule>";
+ $content.="\n </IfModule>";
+ $content.="\n</IfModule>";
+
+ if ($content !== '') {
+ //suppress errors in case we don't have permissions for it
+ @file_put_contents($setupHelper->pathToHtaccess(), $content . "\n", FILE_APPEND);
+ }
}
+
}
public static function protectDataDirectory() {
diff --git a/lib/private/updater.php b/lib/private/updater.php
index 4f74481562b..0d567b8dfb9 100644
--- a/lib/private/updater.php
+++ b/lib/private/updater.php
@@ -333,7 +333,12 @@ class Updater extends BasicEmitter {
// install new shipped apps on upgrade
OC_App::loadApps('authentication');
- OC_Installer::installShippedApps();
+ $errors = OC_Installer::installShippedApps(true);
+ foreach ($errors as $appId => $exception) {
+ /** @var \Exception $exception */
+ $this->log->logException($exception, ['app' => $appId]);
+ $this->emit('\OC\Updater', 'failure', [$appId . ': ' . $exception->getMessage()]);
+ }
// post-upgrade repairs
$repair = new Repair(Repair::getRepairSteps());
diff --git a/settings/l10n/is.js b/settings/l10n/is.js
index 3dd4db086f6..a5b48964e46 100644
--- a/settings/l10n/is.js
+++ b/settings/l10n/is.js
@@ -85,6 +85,7 @@ OC.L10N.register(
"Strong password" : "Sterkt lykilorð",
"Groups" : "Hópar",
"Unable to delete {objName}" : "Get ekki eytt {objName}",
+ "Error creating group: {message}" : "Villa við að búa til hóp: {message}",
"A valid group name must be provided" : "Skráðu inn gilt heiti á hópi",
"deleted {groupName}" : "eyddi {groupName}",
"undo" : "afturkalla",
@@ -93,6 +94,7 @@ OC.L10N.register(
"deleted {userName}" : "eyddi {userName}",
"add group" : "bæta við hópi",
"A valid username must be provided" : "Skráðu inn gilt notandanafn",
+ "Error creating user: {message}" : "Villa við að búa til notanda: {message}",
"A valid password must be provided" : "Skráðu inn gilt lykilorð",
"A valid email must be provided" : "Skráðu inn gilt tölvupóstfang",
"__language_name__" : "Íslenska",
@@ -128,6 +130,7 @@ OC.L10N.register(
"Last cron job execution: %s." : "Síðasta keyrsla cron-verks: %s.",
"Last cron job execution: %s. Something seems wrong." : "Síðasta keyrsla cron-verks: %s. Eitthvað er ekki eins og það á að sér að vera.",
"Enable server-side encryption" : "Virkja dulritun á þjóni",
+ "Please read carefully before activating server-side encryption: " : "Lestu eftirfarandi gaumgæfilega áður en þú virkjar dulritun á þjóni: ",
"Enable encryption" : "Virkja dulritun",
"Select default encryption module:" : "Veldu sjálfgefna dulritunareiningu:",
"Start migration" : "Hefja yfirfærslu",
@@ -169,6 +172,7 @@ OC.L10N.register(
"Admin documentation" : "Hjálparskjöl kerfisstjóra",
"Show description …" : "Birta lýsingu …",
"Hide description …" : "Fela lýsingu …",
+ "This app has an update available." : "Uppfærsla er tiltæk fyrir þetta forrit.",
"This app cannot be installed because the following dependencies are not fulfilled:" : "Ekki var hægt að setja upp forritið þar sem eftirfarandi kerfiskröfur eru ekki uppfylltar:",
"Enable only for specific groups" : "Einungis fyrir sérstaka hópa",
"Uninstall App" : "Fjarlægja/Henda út forriti",
diff --git a/settings/l10n/is.json b/settings/l10n/is.json
index d64b2f0354a..76cde2f9a9b 100644
--- a/settings/l10n/is.json
+++ b/settings/l10n/is.json
@@ -83,6 +83,7 @@
"Strong password" : "Sterkt lykilorð",
"Groups" : "Hópar",
"Unable to delete {objName}" : "Get ekki eytt {objName}",
+ "Error creating group: {message}" : "Villa við að búa til hóp: {message}",
"A valid group name must be provided" : "Skráðu inn gilt heiti á hópi",
"deleted {groupName}" : "eyddi {groupName}",
"undo" : "afturkalla",
@@ -91,6 +92,7 @@
"deleted {userName}" : "eyddi {userName}",
"add group" : "bæta við hópi",
"A valid username must be provided" : "Skráðu inn gilt notandanafn",
+ "Error creating user: {message}" : "Villa við að búa til notanda: {message}",
"A valid password must be provided" : "Skráðu inn gilt lykilorð",
"A valid email must be provided" : "Skráðu inn gilt tölvupóstfang",
"__language_name__" : "Íslenska",
@@ -126,6 +128,7 @@
"Last cron job execution: %s." : "Síðasta keyrsla cron-verks: %s.",
"Last cron job execution: %s. Something seems wrong." : "Síðasta keyrsla cron-verks: %s. Eitthvað er ekki eins og það á að sér að vera.",
"Enable server-side encryption" : "Virkja dulritun á þjóni",
+ "Please read carefully before activating server-side encryption: " : "Lestu eftirfarandi gaumgæfilega áður en þú virkjar dulritun á þjóni: ",
"Enable encryption" : "Virkja dulritun",
"Select default encryption module:" : "Veldu sjálfgefna dulritunareiningu:",
"Start migration" : "Hefja yfirfærslu",
@@ -167,6 +170,7 @@
"Admin documentation" : "Hjálparskjöl kerfisstjóra",
"Show description …" : "Birta lýsingu …",
"Hide description …" : "Fela lýsingu …",
+ "This app has an update available." : "Uppfærsla er tiltæk fyrir þetta forrit.",
"This app cannot be installed because the following dependencies are not fulfilled:" : "Ekki var hægt að setja upp forritið þar sem eftirfarandi kerfiskröfur eru ekki uppfylltar:",
"Enable only for specific groups" : "Einungis fyrir sérstaka hópa",
"Uninstall App" : "Fjarlægja/Henda út forriti",
diff --git a/settings/l10n/ru.js b/settings/l10n/ru.js
index 47dec774067..62b232c521a 100644
--- a/settings/l10n/ru.js
+++ b/settings/l10n/ru.js
@@ -67,11 +67,15 @@ OC.L10N.register(
"Approved apps are developed by trusted developers and have passed a cursory security check. They are actively maintained in an open code repository and their maintainers deem them to be stable for casual to normal use." : "Подтвержденные приложения разработаны доверенными разработчиками и прошли краткую проверку на наличие проблем с безопасностью. Они активно поддерживаются в открытых репозиториях и сопровождающие их разработчики подтверждают, что приложения достаточно стабильны для нормальной работы.",
"This app is not checked for security issues and is new or known to be unstable. Install at your own risk." : "Это приложение не проверялось на наличие проблем с безопасностью, также оно может работать нестабильно. Устанавливайте на свой страх и риск.",
"Update to %s" : "Обновить до %s",
+ "_You have %n app update pending_::_You have %n app updates pending_" : ["%n обновление в очереди","%n обновлений в очереди","%n обновлений в очереди","%n обновлений в очереди"],
"Please wait...." : "Пожалуйста подождите...",
"Error while disabling app" : "Ошибка при отключении приложения",
"Disable" : "Выключить",
"Enable" : "Включить",
"Error while enabling app" : "Ошибка при включении приложения",
+ "Error: this app cannot be enabled because it makes the server unstable" : "Ошибка: это приложение не может быть включено, так как оно делает сервер нестабильным",
+ "Error: could not disable broken app" : "Ошибка: невозможно отключить сломанное приложение",
+ "Error while disabling broken app" : "Ошибка при отключении сломанного приложения",
"Updating...." : "Обновление...",
"Error while updating app" : "Ошибка при обновлении приложения",
"Updated" : "Обновлено",
@@ -93,6 +97,7 @@ OC.L10N.register(
"Strong password" : "Стойкий пароль",
"Groups" : "Группы",
"Unable to delete {objName}" : "Невозможно удалить {objName}",
+ "Error creating group: {message}" : "Ошибка создания группы: {message}",
"A valid group name must be provided" : "Введите правильное имя группы",
"deleted {groupName}" : "удалена {groupName}",
"undo" : "отмена",
@@ -102,6 +107,7 @@ OC.L10N.register(
"add group" : "добавить группу",
"Changing the password will result in data loss, because data recovery is not available for this user" : "Изменение пароля приведёт к потере данных, так как восстановление данных не доступно для этого пользователя",
"A valid username must be provided" : "Укажите правильное имя пользователя",
+ "Error creating user: {message}" : "Ошибка создания пользователя: {message}",
"A valid password must be provided" : "Должен быть указан правильный пароль",
"A valid email must be provided" : "Должен быть указан корректный адрес email",
"__language_name__" : "Русский",
@@ -125,6 +131,7 @@ OC.L10N.register(
"PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "Очевидно, PHP настроен на вычищение блоков встроенной документации. Это сделает несколько центральных приложений недоступными.",
"This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Возможно это вызвано кешем/ускорителем вроде Zend OPcache или eAccelerator.",
"Your server is running on Microsoft Windows. We highly recommend Linux for optimal user experience." : "Ваш сервер работает на ОС Microsoft Windows. Мы настоятельно рекомендуем использовать ОС семейства Linux для достижения наилучших условий использования.",
+ "%1$s below version %2$s is installed, for stability and performance reasons we recommend updating to a newer %1$s version." : "%1$s ниже установленной версии %2$s, по причинам стабильности и производительности мы рекомендуем обновиться до новой версии %1$s.",
"The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "PHP-модуль 'fileinfo' отсутствует. Мы настоятельно рекомендуем включить этот модуль для улучшения определения типов (mime-type) файлов.",
"Transactional file locking is disabled, this might lead to issues with race conditions. Enable 'filelocking.enabled' in config.php to avoid these problems. See the <a target=\"_blank\" href=\"%s\">documentation ↗</a> for more information." : "Блокировка файлов во время передачи отключена, это может привести к состоянию гонки. Включите параметр 'filelocking.enabled' в config.php для избежания этой проблемы. За подробной информацией обратитесь к <a target=\"_blank\" href=\"%s\">документации</a>.",
"System locale can not be set to a one which supports UTF-8." : "Невозможно установить системную локаль, поддерживающую UTF-8",
@@ -209,6 +216,7 @@ OC.L10N.register(
"Admin documentation" : "Документация для администратора",
"Show description …" : "Показать описание ...",
"Hide description …" : "Скрыть описание ...",
+ "This app has an update available." : "Для этого приложения доступно обновление.",
"This app has no minimum ownCloud version assigned. This will be an error in ownCloud 11 and later." : "Для этого приложения не указана минимальная версия ownClowd. Будет считаться ошибкой начиная с версии ownClowd 11.",
"This app has no maximum ownCloud version assigned. This will be an error in ownCloud 11 and later." : "Для этого приложения не указана максимальная версия ownClowd. Будет считаться ошибкой начиная с версии ownClowd 11.",
"This app cannot be installed because the following dependencies are not fulfilled:" : "Приложение не может быть установлено, следующие зависимости не удовлетворены:",
diff --git a/settings/l10n/ru.json b/settings/l10n/ru.json
index e59622f67be..21a014871fb 100644
--- a/settings/l10n/ru.json
+++ b/settings/l10n/ru.json
@@ -65,11 +65,15 @@
"Approved apps are developed by trusted developers and have passed a cursory security check. They are actively maintained in an open code repository and their maintainers deem them to be stable for casual to normal use." : "Подтвержденные приложения разработаны доверенными разработчиками и прошли краткую проверку на наличие проблем с безопасностью. Они активно поддерживаются в открытых репозиториях и сопровождающие их разработчики подтверждают, что приложения достаточно стабильны для нормальной работы.",
"This app is not checked for security issues and is new or known to be unstable. Install at your own risk." : "Это приложение не проверялось на наличие проблем с безопасностью, также оно может работать нестабильно. Устанавливайте на свой страх и риск.",
"Update to %s" : "Обновить до %s",
+ "_You have %n app update pending_::_You have %n app updates pending_" : ["%n обновление в очереди","%n обновлений в очереди","%n обновлений в очереди","%n обновлений в очереди"],
"Please wait...." : "Пожалуйста подождите...",
"Error while disabling app" : "Ошибка при отключении приложения",
"Disable" : "Выключить",
"Enable" : "Включить",
"Error while enabling app" : "Ошибка при включении приложения",
+ "Error: this app cannot be enabled because it makes the server unstable" : "Ошибка: это приложение не может быть включено, так как оно делает сервер нестабильным",
+ "Error: could not disable broken app" : "Ошибка: невозможно отключить сломанное приложение",
+ "Error while disabling broken app" : "Ошибка при отключении сломанного приложения",
"Updating...." : "Обновление...",
"Error while updating app" : "Ошибка при обновлении приложения",
"Updated" : "Обновлено",
@@ -91,6 +95,7 @@
"Strong password" : "Стойкий пароль",
"Groups" : "Группы",
"Unable to delete {objName}" : "Невозможно удалить {objName}",
+ "Error creating group: {message}" : "Ошибка создания группы: {message}",
"A valid group name must be provided" : "Введите правильное имя группы",
"deleted {groupName}" : "удалена {groupName}",
"undo" : "отмена",
@@ -100,6 +105,7 @@
"add group" : "добавить группу",
"Changing the password will result in data loss, because data recovery is not available for this user" : "Изменение пароля приведёт к потере данных, так как восстановление данных не доступно для этого пользователя",
"A valid username must be provided" : "Укажите правильное имя пользователя",
+ "Error creating user: {message}" : "Ошибка создания пользователя: {message}",
"A valid password must be provided" : "Должен быть указан правильный пароль",
"A valid email must be provided" : "Должен быть указан корректный адрес email",
"__language_name__" : "Русский",
@@ -123,6 +129,7 @@
"PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "Очевидно, PHP настроен на вычищение блоков встроенной документации. Это сделает несколько центральных приложений недоступными.",
"This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Возможно это вызвано кешем/ускорителем вроде Zend OPcache или eAccelerator.",
"Your server is running on Microsoft Windows. We highly recommend Linux for optimal user experience." : "Ваш сервер работает на ОС Microsoft Windows. Мы настоятельно рекомендуем использовать ОС семейства Linux для достижения наилучших условий использования.",
+ "%1$s below version %2$s is installed, for stability and performance reasons we recommend updating to a newer %1$s version." : "%1$s ниже установленной версии %2$s, по причинам стабильности и производительности мы рекомендуем обновиться до новой версии %1$s.",
"The PHP module 'fileinfo' is missing. We strongly recommend to enable this module to get best results with mime-type detection." : "PHP-модуль 'fileinfo' отсутствует. Мы настоятельно рекомендуем включить этот модуль для улучшения определения типов (mime-type) файлов.",
"Transactional file locking is disabled, this might lead to issues with race conditions. Enable 'filelocking.enabled' in config.php to avoid these problems. See the <a target=\"_blank\" href=\"%s\">documentation ↗</a> for more information." : "Блокировка файлов во время передачи отключена, это может привести к состоянию гонки. Включите параметр 'filelocking.enabled' в config.php для избежания этой проблемы. За подробной информацией обратитесь к <a target=\"_blank\" href=\"%s\">документации</a>.",
"System locale can not be set to a one which supports UTF-8." : "Невозможно установить системную локаль, поддерживающую UTF-8",
@@ -207,6 +214,7 @@
"Admin documentation" : "Документация для администратора",
"Show description …" : "Показать описание ...",
"Hide description …" : "Скрыть описание ...",
+ "This app has an update available." : "Для этого приложения доступно обновление.",
"This app has no minimum ownCloud version assigned. This will be an error in ownCloud 11 and later." : "Для этого приложения не указана минимальная версия ownClowd. Будет считаться ошибкой начиная с версии ownClowd 11.",
"This app has no maximum ownCloud version assigned. This will be an error in ownCloud 11 and later." : "Для этого приложения не указана максимальная версия ownClowd. Будет считаться ошибкой начиная с версии ownClowd 11.",
"This app cannot be installed because the following dependencies are not fulfilled:" : "Приложение не может быть установлено, следующие зависимости не удовлетворены:",