Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/lint.yml4
-rw-r--r--.github/workflows/oci.yml2
-rw-r--r--.github/workflows/s3-external.yml4
-rw-r--r--.github/workflows/static-code-analysis.yml4
-rw-r--r--.github/workflows/update-psalm-baseline.yml2
-rw-r--r--apps/files_sharing/lib/External/Scanner.php2
-rw-r--r--lib/private/App/PlatformRepository.php4
-rw-r--r--lib/private/Installer.php9
-rw-r--r--lib/private/Log.php27
-rw-r--r--lib/private/User/Manager.php3
-rw-r--r--lib/private/legacy/OC_Util.php1
11 files changed, 34 insertions, 28 deletions
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 8fdd2948000..3533e188932 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -15,7 +15,7 @@ jobs:
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-versions }}
- extensions: ctype,curl,dom,fileinfo,gd,iconv,intl,json,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
+ extensions: ctype,curl,dom,fileinfo,gd,intl,json,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
coverage: none
- name: Lint
run: composer run lint
@@ -30,7 +30,7 @@ jobs:
uses: shivammathur/setup-php@master
with:
php-version: 7.4
- extensions: ctype,curl,dom,fileinfo,gd,iconv,intl,json,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
+ extensions: ctype,curl,dom,fileinfo,gd,intl,json,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
coverage: none
tools: cs2pr
- name: Install dependencies
diff --git a/.github/workflows/oci.yml b/.github/workflows/oci.yml
index 04d1dfdbab7..7c653d10d06 100644
--- a/.github/workflows/oci.yml
+++ b/.github/workflows/oci.yml
@@ -41,7 +41,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
- extensions: ctype,curl,dom,fileinfo,gd,iconv,intl,json,mbstring,oci8,openssl,pdo_sqlite,posix,sqlite,xml,zip
+ extensions: ctype,curl,dom,fileinfo,gd,intl,json,mbstring,oci8,openssl,pdo_sqlite,posix,sqlite,xml,zip
tools: phpunit:8.5.2
coverage: none
diff --git a/.github/workflows/s3-external.yml b/.github/workflows/s3-external.yml
index 497de81ae2f..dedab6b0c16 100644
--- a/.github/workflows/s3-external.yml
+++ b/.github/workflows/s3-external.yml
@@ -45,7 +45,7 @@ jobs:
with:
php-version: ${{ matrix.php-versions }}
tools: phpunit
- extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite, zip, gd
+ extensions: mbstring, fileinfo, intl, sqlite, pdo_sqlite, zip, gd
- name: Set up Nextcloud
run: |
@@ -94,7 +94,7 @@ jobs:
with:
php-version: ${{ matrix.php-versions }}
tools: phpunit
- extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite, zip, gd
+ extensions: mbstring, fileinfo, intl, sqlite, pdo_sqlite, zip, gd
- name: Set up Nextcloud
run: |
diff --git a/.github/workflows/static-code-analysis.yml b/.github/workflows/static-code-analysis.yml
index 0a2df0d71f9..31ee0f89fa2 100644
--- a/.github/workflows/static-code-analysis.yml
+++ b/.github/workflows/static-code-analysis.yml
@@ -17,7 +17,7 @@ jobs:
uses: shivammathur/setup-php@master
with:
php-version: 7.4
- extensions: ctype,curl,dom,fileinfo,gd,iconv,intl,json,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
+ extensions: ctype,curl,dom,fileinfo,gd,intl,json,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
coverage: none
- name: Composer install
run: composer i
@@ -43,7 +43,7 @@ jobs:
uses: shivammathur/setup-php@master
with:
php-version: 7.4
- extensions: ctype,curl,dom,fileinfo,gd,iconv,intl,json,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
+ extensions: ctype,curl,dom,fileinfo,gd,intl,json,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
coverage: none
- name: Composer install
run: composer i
diff --git a/.github/workflows/update-psalm-baseline.yml b/.github/workflows/update-psalm-baseline.yml
index b5b38cd888b..9fdaeffe22c 100644
--- a/.github/workflows/update-psalm-baseline.yml
+++ b/.github/workflows/update-psalm-baseline.yml
@@ -18,7 +18,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
- extensions: ctype,curl,dom,fileinfo,gd,iconv,intl,json,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
+ extensions: ctype,curl,dom,fileinfo,gd,intl,json,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
coverage: none
- name: Composer install
diff --git a/apps/files_sharing/lib/External/Scanner.php b/apps/files_sharing/lib/External/Scanner.php
index 8115159d181..54d5a33d517 100644
--- a/apps/files_sharing/lib/External/Scanner.php
+++ b/apps/files_sharing/lib/External/Scanner.php
@@ -37,7 +37,7 @@ class Scanner extends \OC\Files\Cache\Scanner {
/** {@inheritDoc} */
public function scan($path, $recursive = self::SCAN_RECURSIVE, $reuse = -1, $lock = true) {
if (!$this->storage->remoteIsOwnCloud()) {
- return parent::scan($path, $recursive, $recursive, $lock);
+ return parent::scan($path, $recursive, $reuse, $lock);
}
$this->scanAll();
diff --git a/lib/private/App/PlatformRepository.php b/lib/private/App/PlatformRepository.php
index ed8e550ca77..94fac5260e1 100644
--- a/lib/private/App/PlatformRepository.php
+++ b/lib/private/App/PlatformRepository.php
@@ -65,10 +65,6 @@ class PlatformRepository {
$prettyVersion = $curlVersion['version'];
break;
- case 'iconv':
- $prettyVersion = ICONV_VERSION;
- break;
-
case 'intl':
$name = 'ICU';
if (defined('INTL_ICU_VERSION')) {
diff --git a/lib/private/Installer.php b/lib/private/Installer.php
index cacaafec671..d094dbba6e8 100644
--- a/lib/private/Installer.php
+++ b/lib/private/Installer.php
@@ -150,7 +150,7 @@ class Installer {
//install the database
$ms = new MigrationService($info['id'], \OC::$server->get(Connection::class));
- $ms->migrate('latest', true);
+ $ms->migrate('latest', !$previousVersion);
if ($previousVersion) {
OC_App::executeRepairSteps($appId, $info['repair-steps']['post-migration']);
@@ -596,8 +596,11 @@ class Installer {
$appPath = OC_App::getAppPath($app);
\OC_App::registerAutoloading($app, $appPath);
+ $config = \OC::$server->getConfig();
+
$ms = new MigrationService($app, \OC::$server->get(Connection::class));
- $ms->migrate('latest', true);
+ $previousVersion = $config->getAppValue($app, 'installed_version', false);
+ $ms->migrate('latest', !$previousVersion);
//run appinfo/install.php
self::includeAppScript("$appPath/appinfo/install.php");
@@ -610,8 +613,6 @@ class Installer {
OC_App::executeRepairSteps($app, $info['repair-steps']['install']);
- $config = \OC::$server->getConfig();
-
$config->setAppValue($app, 'installed_version', OC_App::getAppVersion($app));
if (array_key_exists('ocsid', $info)) {
$config->setAppValue($app, 'ocsid', $info['ocsid']);
diff --git a/lib/private/Log.php b/lib/private/Log.php
index 9c6a1b614c6..edbfdea7b9d 100644
--- a/lib/private/Log.php
+++ b/lib/private/Log.php
@@ -43,6 +43,7 @@ use OCP\ILogger;
use OCP\Log\IFileBased;
use OCP\Log\IWriter;
use OCP\Support\CrashReport\IRegistry;
+use function strtr;
/**
* logging utilities
@@ -206,13 +207,7 @@ class Log implements ILogger, IDataLogger {
array_walk($context, [$this->normalizer, 'format']);
$app = $context['app'] ?? 'no app in context';
-
- // interpolate $message as defined in PSR-3
- $replace = [];
- foreach ($context as $key => $val) {
- $replace['{' . $key . '}'] = $val;
- }
- $message = strtr($message, $replace);
+ $message = $this->interpolateMessage($context, $message);
try {
if ($level >= $minLevel) {
@@ -315,7 +310,7 @@ class Log implements ILogger, IDataLogger {
$serializer = new ExceptionSerializer($this->config);
$data = $serializer->serializeException($exception);
- $data['CustomMessage'] = $context['message'] ?? '--';
+ $data['CustomMessage'] = $this->interpolateMessage($context, $context['message'] ?? '--');
$minLevel = $this->getLogLevel($context);
@@ -376,4 +371,20 @@ class Log implements ILogger, IDataLogger {
}
throw new \RuntimeException('Log implementation has no path');
}
+
+ /**
+ * Interpolate $message as defined in PSR-3
+ *
+ * @param array $context
+ * @param string $message
+ *
+ * @return string
+ */
+ private function interpolateMessage(array $context, string $message): string {
+ $replace = [];
+ foreach ($context as $key => $val) {
+ $replace['{' . $key . '}'] = $val;
+ }
+ return strtr($message, $replace);
+ }
}
diff --git a/lib/private/User/Manager.php b/lib/private/User/Manager.php
index bebb9c8c72c..bd1e7c4de2a 100644
--- a/lib/private/User/Manager.php
+++ b/lib/private/User/Manager.php
@@ -617,8 +617,7 @@ class Manager extends PublicEmitter implements IUserManager {
$queryBuilder->select($queryBuilder->func()->count('*'))
->from('preferences')
->where($queryBuilder->expr()->eq('appid', $queryBuilder->createNamedParameter('login')))
- ->andWhere($queryBuilder->expr()->eq('configkey', $queryBuilder->createNamedParameter('lastLogin')))
- ->andWhere($queryBuilder->expr()->isNotNull('configvalue'));
+ ->andWhere($queryBuilder->expr()->eq('configkey', $queryBuilder->createNamedParameter('lastLogin')));
$query = $queryBuilder->execute();
diff --git a/lib/private/legacy/OC_Util.php b/lib/private/legacy/OC_Util.php
index 49d24efdfb9..d351b0daa76 100644
--- a/lib/private/legacy/OC_Util.php
+++ b/lib/private/legacy/OC_Util.php
@@ -836,7 +836,6 @@ class OC_Util {
'json_encode' => 'JSON',
'gd_info' => 'GD',
'gzencode' => 'zlib',
- 'iconv' => 'iconv',
'simplexml_load_string' => 'SimpleXML',
'hash' => 'HASH Message Digest Framework',
'curl_init' => 'cURL',