summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/base.php2
-rw-r--r--lib/composer/composer/autoload_classmap.php2
-rw-r--r--lib/composer/composer/autoload_static.php2
-rw-r--r--lib/l10n/ca.js7
-rw-r--r--lib/l10n/ca.json7
-rw-r--r--lib/l10n/es.js1
-rw-r--r--lib/l10n/es.json1
-rw-r--r--lib/l10n/fr.js1
-rw-r--r--lib/l10n/fr.json1
-rw-r--r--lib/l10n/ja.js44
-rw-r--r--lib/l10n/ja.json44
-rw-r--r--lib/l10n/ru.js1
-rw-r--r--lib/l10n/ru.json1
-rw-r--r--lib/l10n/sr.js1
-rw-r--r--lib/l10n/sr.json1
-rw-r--r--lib/l10n/tr.js1
-rw-r--r--lib/l10n/tr.json1
-rw-r--r--lib/private/Files/AppData/AppData.php16
-rw-r--r--lib/private/Files/AppData/Factory.php3
-rw-r--r--lib/private/Preview/BackgroundCleanupJob.php91
-rw-r--r--lib/private/Preview/Watcher.php44
-rw-r--r--lib/private/Preview/WatcherConnector.php11
-rw-r--r--lib/private/Repair.php4
-rw-r--r--lib/private/Repair/NC14/AddPreviewBackgroundCleanupJob.php48
-rw-r--r--lib/private/Setup.php2
-rw-r--r--lib/public/Files/SimpleFS/ISimpleRoot.php6
26 files changed, 264 insertions, 79 deletions
diff --git a/lib/base.php b/lib/base.php
index 5cfaccf59ab..57a620db0ec 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -891,6 +891,8 @@ class OC {
self::$loader->setMemoryCache($memcacheFactory->createLocal('Autoloader'));
} catch (\Exception $ex) {
}
+
+ self::$composerAutoloader->setApcuPrefix($instanceId . '-mainComposer');
}
}
diff --git a/lib/composer/composer/autoload_classmap.php b/lib/composer/composer/autoload_classmap.php
index d37cab8277a..cd5090cc93c 100644
--- a/lib/composer/composer/autoload_classmap.php
+++ b/lib/composer/composer/autoload_classmap.php
@@ -791,6 +791,7 @@ return array(
'OC\\PreviewManager' => $baseDir . '/lib/private/PreviewManager.php',
'OC\\PreviewNotAvailableException' => $baseDir . '/lib/private/PreviewNotAvailableException.php',
'OC\\Preview\\BMP' => $baseDir . '/lib/private/Preview/BMP.php',
+ 'OC\\Preview\\BackgroundCleanupJob' => $baseDir . '/lib/private/Preview/BackgroundCleanupJob.php',
'OC\\Preview\\Bitmap' => $baseDir . '/lib/private/Preview/Bitmap.php',
'OC\\Preview\\Font' => $baseDir . '/lib/private/Preview/Font.php',
'OC\\Preview\\GIF' => $baseDir . '/lib/private/Preview/GIF.php',
@@ -838,6 +839,7 @@ return array(
'OC\\Repair\\NC11\\FixMountStorages' => $baseDir . '/lib/private/Repair/NC11/FixMountStorages.php',
'OC\\Repair\\NC13\\AddLogRotateJob' => $baseDir . '/lib/private/Repair/NC13/AddLogRotateJob.php',
'OC\\Repair\\NC13\\RepairInvalidPaths' => $baseDir . '/lib/private/Repair/NC13/RepairInvalidPaths.php',
+ 'OC\\Repair\\NC14\\AddPreviewBackgroundCleanupJob' => $baseDir . '/lib/private/Repair/NC14/AddPreviewBackgroundCleanupJob.php',
'OC\\Repair\\OldGroupMembershipShares' => $baseDir . '/lib/private/Repair/OldGroupMembershipShares.php',
'OC\\Repair\\Owncloud\\DropAccountTermsTable' => $baseDir . '/lib/private/Repair/Owncloud/DropAccountTermsTable.php',
'OC\\Repair\\Owncloud\\SaveAccountsTableData' => $baseDir . '/lib/private/Repair/Owncloud/SaveAccountsTableData.php',
diff --git a/lib/composer/composer/autoload_static.php b/lib/composer/composer/autoload_static.php
index ac68a91621b..4e47536eacc 100644
--- a/lib/composer/composer/autoload_static.php
+++ b/lib/composer/composer/autoload_static.php
@@ -821,6 +821,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c
'OC\\PreviewManager' => __DIR__ . '/../../..' . '/lib/private/PreviewManager.php',
'OC\\PreviewNotAvailableException' => __DIR__ . '/../../..' . '/lib/private/PreviewNotAvailableException.php',
'OC\\Preview\\BMP' => __DIR__ . '/../../..' . '/lib/private/Preview/BMP.php',
+ 'OC\\Preview\\BackgroundCleanupJob' => __DIR__ . '/../../..' . '/lib/private/Preview/BackgroundCleanupJob.php',
'OC\\Preview\\Bitmap' => __DIR__ . '/../../..' . '/lib/private/Preview/Bitmap.php',
'OC\\Preview\\Font' => __DIR__ . '/../../..' . '/lib/private/Preview/Font.php',
'OC\\Preview\\GIF' => __DIR__ . '/../../..' . '/lib/private/Preview/GIF.php',
@@ -868,6 +869,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c
'OC\\Repair\\NC11\\FixMountStorages' => __DIR__ . '/../../..' . '/lib/private/Repair/NC11/FixMountStorages.php',
'OC\\Repair\\NC13\\AddLogRotateJob' => __DIR__ . '/../../..' . '/lib/private/Repair/NC13/AddLogRotateJob.php',
'OC\\Repair\\NC13\\RepairInvalidPaths' => __DIR__ . '/../../..' . '/lib/private/Repair/NC13/RepairInvalidPaths.php',
+ 'OC\\Repair\\NC14\\AddPreviewBackgroundCleanupJob' => __DIR__ . '/../../..' . '/lib/private/Repair/NC14/AddPreviewBackgroundCleanupJob.php',
'OC\\Repair\\OldGroupMembershipShares' => __DIR__ . '/../../..' . '/lib/private/Repair/OldGroupMembershipShares.php',
'OC\\Repair\\Owncloud\\DropAccountTermsTable' => __DIR__ . '/../../..' . '/lib/private/Repair/Owncloud/DropAccountTermsTable.php',
'OC\\Repair\\Owncloud\\SaveAccountsTableData' => __DIR__ . '/../../..' . '/lib/private/Repair/Owncloud/SaveAccountsTableData.php',
diff --git a/lib/l10n/ca.js b/lib/l10n/ca.js
index e47de1f81a5..4989ac90342 100644
--- a/lib/l10n/ca.js
+++ b/lib/l10n/ca.js
@@ -42,7 +42,7 @@ OC.L10N.register(
"_in %n minute_::_in %n minutes_" : ["d'aquí %n minut","d'aquí %n minuts"],
"_%n minute ago_::_%n minutes ago_" : ["fa %n minut","fa %n minuts"],
"in a few seconds" : "en uns segons",
- "seconds ago" : "segons enrere",
+ "seconds ago" : "fa uns segons",
"File name is a reserved word" : "El nom de fitxer és una paraula reservada",
"File name contains at least one invalid character" : "El nom del fitxer conté al menys un caràcter invàlid",
"File name is too long" : "el nom del fitxer es massa gran",
@@ -50,7 +50,7 @@ OC.L10N.register(
"Empty filename is not allowed" : "Mo estan permesos noms buits",
"Help" : "Ajuda",
"Apps" : "Aplicacions",
- "Settings" : "Preferències",
+ "Settings" : "Configuració",
"Log out" : "Surt",
"Users" : "Usuaris",
"Unknown user" : "Usuari desconegut",
@@ -64,9 +64,10 @@ OC.L10N.register(
"Sharing" : "Compartir",
"Security" : "Seguretat",
"Encryption" : "Xifrat",
- "Additional settings" : "Configuració adicional",
+ "Additional settings" : "Configuració addicional",
"Tips & tricks" : "Consells i trucs",
"Personal info" : "Informació personal",
+ "Sync clients" : "Aplicacions per sincronitzar",
"Unlimited" : "Il·limitat",
"__language_name__" : "Català",
"Verifying" : "Verificant",
diff --git a/lib/l10n/ca.json b/lib/l10n/ca.json
index 69efeef3988..0c2e047778b 100644
--- a/lib/l10n/ca.json
+++ b/lib/l10n/ca.json
@@ -40,7 +40,7 @@
"_in %n minute_::_in %n minutes_" : ["d'aquí %n minut","d'aquí %n minuts"],
"_%n minute ago_::_%n minutes ago_" : ["fa %n minut","fa %n minuts"],
"in a few seconds" : "en uns segons",
- "seconds ago" : "segons enrere",
+ "seconds ago" : "fa uns segons",
"File name is a reserved word" : "El nom de fitxer és una paraula reservada",
"File name contains at least one invalid character" : "El nom del fitxer conté al menys un caràcter invàlid",
"File name is too long" : "el nom del fitxer es massa gran",
@@ -48,7 +48,7 @@
"Empty filename is not allowed" : "Mo estan permesos noms buits",
"Help" : "Ajuda",
"Apps" : "Aplicacions",
- "Settings" : "Preferències",
+ "Settings" : "Configuració",
"Log out" : "Surt",
"Users" : "Usuaris",
"Unknown user" : "Usuari desconegut",
@@ -62,9 +62,10 @@
"Sharing" : "Compartir",
"Security" : "Seguretat",
"Encryption" : "Xifrat",
- "Additional settings" : "Configuració adicional",
+ "Additional settings" : "Configuració addicional",
"Tips & tricks" : "Consells i trucs",
"Personal info" : "Informació personal",
+ "Sync clients" : "Aplicacions per sincronitzar",
"Unlimited" : "Il·limitat",
"__language_name__" : "Català",
"Verifying" : "Verificant",
diff --git a/lib/l10n/es.js b/lib/l10n/es.js
index cbf3493d563..fbe0ef70cc8 100644
--- a/lib/l10n/es.js
+++ b/lib/l10n/es.js
@@ -71,6 +71,7 @@ OC.L10N.register(
"Change" : "Cambiar",
"Delete" : "Eliminar",
"Share" : "Compartir",
+ "Overview" : "Vista general",
"Basic settings" : "Ajustes básicos",
"Sharing" : "Compartir",
"Security" : "Seguridad",
diff --git a/lib/l10n/es.json b/lib/l10n/es.json
index 76dda7f2c7d..389afaf7e25 100644
--- a/lib/l10n/es.json
+++ b/lib/l10n/es.json
@@ -69,6 +69,7 @@
"Change" : "Cambiar",
"Delete" : "Eliminar",
"Share" : "Compartir",
+ "Overview" : "Vista general",
"Basic settings" : "Ajustes básicos",
"Sharing" : "Compartir",
"Security" : "Seguridad",
diff --git a/lib/l10n/fr.js b/lib/l10n/fr.js
index 099779265ee..d0240f880d7 100644
--- a/lib/l10n/fr.js
+++ b/lib/l10n/fr.js
@@ -71,6 +71,7 @@ OC.L10N.register(
"Change" : "Modifier",
"Delete" : "Supprimer",
"Share" : "Partager",
+ "Overview" : "Vue d'ensemble",
"Basic settings" : "Paramètres de base",
"Sharing" : "Partage",
"Security" : "Sécurité",
diff --git a/lib/l10n/fr.json b/lib/l10n/fr.json
index 77896b495b6..19e8c1e3863 100644
--- a/lib/l10n/fr.json
+++ b/lib/l10n/fr.json
@@ -69,6 +69,7 @@
"Change" : "Modifier",
"Delete" : "Supprimer",
"Share" : "Partager",
+ "Overview" : "Vue d'ensemble",
"Basic settings" : "Paramètres de base",
"Sharing" : "Partage",
"Security" : "Sécurité",
diff --git a/lib/l10n/ja.js b/lib/l10n/ja.js
index 09a95e318c1..90ca5fbb729 100644
--- a/lib/l10n/ja.js
+++ b/lib/l10n/ja.js
@@ -13,6 +13,9 @@ OC.L10N.register(
"%1$s, %2$s, %3$s and %4$s" : "%1$s と %2$s、%3$s、%4$s",
"%1$s, %2$s, %3$s, %4$s and %5$s" : "%1$s と %2$s、%3$s、%4$s、%5$s",
"Education Edition" : "Education Edition",
+ "Enterprise bundle" : "エンタープライズ バンドル",
+ "Groupware bundle" : "グループウェア バンドル",
+ "Social sharing bundle" : "SNS バンドル",
"PHP %s or higher is required." : "PHP %s 以上が必要です。",
"PHP with a version lower than %s is required." : "%s 以前のバージョンのPHPが必要です。",
"%sbit or higher PHP required." : "%sbit 以上の新しいバージョンのPHPが必要です。",
@@ -24,18 +27,28 @@ OC.L10N.register(
"Following platforms are supported: %s" : "次のプラットフォームをサポートしています: %s",
"Server version %s or higher is required." : "サーバーの %s よりも高いバージョンが必要です。",
"Server version %s or lower is required." : "サーバーの %s よりも低いバージョンが必要です。",
+ "Logged in user must be an admin" : "ログインユーザーは管理者である必要があります",
"Unknown filetype" : "不明なファイルタイプ",
"Invalid image" : "無効な画像",
"Avatar image is not square" : "アバター画像が正方形ではありません",
"today" : "今日",
- "yesterday" : "1日前",
+ "tomorrow" : "明日",
+ "yesterday" : "昨日",
+ "_in %n day_::_in %n days_" : ["%n 日"],
"_%n day ago_::_%n days ago_" : ["%n 日前"],
- "last month" : "1ヶ月前",
- "_%n month ago_::_%n months ago_" : ["%nヶ月前"],
- "last year" : "1年前",
+ "next month" : "来月",
+ "last month" : "先月",
+ "_in %n month_::_in %n months_" : ["%n ヶ月"],
+ "_%n month ago_::_%n months ago_" : ["%n ヶ月前"],
+ "next year" : "来年",
+ "last year" : "去年",
+ "_in %n year_::_in %n years_" : ["%n 年"],
"_%n year ago_::_%n years ago_" : ["%n 年前"],
+ "_in %n hour_::_in %n hours_" : ["%n 時間"],
"_%n hour ago_::_%n hours ago_" : ["%n 時間前"],
+ "_in %n minute_::_in %n minutes_" : ["%n 分"],
"_%n minute ago_::_%n minutes ago_" : ["%n 分前"],
+ "in a few seconds" : "数秒",
"seconds ago" : "数秒前",
"Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "ID: %sのモジュールは存在しません。アプリ設定で有効にするか、管理者に問い合わせてください。",
"File name is a reserved word" : "ファイル名が予約された単語です",
@@ -54,6 +67,11 @@ OC.L10N.register(
"Unknown user" : "不明なユーザー",
"APCu" : "APCu",
"Redis" : "Redis",
+ "Create" : "作成",
+ "Change" : "変更",
+ "Delete" : "削除",
+ "Share" : "共有",
+ "Overview" : "概要",
"Basic settings" : "基本設定",
"Sharing" : "共有",
"Security" : "セキュリティ",
@@ -88,7 +106,7 @@ OC.L10N.register(
"You are not allowed to share %s" : "%s を共有することを許可されていません。",
"Sharing %s failed, because you can not share with yourself" : "%s を共有できませんでした。自分自身に共有することはできません。",
"Sharing %s failed, because the user %s does not exist" : "%s を共有できませんでした。ユーザー %s が存在しません。",
- "Sharing %s failed, because the user %s is not a member of any groups that %s is a member of" : "%s を共有できませんでした。ユーザー %s はどのグループにも属していません。%s は、??のメンバーです。",
+ "Sharing %s failed, because the user %s is not a member of any groups that %s is a member of" : "%s を共有できませんでした。ユーザー %s はどのグループにも属していません。%s は、次のグループのメンバーです",
"Sharing %s failed, because this item is already shared with %s" : "%s を共有できませんでした。このアイテムはすでに %s に共有されています。",
"Sharing %s failed, because this item is already shared with user %s" : "%s を共有できませんでした。このアイテムは、ユーザー %s によりすでに共有されています。",
"Sharing %s failed, because the group %s does not exist" : "%s を共有できませんでした。グループ %s は存在しません。",
@@ -215,6 +233,20 @@ OC.L10N.register(
"Storage incomplete configuration. %s" : "設定が未完了のストレージです。 %s",
"Storage connection error. %s" : "ストレージへの接続エラー。 %s",
"Storage is temporarily not available" : "ストレージは一時的に利用できません",
- "Storage connection timeout. %s" : "ストレージへの接続がタイムアウト。 %s"
+ "Storage connection timeout. %s" : "ストレージへの接続がタイムアウト。 %s",
+ "Personal" : "パーソナル",
+ "Admin" : "管理者",
+ "DB Error: \"%s\"" : "DBエラー: \"%s\"",
+ "Offending command was: \"%s\"" : "問題のあるコマンド: \"%s\"",
+ "Offending command was: \"%s\", name: %s, password: %s" : "問題のあるコマンド: \"%s\", name: %s, password: %s",
+ "Setting permissions for %s failed, because the permissions exceed permissions granted to %s" : "%sのアクセス権を設定できません。%sの権限不足です ",
+ "Setting permissions for %s failed, because the item was not found" : "%sのアクセス権を設定できません。指定されたアイテムがありません ",
+ "Cannot clear expiration date. Shares are required to have an expiration date." : "有効期限は削除できません。共有には有効期限が必要です。",
+ "Cannot increase permissions of %s" : "%sの権限を付与できません ",
+ "Files can't be shared with delete permissions" : "削除権限付きでファイル共有はできません",
+ "Files can't be shared with create permissions" : "作成権限付きでファイル共有はできません",
+ "Cannot set expiration date more than %s days in the future" : "%s 日以上先の有効期限は設定できません ",
+ "No app name specified" : "アプリ名が指定されていません",
+ "App '%s' could not be installed!" : "アプリ名 %s はインストールできませんでした"
},
"nplurals=1; plural=0;");
diff --git a/lib/l10n/ja.json b/lib/l10n/ja.json
index e6067d7ca21..fe3c28368fc 100644
--- a/lib/l10n/ja.json
+++ b/lib/l10n/ja.json
@@ -11,6 +11,9 @@
"%1$s, %2$s, %3$s and %4$s" : "%1$s と %2$s、%3$s、%4$s",
"%1$s, %2$s, %3$s, %4$s and %5$s" : "%1$s と %2$s、%3$s、%4$s、%5$s",
"Education Edition" : "Education Edition",
+ "Enterprise bundle" : "エンタープライズ バンドル",
+ "Groupware bundle" : "グループウェア バンドル",
+ "Social sharing bundle" : "SNS バンドル",
"PHP %s or higher is required." : "PHP %s 以上が必要です。",
"PHP with a version lower than %s is required." : "%s 以前のバージョンのPHPが必要です。",
"%sbit or higher PHP required." : "%sbit 以上の新しいバージョンのPHPが必要です。",
@@ -22,18 +25,28 @@
"Following platforms are supported: %s" : "次のプラットフォームをサポートしています: %s",
"Server version %s or higher is required." : "サーバーの %s よりも高いバージョンが必要です。",
"Server version %s or lower is required." : "サーバーの %s よりも低いバージョンが必要です。",
+ "Logged in user must be an admin" : "ログインユーザーは管理者である必要があります",
"Unknown filetype" : "不明なファイルタイプ",
"Invalid image" : "無効な画像",
"Avatar image is not square" : "アバター画像が正方形ではありません",
"today" : "今日",
- "yesterday" : "1日前",
+ "tomorrow" : "明日",
+ "yesterday" : "昨日",
+ "_in %n day_::_in %n days_" : ["%n 日"],
"_%n day ago_::_%n days ago_" : ["%n 日前"],
- "last month" : "1ヶ月前",
- "_%n month ago_::_%n months ago_" : ["%nヶ月前"],
- "last year" : "1年前",
+ "next month" : "来月",
+ "last month" : "先月",
+ "_in %n month_::_in %n months_" : ["%n ヶ月"],
+ "_%n month ago_::_%n months ago_" : ["%n ヶ月前"],
+ "next year" : "来年",
+ "last year" : "去年",
+ "_in %n year_::_in %n years_" : ["%n 年"],
"_%n year ago_::_%n years ago_" : ["%n 年前"],
+ "_in %n hour_::_in %n hours_" : ["%n 時間"],
"_%n hour ago_::_%n hours ago_" : ["%n 時間前"],
+ "_in %n minute_::_in %n minutes_" : ["%n 分"],
"_%n minute ago_::_%n minutes ago_" : ["%n 分前"],
+ "in a few seconds" : "数秒",
"seconds ago" : "数秒前",
"Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "ID: %sのモジュールは存在しません。アプリ設定で有効にするか、管理者に問い合わせてください。",
"File name is a reserved word" : "ファイル名が予約された単語です",
@@ -52,6 +65,11 @@
"Unknown user" : "不明なユーザー",
"APCu" : "APCu",
"Redis" : "Redis",
+ "Create" : "作成",
+ "Change" : "変更",
+ "Delete" : "削除",
+ "Share" : "共有",
+ "Overview" : "概要",
"Basic settings" : "基本設定",
"Sharing" : "共有",
"Security" : "セキュリティ",
@@ -86,7 +104,7 @@
"You are not allowed to share %s" : "%s を共有することを許可されていません。",
"Sharing %s failed, because you can not share with yourself" : "%s を共有できませんでした。自分自身に共有することはできません。",
"Sharing %s failed, because the user %s does not exist" : "%s を共有できませんでした。ユーザー %s が存在しません。",
- "Sharing %s failed, because the user %s is not a member of any groups that %s is a member of" : "%s を共有できませんでした。ユーザー %s はどのグループにも属していません。%s は、??のメンバーです。",
+ "Sharing %s failed, because the user %s is not a member of any groups that %s is a member of" : "%s を共有できませんでした。ユーザー %s はどのグループにも属していません。%s は、次のグループのメンバーです",
"Sharing %s failed, because this item is already shared with %s" : "%s を共有できませんでした。このアイテムはすでに %s に共有されています。",
"Sharing %s failed, because this item is already shared with user %s" : "%s を共有できませんでした。このアイテムは、ユーザー %s によりすでに共有されています。",
"Sharing %s failed, because the group %s does not exist" : "%s を共有できませんでした。グループ %s は存在しません。",
@@ -213,6 +231,20 @@
"Storage incomplete configuration. %s" : "設定が未完了のストレージです。 %s",
"Storage connection error. %s" : "ストレージへの接続エラー。 %s",
"Storage is temporarily not available" : "ストレージは一時的に利用できません",
- "Storage connection timeout. %s" : "ストレージへの接続がタイムアウト。 %s"
+ "Storage connection timeout. %s" : "ストレージへの接続がタイムアウト。 %s",
+ "Personal" : "パーソナル",
+ "Admin" : "管理者",
+ "DB Error: \"%s\"" : "DBエラー: \"%s\"",
+ "Offending command was: \"%s\"" : "問題のあるコマンド: \"%s\"",
+ "Offending command was: \"%s\", name: %s, password: %s" : "問題のあるコマンド: \"%s\", name: %s, password: %s",
+ "Setting permissions for %s failed, because the permissions exceed permissions granted to %s" : "%sのアクセス権を設定できません。%sの権限不足です ",
+ "Setting permissions for %s failed, because the item was not found" : "%sのアクセス権を設定できません。指定されたアイテムがありません ",
+ "Cannot clear expiration date. Shares are required to have an expiration date." : "有効期限は削除できません。共有には有効期限が必要です。",
+ "Cannot increase permissions of %s" : "%sの権限を付与できません ",
+ "Files can't be shared with delete permissions" : "削除権限付きでファイル共有はできません",
+ "Files can't be shared with create permissions" : "作成権限付きでファイル共有はできません",
+ "Cannot set expiration date more than %s days in the future" : "%s 日以上先の有効期限は設定できません ",
+ "No app name specified" : "アプリ名が指定されていません",
+ "App '%s' could not be installed!" : "アプリ名 %s はインストールできませんでした"
},"pluralForm" :"nplurals=1; plural=0;"
} \ No newline at end of file
diff --git a/lib/l10n/ru.js b/lib/l10n/ru.js
index 3decbc2a5bb..7d2438c869d 100644
--- a/lib/l10n/ru.js
+++ b/lib/l10n/ru.js
@@ -71,6 +71,7 @@ OC.L10N.register(
"Change" : "Изменить",
"Delete" : "Удалить",
"Share" : "Поделиться",
+ "Overview" : "Обзор",
"Basic settings" : "Основные настройки",
"Sharing" : "Общий доступ",
"Security" : "Безопасность",
diff --git a/lib/l10n/ru.json b/lib/l10n/ru.json
index 7513bdee36c..fde4afaca48 100644
--- a/lib/l10n/ru.json
+++ b/lib/l10n/ru.json
@@ -69,6 +69,7 @@
"Change" : "Изменить",
"Delete" : "Удалить",
"Share" : "Поделиться",
+ "Overview" : "Обзор",
"Basic settings" : "Основные настройки",
"Sharing" : "Общий доступ",
"Security" : "Безопасность",
diff --git a/lib/l10n/sr.js b/lib/l10n/sr.js
index 58621a77766..949da3caf4b 100644
--- a/lib/l10n/sr.js
+++ b/lib/l10n/sr.js
@@ -71,6 +71,7 @@ OC.L10N.register(
"Change" : "Измени",
"Delete" : "Обриши",
"Share" : "Подели",
+ "Overview" : "Преглед",
"Basic settings" : "Основне поставке",
"Sharing" : "Дељење",
"Security" : "Безбедност",
diff --git a/lib/l10n/sr.json b/lib/l10n/sr.json
index fe2ea97952c..4d3b406f9c5 100644
--- a/lib/l10n/sr.json
+++ b/lib/l10n/sr.json
@@ -69,6 +69,7 @@
"Change" : "Измени",
"Delete" : "Обриши",
"Share" : "Подели",
+ "Overview" : "Преглед",
"Basic settings" : "Основне поставке",
"Sharing" : "Дељење",
"Security" : "Безбедност",
diff --git a/lib/l10n/tr.js b/lib/l10n/tr.js
index 56cefdc56c8..194b90f828a 100644
--- a/lib/l10n/tr.js
+++ b/lib/l10n/tr.js
@@ -71,6 +71,7 @@ OC.L10N.register(
"Change" : "Düzenle",
"Delete" : "Sil",
"Share" : "Paylaş",
+ "Overview" : "Özet",
"Basic settings" : "Temel Ayarlar",
"Sharing" : "Paylaşım",
"Security" : "Güvenlik",
diff --git a/lib/l10n/tr.json b/lib/l10n/tr.json
index ee06b2c9a1d..d487ddda6a5 100644
--- a/lib/l10n/tr.json
+++ b/lib/l10n/tr.json
@@ -69,6 +69,7 @@
"Change" : "Düzenle",
"Delete" : "Sil",
"Share" : "Paylaş",
+ "Overview" : "Özet",
"Basic settings" : "Temel Ayarlar",
"Sharing" : "Paylaşım",
"Security" : "Güvenlik",
diff --git a/lib/private/Files/AppData/AppData.php b/lib/private/Files/AppData/AppData.php
index 270e834b8e5..e25bf450446 100644
--- a/lib/private/Files/AppData/AppData.php
+++ b/lib/private/Files/AppData/AppData.php
@@ -1,4 +1,5 @@
<?php
+declare(strict_types=1);
/**
* @copyright 2016 Roeland Jago Douma <roeland@famdouma.nl>
*
@@ -31,6 +32,7 @@ use OC\SystemConfig;
use OCP\Files\Node;
use OCP\Files\NotFoundException;
use OCP\Files\NotPermittedException;
+use OCP\Files\SimpleFS\ISimpleFolder;
class AppData implements IAppData {
@@ -55,7 +57,7 @@ class AppData implements IAppData {
*/
public function __construct(IRootFolder $rootFolder,
SystemConfig $systemConfig,
- $appId) {
+ string $appId) {
$this->rootFolder = $rootFolder;
$this->config = $systemConfig;
@@ -66,7 +68,7 @@ class AppData implements IAppData {
* @return Folder
* @throws \RuntimeException
*/
- private function getAppDataFolder() {
+ private function getAppDataFolder(): Folder {
if ($this->folder === null) {
$instanceId = $this->config->getValue('instanceid', null);
if ($instanceId === null) {
@@ -101,20 +103,20 @@ class AppData implements IAppData {
return $this->folder;
}
- public function getFolder($name) {
+ public function getFolder(string $name): ISimpleFolder {
$node = $this->getAppDataFolder()->get($name);
/** @var Folder $node */
return new SimpleFolder($node);
}
- public function newFolder($name) {
+ public function newFolder(string $name): ISimpleFolder {
$folder = $this->getAppDataFolder()->newFolder($name);
return new SimpleFolder($folder);
}
- public function getDirectoryListing() {
+ public function getDirectoryListing(): array {
$listing = $this->getAppDataFolder()->getDirectoryListing();
$fileListing = array_map(function(Node $folder) {
@@ -128,4 +130,8 @@ class AppData implements IAppData {
return array_values($fileListing);
}
+
+ public function getId(): int {
+ return $this->getAppDataFolder()->getId();
+ }
}
diff --git a/lib/private/Files/AppData/Factory.php b/lib/private/Files/AppData/Factory.php
index 85c75733796..fba2232db06 100644
--- a/lib/private/Files/AppData/Factory.php
+++ b/lib/private/Files/AppData/Factory.php
@@ -1,4 +1,5 @@
<?php
+declare(strict_types=1);
/**
* @copyright 2016 Roeland Jago Douma <roeland@famdouma.nl>
*
@@ -44,7 +45,7 @@ class Factory {
* @param string $appId
* @return AppData
*/
- public function get($appId) {
+ public function get(string $appId): AppData {
return new AppData($this->rootFolder, $this->config, $appId);
}
}
diff --git a/lib/private/Preview/BackgroundCleanupJob.php b/lib/private/Preview/BackgroundCleanupJob.php
new file mode 100644
index 00000000000..25bf354e28b
--- /dev/null
+++ b/lib/private/Preview/BackgroundCleanupJob.php
@@ -0,0 +1,91 @@
+<?php
+declare(strict_types=1);
+/**
+ * @copyright Copyright (c) 2018, Roeland Jago Douma <roeland@famdouma.nl>
+ *
+ * @author Roeland Jago Douma <roeland@famdouma.nl>
+ *
+ * @license AGPL-3.0
+ *
+ * This code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
+ *
+ * This program 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, version 3,
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+namespace OC\Preview;
+
+use OC\BackgroundJob\TimedJob;
+use OC\Files\AppData\Factory;
+use OCP\DB\QueryBuilder\IQueryBuilder;
+use OCP\Files\NotFoundException;
+use OCP\Files\NotPermittedException;
+use OCP\IDBConnection;
+
+class BackgroundCleanupJob extends TimedJob {
+
+ /** @var IDBConnection */
+ private $connection;
+
+ /** @var Factory */
+ private $appDataFactory;
+
+ /** @var bool */
+ private $isCLI;
+
+ public function __construct(IDBConnection $connection,
+ Factory $appDataFactory,
+ bool $isCLI) {
+ // Run at most once an hour
+ $this->setInterval(3600);
+
+ $this->connection = $connection;
+ $this->appDataFactory = $appDataFactory;
+ $this->isCLI = $isCLI;
+ }
+
+ public function run($argument) {
+ $previews = $this->appDataFactory->get('preview');
+
+ $previewFodlerId = $previews->getId();
+
+ $qb = $this->connection->getQueryBuilder();
+ $qb->select('a.name')
+ ->from('filecache', 'a')
+ ->leftJoin('a', 'filecache', 'b', $qb->expr()->eq(
+ $qb->expr()->castColumn('a.name', IQueryBuilder::PARAM_INT), 'b.fileid'
+ ))
+ ->where(
+ $qb->expr()->isNull('b.fileid')
+ )->andWhere(
+ $qb->expr()->eq('a.parent', $qb->createNamedParameter($previewFodlerId))
+ );
+
+ if (!$this->isCLI) {
+ $qb->setMaxResults(10);
+ }
+
+ $cursor = $qb->execute();
+
+ while ($row = $cursor->fetch()) {
+ try {
+ $preview = $previews->getFolder($row['name']);
+ $preview->delete();
+ } catch (NotFoundException $e) {
+ // continue
+ } catch (NotPermittedException $e) {
+ // continue
+ }
+ }
+
+ $cursor->closeCursor();
+ }
+}
diff --git a/lib/private/Preview/Watcher.php b/lib/private/Preview/Watcher.php
index 8d091b84b0e..be462d9c935 100644
--- a/lib/private/Preview/Watcher.php
+++ b/lib/private/Preview/Watcher.php
@@ -1,4 +1,5 @@
<?php
+declare(strict_types=1);
/**
* @copyright Copyright (c) 2016, Roeland Jago Douma <roeland@famdouma.nl>
*
@@ -22,7 +23,6 @@
*/
namespace OC\Preview;
-use OCP\Files\File;
use OCP\Files\Node;
use OCP\Files\Folder;
use OCP\Files\IAppData;
@@ -39,9 +39,6 @@ class Watcher {
/** @var IAppData */
private $appData;
- /** @var int[] */
- private $toDelete = [];
-
/**
* Watcher constructor.
*
@@ -58,47 +55,10 @@ class Watcher {
}
try {
- $folder = $this->appData->getFolder($node->getId());
+ $folder = $this->appData->getFolder((string)$node->getId());
$folder->delete();
} catch (NotFoundException $e) {
//Nothing to do
}
}
-
- public function preDelete(Node $node) {
- // To avoid cycles
- if ($this->toDelete !== []) {
- return;
- }
-
- if ($node instanceof File) {
- $this->toDelete[] = $node->getId();
- return;
- }
-
- /** @var Folder $node */
- $this->deleteFolder($node);
- }
-
- private function deleteFolder(Folder $folder) {
- $nodes = $folder->getDirectoryListing();
- foreach ($nodes as $node) {
- if ($node instanceof File) {
- $this->toDelete[] = $node->getId();
- } else if ($node instanceof Folder) {
- $this->deleteFolder($node);
- }
- }
- }
-
- public function postDelete(Node $node) {
- foreach ($this->toDelete as $fid) {
- try {
- $folder = $this->appData->getFolder($fid);
- $folder->delete();
- } catch (NotFoundException $e) {
- // continue
- }
- }
- }
}
diff --git a/lib/private/Preview/WatcherConnector.php b/lib/private/Preview/WatcherConnector.php
index 4e6e786cec7..bf9e6c29e4f 100644
--- a/lib/private/Preview/WatcherConnector.php
+++ b/lib/private/Preview/WatcherConnector.php
@@ -1,4 +1,5 @@
<?php
+declare(strict_types=1);
/**
* @copyright Copyright (c) 2016, Roeland Jago Douma <roeland@famdouma.nl>
*
@@ -49,7 +50,7 @@ class WatcherConnector {
/**
* @return Watcher
*/
- private function getWatcher() {
+ private function getWatcher(): Watcher {
return \OC::$server->query(Watcher::class);
}
@@ -59,14 +60,6 @@ class WatcherConnector {
$this->root->listen('\OC\Files', 'postWrite', function (Node $node) {
$this->getWatcher()->postWrite($node);
});
-
- $this->root->listen('\OC\Files', 'preDelete', function (Node $node) {
- $this->getWatcher()->preDelete($node);
- });
-
- $this->root->listen('\OC\Files', 'postDelete', function (Node $node) {
- $this->getWatcher()->postDelete($node);
- });
}
}
}
diff --git a/lib/private/Repair.php b/lib/private/Repair.php
index a257ef061e7..8746f1e6f27 100644
--- a/lib/private/Repair.php
+++ b/lib/private/Repair.php
@@ -36,6 +36,7 @@ use OC\Repair\Collation;
use OC\Repair\MoveUpdaterStepFile;
use OC\Repair\NC11\FixMountStorages;
use OC\Repair\NC13\AddLogRotateJob;
+use OC\Repair\NC14\AddPreviewBackgroundCleanupJob;
use OC\Repair\OldGroupMembershipShares;
use OC\Repair\Owncloud\DropAccountTermsTable;
use OC\Repair\Owncloud\SaveAccountsTableData;
@@ -132,7 +133,8 @@ class Repair implements IOutput{
new FixMountStorages(\OC::$server->getDatabaseConnection()),
new RepairInvalidPaths(\OC::$server->getDatabaseConnection(), \OC::$server->getConfig()),
new AddLogRotateJob(\OC::$server->getJobList()),
- new ClearFrontendCaches(\OC::$server->getMemCacheFactory(), \OC::$server->query(SCSSCacher::class), \OC::$server->query(JSCombiner::class))
+ new ClearFrontendCaches(\OC::$server->getMemCacheFactory(), \OC::$server->query(SCSSCacher::class), \OC::$server->query(JSCombiner::class)),
+ new AddPreviewBackgroundCleanupJob(\OC::$server->getJobList()),
];
}
diff --git a/lib/private/Repair/NC14/AddPreviewBackgroundCleanupJob.php b/lib/private/Repair/NC14/AddPreviewBackgroundCleanupJob.php
new file mode 100644
index 00000000000..b58fabcba50
--- /dev/null
+++ b/lib/private/Repair/NC14/AddPreviewBackgroundCleanupJob.php
@@ -0,0 +1,48 @@
+<?php
+declare(strict_types=1);
+/**
+ * @copyright 2018, Roeland Jago Douma <roeland@famdouma.nl>
+ *
+ * @author Roeland Jago Douma <roeland@famdouma.nl>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program 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 program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+namespace OC\Repair\NC14;
+
+use OC\Preview\BackgroundCleanupJob;
+use OCP\BackgroundJob\IJobList;
+use OCP\Migration\IOutput;
+use OCP\Migration\IRepairStep;
+
+class AddPreviewBackgroundCleanupJob implements IRepairStep {
+
+ /** @var IJobList */
+ private $jobList;
+
+ public function __construct(IJobList $jobList) {
+ $this->jobList = $jobList;
+ }
+
+ public function getName(): string {
+ return 'Add preview background cleanup job';
+ }
+
+ public function run(IOutput $output) {
+ $this->jobList->add(BackgroundCleanupJob::class);
+ }
+
+}
diff --git a/lib/private/Setup.php b/lib/private/Setup.php
index 5564bb5b072..25e0b4d8817 100644
--- a/lib/private/Setup.php
+++ b/lib/private/Setup.php
@@ -47,6 +47,7 @@ use OC\App\AppStore\Bundles\BundleFetcher;
use OC\Authentication\Token\DefaultTokenCleanupJob;
use OC\Authentication\Token\DefaultTokenProvider;
use OC\Log\Rotate;
+use OC\Preview\BackgroundCleanupJob;
use OCP\Defaults;
use OCP\IL10N;
use OCP\ILogger;
@@ -419,6 +420,7 @@ class Setup {
$jobList = \OC::$server->getJobList();
$jobList->add(DefaultTokenCleanupJob::class);
$jobList->add(Rotate::class);
+ $jobList->add(BackgroundCleanupJob::class);
}
/**
diff --git a/lib/public/Files/SimpleFS/ISimpleRoot.php b/lib/public/Files/SimpleFS/ISimpleRoot.php
index 9b4b8d76947..054106fbaca 100644
--- a/lib/public/Files/SimpleFS/ISimpleRoot.php
+++ b/lib/public/Files/SimpleFS/ISimpleRoot.php
@@ -42,7 +42,7 @@ interface ISimpleRoot {
* @throws \RuntimeException
* @since 11.0.0
*/
- public function getFolder($name);
+ public function getFolder(string $name): ISimpleFolder;
/**
* Get all the Folders
@@ -52,7 +52,7 @@ interface ISimpleRoot {
* @throws \RuntimeException
* @since 11.0.0
*/
- public function getDirectoryListing();
+ public function getDirectoryListing(): array;
/**
* Create a new folder named $name
@@ -63,5 +63,5 @@ interface ISimpleRoot {
* @throws \RuntimeException
* @since 11.0.0
*/
- public function newFolder($name);
+ public function newFolder(string $name): ISimpleFolder;
}