diff --git a/.gitignore b/.gitignore
index 68977ad077..6259482c00 100644
--- a/.gitignore
+++ b/.gitignore
@@ -72,7 +72,10 @@ nbproject
.well-known
/.buildpath
-#tests - autogenerated filed
+# Tests
+/tests/phpunit.xml
+
+# Tests - auto-generated files
data-autotest
/tests/coverage*
/tests/autoconfig*
diff --git a/apps/files/ajax/scan.php b/apps/files/ajax/scan.php
index 6659cd459c..0706d4e782 100644
--- a/apps/files/ajax/scan.php
+++ b/apps/files/ajax/scan.php
@@ -4,6 +4,16 @@ session_write_close();
$force = (isset($_GET['force']) and ($_GET['force'] === 'true'));
$dir = isset($_GET['dir']) ? $_GET['dir'] : '';
+if (isset($_GET['users'])) {
+ OC_JSON::checkAdminUser();
+ if ($_GET['users'] === 'all') {
+ $users = OC_User::getUsers();
+ } else {
+ $users = json_decode($_GET['users']);
+ }
+} else {
+ $users = array(OC_User::getUser());
+}
$eventSource = new OC_EventSource();
ScanListener::$eventSource = $eventSource;
@@ -12,21 +22,27 @@ ScanListener::$view = \OC\Files\Filesystem::getView();
OC_Hook::connect('\OC\Files\Cache\Scanner', 'scan_folder', 'ScanListener', 'folder');
OC_Hook::connect('\OC\Files\Cache\Scanner', 'scan_file', 'ScanListener', 'file');
-$absolutePath = \OC\Files\Filesystem::getView()->getAbsolutePath($dir);
+foreach ($users as $user) {
+ $eventSource->send('user', $user);
+ OC_Util::tearDownFS();
+ OC_Util::setupFS($user);
-$mountPoints = \OC\Files\Filesystem::getMountPoints($absolutePath);
-$mountPoints[] = \OC\Files\Filesystem::getMountPoint($absolutePath);
-$mountPoints = array_reverse($mountPoints); //start with the mount point of $dir
+ $absolutePath = \OC\Files\Filesystem::getView()->getAbsolutePath($dir);
-foreach ($mountPoints as $mountPoint) {
- $storage = \OC\Files\Filesystem::getStorage($mountPoint);
- if ($storage) {
- ScanListener::$mountPoints[$storage->getId()] = $mountPoint;
- $scanner = $storage->getScanner();
- if ($force) {
- $scanner->scan('', \OC\Files\Cache\Scanner::SCAN_RECURSIVE, \OC\Files\Cache\Scanner::REUSE_ETAG);
- } else {
- $scanner->backgroundScan();
+ $mountPoints = \OC\Files\Filesystem::getMountPoints($absolutePath);
+ $mountPoints[] = \OC\Files\Filesystem::getMountPoint($absolutePath);
+ $mountPoints = array_reverse($mountPoints); //start with the mount point of $dir
+
+ foreach ($mountPoints as $mountPoint) {
+ $storage = \OC\Files\Filesystem::getStorage($mountPoint);
+ if ($storage) {
+ ScanListener::$mountPoints[$storage->getId()] = $mountPoint;
+ $scanner = $storage->getScanner();
+ if ($force) {
+ $scanner->scan('', \OC\Files\Cache\Scanner::SCAN_RECURSIVE, \OC\Files\Cache\Scanner::REUSE_ETAG);
+ } else {
+ $scanner->backgroundScan();
+ }
}
}
}
diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index a79d34c9b2..3438c1c30a 100644
--- a/apps/files/js/files.js
+++ b/apps/files/js/files.js
@@ -695,7 +695,7 @@ $(document).ready(function() {
}
});
-function scanFiles(force, dir){
+function scanFiles(force, dir, users){
if (!OC.currentUser) {
return;
}
@@ -705,7 +705,18 @@ function scanFiles(force, dir){
}
force = !!force; //cast to bool
scanFiles.scanning = true;
- var scannerEventSource = new OC.EventSource(OC.filePath('files','ajax','scan.php'),{force:force,dir:dir});
+ var scannerEventSource;
+ if (users) {
+ var usersString;
+ if (users === 'all') {
+ usersString = users;
+ } else {
+ usersString = JSON.stringify(users);
+ }
+ scannerEventSource = new OC.EventSource(OC.filePath('files','ajax','scan.php'),{force: force,dir: dir, users: usersString});
+ } else {
+ scannerEventSource = new OC.EventSource(OC.filePath('files','ajax','scan.php'),{force: force,dir: dir});
+ }
scanFiles.cancel = scannerEventSource.close.bind(scannerEventSource);
scannerEventSource.listen('count',function(count){
console.log(count + ' files scanned')
@@ -717,6 +728,9 @@ function scanFiles(force, dir){
scanFiles.scanning=false;
console.log('done after ' + count + ' files');
});
+ scannerEventSource.listen('user',function(user){
+ console.log('scanning files for ' + user);
+ });
}
scanFiles.scanning=false;
diff --git a/apps/files/l10n/eo.php b/apps/files/l10n/eo.php
index 3eeb88754c..d4cc7b2bb9 100644
--- a/apps/files/l10n/eo.php
+++ b/apps/files/l10n/eo.php
@@ -9,9 +9,11 @@
"No file was uploaded" => "Neniu dosiero alŝutiĝis.",
"Missing a temporary folder" => "Mankas provizora dosierujo.",
"Failed to write to disk" => "Malsukcesis skribo al disko",
+"Not enough storage available" => "Ne haveblas sufiĉa memoro",
"Invalid directory." => "Nevalida dosierujo.",
"Files" => "Dosieroj",
"Share" => "Kunhavigi",
+"Delete permanently" => "Forigi por ĉiam",
"Delete" => "Forigi",
"Rename" => "Alinomigi",
"Pending" => "Traktotaj",
@@ -21,11 +23,14 @@
"cancel" => "nuligi",
"replaced {new_name} with {old_name}" => "anstataŭiĝis {new_name} per {old_name}",
"undo" => "malfari",
+"perform delete operation" => "plenumi forigan operacion",
"1 file uploading" => "1 dosiero estas alŝutata",
"files uploading" => "dosieroj estas alŝutataj",
"'.' is an invalid file name." => "'.' ne estas valida dosiernomo.",
"File name cannot be empty." => "Dosiernomo devas ne malpleni.",
"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Nevalida nomo: “\\”, “/”, “<”, “>”, “:”, “\"”, “|”, “?” kaj “*” ne permesatas.",
+"Your storage is full, files can not be updated or synced anymore!" => "Via memoro plenas, ne plu eblas ĝisdatigi aŭ sinkronigi dosierojn!",
+"Your storage is almost full ({usedSpacePercent}%)" => "Via memoro preskaŭ plenas ({usedSpacePercent}%)",
"Your download is being prepared. This might take some time if the files are big." => "Via elŝuto pretiĝatas. Ĉi tio povas daŭri iom da tempo se la dosieroj grandas.",
"Unable to upload your file as it is a directory or has 0 bytes" => "Ne eblis alŝuti vian dosieron ĉar ĝi estas dosierujo aŭ havas 0 duumokojn",
"Not enough space available" => "Ne haveblas sufiĉa spaco",
@@ -41,6 +46,7 @@
"{count} folders" => "{count} dosierujoj",
"1 file" => "1 dosiero",
"{count} files" => "{count} dosierujoj",
+"Invalid folder name. Usage of 'Shared' is reserved by ownCloud" => "Nevalida dosierujnomo. La uzo de “Shared” estas rezervita de ownCloud.",
"Unable to rename file" => "Ne eblis alinomigi dosieron",
"Upload" => "Alŝuti",
"File handling" => "Dosieradministro",
@@ -55,12 +61,15 @@
"Text file" => "Tekstodosiero",
"Folder" => "Dosierujo",
"From link" => "El ligilo",
+"Deleted files" => "Forigitaj dosieroj",
"Cancel upload" => "Nuligi alŝuton",
+"You don’t have write permissions here." => "Vi ne havas permeson skribi ĉi tie.",
"Nothing in here. Upload something!" => "Nenio estas ĉi tie. Alŝutu ion!",
"Download" => "Elŝuti",
"Unshare" => "Malkunhavigi",
"Upload too large" => "Alŝuto tro larĝa",
"The files you are trying to upload exceed the maximum size for file uploads on this server." => "La dosieroj, kiujn vi provas alŝuti, transpasas la maksimuman grandon por dosieralŝutoj en ĉi tiu servilo.",
"Files are being scanned, please wait." => "Dosieroj estas skanataj, bonvolu atendi.",
-"Current scanning" => "Nuna skano"
+"Current scanning" => "Nuna skano",
+"Upgrading filesystem cache..." => "Ĝisdatiĝas dosiersistema kaŝmemoro..."
);
diff --git a/apps/files/l10n/ro.php b/apps/files/l10n/ro.php
index 8fdf62aeb3..59c12c57a3 100644
--- a/apps/files/l10n/ro.php
+++ b/apps/files/l10n/ro.php
@@ -46,6 +46,7 @@
"{count} folders" => "{count} foldare",
"1 file" => "1 fisier",
"{count} files" => "{count} fisiere",
+"Invalid folder name. Usage of 'Shared' is reserved by ownCloud" => "Nume de dosar invalid. Utilizarea 'Shared' e rezervată de ownCloud",
"Unable to rename file" => "Nu s-a putut redenumi fișierul",
"Upload" => "Încărcare",
"File handling" => "Manipulare fișiere",
diff --git a/apps/files/l10n/sl.php b/apps/files/l10n/sl.php
index 6902d311ab..ed6391a588 100644
--- a/apps/files/l10n/sl.php
+++ b/apps/files/l10n/sl.php
@@ -46,6 +46,7 @@
"{count} folders" => "{count} map",
"1 file" => "1 datoteka",
"{count} files" => "{count} datotek",
+"Invalid folder name. Usage of 'Shared' is reserved by ownCloud" => "Ime mape je neveljavno. Uporaba oznake \"Souporaba\" je rezervirana za ownCloud",
"Unable to rename file" => "Ni mogoče preimenovati datoteke",
"Upload" => "Pošlji",
"File handling" => "Upravljanje z datotekami",
diff --git a/apps/files/triggerupdate.php b/apps/files/triggerupdate.php
new file mode 100644
index 0000000000..0e29edbba3
--- /dev/null
+++ b/apps/files/triggerupdate.php
@@ -0,0 +1,22 @@
+resolvePath($file);
+ $watcher = $storage->getWatcher($internalPath);
+ $watcher->checkUpdate($internalPath);
+ } else {
+ echo "Usage: php triggerupdate.php /path/to/file\n";
+ }
+} else {
+ echo "This script can be run from the command line only\n";
+}
diff --git a/apps/files_encryption/appinfo/app.php b/apps/files_encryption/appinfo/app.php
index 419bef1ede..d97811bb79 100644
--- a/apps/files_encryption/appinfo/app.php
+++ b/apps/files_encryption/appinfo/app.php
@@ -33,13 +33,18 @@ if (!OC_Config::getValue('maintenance', false)) {
}
$view = new OC_FilesystemView('/');
- $session = new \OCA\Encryption\Session($view);
+
+ $sessionReady = false;
+ if(extension_loaded("openssl")) {
+ $session = new \OCA\Encryption\Session($view);
+ $sessionReady = true;
+ }
$user = \OCP\USER::getUser();
// check if user has a private key
- if (
- !$view->file_exists('/' . $user . '/files_encryption/' . $user . '.private.key')
- && OCA\Encryption\Crypt::mode() === 'server'
+ if ($sessionReady === false
+ || (!$view->file_exists('/' . $user . '/files_encryption/' . $user . '.private.key')
+ && OCA\Encryption\Crypt::mode() === 'server')
) {
// Force the user to log-in again if the encryption key isn't unlocked
diff --git a/apps/files_encryption/appinfo/info.xml b/apps/files_encryption/appinfo/info.xml
index ea8f6cf6f3..1e97b1b221 100644
--- a/apps/files_encryption/appinfo/info.xml
+++ b/apps/files_encryption/appinfo/info.xml
@@ -2,7 +2,7 @@
- t("Enable encryption passwords recovery key (allow sharing to recovery key):")); ?>
+ t("Enable recovery key (allow to recover users files in case of password loss):")); ?>
-
+
- t("Change encryption passwords recovery key:")); ?>
+ t("Change recovery key password:")); ?>
/>
-
+
/>
-
+