aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.drone.yml18
-rw-r--r--README.md2
-rw-r--r--apps/comments/lib/Activity/Extension.php5
-rw-r--r--apps/files/lib/Activity.php29
-rw-r--r--apps/files_sharing/lib/Activity.php1
-rw-r--r--apps/files_sharing/tests/EtagPropagationTest.php2
-rw-r--r--apps/files_sharing/tests/GroupEtagPropagationTest.php2
-rw-r--r--apps/files_sharing/tests/SharedMountTest.php2
-rw-r--r--apps/systemtags/lib/Activity/Extension.php2
-rwxr-xr-xautotest.sh7
-rw-r--r--core/css/icons.css7
-rw-r--r--core/img/actions/star-dark.svg1
-rw-r--r--core/img/places/files-dark.svg1
-rw-r--r--lib/private/legacy/app.php74
-rw-r--r--settings/js/apps.js7
-rw-r--r--tests/lib/TestCase.php6
-rw-r--r--tests/phpunit-autotest.xml5
17 files changed, 148 insertions, 23 deletions
diff --git a/.drone.yml b/.drone.yml
index a3c3870dcdd..92dde90bf6d 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -301,7 +301,7 @@ pipeline:
when:
matrix:
TESTS: integration-sharees-features
- codecov:
+ nodb-codecov:
image: nextcloudci/php7.0:php7.0-2
commands:
- TEST_SELECTION=NODB ./autotest.sh sqlite
@@ -310,12 +310,22 @@ pipeline:
- sh -c "if [ '$DRONE_BUILD_EVENT' != 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -t 117641e2-a9e8-4b7b-984b-ae872d9b05f5 -f tests/autotest-clover-sqlite.xml; fi"
when:
matrix:
- TESTS: codecov
-
+ TESTS: nodb-codecov
+ db-codecov:
+ image: nextcloudci/php7.0:php7.0-2
+ commands:
+ - TEST_SELECTION=QUICKDB ./autotest.sh sqlite
+ - wget https://codecov.io/bash -O codecov.sh
+ - sh -c "if [ '$DRONE_BUILD_EVENT' = 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -P $DRONE_PULL_REQUEST -t 117641e2-a9e8-4b7b-984b-ae872d9b05f5 -f tests/autotest-clover-sqlite.xml; fi"
+ - sh -c "if [ '$DRONE_BUILD_EVENT' != 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -t 117641e2-a9e8-4b7b-984b-ae872d9b05f5 -f tests/autotest-clover-sqlite.xml; fi"
+ when:
+ matrix:
+ TESTS: db-codecov
matrix:
include:
- TESTS: signed-off-check
- - TESTS: codecov
+ - TESTS: nodb-codecov
+ - TESTS: db-codecov
- TESTS: integration-capabilities_features
- TESTS: integration-federation_features
- TESTS: integration-auth
diff --git a/README.md b/README.md
index 2c0f11b43bd..cd6122894af 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
# Nextcloud
-[![Build Status](https://drone.weasel.rocks/api/badges/nextcloud/server/status.svg)](https://drone.weasel.rocks/nextcloud/server)
+[![Build Status](https://drone.nextcloud.com/api/badges/nextcloud/server/status.svg)](https://drone.nextcloud.com/nextcloud/server)
[![irc](https://img.shields.io/badge/IRC-%23nextcloud%20on%20freenode-orange.svg)](https://webchat.freenode.net/?channels=nextcloud)
[![irc](https://img.shields.io/badge/IRC-%23nextcloud--dev%20on%20freenode-blue.svg)](https://webchat.freenode.net/?channels=nextcloud-dev)
diff --git a/apps/comments/lib/Activity/Extension.php b/apps/comments/lib/Activity/Extension.php
index 3bdb267358b..6bf7bc9ac0b 100644
--- a/apps/comments/lib/Activity/Extension.php
+++ b/apps/comments/lib/Activity/Extension.php
@@ -246,14 +246,15 @@ class Extension implements IExtension {
public function getNavigation() {
$l = $this->getL10N();
return [
- 'apps' => [],
- 'top' => [
+ 'apps' => [
self::APP_NAME => [
'id' => self::APP_NAME,
+ 'icon' => 'icon-comment',
'name' => (string) $l->t('Comments'),
'url' => $this->URLGenerator->linkToRoute('activity.Activities.showList', ['filter' => self::APP_NAME]),
],
],
+ 'top' => [],
];
}
diff --git a/apps/files/lib/Activity.php b/apps/files/lib/Activity.php
index b9cc98cf7ea..5fc59f119e1 100644
--- a/apps/files/lib/Activity.php
+++ b/apps/files/lib/Activity.php
@@ -104,7 +104,7 @@ class Activity implements IExtension {
$l = $this->getL10N($languageCode);
return [
self::TYPE_SHARE_CREATED => (string) $l->t('A new file or folder has been <strong>created</strong>'),
- self::TYPE_SHARE_CHANGED => (string) $l->t('A file or folder has been <strong>changed</strong>'),
+ self::TYPE_SHARE_CHANGED => (string) $l->t('A file or folder has been <strong>changed</strong> or <strong>renamed</strong>'),
self::TYPE_FAVORITES => [
'desc' => (string) $l->t('Limit notifications about creation and changes to your <strong>favorite files</strong> <em>(Stream only)</em>'),
'methods' => [self::METHOD_STREAM],
@@ -189,6 +189,14 @@ class Activity implements IExtension {
return (string) $l->t('You restored %1$s', $params);
case 'restored_by':
return (string) $l->t('%2$s restored %1$s', $params);
+ case 'renamed_self':
+ return (string) $l->t('You renamed %2$s to %1$s', $params);
+ case 'renamed_by':
+ return (string) $l->t('%2$s renamed %3$s to %1$s', $params);
+ case 'moved_self':
+ return (string) $l->t('You moved %2$s to %1$s', $params);
+ case 'moved_by':
+ return (string) $l->t('%2$s moved %3$s to %1$s', $params);
default:
return false;
@@ -209,6 +217,10 @@ class Activity implements IExtension {
return (string) $l->t('Deleted by %2$s', $params);
case 'restored_by':
return (string) $l->t('Restored by %2$s', $params);
+ case 'renamed_by':
+ return (string) $l->t('Renamed by %2$s', $params);
+ case 'moved_by':
+ return (string) $l->t('Moved by %2$s', $params);
default:
return false;
@@ -242,6 +254,19 @@ class Activity implements IExtension {
0 => 'file',
1 => 'username',
];
+ case 'renamed_self':
+ case 'moved_self':
+ return [
+ 0 => 'file',
+ 1 => 'file',
+ ];
+ case 'renamed_by':
+ case 'moved_by':
+ return [
+ 0 => 'file',
+ 1 => 'username',
+ 2 => 'file',
+ ];
}
}
@@ -306,6 +331,7 @@ class Activity implements IExtension {
'top' => [
self::FILTER_FAVORITES => [
'id' => self::FILTER_FAVORITES,
+ 'icon' => 'icon-favorite',
'name' => (string) $this->l->t('Favorites'),
'url' => $this->URLGenerator->linkToRoute('activity.Activities.showList', ['filter' => self::FILTER_FAVORITES]),
],
@@ -313,6 +339,7 @@ class Activity implements IExtension {
'apps' => [
self::FILTER_FILES => [
'id' => self::FILTER_FILES,
+ 'icon' => 'icon-files-dark',
'name' => (string) $this->l->t('Files'),
'url' => $this->URLGenerator->linkToRoute('activity.Activities.showList', ['filter' => self::FILTER_FILES]),
],
diff --git a/apps/files_sharing/lib/Activity.php b/apps/files_sharing/lib/Activity.php
index f69f86175f8..4d57cc8c7b2 100644
--- a/apps/files_sharing/lib/Activity.php
+++ b/apps/files_sharing/lib/Activity.php
@@ -429,6 +429,7 @@ class Activity implements IExtension {
'top' => [
self::FILTER_SHARES => [
'id' => self::FILTER_SHARES,
+ 'icon' => 'icon-share',
'name' => (string) $l->t('Shares'),
'url' => $this->URLGenerator->linkToRoute('activity.Activities.showList', ['filter' => self::FILTER_SHARES]),
],
diff --git a/apps/files_sharing/tests/EtagPropagationTest.php b/apps/files_sharing/tests/EtagPropagationTest.php
index 977f98f0497..4aba9e29113 100644
--- a/apps/files_sharing/tests/EtagPropagationTest.php
+++ b/apps/files_sharing/tests/EtagPropagationTest.php
@@ -34,7 +34,7 @@ use OC\Files\View;
/**
* Class EtagPropagationTest
*
- * @group DB
+ * @group SLOWDB
*
* @package OCA\Files_Sharing\Tests
*/
diff --git a/apps/files_sharing/tests/GroupEtagPropagationTest.php b/apps/files_sharing/tests/GroupEtagPropagationTest.php
index 0ff3a4c01c6..eeb3c06bc59 100644
--- a/apps/files_sharing/tests/GroupEtagPropagationTest.php
+++ b/apps/files_sharing/tests/GroupEtagPropagationTest.php
@@ -28,7 +28,7 @@ use OC\Files\Filesystem;
use OC\Files\View;
/**
- * @group DB
+ * @group SLOWDB
*
* @package OCA\Files_Sharing\Tests
*/
diff --git a/apps/files_sharing/tests/SharedMountTest.php b/apps/files_sharing/tests/SharedMountTest.php
index 7427304eb14..5f769852dc8 100644
--- a/apps/files_sharing/tests/SharedMountTest.php
+++ b/apps/files_sharing/tests/SharedMountTest.php
@@ -31,7 +31,7 @@ namespace OCA\Files_Sharing\Tests;
/**
* Class SharedMountTest
*
- * @group DB
+ * @group SLOWDB
*/
class SharedMountTest extends TestCase {
diff --git a/apps/systemtags/lib/Activity/Extension.php b/apps/systemtags/lib/Activity/Extension.php
index c7342bd2af7..9fac2ddbc62 100644
--- a/apps/systemtags/lib/Activity/Extension.php
+++ b/apps/systemtags/lib/Activity/Extension.php
@@ -98,7 +98,7 @@ class Extension implements IExtension {
public function getTypeIcon($type) {
switch ($type) {
case self::APP_NAME:
- return false;
+ return 'icon-tag';
}
return false;
diff --git a/autotest.sh b/autotest.sh
index 2dfa961a1a2..eca3d81c048 100755
--- a/autotest.sh
+++ b/autotest.sh
@@ -293,11 +293,14 @@ function execute_tests {
export XDEBUG_CONFIG=$_XDEBUG_CONFIG
fi
GROUP=''
+ if [ "$TEST_SELECTION" == "QUICKDB" ]; then
+ GROUP='--group DB --exclude-group=SLOWDB'
+ fi
if [ "$TEST_SELECTION" == "DB" ]; then
- GROUP='--group DB'
+ GROUP='--group DB,SLOWDB'
fi
if [ "$TEST_SELECTION" == "NODB" ]; then
- GROUP='--exclude-group DB'
+ GROUP='--exclude-group DB,SLOWDB'
fi
COVER=''
diff --git a/core/css/icons.css b/core/css/icons.css
index 45069a23c44..50dcf51fd3a 100644
--- a/core/css/icons.css
+++ b/core/css/icons.css
@@ -282,6 +282,10 @@ img.icon-loading-small-dark, object.icon-loading-small-dark, video.icon-loading-
background-image: url('../img/actions/sound-off.svg?v=1');
}
+.icon-favorite {
+ background-image: url('../img/actions/star-dark.svg?v=1');
+}
+
.icon-star,
.icon-starred:hover,
.icon-starred:focus {
@@ -365,6 +369,9 @@ img.icon-loading-small-dark, object.icon-loading-small-dark, video.icon-loading-
.icon-files {
background-image: url('../img/places/files.svg?v=1');
}
+.icon-files-dark {
+ background-image: url('../img/places/files-dark.svg?v=1');
+}
.icon-file,
.icon-filetype-text {
background-image: url('../img/filetypes/text.svg?v=1');
diff --git a/core/img/actions/star-dark.svg b/core/img/actions/star-dark.svg
new file mode 100644
index 00000000000..6edb7ea5000
--- /dev/null
+++ b/core/img/actions/star-dark.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" height="22" width="22"><path d="M11.017.06l2.946 7.384L22 8.077l-6.11 5.082L17.77 21l-6.72-4.242-6.876 4.213 1.957-7.703L0 8.03l7.932-.52z"/></svg>
diff --git a/core/img/places/files-dark.svg b/core/img/places/files-dark.svg
new file mode 100644
index 00000000000..dfcad56018a
--- /dev/null
+++ b/core/img/places/files-dark.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" height="32" width="32"><path d="M2.917 5.015c-.5 0-.92.42-.92.92v22.16c0 .516.402.92.92.92h26.157a.91.91 0 0 0 .92-.92V9.938c0-.5-.418-.926-.92-.926H15.997l-4-4z" fill-rule="evenodd"/></svg> \ No newline at end of file
diff --git a/lib/private/legacy/app.php b/lib/private/legacy/app.php
index d964212f3bb..c3d2d1d6ad4 100644
--- a/lib/private/legacy/app.php
+++ b/lib/private/legacy/app.php
@@ -662,15 +662,16 @@ class OC_App {
* Read all app metadata from the info.xml file
*
* @param string $appId id of the app or the path of the info.xml file
- * @param boolean $path (optional)
+ * @param bool $path
+ * @param string $lang
* @return array|null
* @note all data is read from info.xml, not just pre-defined fields
*/
- public static function getAppInfo($appId, $path = false) {
+ public static function getAppInfo($appId, $path = false, $lang = null) {
if ($path) {
$file = $appId;
} else {
- if (isset(self::$appInfo[$appId])) {
+ if ($lang === null && isset(self::$appInfo[$appId])) {
return self::$appInfo[$appId];
}
$appPath = self::getAppPath($appId);
@@ -684,7 +685,7 @@ class OC_App {
$data = $parser->parse($file);
if (is_array($data)) {
- $data = OC_App::parseAppInfo($data);
+ $data = OC_App::parseAppInfo($data, $lang);
}
if(isset($data['ocsid'])) {
$storedId = \OC::$server->getConfig()->getAppValue($appId, 'ocsid');
@@ -693,7 +694,9 @@ class OC_App {
}
}
- self::$appInfo[$appId] = $data;
+ if ($lang === null) {
+ self::$appInfo[$appId] = $data;
+ }
return $data;
}
@@ -843,11 +846,12 @@ class OC_App {
//we don't want to show configuration for these
$blacklist = \OC::$server->getAppManager()->getAlwaysEnabledApps();
$appList = array();
+ $langCode = \OC::$server->getL10N('core')->getLanguageCode();
foreach ($installedApps as $app) {
if (array_search($app, $blacklist) === false) {
- $info = OC_App::getAppInfo($app);
+ $info = OC_App::getAppInfo($app, false, $langCode);
if (!is_array($info)) {
\OCP\Util::writeLog('core', 'Could not read app info file for app "' . $app . '"', \OCP\Util::ERROR);
continue;
@@ -1327,13 +1331,69 @@ class OC_App {
}
}
+ protected static function findBestL10NOption($options, $lang) {
+ $fallback = $similarLangFallback = $englishFallback = false;
+
+ $lang = strtolower($lang);
+ $similarLang = $lang;
+ if (strpos($similarLang, '_')) {
+ // For "de_DE" we want to find "de" and the other way around
+ $similarLang = substr($lang, 0, strpos($lang, '_'));
+ }
+
+ foreach ($options as $option) {
+ if (is_array($option)) {
+ if ($fallback === false) {
+ $fallback = $option['@value'];
+ }
+
+ if (!isset($option['@attributes']['lang'])) {
+ continue;
+ }
+
+ $attributeLang = strtolower($option['@attributes']['lang']);
+ if ($attributeLang === $lang) {
+ return $option['@value'];
+ }
+
+ if ($attributeLang === $similarLang) {
+ $similarLangFallback = $option['@value'];
+ } else if (strpos($attributeLang, $similarLang . '_') === 0) {
+ if ($similarLangFallback === false) {
+ $similarLangFallback = $option['@value'];
+ }
+ }
+ } else {
+ $englishFallback = $option;
+ }
+ }
+
+ if ($similarLangFallback !== false) {
+ return $similarLangFallback;
+ } else if ($englishFallback !== false) {
+ return $englishFallback;
+ }
+ return (string) $fallback;
+ }
+
/**
* parses the app data array and enhanced the 'description' value
*
* @param array $data the app data
+ * @param string $lang
* @return array improved app data
*/
- public static function parseAppInfo(array $data) {
+ public static function parseAppInfo(array $data, $lang = null) {
+
+ if ($lang && isset($data['name']) && is_array($data['name'])) {
+ $data['name'] = self::findBestL10NOption($data['name'], $lang);
+ }
+ if ($lang && isset($data['summary']) && is_array($data['summary'])) {
+ $data['summary'] = self::findBestL10NOption($data['summary'], $lang);
+ }
+ if ($lang && isset($data['description']) && is_array($data['description'])) {
+ $data['description'] = self::findBestL10NOption($data['description'], $lang);
+ }
// just modify the description if it is available
// otherwise this will create a $data element with an empty 'description'
diff --git a/settings/js/apps.js b/settings/js/apps.js
index 99246f323fe..5119b35178e 100644
--- a/settings/js/apps.js
+++ b/settings/js/apps.js
@@ -183,6 +183,10 @@ OC.Settings.Apps = OC.Settings.Apps || {
app.previewAsIcon = true;
}
+ if (_.isArray(app.author)) {
+ app.author = app.author.join(', ');
+ }
+
var html = template(app);
if (selector) {
selector.html(html);
@@ -513,6 +517,9 @@ OC.Settings.Apps = OC.Settings.Apps || {
// Author Name
apps = apps.concat(_.filter(OC.Settings.Apps.State.apps, function (app) {
+ if (_.isArray(app.author)) {
+ return app.author.join(', ').toLowerCase().indexOf(query) !== -1;
+ }
return app.author.toLowerCase().indexOf(query) !== -1;
}));
diff --git a/tests/lib/TestCase.php b/tests/lib/TestCase.php
index 0389ef5d46b..7ccff382357 100644
--- a/tests/lib/TestCase.php
+++ b/tests/lib/TestCase.php
@@ -435,8 +435,10 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase {
return true;
}
$annotations = $this->getAnnotations();
- if (isset($annotations['class']['group']) && in_array('DB', $annotations['class']['group'])) {
- return true;
+ if (isset($annotations['class']['group'])) {
+ if(in_array('DB', $annotations['class']['group']) || in_array('SLOWDB', $annotations['class']['group']) ) {
+ return true;
+ }
}
return false;
diff --git a/tests/phpunit-autotest.xml b/tests/phpunit-autotest.xml
index 301f63a375d..3a82a56ebbf 100644
--- a/tests/phpunit-autotest.xml
+++ b/tests/phpunit-autotest.xml
@@ -29,10 +29,15 @@
<directory suffix=".php">../apps/files_trashbin/tests</directory>
<directory suffix=".php">../apps/files_versions/tests</directory>
<directory suffix=".php">../apps/provisioning_api/tests</directory>
+ <directory suffix=".php">../apps/systemtags/tests</directory>
+ <directory suffix=".php">../apps/theming/tests</directory>
+ <directory suffix=".php">../apps/twofactor_backupcodes/tests</directory>
<directory suffix=".php">../apps/updatenotification/tests</directory>
<directory suffix=".php">../apps/user_ldap/tests</directory>
+ <directory suffix=".php">../apps/workflowengine/tests</directory>
<directory suffix=".php">../tests</directory>
<directory suffix=".php">../build</directory>
+ <directory suffix=".php">../lib/composer</directory>
</exclude>
</whitelist>
</filter>