summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/l10n/eo.js35
-rw-r--r--lib/l10n/eo.json35
-rw-r--r--lib/l10n/fr.js1
-rw-r--r--lib/l10n/fr.json1
-rw-r--r--lib/l10n/ru.js1
-rw-r--r--lib/l10n/ru.json1
-rw-r--r--lib/private/BackgroundJob/JobList.php40
-rw-r--r--lib/private/Updater.php24
-rw-r--r--lib/private/legacy/template.php1
9 files changed, 128 insertions, 11 deletions
diff --git a/lib/l10n/eo.js b/lib/l10n/eo.js
index bc87b260f7c..46310229b86 100644
--- a/lib/l10n/eo.js
+++ b/lib/l10n/eo.js
@@ -3,6 +3,10 @@ OC.L10N.register(
{
"Cannot write into \"config\" directory!" : "Ne skribeblas la dosierujo “config”!",
"See %s" : "Vidi %s",
+ "%1$s and %2$s" : "%1$s kaj %2$s",
+ "%1$s, %2$s and %3$s" : "%1$s, %2$s kaj %3$s",
+ "%1$s, %2$s, %3$s and %4$s" : "%1$s, %2$s, %3$s kaj %4$s",
+ "%1$s, %2$s, %3$s, %4$s and %5$s" : "%1$s, %2$s, %3$s, %4$s kaj %5$s",
"PHP %s or higher is required." : "PHP %s aŭ pli alta necesas.",
"PHP with a version lower than %s is required." : "Necesas pli malalta eldono de PHP ol %s.",
"Following databases are supported: %s" : "La jenan datumbazoj kongruas: %s",
@@ -62,6 +66,7 @@ OC.L10N.register(
"Sharing %s failed, because the sharing backend for %s could not find its source" : "Kunhavigo de %s malsukcesis, ĉar la kunhavmotoro por %s ne povis trovi ĝian fonton",
"Expiration date is in the past" : "Senvalidiĝa dato estintas",
"%s shared »%s« with you" : "%s kunhavigis “%s” kun vi",
+ "Open »%s«" : "Malfermi »%s«",
"%s via %s" : "%s per %s",
"Could not find category \"%s\"" : "Ne troviĝis kategorio “%s”",
"Sunday" : "dimanĉo",
@@ -85,10 +90,36 @@ OC.L10N.register(
"Th" : "Ĵa",
"Fr" : "Ve",
"Sa" : "Sa",
+ "January" : "Januaro",
+ "February" : "Februaro",
+ "March" : "Marto",
+ "April" : "Aprilo",
+ "May" : "Majo",
+ "June" : "Junio",
+ "July" : "Julio",
+ "August" : "Aŭgusto",
+ "September" : "Septembro",
+ "October" : "Oktobro",
+ "November" : "Novembro",
+ "December" : "Decembro",
+ "Jan." : "Jan.",
+ "Feb." : "Feb.",
+ "Mar." : "Mar.",
+ "Apr." : "Apr.",
+ "May." : "Maj.",
+ "Jun." : "Jun.",
+ "Jul." : "Jul.",
+ "Aug." : "Aŭg.",
+ "Sep." : "Sep.",
+ "Oct." : "Okt.",
+ "Nov." : "Nov.",
+ "Dec." : "Dec.",
"A valid username must be provided" : "Valida uzantonomo devas proviziĝi",
"Username contains whitespace at the beginning or at the end" : "Uzantonomo enhavas blankospacon eke aŭ maleke",
"A valid password must be provided" : "Valida pasvorto devas proviziĝi",
"The username is already being used" : "La uzantonomo jam uzatas",
+ "Could not create user" : "Ne povis kreiĝi uzanton",
+ "User disabled" : "Uzanto estas malkapabligita",
"a safe home for all your data" : "sekura hejmo por ĉion vian datumon",
"Can't read file" : "Ne legeblas dosiero",
"Application is not enabled" : "La aplikaĵo ne estas kapabligita",
@@ -96,6 +127,7 @@ OC.L10N.register(
"Token expired. Please reload page." : "Ĵetono eksvalidiĝis. Bonvolu reŝargi la paĝon.",
"Cannot write into \"config\" directory" : "Ne skribeblas la dosierujo “config”",
"Cannot write into \"apps\" directory" : "Ne skribeblas la dosierujo “apps”",
+ "Cannot create \"data\" directory" : "Ne kreeblas la dosierujo “data”",
"Please ask your server administrator to install the module." : "Bonvolu peti vian sistemadministranton, ke ĝi instalu la modulon.",
"PHP module %s not installed." : "La PHP-modulo %s ne instalitas.",
"Please ask your server administrator to restart the web server." : "Bonvolu peti viajn serviladministranton, ke ŝi/li reekfunkciigu la TTT-servilon.",
@@ -103,6 +135,7 @@ OC.L10N.register(
"Please upgrade your database version" : "Bonvolu ĝisdatigi la eldonon de via datumbazo",
"Storage connection error. %s" : "Memorokonekta eraro. %s",
"Personal" : "Persona",
- "Admin" : "Administranto"
+ "Admin" : "Administranto",
+ "DB Error: \"%s\"" : "Datumbaza eraro: “%s”"
},
"nplurals=2; plural=(n != 1);");
diff --git a/lib/l10n/eo.json b/lib/l10n/eo.json
index 3fc0a8c6f87..e4629daeca5 100644
--- a/lib/l10n/eo.json
+++ b/lib/l10n/eo.json
@@ -1,6 +1,10 @@
{ "translations": {
"Cannot write into \"config\" directory!" : "Ne skribeblas la dosierujo “config”!",
"See %s" : "Vidi %s",
+ "%1$s and %2$s" : "%1$s kaj %2$s",
+ "%1$s, %2$s and %3$s" : "%1$s, %2$s kaj %3$s",
+ "%1$s, %2$s, %3$s and %4$s" : "%1$s, %2$s, %3$s kaj %4$s",
+ "%1$s, %2$s, %3$s, %4$s and %5$s" : "%1$s, %2$s, %3$s, %4$s kaj %5$s",
"PHP %s or higher is required." : "PHP %s aŭ pli alta necesas.",
"PHP with a version lower than %s is required." : "Necesas pli malalta eldono de PHP ol %s.",
"Following databases are supported: %s" : "La jenan datumbazoj kongruas: %s",
@@ -60,6 +64,7 @@
"Sharing %s failed, because the sharing backend for %s could not find its source" : "Kunhavigo de %s malsukcesis, ĉar la kunhavmotoro por %s ne povis trovi ĝian fonton",
"Expiration date is in the past" : "Senvalidiĝa dato estintas",
"%s shared »%s« with you" : "%s kunhavigis “%s” kun vi",
+ "Open »%s«" : "Malfermi »%s«",
"%s via %s" : "%s per %s",
"Could not find category \"%s\"" : "Ne troviĝis kategorio “%s”",
"Sunday" : "dimanĉo",
@@ -83,10 +88,36 @@
"Th" : "Ĵa",
"Fr" : "Ve",
"Sa" : "Sa",
+ "January" : "Januaro",
+ "February" : "Februaro",
+ "March" : "Marto",
+ "April" : "Aprilo",
+ "May" : "Majo",
+ "June" : "Junio",
+ "July" : "Julio",
+ "August" : "Aŭgusto",
+ "September" : "Septembro",
+ "October" : "Oktobro",
+ "November" : "Novembro",
+ "December" : "Decembro",
+ "Jan." : "Jan.",
+ "Feb." : "Feb.",
+ "Mar." : "Mar.",
+ "Apr." : "Apr.",
+ "May." : "Maj.",
+ "Jun." : "Jun.",
+ "Jul." : "Jul.",
+ "Aug." : "Aŭg.",
+ "Sep." : "Sep.",
+ "Oct." : "Okt.",
+ "Nov." : "Nov.",
+ "Dec." : "Dec.",
"A valid username must be provided" : "Valida uzantonomo devas proviziĝi",
"Username contains whitespace at the beginning or at the end" : "Uzantonomo enhavas blankospacon eke aŭ maleke",
"A valid password must be provided" : "Valida pasvorto devas proviziĝi",
"The username is already being used" : "La uzantonomo jam uzatas",
+ "Could not create user" : "Ne povis kreiĝi uzanton",
+ "User disabled" : "Uzanto estas malkapabligita",
"a safe home for all your data" : "sekura hejmo por ĉion vian datumon",
"Can't read file" : "Ne legeblas dosiero",
"Application is not enabled" : "La aplikaĵo ne estas kapabligita",
@@ -94,6 +125,7 @@
"Token expired. Please reload page." : "Ĵetono eksvalidiĝis. Bonvolu reŝargi la paĝon.",
"Cannot write into \"config\" directory" : "Ne skribeblas la dosierujo “config”",
"Cannot write into \"apps\" directory" : "Ne skribeblas la dosierujo “apps”",
+ "Cannot create \"data\" directory" : "Ne kreeblas la dosierujo “data”",
"Please ask your server administrator to install the module." : "Bonvolu peti vian sistemadministranton, ke ĝi instalu la modulon.",
"PHP module %s not installed." : "La PHP-modulo %s ne instalitas.",
"Please ask your server administrator to restart the web server." : "Bonvolu peti viajn serviladministranton, ke ŝi/li reekfunkciigu la TTT-servilon.",
@@ -101,6 +133,7 @@
"Please upgrade your database version" : "Bonvolu ĝisdatigi la eldonon de via datumbazo",
"Storage connection error. %s" : "Memorokonekta eraro. %s",
"Personal" : "Persona",
- "Admin" : "Administranto"
+ "Admin" : "Administranto",
+ "DB Error: \"%s\"" : "Datumbaza eraro: “%s”"
},"pluralForm" :"nplurals=2; plural=(n != 1);"
} \ No newline at end of file
diff --git a/lib/l10n/fr.js b/lib/l10n/fr.js
index f966e0e9bf1..478681106c0 100644
--- a/lib/l10n/fr.js
+++ b/lib/l10n/fr.js
@@ -77,6 +77,7 @@ OC.L10N.register(
"Encryption" : "Chiffrement",
"Additional settings" : "Paramètres supplémentaires",
"Personal info" : "Informations personnelles",
+ "Mobile & desktop" : "Mobile & bureau",
"Unlimited" : "Illimité",
"Verifying" : "Vérification en cours",
"Verifying …" : "Vérification en cours...",
diff --git a/lib/l10n/fr.json b/lib/l10n/fr.json
index fe12ac8591b..5cd27a1f77b 100644
--- a/lib/l10n/fr.json
+++ b/lib/l10n/fr.json
@@ -75,6 +75,7 @@
"Encryption" : "Chiffrement",
"Additional settings" : "Paramètres supplémentaires",
"Personal info" : "Informations personnelles",
+ "Mobile & desktop" : "Mobile & bureau",
"Unlimited" : "Illimité",
"Verifying" : "Vérification en cours",
"Verifying …" : "Vérification en cours...",
diff --git a/lib/l10n/ru.js b/lib/l10n/ru.js
index bbb94f61a90..b7b65230335 100644
--- a/lib/l10n/ru.js
+++ b/lib/l10n/ru.js
@@ -77,6 +77,7 @@ OC.L10N.register(
"Encryption" : "Шифрование",
"Additional settings" : "Дополнительные настройки",
"Personal info" : "Личная информация",
+ "Mobile & desktop" : "Мобильный и настольный",
"Unlimited" : "Неограничено",
"Verifying" : "Производится проверка",
"Verifying …" : "Производится проверка…",
diff --git a/lib/l10n/ru.json b/lib/l10n/ru.json
index 1a3a632d21b..cb687bb1203 100644
--- a/lib/l10n/ru.json
+++ b/lib/l10n/ru.json
@@ -75,6 +75,7 @@
"Encryption" : "Шифрование",
"Additional settings" : "Дополнительные настройки",
"Personal info" : "Личная информация",
+ "Mobile & desktop" : "Мобильный и настольный",
"Unlimited" : "Неограничено",
"Verifying" : "Производится проверка",
"Verifying …" : "Производится проверка…",
diff --git a/lib/private/BackgroundJob/JobList.php b/lib/private/BackgroundJob/JobList.php
index 1399683dc9b..a926194e9df 100644
--- a/lib/private/BackgroundJob/JobList.php
+++ b/lib/private/BackgroundJob/JobList.php
@@ -48,6 +48,9 @@ class JobList implements IJobList {
/**@var ITimeFactory */
protected $timeFactory;
+ /** @var int - 12 hours * 3600 seconds*/
+ private $jobTimeOut = 43200;
+
/**
* @param IDBConnection $connection
* @param IConfig $config
@@ -182,7 +185,7 @@ class JobList implements IJobList {
$query = $this->connection->getQueryBuilder();
$query->select('*')
->from('jobs')
- ->where($query->expr()->lte('reserved_at', $query->createNamedParameter($this->timeFactory->getTime() - 12 * 3600, IQueryBuilder::PARAM_INT)))
+ ->where($query->expr()->lte('reserved_at', $query->createNamedParameter($this->timeFactory->getTime() - $this->jobTimeOut, IQueryBuilder::PARAM_INT)))
->orderBy('last_checked', 'ASC')
->setMaxResults(1);
@@ -333,4 +336,39 @@ class JobList implements IJobList {
->where($query->expr()->eq('id', $query->createNamedParameter($job->getId(), IQueryBuilder::PARAM_INT)));
$query->execute();
}
+
+ /**
+ * checks if a job is still running (reserved_at time is smaller than 12 hours ago)
+ *
+ * Background information:
+ *
+ * The 12 hours is the same timeout that is also used to re-schedule an non-terminated
+ * job (see getNext()). The idea here is to give a job enough time to run very
+ * long but still be able to recognize that it maybe crashed and re-schedule it
+ * after the timeout. It's more likely to be crashed at that time than it ran
+ * that long.
+ *
+ * In theory it could lead to an nearly endless loop (as in - at most 12 hours).
+ * The cron command will not start new jobs when maintenance mode is active and
+ * this method is only executed in maintenance mode (see where it is called in
+ * the upgrader class. So this means in the worst case we wait 12 hours when a
+ * job has crashed. On the other hand: then the instance should be fixed anyways.
+ *
+ * @return bool
+ */
+ public function isAnyJobRunning(): bool {
+ $query = $this->connection->getQueryBuilder();
+ $query->select('*')
+ ->from('jobs')
+ ->where($query->expr()->gt('reserved_at', $query->createNamedParameter($this->timeFactory->getTime() - $this->jobTimeOut, IQueryBuilder::PARAM_INT)))
+ ->setMaxResults(1);
+ $result = $query->execute();
+ $row = $result->fetch();
+ $result->closeCursor();
+
+ if ($row) {
+ return true;
+ }
+ return false;
+ }
}
diff --git a/lib/private/Updater.php b/lib/private/Updater.php
index e6e38798142..02b3138f30f 100644
--- a/lib/private/Updater.php
+++ b/lib/private/Updater.php
@@ -38,6 +38,7 @@ use OC\DB\MigrationService;
use OC\Hooks\BasicEmitter;
use OC\IntegrityCheck\Checker;
use OC_App;
+use OCP\BackgroundJob\IJobList;
use OCP\IConfig;
use OCP\ILogger;
use OCP\Util;
@@ -66,6 +67,9 @@ class Updater extends BasicEmitter {
/** @var Installer */
private $installer;
+ /** @var IJobList */
+ private $jobList;
+
private $logLevelNames = [
0 => 'Debug',
1 => 'Info',
@@ -74,20 +78,16 @@ class Updater extends BasicEmitter {
4 => 'Fatal',
];
- /**
- * @param IConfig $config
- * @param Checker $checker
- * @param ILogger $log
- * @param Installer $installer
- */
public function __construct(IConfig $config,
Checker $checker,
- ILogger $log = null,
- Installer $installer) {
+ ILogger $log,
+ Installer $installer,
+ IJobList $jobList) {
$this->log = $log;
$this->config = $config;
$this->checker = $checker;
$this->installer = $installer;
+ $this->jobList = $jobList;
}
/**
@@ -111,6 +111,8 @@ class Updater extends BasicEmitter {
$this->emit('\OC\Updater', 'maintenanceEnabled');
}
+ $this->waitForCronToFinish();
+
$installedVersion = $this->config->getSystemValue('version', '0.0.0');
$currentVersion = implode('.', \OCP\Util::getVersion());
$this->log->debug('starting upgrade from ' . $installedVersion . ' to ' . $currentVersion, array('app' => 'core'));
@@ -604,6 +606,12 @@ class Updater extends BasicEmitter {
});
}
+ private function waitForCronToFinish() {
+ while ($this->jobList->isAnyJobRunning()) {
+ $this->emit('\OC\Updater', 'waitForCronToFinish');
+ sleep(5);
+ }
+ }
}
diff --git a/lib/private/legacy/template.php b/lib/private/legacy/template.php
index 7258eb90222..3cca8245af0 100644
--- a/lib/private/legacy/template.php
+++ b/lib/private/legacy/template.php
@@ -109,6 +109,7 @@ class OC_Template extends \OC\Template\Base {
}
}
+ OC_Util::addStyle('css-variables', null, true);
OC_Util::addStyle('server', null, true);
OC_Util::addStyle('jquery-ui-fixes',null,true);
OC_Util::addVendorStyle('jquery-ui/themes/base/jquery-ui',null,true);