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--apps/files_encryption/l10n/id.php20
-rw-r--r--apps/files_encryption/l10n/pl.php1
-rw-r--r--config/config.sample.php24
-rw-r--r--core/js/js.js6
-rw-r--r--core/setup/controller.php63
-rw-r--r--core/templates/layout.base.php12
-rw-r--r--core/templates/layout.guest.php12
-rw-r--r--core/templates/layout.user.php12
-rw-r--r--l10n/templates/core.pot6
-rw-r--r--l10n/templates/files.pot2
-rw-r--r--l10n/templates/files_encryption.pot2
-rw-r--r--l10n/templates/files_external.pot2
-rw-r--r--l10n/templates/files_sharing.pot2
-rw-r--r--l10n/templates/files_trashbin.pot2
-rw-r--r--l10n/templates/files_versions.pot2
-rw-r--r--l10n/templates/lib.pot64
-rw-r--r--l10n/templates/private.pot64
-rw-r--r--l10n/templates/settings.pot2
-rw-r--r--l10n/templates/user_ldap.pot2
-rw-r--r--l10n/templates/user_webdavauth.pot2
-rw-r--r--lib/base.php2
-rw-r--r--lib/l10n/pl.php2
-rw-r--r--lib/private/db/connectionfactory.php7
-rw-r--r--lib/private/files/storage/local.php21
-rw-r--r--lib/private/setup.php135
-rw-r--r--lib/private/templatelayout.php5
-rw-r--r--lib/private/util.php9
-rw-r--r--lib/public/iconfig.php2
-rw-r--r--settings/l10n/da.php2
-rw-r--r--settings/l10n/es.php1
-rw-r--r--settings/l10n/fr.php8
-rw-r--r--settings/l10n/it.php2
-rw-r--r--settings/l10n/pl.php9
-rw-r--r--settings/l10n/sl.php13
-rw-r--r--tests/lib/files/storage/local.php67
-rw-r--r--tests/lib/setup.php103
36 files changed, 504 insertions, 186 deletions
diff --git a/apps/files_encryption/l10n/id.php b/apps/files_encryption/l10n/id.php
index c31c3e52089..c1d171d1fc0 100644
--- a/apps/files_encryption/l10n/id.php
+++ b/apps/files_encryption/l10n/id.php
@@ -1,19 +1,31 @@
<?php
$TRANSLATIONS = array(
-"Unknown error" => "Galat tidak diketahui",
+"Unknown error" => "Kesalahan tidak diketahui",
+"Missing recovery key password" => "Sandi kunci pemuliahan hilang",
+"Please repeat the recovery key password" => "Silakan ulangi sandi kunci pemulihan",
+"Repeated recovery key password does not match the provided recovery key password" => "Sandi kunci pemulihan yang diulangi tidak cocok dengan sandi kunci pemulihan yang diberikan",
"Recovery key successfully enabled" => "Kunci pemulihan berhasil diaktifkan",
"Could not disable recovery key. Please check your recovery key password!" => "Tidak dapat menonaktifkan kunci pemulihan. Silakan periksa sandi kunci pemulihan Anda!",
"Recovery key successfully disabled" => "Kunci pemulihan berhasil dinonaktifkan",
+"Please provide the old recovery password" => "Mohon berikan sandi pemulihan lama",
+"Please provide a new recovery password" => "Mohon berikan sandi pemulihan baru",
+"Please repeat the new recovery password" => "Silakan ulangi sandi pemulihan baru",
"Password successfully changed." => "Sandi berhasil diubah",
"Could not change the password. Maybe the old password was not correct." => "Tidak dapat mengubah sandi. Kemungkinan sandi lama yang dimasukkan salah.",
"Private key password successfully updated." => "Sandi kunci privat berhasil diperbarui.",
"Could not update the private key password. Maybe the old password was not correct." => "Tidak dapat memperbarui sandi kunci privat. Kemungkinan sandi lama yang Anda masukkan salah.",
"File recovery settings updated" => "Pengaturan pemulihan berkas diperbarui",
"Could not update file recovery" => "Tidak dapat memperbarui pemulihan berkas",
+"Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." => "Aplikasi enkripsi tidak dimulai! Kemungkinan aplikasi enkripsi telah diaktifkan ulang saat sesi Anda. Silakan coba untuk keluar dan kembali lagi untuk memulai aplikasi enkripsi.",
+"Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." => "Kunci private Anda tidak sah! Nampaknya sandi Anda telah diubah diluar %s (misal direktori perusahaan Anda). Anda dapat memperbarui sandi kunci private untuk memulihakan akses ke berkas terenkripsi Anda.",
"Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." => "Tidak dapat mendekripsi berkas ini, mungkin ini adalah berkas bersama. Silakan meminta pemilik berkas ini untuk membagikan kembali dengan Anda.",
-"Missing requirements." => "Persyaratan yang hilang.",
+"Unknown error. Please check your system settings or contact your administrator" => "Kesalahan tidak diketahui. Silakan periksa pengaturan sistem Anda atau hubungi administrator",
+"Missing requirements." => "Persyaratan tidak terpenuhi.",
+"Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." => "Pastikan bahwa PHP 5.3.3 atau yang lebih baru telah diinstal dan OpenSSL bersama ekstensi PHP telah diaktifkan dan dikonfigurasi dengan benar. Untuk saat ini, aplikasi enkripsi akan dinonaktifkan.",
"Following users are not set up for encryption:" => "Pengguna berikut belum diatur untuk enkripsi:",
-"Initial encryption started... This can take some time. Please wait." => "Inisial enskripsi dijalankan... Ini dapat memakan waktu. Silakan tunggu.",
+"Initial encryption started... This can take some time. Please wait." => "Enskripsi awal dijalankan... Ini dapat memakan waktu. Silakan tunggu.",
+"Initial encryption running... Please try again later." => "Enkripsi awal sedang berjalan... Sialakn coba lagi nanti.",
+"Go directly to your %spersonal settings%s." => "Langsung ke %spengaturan pribadi%s Anda.",
"Encryption" => "Enkripsi",
"Encryption App is enabled but your keys are not initialized, please log-out and log-in again" => "Aplikasi Enskripsi telah diaktifkan tetapi kunci tidak diinisialisasi, silakan log-out dan log-in lagi",
"Enable recovery key (allow to recover users files in case of password loss):" => "Aktifkan kunci pemulihan (memungkinkan pengguna untuk memulihkan berkas dalam kasus kehilangan sandi):",
@@ -26,6 +38,8 @@ $TRANSLATIONS = array(
"New Recovery key password" => "Sandi kunci Pemulihan Baru",
"Repeat New Recovery key password" => "Ulangi sandi kunci Pemulihan baru",
"Change Password" => "Ubah sandi",
+"Your private key password no longer matches your log-in password." => "Sandi kunci private Anda tidak lagi cocok dengan sandi masuk Anda.",
+"Set your old private key password to your current log-in password:" => "Setel sandi kunci private Anda untuk sandi masuk Anda saat ini:",
" If you don't remember your old password you can ask your administrator to recover your files." => "Jika Anda tidak ingat sandi lama, Anda dapat meminta administrator Anda untuk memulihkan berkas.",
"Old log-in password" => "Sandi masuk yang lama",
"Current log-in password" => "Sandi masuk saat ini",
diff --git a/apps/files_encryption/l10n/pl.php b/apps/files_encryption/l10n/pl.php
index b7a66462ef2..c52c3ddee99 100644
--- a/apps/files_encryption/l10n/pl.php
+++ b/apps/files_encryption/l10n/pl.php
@@ -1,6 +1,7 @@
<?php
$TRANSLATIONS = array(
"Unknown error" => "Nieznany błąd",
+"Please repeat the recovery key password" => "Proszę powtórz nowe hasło klucza odzyskiwania",
"Recovery key successfully enabled" => "Klucz odzyskiwania włączony",
"Could not disable recovery key. Please check your recovery key password!" => "Nie można wyłączyć klucza odzyskiwania. Proszę sprawdzić swoje hasło odzyskiwania!",
"Recovery key successfully disabled" => "Klucz odzyskiwania wyłączony",
diff --git a/config/config.sample.php b/config/config.sample.php
index 621e5df80b3..09b59fcb5b4 100644
--- a/config/config.sample.php
+++ b/config/config.sample.php
@@ -120,6 +120,13 @@ $CONFIG = array(
'dbtableprefix' => '',
/**
+ * Additional driver options for the database connection, eg. to enable SSL encryption in MySQL:
+ */
+'dbdriveroptions' => array(
+ PDO::MYSQL_ATTR_SSL_CA => '/file/path/to/ca_cert.pem',
+),
+
+/**
* Indicates whether the ownCloud instance was installed successfully; ``true``
* indicates a successful installation, and ``false`` indicates an unsuccessful
* installation.
@@ -801,6 +808,23 @@ $CONFIG = array(
),
/**
+ * Database types that are supported for installation
+ * Available:
+ * - sqlite (SQLite3)
+ * - mysql (MySQL)
+ * - pgsql (PostgreSQL)
+ * - oci (Oracle)
+ * - mssql (Microsoft SQL Server)
+ */
+'supportedDatabases' => array(
+ 'sqlite',
+ 'mysql',
+ 'pgsql',
+ 'oci',
+ 'mssql'
+),
+
+/**
* Custom CSP policy, changing this will overwrite the standard policy
*/
'custom_csp_policy' =>
diff --git a/core/js/js.js b/core/js/js.js
index 566a3d4d8cd..94b78a2e9a9 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -967,6 +967,12 @@ function object(o) {
function initCore() {
/**
+ * Set users local to moment.js as soon as possible
+ */
+ moment.locale($('html').prop('lang'));
+
+
+ /**
* Calls the server periodically to ensure that session doesn't
* time out
*/
diff --git a/core/setup/controller.php b/core/setup/controller.php
index 53f247e9769..f5f05348fd1 100644
--- a/core/setup/controller.php
+++ b/core/setup/controller.php
@@ -1,6 +1,7 @@
<?php
/**
* Copyright (c) 2013 Bart Visscher <bartv@thisnet.nl>
+ * Copyright (c) 2014 Lukas Reschke <lukas@owncloud.com>
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
@@ -8,7 +9,19 @@
namespace OC\Core\Setup;
+use OCP\IConfig;
+
class Controller {
+ /** @var \OCP\IConfig */
+ protected $config;
+
+ /**
+ * @param IConfig $config
+ */
+ function __construct(IConfig $config) {
+ $this->config = $config;
+ }
+
public function run($post) {
// Check for autosetup:
$post = $this->loadAutoConfig($post);
@@ -87,28 +100,10 @@ class Controller {
* in case of errors/warnings
*/
public function getSystemInfo() {
- $hasSQLite = class_exists('SQLite3');
- $hasMySQL = is_callable('mysql_connect');
- $hasPostgreSQL = is_callable('pg_connect');
- $hasOracle = is_callable('oci_connect');
- $hasMSSQL = is_callable('sqlsrv_connect');
- $databases = array();
- if ($hasSQLite) {
- $databases['sqlite'] = 'SQLite';
- }
- if ($hasMySQL) {
- $databases['mysql'] = 'MySQL/MariaDB';
- }
- if ($hasPostgreSQL) {
- $databases['pgsql'] = 'PostgreSQL';
- }
- if ($hasOracle) {
- $databases['oci'] = 'Oracle';
- }
- if ($hasMSSQL) {
- $databases['mssql'] = 'MS SQL';
- }
- $datadir = \OC_Config::getValue('datadirectory', \OC::$SERVERROOT.'/data');
+ $setup = new \OC_Setup($this->config);
+ $databases = $setup->getSupportedDatabases();
+
+ $dataDir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data');
$vulnerableToNullByte = false;
if(@file_exists(__FILE__."\0Nullbyte")) { // Check if the used PHP version is vulnerable to the NULL Byte attack (CVE-2006-7243)
$vulnerableToNullByte = true;
@@ -119,25 +114,25 @@ class Controller {
// Create data directory to test whether the .htaccess works
// Notice that this is not necessarily the same data directory as the one
// that will effectively be used.
- @mkdir($datadir);
- if (is_dir($datadir) && is_writable($datadir)) {
+ @mkdir($dataDir);
+ $htAccessWorking = true;
+ if (is_dir($dataDir) && is_writable($dataDir)) {
// Protect data directory here, so we can test if the protection is working
\OC_Setup::protectDataDirectory();
try {
- $htaccessWorking = \OC_Util::isHtaccessWorking();
+ $htAccessWorking = \OC_Util::isHtaccessWorking();
} catch (\OC\HintException $e) {
$errors[] = array(
'error' => $e->getMessage(),
'hint' => $e->getHint()
);
- $htaccessWorking = false;
+ $htAccessWorking = false;
}
}
if (\OC_Util::runningOnMac()) {
$l10n = \OC::$server->getL10N('core');
- $themeName = \OC_Util::getTheme();
$theme = new \OC_Defaults();
$errors[] = array(
'error' => $l10n->t(
@@ -150,14 +145,14 @@ class Controller {
}
return array(
- 'hasSQLite' => $hasSQLite,
- 'hasMySQL' => $hasMySQL,
- 'hasPostgreSQL' => $hasPostgreSQL,
- 'hasOracle' => $hasOracle,
- 'hasMSSQL' => $hasMSSQL,
+ 'hasSQLite' => isset($databases['sqlite']),
+ 'hasMySQL' => isset($databases['mysql']),
+ 'hasPostgreSQL' => isset($databases['postgre']),
+ 'hasOracle' => isset($databases['oci']),
+ 'hasMSSQL' => isset($databases['mssql']),
'databases' => $databases,
- 'directory' => $datadir,
- 'htaccessWorking' => $htaccessWorking,
+ 'directory' => $dataDir,
+ 'htaccessWorking' => $htAccessWorking,
'vulnerableToNullByte' => $vulnerableToNullByte,
'errors' => $errors,
);
diff --git a/core/templates/layout.base.php b/core/templates/layout.base.php
index 963bf4cf545..3325bc9165e 100644
--- a/core/templates/layout.base.php
+++ b/core/templates/layout.base.php
@@ -1,10 +1,10 @@
<!DOCTYPE html>
-<!--[if lt IE 7]><html class="ng-csp ie ie6 lte9 lte8 lte7" data-placeholder-focus="false"><![endif]-->
-<!--[if IE 7]><html class="ng-csp ie ie7 lte9 lte8 lte7" data-placeholder-focus="false"><![endif]-->
-<!--[if IE 8]><html class="ng-csp ie ie8 lte9 lte8" data-placeholder-focus="false"><![endif]-->
-<!--[if IE 9]><html class="ng-csp ie ie9 lte9" data-placeholder-focus="false"><![endif]-->
-<!--[if gt IE 9]><html class="ng-csp ie" data-placeholder-focus="false"><![endif]-->
-<!--[if !IE]><!--><html class="ng-csp" data-placeholder-focus="false"><!--<![endif]-->
+<!--[if lt IE 7]><html class="ng-csp ie ie6 lte9 lte8 lte7" data-placeholder-focus="false" lang="<?php p($_['language']); ?>"><![endif]-->
+<!--[if IE 7]><html class="ng-csp ie ie7 lte9 lte8 lte7" data-placeholder-focus="false" lang="<?php p($_['language']); ?>" ><![endif]-->
+<!--[if IE 8]><html class="ng-csp ie ie8 lte9 lte8" data-placeholder-focus="false" lang="<?php p($_['language']); ?>" ><![endif]-->
+<!--[if IE 9]><html class="ng-csp ie ie9 lte9" data-placeholder-focus="false" lang="<?php p($_['language']); ?>" ><![endif]-->
+<!--[if gt IE 9]><html class="ng-csp ie" data-placeholder-focus="false" lang="<?php p($_['language']); ?>" ><![endif]-->
+<!--[if !IE]><!--><html class="ng-csp" data-placeholder-focus="false" lang="<?php p($_['language']); ?>" ><!--<![endif]-->
<head>
<title>
diff --git a/core/templates/layout.guest.php b/core/templates/layout.guest.php
index da40fd83ad8..0ad2ea4d807 100644
--- a/core/templates/layout.guest.php
+++ b/core/templates/layout.guest.php
@@ -1,10 +1,10 @@
<!DOCTYPE html>
-<!--[if lt IE 7]><html class="ng-csp ie ie6 lte9 lte8 lte7" data-placeholder-focus="false"><![endif]-->
-<!--[if IE 7]><html class="ng-csp ie ie7 lte9 lte8 lte7" data-placeholder-focus="false"><![endif]-->
-<!--[if IE 8]><html class="ng-csp ie ie8 lte9 lte8" data-placeholder-focus="false"><![endif]-->
-<!--[if IE 9]><html class="ng-csp ie ie9 lte9" data-placeholder-focus="false"><![endif]-->
-<!--[if gt IE 9]><html class="ng-csp ie" data-placeholder-focus="false"><![endif]-->
-<!--[if !IE]><!--><html class="ng-csp" data-placeholder-focus="false"><!--<![endif]-->
+<!--[if lt IE 7]><html class="ng-csp ie ie6 lte9 lte8 lte7" data-placeholder-focus="false" lang="<?php p($_['language']); ?>"><![endif]-->
+<!--[if IE 7]><html class="ng-csp ie ie7 lte9 lte8 lte7" data-placeholder-focus="false" lang="<?php p($_['language']); ?>" ><![endif]-->
+<!--[if IE 8]><html class="ng-csp ie ie8 lte9 lte8" data-placeholder-focus="false" lang="<?php p($_['language']); ?>" ><![endif]-->
+<!--[if IE 9]><html class="ng-csp ie ie9 lte9" data-placeholder-focus="false" lang="<?php p($_['language']); ?>" ><![endif]-->
+<!--[if gt IE 9]><html class="ng-csp ie" data-placeholder-focus="false" lang="<?php p($_['language']); ?>" ><![endif]-->
+<!--[if !IE]><!--><html class="ng-csp" data-placeholder-focus="false" lang="<?php p($_['language']); ?>" ><!--<![endif]-->
<head data-requesttoken="<?php p($_['requesttoken']); ?>">
<title>
diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php
index d0c6f9c38f5..6164d16ac17 100644
--- a/core/templates/layout.user.php
+++ b/core/templates/layout.user.php
@@ -1,10 +1,10 @@
<!DOCTYPE html>
-<!--[if lt IE 7]><html class="ng-csp ie ie6 lte9 lte8 lte7" data-placeholder-focus="false"><![endif]-->
-<!--[if IE 7]><html class="ng-csp ie ie7 lte9 lte8 lte7" data-placeholder-focus="false"><![endif]-->
-<!--[if IE 8]><html class="ng-csp ie ie8 lte9 lte8" data-placeholder-focus="false"><![endif]-->
-<!--[if IE 9]><html class="ng-csp ie ie9 lte9" data-placeholder-focus="false"><![endif]-->
-<!--[if gt IE 9]><html class="ng-csp ie" data-placeholder-focus="false"><![endif]-->
-<!--[if !IE]><!--><html class="ng-csp" data-placeholder-focus="false"><!--<![endif]-->
+<!--[if lt IE 7]><html class="ng-csp ie ie6 lte9 lte8 lte7" data-placeholder-focus="false" lang="<?php p($_['language']); ?>"><![endif]-->
+<!--[if IE 7]><html class="ng-csp ie ie7 lte9 lte8 lte7" data-placeholder-focus="false" lang="<?php p($_['language']); ?>" ><![endif]-->
+<!--[if IE 8]><html class="ng-csp ie ie8 lte9 lte8" data-placeholder-focus="false" lang="<?php p($_['language']); ?>" ><![endif]-->
+<!--[if IE 9]><html class="ng-csp ie ie9 lte9" data-placeholder-focus="false" lang="<?php p($_['language']); ?>" ><![endif]-->
+<!--[if gt IE 9]><html class="ng-csp ie" data-placeholder-focus="false" lang="<?php p($_['language']); ?>" ><![endif]-->
+<!--[if !IE]><!--><html class="ng-csp" data-placeholder-focus="false" lang="<?php p($_['language']); ?>" ><!--<![endif]-->
<head data-user="<?php p($_['user_uid']); ?>" data-requesttoken="<?php p($_['requesttoken']); ?>">
<title>
diff --git a/l10n/templates/core.pot b/l10n/templates/core.pot
index 7d1f8371936..db83a13d3ef 100644
--- a/l10n/templates/core.pot
+++ b/l10n/templates/core.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud Core 6.0.0\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
-"POT-Creation-Date: 2014-10-27 01:54-0400\n"
+"POT-Creation-Date: 2014-10-28 01:54-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -566,14 +566,14 @@ msgstr ""
msgid "New Password"
msgstr ""
-#: setup/controller.php:144
+#: setup/controller.php:139
#, php-format
msgid ""
"Mac OS X is not supported and %s will not work properly on this platform. "
"Use it at your own risk! "
msgstr ""
-#: setup/controller.php:148
+#: setup/controller.php:143
msgid "For the best results, please consider using a GNU/Linux server instead."
msgstr ""
diff --git a/l10n/templates/files.pot b/l10n/templates/files.pot
index b7a65d3a2bf..fae34af9b91 100644
--- a/l10n/templates/files.pot
+++ b/l10n/templates/files.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud Core 6.0.0\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
-"POT-Creation-Date: 2014-10-27 01:54-0400\n"
+"POT-Creation-Date: 2014-10-28 01:54-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/l10n/templates/files_encryption.pot b/l10n/templates/files_encryption.pot
index 998d5a9494b..7f9ff02a5e2 100644
--- a/l10n/templates/files_encryption.pot
+++ b/l10n/templates/files_encryption.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud Core 6.0.0\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
-"POT-Creation-Date: 2014-10-27 01:54-0400\n"
+"POT-Creation-Date: 2014-10-28 01:54-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/l10n/templates/files_external.pot b/l10n/templates/files_external.pot
index 34fbcd3b6c0..2c745157a39 100644
--- a/l10n/templates/files_external.pot
+++ b/l10n/templates/files_external.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud Core 6.0.0\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
-"POT-Creation-Date: 2014-10-27 01:54-0400\n"
+"POT-Creation-Date: 2014-10-28 01:54-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/l10n/templates/files_sharing.pot b/l10n/templates/files_sharing.pot
index 1aba20829be..8b413120455 100644
--- a/l10n/templates/files_sharing.pot
+++ b/l10n/templates/files_sharing.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud Core 6.0.0\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
-"POT-Creation-Date: 2014-10-27 01:54-0400\n"
+"POT-Creation-Date: 2014-10-28 01:54-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/l10n/templates/files_trashbin.pot b/l10n/templates/files_trashbin.pot
index fd8b4427d2c..499fc47b987 100644
--- a/l10n/templates/files_trashbin.pot
+++ b/l10n/templates/files_trashbin.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud Core 6.0.0\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
-"POT-Creation-Date: 2014-10-27 01:54-0400\n"
+"POT-Creation-Date: 2014-10-28 01:54-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/l10n/templates/files_versions.pot b/l10n/templates/files_versions.pot
index 909e1300d71..d1ad5c42f3c 100644
--- a/l10n/templates/files_versions.pot
+++ b/l10n/templates/files_versions.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud Core 6.0.0\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
-"POT-Creation-Date: 2014-10-27 01:54-0400\n"
+"POT-Creation-Date: 2014-10-28 01:54-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/l10n/templates/lib.pot b/l10n/templates/lib.pot
index e0090d64eb8..dd7839e7b0c 100644
--- a/l10n/templates/lib.pot
+++ b/l10n/templates/lib.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud Core 6.0.0\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
-"POT-Creation-Date: 2014-10-27 01:54-0400\n"
+"POT-Creation-Date: 2014-10-28 01:55-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -33,7 +33,7 @@ msgstr ""
msgid "See %s"
msgstr ""
-#: base.php:209 private/util.php:461
+#: base.php:209 private/util.php:458
#, php-format
msgid ""
"This can usually be fixed by %sgiving the webserver write access to the "
@@ -258,15 +258,15 @@ msgstr ""
msgid "PostgreSQL username and/or password not valid"
msgstr ""
-#: private/setup.php:27
+#: private/setup.php:129
msgid "Set an admin username."
msgstr ""
-#: private/setup.php:30
+#: private/setup.php:132
msgid "Set an admin password."
msgstr ""
-#: private/setup.php:54
+#: private/setup.php:156
#, php-format
msgid "Can't create or write into the data directory %s"
msgstr ""
@@ -473,144 +473,144 @@ msgstr ""
msgid "The username is already being used"
msgstr ""
-#: private/util.php:446
+#: private/util.php:443
msgid "No database drivers (sqlite, mysql, or postgresql) installed."
msgstr ""
-#: private/util.php:453
+#: private/util.php:450
#, php-format
msgid ""
"Permissions can usually be fixed by %sgiving the webserver write access to "
"the root directory%s."
msgstr ""
-#: private/util.php:460
+#: private/util.php:457
msgid "Cannot write into \"config\" directory"
msgstr ""
-#: private/util.php:474
+#: private/util.php:471
msgid "Cannot write into \"apps\" directory"
msgstr ""
-#: private/util.php:475
+#: private/util.php:472
#, php-format
msgid ""
"This can usually be fixed by %sgiving the webserver write access to the apps "
"directory%s or disabling the appstore in the config file."
msgstr ""
-#: private/util.php:490
+#: private/util.php:487
#, php-format
msgid "Cannot create \"data\" directory (%s)"
msgstr ""
-#: private/util.php:491
+#: private/util.php:488
#, php-format
msgid ""
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the "
"webserver write access to the root directory</a>."
msgstr ""
-#: private/util.php:508
+#: private/util.php:505
#, php-format
msgid "Setting locale to %s failed"
msgstr ""
-#: private/util.php:511
+#: private/util.php:508
msgid ""
"Please install one of these locales on your system and restart your "
"webserver."
msgstr ""
-#: private/util.php:540
+#: private/util.php:537
msgid "Please ask your server administrator to install the module."
msgstr ""
-#: private/util.php:560
+#: private/util.php:557
#, php-format
msgid "PHP module %s not installed."
msgstr ""
-#: private/util.php:568
+#: private/util.php:565
#, php-format
msgid "PHP %s or higher is required."
msgstr ""
-#: private/util.php:569
+#: private/util.php:566
msgid ""
"Please ask your server administrator to update PHP to the latest version. "
"Your PHP version is no longer supported by ownCloud and the PHP community."
msgstr ""
-#: private/util.php:580
+#: private/util.php:577
msgid ""
"PHP Safe Mode is enabled. ownCloud requires that it is disabled to work "
"properly."
msgstr ""
-#: private/util.php:581
+#: private/util.php:578
msgid ""
"PHP Safe Mode is a deprecated and mostly useless setting that should be "
"disabled. Please ask your server administrator to disable it in php.ini or "
"in your webserver config."
msgstr ""
-#: private/util.php:588
+#: private/util.php:585
msgid ""
"Magic Quotes is enabled. ownCloud requires that it is disabled to work "
"properly."
msgstr ""
-#: private/util.php:589
+#: private/util.php:586
msgid ""
"Magic Quotes is a deprecated and mostly useless setting that should be "
"disabled. Please ask your server administrator to disable it in php.ini or "
"in your webserver config."
msgstr ""
-#: private/util.php:603
+#: private/util.php:600
msgid "PHP modules have been installed, but they are still listed as missing?"
msgstr ""
-#: private/util.php:604
+#: private/util.php:601
msgid "Please ask your server administrator to restart the web server."
msgstr ""
-#: private/util.php:634
+#: private/util.php:631
msgid "PostgreSQL >= 9 required"
msgstr ""
-#: private/util.php:635
+#: private/util.php:632
msgid "Please upgrade your database version"
msgstr ""
-#: private/util.php:642
+#: private/util.php:639
msgid "Error occurred while checking PostgreSQL version"
msgstr ""
-#: private/util.php:643
+#: private/util.php:640
msgid ""
"Please make sure you have PostgreSQL >= 9 or check the logs for more "
"information about the error"
msgstr ""
-#: private/util.php:708
+#: private/util.php:705
msgid ""
"Please change the permissions to 0770 so that the directory cannot be listed "
"by other users."
msgstr ""
-#: private/util.php:717
+#: private/util.php:714
#, php-format
msgid "Data directory (%s) is readable by other users"
msgstr ""
-#: private/util.php:738
+#: private/util.php:735
#, php-format
msgid "Data directory (%s) is invalid"
msgstr ""
-#: private/util.php:739
+#: private/util.php:736
msgid ""
"Please check that the data directory contains a file \".ocdata\" in its root."
msgstr ""
diff --git a/l10n/templates/private.pot b/l10n/templates/private.pot
index 5373b5c248b..d5836a75d3f 100644
--- a/l10n/templates/private.pot
+++ b/l10n/templates/private.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud Core 6.0.0\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
-"POT-Creation-Date: 2014-10-27 01:54-0400\n"
+"POT-Creation-Date: 2014-10-28 01:55-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -218,15 +218,15 @@ msgstr ""
msgid "PostgreSQL username and/or password not valid"
msgstr ""
-#: setup.php:27
+#: setup.php:129
msgid "Set an admin username."
msgstr ""
-#: setup.php:30
+#: setup.php:132
msgid "Set an admin password."
msgstr ""
-#: setup.php:54
+#: setup.php:156
#, php-format
msgid "Can't create or write into the data directory %s"
msgstr ""
@@ -432,151 +432,151 @@ msgstr ""
msgid "The username is already being used"
msgstr ""
-#: util.php:446
+#: util.php:443
msgid "No database drivers (sqlite, mysql, or postgresql) installed."
msgstr ""
-#: util.php:453
+#: util.php:450
#, php-format
msgid ""
"Permissions can usually be fixed by %sgiving the webserver write access to "
"the root directory%s."
msgstr ""
-#: util.php:460
+#: util.php:457
msgid "Cannot write into \"config\" directory"
msgstr ""
-#: util.php:461
+#: util.php:458
#, php-format
msgid ""
"This can usually be fixed by %sgiving the webserver write access to the "
"config directory%s."
msgstr ""
-#: util.php:474
+#: util.php:471
msgid "Cannot write into \"apps\" directory"
msgstr ""
-#: util.php:475
+#: util.php:472
#, php-format
msgid ""
"This can usually be fixed by %sgiving the webserver write access to the apps "
"directory%s or disabling the appstore in the config file."
msgstr ""
-#: util.php:490
+#: util.php:487
#, php-format
msgid "Cannot create \"data\" directory (%s)"
msgstr ""
-#: util.php:491
+#: util.php:488
#, php-format
msgid ""
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the "
"webserver write access to the root directory</a>."
msgstr ""
-#: util.php:508
+#: util.php:505
#, php-format
msgid "Setting locale to %s failed"
msgstr ""
-#: util.php:511
+#: util.php:508
msgid ""
"Please install one of these locales on your system and restart your "
"webserver."
msgstr ""
-#: util.php:540
+#: util.php:537
msgid "Please ask your server administrator to install the module."
msgstr ""
-#: util.php:560
+#: util.php:557
#, php-format
msgid "PHP module %s not installed."
msgstr ""
-#: util.php:568
+#: util.php:565
#, php-format
msgid "PHP %s or higher is required."
msgstr ""
-#: util.php:569
+#: util.php:566
msgid ""
"Please ask your server administrator to update PHP to the latest version. "
"Your PHP version is no longer supported by ownCloud and the PHP community."
msgstr ""
-#: util.php:580
+#: util.php:577
msgid ""
"PHP Safe Mode is enabled. ownCloud requires that it is disabled to work "
"properly."
msgstr ""
-#: util.php:581
+#: util.php:578
msgid ""
"PHP Safe Mode is a deprecated and mostly useless setting that should be "
"disabled. Please ask your server administrator to disable it in php.ini or "
"in your webserver config."
msgstr ""
-#: util.php:588
+#: util.php:585
msgid ""
"Magic Quotes is enabled. ownCloud requires that it is disabled to work "
"properly."
msgstr ""
-#: util.php:589
+#: util.php:586
msgid ""
"Magic Quotes is a deprecated and mostly useless setting that should be "
"disabled. Please ask your server administrator to disable it in php.ini or "
"in your webserver config."
msgstr ""
-#: util.php:603
+#: util.php:600
msgid "PHP modules have been installed, but they are still listed as missing?"
msgstr ""
-#: util.php:604
+#: util.php:601
msgid "Please ask your server administrator to restart the web server."
msgstr ""
-#: util.php:634
+#: util.php:631
msgid "PostgreSQL >= 9 required"
msgstr ""
-#: util.php:635
+#: util.php:632
msgid "Please upgrade your database version"
msgstr ""
-#: util.php:642
+#: util.php:639
msgid "Error occurred while checking PostgreSQL version"
msgstr ""
-#: util.php:643
+#: util.php:640
msgid ""
"Please make sure you have PostgreSQL >= 9 or check the logs for more "
"information about the error"
msgstr ""
-#: util.php:708
+#: util.php:705
msgid ""
"Please change the permissions to 0770 so that the directory cannot be listed "
"by other users."
msgstr ""
-#: util.php:717
+#: util.php:714
#, php-format
msgid "Data directory (%s) is readable by other users"
msgstr ""
-#: util.php:738
+#: util.php:735
#, php-format
msgid "Data directory (%s) is invalid"
msgstr ""
-#: util.php:739
+#: util.php:736
msgid ""
"Please check that the data directory contains a file \".ocdata\" in its root."
msgstr ""
diff --git a/l10n/templates/settings.pot b/l10n/templates/settings.pot
index 88ff7016873..a176064439c 100644
--- a/l10n/templates/settings.pot
+++ b/l10n/templates/settings.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud Core 6.0.0\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
-"POT-Creation-Date: 2014-10-27 01:54-0400\n"
+"POT-Creation-Date: 2014-10-28 01:55-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/l10n/templates/user_ldap.pot b/l10n/templates/user_ldap.pot
index 7ff5ef5249a..edc4143ba34 100644
--- a/l10n/templates/user_ldap.pot
+++ b/l10n/templates/user_ldap.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud Core 6.0.0\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
-"POT-Creation-Date: 2014-10-27 01:54-0400\n"
+"POT-Creation-Date: 2014-10-28 01:54-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/l10n/templates/user_webdavauth.pot b/l10n/templates/user_webdavauth.pot
index 0e813ab1ae3..eb6a314a5a6 100644
--- a/l10n/templates/user_webdavauth.pot
+++ b/l10n/templates/user_webdavauth.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud Core 6.0.0\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
-"POT-Creation-Date: 2014-10-27 01:54-0400\n"
+"POT-Creation-Date: 2014-10-28 01:54-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/lib/base.php b/lib/base.php
index 4af5b515006..4a5f4e77a59 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -717,7 +717,7 @@ class OC {
// Check if ownCloud is installed or in maintenance (update) mode
if (!OC_Config::getValue('installed', false)) {
- $controller = new OC\Core\Setup\Controller();
+ $controller = new OC\Core\Setup\Controller(\OC::$server->getConfig());
$controller->run($_POST);
exit();
}
diff --git a/lib/l10n/pl.php b/lib/l10n/pl.php
index 4b73fffa6cf..81c844f6d5f 100644
--- a/lib/l10n/pl.php
+++ b/lib/l10n/pl.php
@@ -11,6 +11,7 @@ $TRANSLATIONS = array(
"Settings" => "Ustawienia",
"Users" => "Użytkownicy",
"Admin" => "Administrator",
+"Recommended" => "Polecane",
"App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." => "Aplikacja \\\"%s\\\" nie może zostać zainstalowana ponieważ nie jest kompatybilna z tą wersją ownCloud.",
"No app name specified" => "Nie określono nazwy aplikacji",
"Unknown filetype" => "Nieznany typ pliku",
@@ -50,6 +51,7 @@ $TRANSLATIONS = array(
"PostgreSQL username and/or password not valid" => "PostgreSQL: Nazwa użytkownika i/lub hasło jest niepoprawne",
"Set an admin username." => "Ustaw nazwę administratora.",
"Set an admin password." => "Ustaw hasło administratora.",
+"Can't create or write into the data directory %s" => "Nie można tworzyć ani zapisywać w katalogu %s",
"%s shared »%s« with you" => "%s Współdzielone »%s« z tobą",
"Sharing %s failed, because the file does not exist" => "Wspóldzielenie %s nie powiodło się. ponieważ plik nie istnieje",
"You are not allowed to share %s" => "Nie masz uprawnień aby udostępnić %s",
diff --git a/lib/private/db/connectionfactory.php b/lib/private/db/connectionfactory.php
index 1f676f1fca2..f6253e09b95 100644
--- a/lib/private/db/connectionfactory.php
+++ b/lib/private/db/connectionfactory.php
@@ -153,6 +153,13 @@ class ConnectionFactory {
}
$connectionParams['tablePrefix'] = $config->getSystemValue('dbtableprefix', 'oc_');
+
+ //additional driver options, eg. for mysql ssl
+ $driverOptions = $config->getSystemValue('dbdriveroptions', null);
+ if ($driverOptions) {
+ $connectionParams['driverOptions'] = $driverOptions;
+ }
+
return $connectionParams;
}
}
diff --git a/lib/private/files/storage/local.php b/lib/private/files/storage/local.php
index 0a612ae505b..1c5fafc12fa 100644
--- a/lib/private/files/storage/local.php
+++ b/lib/private/files/storage/local.php
@@ -90,6 +90,7 @@ if (\OC_Util::runningOnWindows()) {
}
public function stat($path) {
+ clearstatcache();
$fullPath = $this->datadir . $path;
$statResult = stat($fullPath);
if (PHP_INT_SIZE === 4 && !$this->is_dir($path)) {
@@ -276,5 +277,25 @@ if (\OC_Util::runningOnWindows()) {
public function isLocal() {
return true;
}
+
+ /**
+ * get the ETag for a file or folder
+ *
+ * @param string $path
+ * @return string
+ */
+ public function getETag($path) {
+ if ($this->is_file($path)) {
+ $stat = $this->stat($path);
+ return md5(
+ $stat['mtime'] .
+ $stat['ino'] .
+ $stat['dev'] .
+ $stat['size']
+ );
+ } else {
+ return parent::getETag($path);
+ }
+ }
}
}
diff --git a/lib/private/setup.php b/lib/private/setup.php
index 75dc1987ee6..b82e0be72e8 100644
--- a/lib/private/setup.php
+++ b/lib/private/setup.php
@@ -1,9 +1,27 @@
<?php
+/**
+ * Copyright (c) 2014 Lukas Reschke <lukas@owncloud.com>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+use OCP\IConfig;
class DatabaseSetupException extends \OC\HintException {
}
class OC_Setup {
+ /** @var IConfig */
+ protected $config;
+
+ /**
+ * @param IConfig $config
+ */
+ function __construct(IConfig $config) {
+ $this->config = $config;
+ }
+
static $dbSetupClasses = array(
'mysql' => '\OC\Setup\MySQL',
'pgsql' => '\OC\Setup\PostgreSQL',
@@ -13,15 +31,99 @@ class OC_Setup {
'sqlite3' => '\OC\Setup\Sqlite',
);
+ /**
+ * @return OC_L10N
+ */
public static function getTrans(){
return \OC::$server->getL10N('lib');
}
+ /**
+ * Wrapper around the "class_exists" PHP function to be able to mock it
+ * @param string $name
+ * @return bool
+ */
+ public function class_exists($name) {
+ return class_exists($name);
+ }
+
+ /**
+ * Wrapper around the "is_callable" PHP function to be able to mock it
+ * @param string $name
+ * @return bool
+ */
+ public function is_callable($name) {
+ return is_callable($name);
+ }
+
+ /**
+ * Get the available and supported databases of this instance
+ *
+ * @throws Exception
+ * @return array
+ */
+ public function getSupportedDatabases() {
+ $availableDatabases = array(
+ 'sqlite' => array(
+ 'type' => 'class',
+ 'call' => 'SQLite3',
+ 'name' => 'SQLite'
+ ),
+ 'mysql' => array(
+ 'type' => 'function',
+ 'call' => 'mysql_connect',
+ 'name' => 'MySQL/MariaDB'
+ ),
+ 'pgsql' => array(
+ 'type' => 'function',
+ 'call' => 'oci_connect',
+ 'name' => 'PostgreSQL'
+ ),
+ 'oci' => array(
+ 'type' => 'function',
+ 'call' => 'oci_connect',
+ 'name' => 'Oracle'
+ ),
+ 'mssql' => array(
+ 'type' => 'function',
+ 'call' => 'sqlsrv_connect',
+ 'name' => 'MS SQL'
+ )
+ );
+ $configuredDatabases = $this->config->getSystemValue('supportedDatabases',
+ array('sqlite', 'mysql', 'pgsql', 'oci', 'mssql'));
+ if(!is_array($configuredDatabases)) {
+ throw new Exception('Supported databases are not properly configured.');
+ }
+
+ $supportedDatabases = array();
+
+ foreach($configuredDatabases as $database) {
+ if(array_key_exists($database, $availableDatabases)) {
+ $working = false;
+ if($availableDatabases[$database]['type'] === 'class') {
+ $working = $this->class_exists($availableDatabases[$database]['call']);
+ } elseif ($availableDatabases[$database]['type'] === 'function') {
+ $working = $this->is_callable($availableDatabases[$database]['call']);
+ }
+ if($working) {
+ $supportedDatabases[$database] = $availableDatabases[$database]['name'];
+ }
+ }
+ }
+
+ return $supportedDatabases;
+ }
+
+ /**
+ * @param $options
+ * @return array
+ */
public static function install($options) {
$l = self::getTrans();
$error = array();
- $dbtype = $options['dbtype'];
+ $dbType = $options['dbtype'];
if(empty($options['adminlogin'])) {
$error[] = $l->t('Set an admin username.');
@@ -33,25 +135,25 @@ class OC_Setup {
$options['directory'] = OC::$SERVERROOT."/data";
}
- if (!isset(self::$dbSetupClasses[$dbtype])) {
- $dbtype = 'sqlite';
+ if (!isset(self::$dbSetupClasses[$dbType])) {
+ $dbType = 'sqlite';
}
$username = htmlspecialchars_decode($options['adminlogin']);
$password = htmlspecialchars_decode($options['adminpass']);
- $datadir = htmlspecialchars_decode($options['directory']);
+ $dataDir = htmlspecialchars_decode($options['directory']);
- $class = self::$dbSetupClasses[$dbtype];
+ $class = self::$dbSetupClasses[$dbType];
/** @var \OC\Setup\AbstractDatabase $dbSetup */
$dbSetup = new $class(self::getTrans(), 'db_structure.xml');
$error = array_merge($error, $dbSetup->validate($options));
// validate the data directory
if (
- (!is_dir($datadir) and !mkdir($datadir)) or
- !is_writable($datadir)
+ (!is_dir($dataDir) and !mkdir($dataDir)) or
+ !is_writable($dataDir)
) {
- $error[] = $l->t("Can't create or write into the data directory %s", array($datadir));
+ $error[] = $l->t("Can't create or write into the data directory %s", array($dataDir));
}
if(count($error) != 0) {
@@ -59,7 +161,7 @@ class OC_Setup {
}
//no errors, good
- if( isset($options['trusted_domains'])
+ if(isset($options['trusted_domains'])
&& is_array($options['trusted_domains'])) {
$trustedDomains = $options['trusted_domains'];
} else {
@@ -67,12 +169,12 @@ class OC_Setup {
}
if (OC_Util::runningOnWindows()) {
- $datadir = rtrim(realpath($datadir), '\\');
+ $dataDir = rtrim(realpath($dataDir), '\\');
}
- //use sqlite3 when available, otherise sqlite2 will be used.
- if($dbtype=='sqlite' and class_exists('SQLite3')) {
- $dbtype='sqlite3';
+ //use sqlite3 when available, otherwise sqlite2 will be used.
+ if($dbType=='sqlite' and class_exists('SQLite3')) {
+ $dbType='sqlite3';
}
//generate a random salt that is used to salt the local user passwords
@@ -85,9 +187,9 @@ class OC_Setup {
//write the config file
\OC::$server->getConfig()->setSystemValue('trusted_domains', $trustedDomains);
- \OC::$server->getConfig()->setSystemValue('datadirectory', $datadir);
+ \OC::$server->getConfig()->setSystemValue('datadirectory', $dataDir);
\OC::$server->getConfig()->setSystemValue('overwrite.cli.url', \OC_Request::serverProtocol() . '://' . \OC_Request::serverHost() . OC::$WEBROOT);
- \OC::$server->getConfig()->setSystemValue('dbtype', $dbtype);
+ \OC::$server->getConfig()->setSystemValue('dbtype', $dbType);
\OC::$server->getConfig()->setSystemValue('version', implode('.', OC_Util::getVersion()));
try {
@@ -110,8 +212,7 @@ class OC_Setup {
//create the user and group
try {
OC_User::createUser($username, $password);
- }
- catch(Exception $exception) {
+ } catch(Exception $exception) {
$error[] = $exception->getMessage();
}
diff --git a/lib/private/templatelayout.php b/lib/private/templatelayout.php
index cbaadd5768f..a93449f202f 100644
--- a/lib/private/templatelayout.php
+++ b/lib/private/templatelayout.php
@@ -33,7 +33,6 @@ class OC_TemplateLayout extends OC_Template {
$this->config = \OC::$server->getConfig();
// Decide which page we show
-
if( $renderAs == 'user' ) {
parent::__construct( 'core', 'layout.user' );
if(in_array(OC_APP::getCurrentApp(), array('settings','admin', 'help'))!==false) {
@@ -85,7 +84,11 @@ class OC_TemplateLayout extends OC_Template {
$this->assign('bodyid', 'body-login');
} else {
parent::__construct('core', 'layout.base');
+
}
+ // Send the language to our layouts
+ $this->assign('language', OC_L10N::findLanguage());
+
if(empty(self::$versionHash)) {
self::$versionHash = md5(implode(',', OC_App::getAppVersions()));
diff --git a/lib/private/util.php b/lib/private/util.php
index d600f8a5e64..6cd982c222e 100644
--- a/lib/private/util.php
+++ b/lib/private/util.php
@@ -436,12 +436,9 @@ class OC_Util {
}
$webServerRestart = false;
- //check for database drivers
- if (!(is_callable('sqlite_open') or class_exists('SQLite3'))
- and !is_callable('mysql_connect')
- and !is_callable('pg_connect')
- and !is_callable('oci_connect')
- ) {
+ $setup = new OC_Setup($config);
+ $availableDatabases = $setup->getSupportedDatabases();
+ if (empty($availableDatabases)) {
$errors[] = array(
'error' => $l->t('No database drivers (sqlite, mysql, or postgresql) installed.'),
'hint' => '' //TODO: sane hint
diff --git a/lib/public/iconfig.php b/lib/public/iconfig.php
index 404cf030dee..554fee5b22f 100644
--- a/lib/public/iconfig.php
+++ b/lib/public/iconfig.php
@@ -46,7 +46,7 @@ interface IConfig {
* Looks up a system wide defined value
*
* @param string $key the key of the value, under which it was saved
- * @param string $default the default value to be returned if the value isn't set
+ * @param mixed $default the default value to be returned if the value isn't set
* @return mixed the value or $default
*/
public function getSystemValue($key, $default = '');
diff --git a/settings/l10n/da.php b/settings/l10n/da.php
index 802b70cc0b5..814f809e10e 100644
--- a/settings/l10n/da.php
+++ b/settings/l10n/da.php
@@ -70,6 +70,7 @@ $TRANSLATIONS = array(
"A valid group name must be provided" => "Et gyldigt gruppenavn skal angives ",
"deleted {groupName}" => "slettede {groupName}",
"undo" => "fortryd",
+"no group" => "ingen gruppe",
"never" => "aldrig",
"deleted {userName}" => "slettede {userName}",
"add group" => "Tilføj gruppe",
@@ -227,6 +228,7 @@ $TRANSLATIONS = array(
"Unlimited" => "Ubegrænset",
"Other" => "Andet",
"Username" => "Brugernavn",
+"Group Admin for" => "Gruppeadministrator for",
"Quota" => "Kvote",
"Storage Location" => "Placering af lageret",
"Last Login" => "Seneste login",
diff --git a/settings/l10n/es.php b/settings/l10n/es.php
index adf474cda01..91fdbe2f3e1 100644
--- a/settings/l10n/es.php
+++ b/settings/l10n/es.php
@@ -70,6 +70,7 @@ $TRANSLATIONS = array(
"A valid group name must be provided" => "Se debe dar un nombre válido para el grupo ",
"deleted {groupName}" => "borrado {groupName}",
"undo" => "deshacer",
+"no group" => "sin grupo",
"never" => "nunca",
"deleted {userName}" => "borrado {userName}",
"add group" => "añadir Grupo",
diff --git a/settings/l10n/fr.php b/settings/l10n/fr.php
index 41c5635bb68..56c89bc412d 100644
--- a/settings/l10n/fr.php
+++ b/settings/l10n/fr.php
@@ -1,8 +1,8 @@
<?php
$TRANSLATIONS = array(
-"Enabled" => "Activée",
-"Not enabled" => "Désactivée",
-"Recommended" => "Recommandée",
+"Enabled" => "Activées",
+"Not enabled" => "Désactivées",
+"Recommended" => "Recommandées",
"Authentication error" => "Erreur d'authentification",
"Your full name has been changed." => "Votre nom complet a été modifié.",
"Unable to change full name" => "Impossible de changer le nom complet",
@@ -190,7 +190,7 @@ $TRANSLATIONS = array(
"Full Name" => "Nom complet",
"Email" => "Adresse mail",
"Your email address" => "Votre adresse e-mail",
-"Fill in an email address to enable password recovery and receive notifications" => "Saisir une adresse e-mail pour permettre la réinitialisation du mot de passe et la réception des notifications",
+"Fill in an email address to enable password recovery and receive notifications" => "Saisissez votre adresse mail pour permettre la réinitialisation du mot de passe et la réception des notifications",
"Profile picture" => "Photo de profil",
"Upload new" => "Nouvelle depuis votre ordinateur",
"Select new from Files" => "Nouvelle depuis les Fichiers",
diff --git a/settings/l10n/it.php b/settings/l10n/it.php
index e7ecb9a69a1..727017740ae 100644
--- a/settings/l10n/it.php
+++ b/settings/l10n/it.php
@@ -70,6 +70,7 @@ $TRANSLATIONS = array(
"A valid group name must be provided" => "Deve essere fornito un nome valido per il gruppo",
"deleted {groupName}" => "{groupName} eliminato",
"undo" => "annulla",
+"no group" => "nessun gruppo",
"never" => "mai",
"deleted {userName}" => "{userName} eliminato",
"add group" => "aggiungi gruppo",
@@ -227,6 +228,7 @@ $TRANSLATIONS = array(
"Unlimited" => "Illimitata",
"Other" => "Altro",
"Username" => "Nome utente",
+"Group Admin for" => "Gruppo di amministrazione per",
"Quota" => "Quote",
"Storage Location" => "Posizione di archiviazione",
"Last Login" => "Ultimo accesso",
diff --git a/settings/l10n/pl.php b/settings/l10n/pl.php
index 01e3c5afe96..481fec558b6 100644
--- a/settings/l10n/pl.php
+++ b/settings/l10n/pl.php
@@ -1,6 +1,8 @@
<?php
$TRANSLATIONS = array(
"Enabled" => "Włączone",
+"Not enabled" => "Nie włączone",
+"Recommended" => "Polecane",
"Authentication error" => "Błąd uwierzytelniania",
"Your full name has been changed." => "Twoja pełna nazwa została zmieniona.",
"Unable to change full name" => "Nie można zmienić pełnej nazwy",
@@ -33,6 +35,7 @@ $TRANSLATIONS = array(
"Saved" => "Zapisano",
"test email settings" => "przetestuj ustawienia email",
"If you received this email, the settings seem to be correct." => "Jeśli otrzymałeś ten email, ustawienia wydają się być poprawne.",
+"A problem occurred while sending the email. Please revise your settings." => "Pojawił się problem podczas wysyłania email. Proszę sprawdzić ponownie ustawienia",
"Email sent" => "E-mail wysłany",
"You need to set your user email before being able to send test emails." => "Musisz najpierw ustawić użytkownika e-mail, aby móc wysyłać wiadomości testowe.",
"Are you really sure you want add \"{domain}\" as trusted domain?" => "Czy jesteś pewien/pewna że chcesz dodać \"{domain}\" jako zaufaną domenę?",
@@ -67,6 +70,7 @@ $TRANSLATIONS = array(
"A valid group name must be provided" => "Należy podać prawidłową nazwę grupy",
"deleted {groupName}" => "usunięto {groupName}",
"undo" => "cofnij",
+"no group" => "brak grupy",
"never" => "nigdy",
"deleted {userName}" => "usunięto {userName}",
"add group" => "dodaj grupę",
@@ -75,6 +79,7 @@ $TRANSLATIONS = array(
"A valid password must be provided" => "Należy podać prawidłowe hasło",
"Warning: Home directory for user \"{user}\" already exists" => "Ostrzeżenie: Katalog domowy dla użytkownika \"{user}\" już istnieje",
"__language_name__" => "polski",
+"Personal Info" => "Informacje osobiste",
"SSL root certificates" => "Główny certyfikat SSL",
"Encryption" => "Szyfrowanie",
"Everything (fatal issues, errors, warnings, info, debug)" => "Wszystko (Informacje, ostrzeżenia, błędy i poważne problemy, debug)",
@@ -157,10 +162,13 @@ $TRANSLATIONS = array(
"Version" => "Wersja",
"Developed by the <a href=\"http://ownCloud.org/contact\" target=\"_blank\">ownCloud community</a>, the <a href=\"https://github.com/owncloud\" target=\"_blank\">source code</a> is licensed under the <a href=\"http://www.gnu.org/licenses/agpl-3.0.html\" target=\"_blank\"><abbr title=\"Affero General Public License\">AGPL</abbr></a>." => "Stworzone przez <a href=\"http://ownCloud.org/contact\" target=\"_blank\">społeczność ownCloud</a>, <a href=\"https://github.com/owncloud\" target=\"_blank\">kod źródłowy</a> na licencji <a href=\"http://www.gnu.org/licenses/agpl-3.0.html\" target=\"_blank\"><abbr title=\"Affero General Public License\">AGPL</abbr></a>.",
"More apps" => "Więcej aplikacji",
+"Add your app" => "Dodaj twoją aplikację",
"by" => "przez",
+"licensed" => "Licencja",
"Documentation:" => "Dokumentacja:",
"User Documentation" => "Dokumentacja użytkownika",
"Admin Documentation" => "Dokumentacja Administratora",
+"Update to %s" => "Aktualizuj do %s",
"Enable only for specific groups" => "Włącz tylko dla określonych grup",
"Uninstall App" => "Odinstaluj aplikację",
"Administrator Documentation" => "Dokumentacja administratora",
@@ -219,6 +227,7 @@ $TRANSLATIONS = array(
"Unlimited" => "Bez limitu",
"Other" => "Inne",
"Username" => "Nazwa użytkownika",
+"Group Admin for" => "Grupa Admin dla",
"Quota" => "Udział",
"Storage Location" => "Lokalizacja magazynu",
"Last Login" => "Ostatnio zalogowany",
diff --git a/settings/l10n/sl.php b/settings/l10n/sl.php
index 914c5890551..9866e44afa0 100644
--- a/settings/l10n/sl.php
+++ b/settings/l10n/sl.php
@@ -111,11 +111,12 @@ $TRANSLATIONS = array(
"No problems found" => "Ni zaznanih težav",
"Please double check the <a href='%s'>installation guides</a>." => "Preverite <a href='%s'>navodila namestitve</a>.",
"Cron" => "Periodično opravilo",
-"Last cron was executed at %s." => "Zadnje opravilo cron je bilo izvedeno ob %s.",
-"Last cron was executed at %s. This is more than an hour ago, something seems wrong." => "Zadnje opravilo cron je bilo izvedeno ob %s. To je več kot uro nazaj. Nekaj je očitno narobe.",
-"Cron was not executed yet!" => "Opravilo Cron še ni zagnano!",
+"Last cron was executed at %s." => "Zadnje periodično opravilo cron je bilo izvedeno ob %s.",
+"Last cron was executed at %s. This is more than an hour ago, something seems wrong." => "Zadnje periodično opravilo cron je bilo izvedeno ob %s. To je več kot uro nazaj. Nekaj je očitno narobe.",
+"Cron was not executed yet!" => "Periodično opravilo cron še ni zagnano!",
"Execute one task with each page loaded" => "Izvedi eno nalogo z vsako naloženo stranjo.",
-"cron.php is registered at a webcron service to call cron.php every 15 minutes over http." => "Datoteka cron.php je vpisana v storitvi webcron za potrditev sklica vsakih 15 minut pri povezavi preko HTTP.",
+"cron.php is registered at a webcron service to call cron.php every 15 minutes over http." => "Datoteka cron.php je vpisana za periodično opravilo webcron za potrditev sklica vsakih 15 minut pri povezavi preko HTTP.",
+"Use system's cron service to call the cron.php file every 15 minutes." => "Uporabi storitev periodičnih opravil za klic datoteke cron.php vsakih 15 minut.",
"Sharing" => "Souporaba",
"Allow apps to use the Share API" => "Dovoli programom uporabo vmesnika API souporabe",
"Allow users to share via link" => "Uporabnikom dovoli omogočanje souporabe s povezavami",
@@ -129,6 +130,7 @@ $TRANSLATIONS = array(
"Restrict users to only share with users in their groups" => "Uporabnikom dovoli omogočanje souporabe le znotraj njihove skupine",
"Allow users to send mail notification for shared files" => "Dovoli uporabnikom pošiljati obvestila o souporabi datotek po elektronski pošti.",
"Exclude groups from sharing" => "Izloči skupine iz souporabe",
+"These groups will still be able to receive shares, but not to initiate them." => "Te skupine lahko sprejemajo mape v souporabo, ne morejo pa souporabe dovoliti",
"Security" => "Varnost",
"Enforce HTTPS" => "Zahtevaj uporabo HTTPS",
"Forces the clients to connect to %s via an encrypted connection." => "Vsili povezavo odjemalca z %s preko šifrirane povezave.",
@@ -192,12 +194,15 @@ $TRANSLATIONS = array(
"Help translate" => "Sodelujte pri prevajanju",
"Common Name" => "Splošno ime",
"Valid until" => "Veljavno do",
+"Issued By" => "Izdajatelj",
+"Valid until %s" => "Veljavno do %s",
"Import Root Certificate" => "Uvozi korensko potrdilo",
"The encryption app is no longer enabled, please decrypt all your files" => "Program za šifriranje ni več omogočen. Odšifrirati je treba vse datoteke.",
"Log-in password" => "Prijavno geslo",
"Decrypt all Files" => "Odšifriraj vse datoteke",
"Restore Encryption Keys" => "Obnovi šifrirne ključe",
"Delete Encryption Keys" => "Izbriši šifrirne ključe",
+"Show storage location" => "Pokaži mesto shrambe",
"Show last log in" => "Pokaži podatke zadnje prijave",
"Login Name" => "Prijavno ime",
"Create" => "Ustvari",
diff --git a/tests/lib/files/storage/local.php b/tests/lib/files/storage/local.php
index 1aad138aa33..37462941d0c 100644
--- a/tests/lib/files/storage/local.php
+++ b/tests/lib/files/storage/local.php
@@ -1,24 +1,24 @@
<?php
/**
-* ownCloud
-*
-* @author Robin Appelman
-* @copyright 2012 Robin Appelman icewind@owncloud.com
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-* License as published by the Free Software Foundation; either
-* version 3 of the License, or any later version.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
-*
-* You should have received a copy of the GNU Affero General Public
-* License along with this library. If not, see <http://www.gnu.org/licenses/>.
-*
-*/
+ * ownCloud
+ *
+ * @author Robin Appelman
+ * @copyright 2012 Robin Appelman icewind@owncloud.com
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
namespace Test\Files\Storage;
@@ -27,13 +27,38 @@ class Local extends Storage {
* @var string tmpDir
*/
private $tmpDir;
+
public function setUp() {
- $this->tmpDir=\OC_Helper::tmpFolder();
- $this->instance=new \OC\Files\Storage\Local(array('datadir'=>$this->tmpDir));
+ $this->tmpDir = \OC_Helper::tmpFolder();
+ $this->instance = new \OC\Files\Storage\Local(array('datadir' => $this->tmpDir));
}
public function tearDown() {
\OC_Helper::rmdirr($this->tmpDir);
}
+
+ public function testStableEtag() {
+ if (\OC_Util::runningOnWindows()) {
+ $this->markTestSkipped('On Windows platform we have no stable etag generation - yet');
+ }
+
+ $this->instance->file_put_contents('test.txt', 'foobar');
+ $etag1 = $this->instance->getETag('test.txt');
+ $etag2 = $this->instance->getETag('test.txt');
+ $this->assertEquals($etag1, $etag2);
+ }
+
+ public function testEtagChange() {
+ if (\OC_Util::runningOnWindows()) {
+ $this->markTestSkipped('On Windows platform we have no stable etag generation - yet');
+ }
+
+ $this->instance->file_put_contents('test.txt', 'foo');
+ $this->instance->touch('test.txt', time() - 2);
+ $etag1 = $this->instance->getETag('test.txt');
+ $this->instance->file_put_contents('test.txt', 'bar');
+ $etag2 = $this->instance->getETag('test.txt');
+ $this->assertNotEquals($etag1, $etag2);
+ }
}
diff --git a/tests/lib/setup.php b/tests/lib/setup.php
new file mode 100644
index 00000000000..2c1569dd800
--- /dev/null
+++ b/tests/lib/setup.php
@@ -0,0 +1,103 @@
+<?php
+/**
+ * Copyright (c) 2014 Lukas Reschke <lukas@owncloud.com>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+use OCP\IConfig;
+
+class Test_OC_Setup extends PHPUnit_Framework_TestCase {
+
+ /** @var IConfig */
+ protected $config;
+ /** @var \OC_Setup */
+ protected $setupClass;
+
+ public function setUp() {
+ $this->config = $this->getMock('\OCP\IConfig');
+ $this->setupClass = $this->getMock('\OC_Setup', array('class_exists', 'is_callable'), array($this->config));
+ }
+
+ public function testGetSupportedDatabasesWithOneWorking() {
+ $this->config
+ ->expects($this->once())
+ ->method('getSystemValue')
+ ->will($this->returnValue(
+ array('sqlite', 'mysql', 'oci')
+ ));
+ $this->setupClass
+ ->expects($this->once())
+ ->method('class_exists')
+ ->will($this->returnValue(true));
+ $this->setupClass
+ ->expects($this->exactly(2))
+ ->method('is_callable')
+ ->will($this->returnValue(false));
+ $result = $this->setupClass->getSupportedDatabases();
+ $expectedResult = array(
+ 'sqlite' => 'SQLite'
+ );
+
+ $this->assertSame($expectedResult, $result);
+ }
+
+ public function testGetSupportedDatabasesWithNoWorking() {
+ $this->config
+ ->expects($this->once())
+ ->method('getSystemValue')
+ ->will($this->returnValue(
+ array('sqlite', 'mysql', 'oci', 'pgsql')
+ ));
+ $this->setupClass
+ ->expects($this->once())
+ ->method('class_exists')
+ ->will($this->returnValue(false));
+ $this->setupClass
+ ->expects($this->exactly(3))
+ ->method('is_callable')
+ ->will($this->returnValue(false));
+ $result = $this->setupClass->getSupportedDatabases();
+
+ $this->assertSame(array(), $result);
+ }
+
+ public function testGetSupportedDatabasesWitAllWorking() {
+ $this->config
+ ->expects($this->once())
+ ->method('getSystemValue')
+ ->will($this->returnValue(
+ array('sqlite', 'mysql', 'pgsql', 'oci', 'mssql')
+ ));
+ $this->setupClass
+ ->expects($this->once())
+ ->method('class_exists')
+ ->will($this->returnValue(true));
+ $this->setupClass
+ ->expects($this->exactly(4))
+ ->method('is_callable')
+ ->will($this->returnValue(true));
+ $result = $this->setupClass->getSupportedDatabases();
+ $expectedResult = array(
+ 'sqlite' => 'SQLite',
+ 'mysql' => 'MySQL/MariaDB',
+ 'pgsql' => 'PostgreSQL',
+ 'oci' => 'Oracle',
+ 'mssql' => 'MS SQL'
+ );
+ $this->assertSame($expectedResult, $result);
+ }
+
+ /**
+ * @expectedException \Exception
+ * @expectedExceptionMessage Supported databases are not properly configured.
+ */
+ public function testGetSupportedDatabaseException() {
+ $this->config
+ ->expects($this->once())
+ ->method('getSystemValue')
+ ->will($this->returnValue('NotAnArray'));
+ $this->setupClass->getSupportedDatabases();
+ }
+} \ No newline at end of file