diff --git a/apps/files/js/jquery-visibility.js b/apps/files/js/jquery-visibility.js
index a824bf68730..18f57d1f2bd 100644
--- a/apps/files/js/jquery-visibility.js
+++ b/apps/files/js/jquery-visibility.js
@@ -3,7 +3,7 @@
var prefix,
property,
-// In Opera, `'onfocusin' in document == true`, hence the extra `hasFocus` check to detect IE-like behavior
+ // In Opera, `'onfocusin' in document == true`, hence the extra `hasFocus` check to detect IE-like behavior
eventName = 'onfocusin' in document && 'hasFocus' in document ? 'focusin focusout' : 'focus blur',
prefixes = ['', 'moz', 'ms', 'o', 'webkit'],
$support = $.support,
@@ -19,12 +19,11 @@
$(/blur$/.test(eventName) ? window : document).on(eventName, function (event) {
var type = event.type,
- originalEvent = event.originalEvent,
- toElement = originalEvent.toElement;
-// If it’s a `{focusin,focusout}` event (IE), `fromElement` and `toElement` should both be `null` or `undefined`;
-// else, the page visibility hasn’t changed, but the user just clicked somewhere in the doc.
-// In IE9, we need to check the `relatedTarget` property instead.
- if (!/^focus./.test(type) || (toElement == undefined && originalEvent.fromElement == undefined && originalEvent.relatedTarget == undefined)) {
+ originalEvent = event.originalEvent;
+ // If it’s a `{focusin,focusout}` event (IE), `fromElement` and `toElement` should both be `null` or `undefined`;
+ // else, the page visibility hasn’t changed, but the user just clicked somewhere in the doc.
+ // In IE9, we need to check the `relatedTarget` property instead.
+ if (!/^focus./.test(type) || originalEvent == undefined || (originalEvent.toElement == undefined && originalEvent.fromElement == undefined && originalEvent.relatedTarget == undefined)) {
$event.trigger((property && document[property] || /^(?:blur|focusout)$/.test(type) ? 'hide' : 'show') + '.visibility');
}
});
diff --git a/apps/files/l10n/de.php b/apps/files/l10n/de.php
index fa202c8c2b5..1d762403969 100644
--- a/apps/files/l10n/de.php
+++ b/apps/files/l10n/de.php
@@ -13,6 +13,7 @@
"Not enough storage available" => "Nicht genug Speicherplatz verfügbar",
"Invalid directory." => "Ungültiges Verzeichnis.",
"Files" => "Dateien",
+"Delete permanently" => "Permanent löschen",
"Delete" => "Löschen",
"Rename" => "Umbenennen",
"Pending" => "Ausstehend",
@@ -59,6 +60,7 @@
"Text file" => "Textdatei",
"Folder" => "Ordner",
"From link" => "Von einem Link",
+"Trash bin" => "Mülleimer",
"Cancel upload" => "Upload abbrechen",
"Nothing in here. Upload something!" => "Alles leer. Lade etwas hoch!",
"Download" => "Herunterladen",
diff --git a/apps/files/l10n/de_DE.php b/apps/files/l10n/de_DE.php
index 0dfc19ff01b..012cfd69dae 100644
--- a/apps/files/l10n/de_DE.php
+++ b/apps/files/l10n/de_DE.php
@@ -60,6 +60,7 @@
"Text file" => "Textdatei",
"Folder" => "Ordner",
"From link" => "Von einem Link",
+"Trash bin" => "Mülleimer",
"Cancel upload" => "Upload abbrechen",
"Nothing in here. Upload something!" => "Alles leer. Bitte laden Sie etwas hoch!",
"Download" => "Herunterladen",
diff --git a/apps/files/l10n/et_EE.php b/apps/files/l10n/et_EE.php
index 98af371e071..7be5bcf1eed 100644
--- a/apps/files/l10n/et_EE.php
+++ b/apps/files/l10n/et_EE.php
@@ -1,4 +1,6 @@
"%s liigutamine ebaõnnestus",
+"Unable to rename file" => "Faili ümbernimetamine ebaõnnestus",
"No file was uploaded. Unknown error" => "Ühtegi faili ei laetud üles. Tundmatu viga",
"There is no error, the file uploaded with success" => "Ühtegi viga pole, fail on üles laetud",
"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Üles laetud faili suurus ületab HTML vormis määratud upload_max_filesize suuruse",
@@ -6,7 +8,10 @@
"No file was uploaded" => "Ühtegi faili ei laetud üles",
"Missing a temporary folder" => "Ajutiste failide kaust puudub",
"Failed to write to disk" => "Kettale kirjutamine ebaõnnestus",
+"Not enough storage available" => "Saadaval pole piisavalt ruumi",
+"Invalid directory." => "Vigane kaust.",
"Files" => "Failid",
+"Delete permanently" => "Kustuta jäädavalt",
"Delete" => "Kustuta",
"Rename" => "ümber",
"Pending" => "Ootel",
@@ -17,6 +22,8 @@
"replaced {new_name}" => "asendatud nimega {new_name}",
"undo" => "tagasi",
"replaced {new_name} with {old_name}" => "asendas nime {old_name} nimega {new_name}",
+"'.' is an invalid file name." => "'.' on vigane failinimi.",
+"File name cannot be empty." => "Faili nimi ei saa olla tühi.",
"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Vigane nimi, '\\', '/', '<', '>', ':', '\"', '|', '?' ja '*' pole lubatud.",
"Unable to upload your file as it is a directory or has 0 bytes" => "Sinu faili üleslaadimine ebaõnnestus, kuna see on kaust või selle suurus on 0 baiti",
"Upload Error" => "Üleslaadimise viga",
@@ -46,6 +53,7 @@
"Text file" => "Tekstifail",
"Folder" => "Kaust",
"From link" => "Allikast",
+"Trash bin" => "Prügikast",
"Cancel upload" => "Tühista üleslaadimine",
"Nothing in here. Upload something!" => "Siin pole midagi. Lae midagi üles!",
"Download" => "Lae alla",
diff --git a/apps/files/l10n/eu.php b/apps/files/l10n/eu.php
index b62b1c7bf79..d5d28f2b0e4 100644
--- a/apps/files/l10n/eu.php
+++ b/apps/files/l10n/eu.php
@@ -13,6 +13,7 @@
"Not enough storage available" => "Ez dago behar aina leku erabilgarri,",
"Invalid directory." => "Baliogabeko karpeta.",
"Files" => "Fitxategiak",
+"Delete permanently" => "Ezabatu betirako",
"Delete" => "Ezabatu",
"Rename" => "Berrizendatu",
"Pending" => "Zain",
@@ -23,6 +24,7 @@
"replaced {new_name}" => "ordezkatua {new_name}",
"undo" => "desegin",
"replaced {new_name} with {old_name}" => " {new_name}-k {old_name} ordezkatu du",
+"perform delete operation" => "Ezabatu",
"'.' is an invalid file name." => "'.' ez da fitxategi izen baliogarria.",
"File name cannot be empty." => "Fitxategi izena ezin da hutsa izan.",
"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "IZen aliogabea, '\\', '/', '<', '>', ':', '\"', '|', '?' eta '*' ez daude baimenduta.",
@@ -58,6 +60,7 @@
"Text file" => "Testu fitxategia",
"Folder" => "Karpeta",
"From link" => "Estekatik",
+"Trash bin" => "Zakarrontzia",
"Cancel upload" => "Ezeztatu igoera",
"Nothing in here. Upload something!" => "Ez dago ezer. Igo zerbait!",
"Download" => "Deskargatu",
@@ -65,5 +68,6 @@
"Upload too large" => "Igotakoa handiegia da",
"The files you are trying to upload exceed the maximum size for file uploads on this server." => "Igotzen saiatzen ari zaren fitxategiak zerbitzari honek igotzeko onartzen duena baino handiagoak dira.",
"Files are being scanned, please wait." => "Fitxategiak eskaneatzen ari da, itxoin mezedez.",
-"Current scanning" => "Orain eskaneatzen ari da"
+"Current scanning" => "Orain eskaneatzen ari da",
+"Upgrading filesystem cache..." => "Fitxategi sistemaren katxea eguneratzen..."
);
diff --git a/apps/files/l10n/hu_HU.php b/apps/files/l10n/hu_HU.php
index eaec8d24b7a..53da2d3ddc6 100644
--- a/apps/files/l10n/hu_HU.php
+++ b/apps/files/l10n/hu_HU.php
@@ -13,6 +13,7 @@
"Not enough storage available" => "Nincs elég szabad hely.",
"Invalid directory." => "Érvénytelen mappa.",
"Files" => "Fájlok",
+"Delete permanently" => "Végleges törlés",
"Delete" => "Törlés",
"Rename" => "Átnevezés",
"Pending" => "Folyamatban",
@@ -23,6 +24,7 @@
"replaced {new_name}" => "a(z) {new_name} állományt kicseréltük",
"undo" => "visszavonás",
"replaced {new_name} with {old_name}" => "{new_name} fájlt kicseréltük ezzel: {old_name}",
+"perform delete operation" => "a törlés végrehajtása",
"'.' is an invalid file name." => "'.' fájlnév érvénytelen.",
"File name cannot be empty." => "A fájlnév nem lehet semmi.",
"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Érvénytelen elnevezés. Ezek a karakterek nem használhatók: '\\', '/', '<', '>', ':', '\"', '|', '?' és '*'",
@@ -58,6 +60,7 @@
"Text file" => "Szövegfájl",
"Folder" => "Mappa",
"From link" => "Feltöltés linkről",
+"Trash bin" => "Szemetes mappa",
"Cancel upload" => "A feltöltés megszakítása",
"Nothing in here. Upload something!" => "Itt nincs semmi. Töltsön fel valamit!",
"Download" => "Letöltés",
@@ -65,5 +68,6 @@
"Upload too large" => "A feltöltés túl nagy",
"The files you are trying to upload exceed the maximum size for file uploads on this server." => "A feltöltendő állományok mérete meghaladja a kiszolgálón megengedett maximális méretet.",
"Files are being scanned, please wait." => "A fájllista ellenőrzése zajlik, kis türelmet!",
-"Current scanning" => "Ellenőrzés alatt"
+"Current scanning" => "Ellenőrzés alatt",
+"Upgrading filesystem cache..." => "A fájlrendszer gyorsítótárának frissítése zajlik..."
);
diff --git a/apps/files/l10n/ja_JP.php b/apps/files/l10n/ja_JP.php
index 85ec6b6e953..88f8ab985a0 100644
--- a/apps/files/l10n/ja_JP.php
+++ b/apps/files/l10n/ja_JP.php
@@ -60,6 +60,7 @@
"Text file" => "テキストファイル",
"Folder" => "フォルダ",
"From link" => "リンク",
+"Trash bin" => "ゴミ箱",
"Cancel upload" => "アップロードをキャンセル",
"Nothing in here. Upload something!" => "ここには何もありません。何かアップロードしてください。",
"Download" => "ダウンロード",
diff --git a/apps/files/l10n/vi.php b/apps/files/l10n/vi.php
index b069246f017..ec0699e78cc 100644
--- a/apps/files/l10n/vi.php
+++ b/apps/files/l10n/vi.php
@@ -60,6 +60,7 @@
"Text file" => "Tập tin văn bản",
"Folder" => "Thư mục",
"From link" => "Từ liên kết",
+"Trash bin" => "Thùng rác",
"Cancel upload" => "Hủy upload",
"Nothing in here. Upload something!" => "Không có gì ở đây .Hãy tải lên một cái gì đó !",
"Download" => "Tải xuống",
diff --git a/apps/files/templates/index.php b/apps/files/templates/index.php
index 60756db4014..c7bf0d21c13 100644
--- a/apps/files/templates/index.php
+++ b/apps/files/templates/index.php
@@ -37,7 +37,7 @@
diff --git a/apps/files/templates/part.breadcrumb.php b/apps/files/templates/part.breadcrumb.php
index 4cc2c4dce9e..f01cb8d212a 100644
--- a/apps/files/templates/part.breadcrumb.php
+++ b/apps/files/templates/part.breadcrumb.php
@@ -1,7 +1,7 @@
diff --git a/apps/files_encryption/appinfo/app.php b/apps/files_encryption/appinfo/app.php
index 08728622525..c7cd8ca32de 100644
--- a/apps/files_encryption/appinfo/app.php
+++ b/apps/files_encryption/appinfo/app.php
@@ -12,7 +12,7 @@ OC_FileProxy::register( new OCA\Encryption\Proxy() );
// User-related hooks
OCP\Util::connectHook( 'OC_User', 'post_login', 'OCA\Encryption\Hooks', 'login' );
-OCP\Util::connectHook( 'OC_User', 'pre_setPassword','OCA\Encryption\Hooks', 'setPassphrase' );
+OCP\Util::connectHook( 'OC_User', 'pre_setPassword', 'OCA\Encryption\Hooks', 'setPassphrase' );
// Sharing-related hooks
OCP\Util::connectHook( 'OCP\Share', 'post_shared', 'OCA\Encryption\Hooks', 'postShared' );
diff --git a/apps/files_encryption/l10n/de.php b/apps/files_encryption/l10n/de.php
index 3dc586fe06c..cdcd8a40b23 100644
--- a/apps/files_encryption/l10n/de.php
+++ b/apps/files_encryption/l10n/de.php
@@ -1,4 +1,7 @@
"Verschlüsselung",
+"File encryption is enabled." => "Dateiverschlüsselung ist aktiviert",
+"The following file types will not be encrypted:" => "Die folgenden Dateitypen werden nicht verschlüsselt:",
+"Exclude the following file types from encryption:" => "Schließe die folgenden Dateitypen von der Verschlüsselung aus:",
"None" => "Keine"
);
diff --git a/apps/files_encryption/l10n/et_EE.php b/apps/files_encryption/l10n/et_EE.php
index 07f1a48fb0b..0d189ac062e 100644
--- a/apps/files_encryption/l10n/et_EE.php
+++ b/apps/files_encryption/l10n/et_EE.php
@@ -1,4 +1,7 @@
"Krüpteerimine",
+"File encryption is enabled." => "Faili krüpteerimine on sisse lülitatud.",
+"The following file types will not be encrypted:" => "Järgnevaid failitüüpe ei krüpteerita:",
+"Exclude the following file types from encryption:" => "Järgnevaid failitüüpe ei krüpteerita:",
"None" => "Pole"
);
diff --git a/apps/files_encryption/l10n/eu.php b/apps/files_encryption/l10n/eu.php
index b4f7be2c840..5a22b65728e 100644
--- a/apps/files_encryption/l10n/eu.php
+++ b/apps/files_encryption/l10n/eu.php
@@ -1,4 +1,7 @@
"Enkriptazioa",
+"File encryption is enabled." => "Fitxategien enkriptazioa gaituta dago.",
+"The following file types will not be encrypted:" => "Hurrengo fitxategi motak ez dira enkriptatuko:",
+"Exclude the following file types from encryption:" => "Baztertu hurrengo fitxategi motak enkriptatzetik:",
"None" => "Bat ere ez"
);
diff --git a/apps/files_encryption/l10n/hu_HU.php b/apps/files_encryption/l10n/hu_HU.php
index 46f990bf38c..4043da108c0 100644
--- a/apps/files_encryption/l10n/hu_HU.php
+++ b/apps/files_encryption/l10n/hu_HU.php
@@ -1,4 +1,7 @@
"Titkosítás",
+"File encryption is enabled." => "Az állományok titkosítása be van kapcsolva.",
+"The following file types will not be encrypted:" => "A következő fájltípusok nem kerülnek titkosításra:",
+"Exclude the following file types from encryption:" => "Zárjuk ki a titkosításból a következő fájltípusokat:",
"None" => "Egyik sem"
);
diff --git a/apps/files_encryption/l10n/pl.php b/apps/files_encryption/l10n/pl.php
index 505e8659f08..2fa86f454f9 100644
--- a/apps/files_encryption/l10n/pl.php
+++ b/apps/files_encryption/l10n/pl.php
@@ -1,4 +1,7 @@
"Szyfrowanie",
+"File encryption is enabled." => "Szyfrowanie plików jest włączone",
+"The following file types will not be encrypted:" => "Poniższe typy plików nie będą szyfrowane:",
+"Exclude the following file types from encryption:" => "Wyłącz poniższe typy plików z szyfrowania:",
"None" => "Brak"
);
diff --git a/apps/files_encryption/l10n/pt_BR.php b/apps/files_encryption/l10n/pt_BR.php
index 2b4af2a8772..28807db72ce 100644
--- a/apps/files_encryption/l10n/pt_BR.php
+++ b/apps/files_encryption/l10n/pt_BR.php
@@ -1,4 +1,7 @@
"Criptografia",
+"File encryption is enabled." => "A criptografia de arquivos está ativada.",
+"The following file types will not be encrypted:" => "Os seguintes tipos de arquivo não serão criptografados:",
+"Exclude the following file types from encryption:" => "Excluir os seguintes tipos de arquivo da criptografia:",
"None" => "Nenhuma"
);
diff --git a/apps/files_encryption/lib/crypt.php b/apps/files_encryption/lib/crypt.php
index c7a414c5080..437a18669e5 100755
--- a/apps/files_encryption/lib/crypt.php
+++ b/apps/files_encryption/lib/crypt.php
@@ -692,4 +692,4 @@ class Crypt {
}
-}
\ No newline at end of file
+}
diff --git a/apps/files_external/ajax/addRootCertificate.php b/apps/files_external/ajax/addRootCertificate.php
index 2f67e801b2c..7794238ab36 100644
--- a/apps/files_external/ajax/addRootCertificate.php
+++ b/apps/files_external/ajax/addRootCertificate.php
@@ -1,6 +1,7 @@
file_exists('')){
+if (!$view->file_exists('')) {
$view->mkdir('');
}
diff --git a/apps/files_external/ajax/dropbox.php b/apps/files_external/ajax/dropbox.php
index 58c41d69062..bc9821c62ec 100644
--- a/apps/files_external/ajax/dropbox.php
+++ b/apps/files_external/ajax/dropbox.php
@@ -4,6 +4,8 @@ require_once 'Dropbox/autoload.php';
OCP\JSON::checkAppEnabled('files_external');
OCP\JSON::checkLoggedIn();
+OCP\JSON::callCheck();
+
if (isset($_POST['app_key']) && isset($_POST['app_secret'])) {
$oauth = new Dropbox_OAuth_Curl($_POST['app_key'], $_POST['app_secret']);
if (isset($_POST['step'])) {
diff --git a/apps/files_external/ajax/google.php b/apps/files_external/ajax/google.php
index c76c7618e4d..70adcb2c2ad 100644
--- a/apps/files_external/ajax/google.php
+++ b/apps/files_external/ajax/google.php
@@ -4,6 +4,8 @@ require_once 'Google/common.inc.php';
OCP\JSON::checkAppEnabled('files_external');
OCP\JSON::checkLoggedIn();
+OCP\JSON::callCheck();
+
$consumer = new OAuthConsumer('anonymous', 'anonymous');
$sigMethod = new OAuthSignatureMethod_HMAC_SHA1();
if (isset($_POST['step'])) {
diff --git a/apps/files_external/ajax/removeMountPoint.php b/apps/files_external/ajax/removeMountPoint.php
index aa446426202..2f5dbcfdbac 100644
--- a/apps/files_external/ajax/removeMountPoint.php
+++ b/apps/files_external/ajax/removeMountPoint.php
@@ -3,6 +3,15 @@
OCP\JSON::checkAppEnabled('files_external');
OCP\JSON::callCheck();
+if (!isset($_POST['isPersonal']))
+ return;
+if (!isset($_POST['mountPoint']))
+ return;
+if (!isset($_POST['mountType']))
+ return;
+if (!isset($_POST['applicable']))
+ return;
+
if ($_POST['isPersonal'] == 'true') {
OCP\JSON::checkLoggedIn();
$isPersonal = true;
@@ -10,4 +19,5 @@ if ($_POST['isPersonal'] == 'true') {
OCP\JSON::checkAdminUser();
$isPersonal = false;
}
+
OC_Mount_Config::removeMountPoint($_POST['mountPoint'], $_POST['mountType'], $_POST['applicable'], $isPersonal);
diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js
index 172ef097fbf..12690395270 100644
--- a/apps/files_external/js/settings.js
+++ b/apps/files_external/js/settings.js
@@ -47,7 +47,7 @@ OC.MountConfig={
oldUsers.splice($.inArray(applicable, oldUsers), 1);
}
}
- $.post(OC.filePath('files_external', 'ajax', 'addMountPoint.php'), { mountPoint: mountPoint, class: backendClass, classOptions: classOptions, mountType: mountType, applicable: applicable, isPersonal: isPersonal });
+ $.post(OC.filePath('files_external', 'ajax', 'addMountPoint.php'), { mountPoint: mountPoint, 'class': backendClass, classOptions: classOptions, mountType: mountType, applicable: applicable, isPersonal: isPersonal });
});
var mountType = 'group';
$.each(oldGroups, function(index, applicable) {
@@ -61,7 +61,7 @@ OC.MountConfig={
var isPersonal = true;
var mountType = 'user';
var applicable = OC.currentUser;
- $.post(OC.filePath('files_external', 'ajax', 'addMountPoint.php'), { mountPoint: mountPoint, class: backendClass, classOptions: classOptions, mountType: mountType, applicable: applicable, isPersonal: isPersonal });
+ $.post(OC.filePath('files_external', 'ajax', 'addMountPoint.php'), { mountPoint: mountPoint, 'class': backendClass, classOptions: classOptions, mountType: mountType, applicable: applicable, isPersonal: isPersonal });
}
return true;
}
diff --git a/apps/files_external/l10n/hi.php b/apps/files_external/l10n/hi.php
new file mode 100644
index 00000000000..0482efc4b23
--- /dev/null
+++ b/apps/files_external/l10n/hi.php
@@ -0,0 +1,3 @@
+ "उपयोगकर्ता"
+);
diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php
index d78c69e83db..44e668a09c0 100755
--- a/apps/files_external/lib/config.php
+++ b/apps/files_external/lib/config.php
@@ -310,7 +310,7 @@ class OC_Mount_Config {
foreach ($data[self::MOUNT_TYPE_GROUP] as $group => $mounts) {
$content .= "\t\t'".$group."' => array (\n";
foreach ($mounts as $mountPoint => $mount) {
- $content .= "\t\t\t'".addcslashes($mountPoint,"'")."' => ".str_replace("\n", '', var_export($mount, true)).", \n";
+ $content .= "\t\t\t'".addcslashes($mountPoint, "'")."' => ".str_replace("\n", '', var_export($mount, true)).", \n";
}
$content .= "\t\t),\n";
@@ -322,7 +322,7 @@ class OC_Mount_Config {
foreach ($data[self::MOUNT_TYPE_USER] as $user => $mounts) {
$content .= "\t\t'".$user."' => array (\n";
foreach ($mounts as $mountPoint => $mount) {
- $content .= "\t\t\t'".addcslashes($mountPoint,"'")."' => ".str_replace("\n", '', var_export($mount, true)).",\n";
+ $content .= "\t\t\t'".addcslashes($mountPoint, "'")."' => ".str_replace("\n", '', var_export($mount, true)).",\n";
}
$content .= "\t\t),\n";
}
diff --git a/apps/files_external/lib/ftp.php b/apps/files_external/lib/ftp.php
index 9a27b63323a..9b6c037bb57 100644
--- a/apps/files_external/lib/ftp.php
+++ b/apps/files_external/lib/ftp.php
@@ -68,7 +68,7 @@ class FTP extends \OC\Files\Storage\StreamWrapper{
case 'ab':
//these are supported by the wrapper
$context = stream_context_create(array('ftp' => array('overwrite' => true)));
- return fopen($this->constructUrl($path),$mode, false,$context);
+ return fopen($this->constructUrl($path), $mode, false, $context);
case 'r+':
case 'w+':
case 'wb+':
@@ -89,7 +89,7 @@ class FTP extends \OC\Files\Storage\StreamWrapper{
$this->getFile($path, $tmpFile);
}
self::$tempFiles[$tmpFile]=$path;
- return fopen('close://'.$tmpFile,$mode);
+ return fopen('close://'.$tmpFile, $mode);
}
return false;
}
diff --git a/apps/files_external/lib/smb.php b/apps/files_external/lib/smb.php
index 96778b0b2e1..62f6591d25a 100644
--- a/apps/files_external/lib/smb.php
+++ b/apps/files_external/lib/smb.php
@@ -33,7 +33,7 @@ class SMB extends \OC\Files\Storage\StreamWrapper{
$this->share='/'.$this->share;
}
if(substr($this->share, -1, 1)=='/') {
- $this->share = substr($this->share,0,-1);
+ $this->share = substr($this->share, 0, -1);
}
}
@@ -45,7 +45,10 @@ class SMB extends \OC\Files\Storage\StreamWrapper{
if (substr($path, -1)=='/') {
$path=substr($path, 0, -1);
}
- return 'smb://'.$this->user.':'.$this->password.'@'.$this->host.$this->share.$this->root.$path;
+ $path = urlencode($path);
+ $user = urlencode($this->user);
+ $pass = urlencode($this->password);
+ return 'smb://'.$user.':'.$pass.'@'.$this->host.$this->share.$this->root.$path;
}
public function stat($path) {
@@ -59,11 +62,6 @@ class SMB extends \OC\Files\Storage\StreamWrapper{
}
}
- public function filetype($path) {
- // using opendir causes the same amount of requests and caches the content of the folder in one go
- return (bool)@$this->opendir($path) ? 'dir' : 'file';
- }
-
/**
* check if a file or folder has been updated since $time
* @param string $path
diff --git a/apps/files_external/lib/streamwrapper.php b/apps/files_external/lib/streamwrapper.php
index 7c3ddcf8a2c..a631e7ce06a 100644
--- a/apps/files_external/lib/streamwrapper.php
+++ b/apps/files_external/lib/streamwrapper.php
@@ -12,7 +12,7 @@ abstract class StreamWrapper extends \OC\Files\Storage\Common{
private $ready = false;
protected function init(){
- if($this->ready){
+ if($this->ready) {
return;
}
$this->ready = true;
@@ -71,39 +71,39 @@ abstract class StreamWrapper extends \OC\Files\Storage\Common{
return $succes;
}
- public function fopen($path,$mode) {
+ public function fopen($path, $mode) {
$this->init();
- return fopen($this->constructUrl($path),$mode);
+ return fopen($this->constructUrl($path), $mode);
}
public function free_space($path) {
return 0;
}
- public function touch($path,$mtime=null) {
+ public function touch($path, $mtime=null) {
$this->init();
if(is_null($mtime)) {
- $fh = $this->fopen($path,'a');
- fwrite($fh,'');
+ $fh = $this->fopen($path, 'a');
+ fwrite($fh, '');
fclose($fh);
} else {
return false;//not supported
}
}
- public function getFile($path,$target) {
+ public function getFile($path, $target) {
$this->init();
- return copy($this->constructUrl($path),$target);
+ return copy($this->constructUrl($path), $target);
}
- public function uploadFile($path,$target) {
+ public function uploadFile($path, $target) {
$this->init();
- return copy($path,$this->constructUrl($target));
+ return copy($path, $this->constructUrl($target));
}
- public function rename($path1,$path2) {
+ public function rename($path1, $path2) {
$this->init();
- return rename($this->constructUrl($path1),$this->constructUrl($path2));
+ return rename($this->constructUrl($path1), $this->constructUrl($path2));
}
public function stat($path) {
diff --git a/apps/files_external/lib/swift.php b/apps/files_external/lib/swift.php
index cbf2007052b..0fd6fa143b8 100644
--- a/apps/files_external/lib/swift.php
+++ b/apps/files_external/lib/swift.php
@@ -210,7 +210,7 @@ class SWIFT extends \OC\Files\Storage\Common{
return false;
} else {
$fh=fopen($tmpFile, 'a');
- fwrite($fh,$name . "\n");
+ fwrite($fh, $name . "\n");
}
} catch(\Exception $e) {
file_put_contents($tmpFile, $name . "\n");
@@ -290,7 +290,7 @@ class SWIFT extends \OC\Files\Storage\Common{
}
private function init(){
- if($this->ready){
+ if($this->ready) {
return;
}
$this->ready = true;
diff --git a/apps/files_external/lib/webdav.php b/apps/files_external/lib/webdav.php
index 2a953ac63f4..039a07b1ef2 100644
--- a/apps/files_external/lib/webdav.php
+++ b/apps/files_external/lib/webdav.php
@@ -49,7 +49,7 @@ class DAV extends \OC\Files\Storage\Common{
}
private function init(){
- if($this->ready){
+ if($this->ready) {
return;
}
$this->ready = true;
@@ -153,10 +153,10 @@ class DAV extends \OC\Files\Storage\Common{
public function unlink($path) {
$this->init();
- return $this->simpleResponse('DELETE', $path, null ,204);
+ return $this->simpleResponse('DELETE', $path, null, 204);
}
- public function fopen($path,$mode) {
+ public function fopen($path, $mode) {
$this->init();
$path=$this->cleanPath($path);
switch($mode) {
@@ -235,13 +235,13 @@ class DAV extends \OC\Files\Storage\Common{
$this->client->proppatch($path, array('{DAV:}lastmodified' => $mtime));
}
- public function getFile($path,$target) {
+ public function getFile($path, $target) {
$this->init();
- $source=$this->fopen($path,'r');
- file_put_contents($target,$source);
+ $source=$this->fopen($path, 'r');
+ file_put_contents($target, $source);
}
- public function uploadFile($path,$target) {
+ public function uploadFile($path, $target) {
$this->init();
$source=fopen($path, 'r');
@@ -256,7 +256,7 @@ class DAV extends \OC\Files\Storage\Common{
curl_close ($curl);
}
- public function rename($path1,$path2) {
+ public function rename($path1, $path2) {
$this->init();
$path1=$this->cleanPath($path1);
$path2=$this->root.$this->cleanPath($path2);
@@ -268,7 +268,7 @@ class DAV extends \OC\Files\Storage\Common{
}
}
- public function copy($path1,$path2) {
+ public function copy($path1, $path2) {
$this->init();
$path1=$this->cleanPath($path1);
$path2=$this->root.$this->cleanPath($path2);
@@ -321,7 +321,7 @@ class DAV extends \OC\Files\Storage\Common{
}
}
- private function simpleResponse($method,$path,$body,$expected) {
+ private function simpleResponse($method, $path, $body, $expected) {
$path=$this->cleanPath($path);
try {
$response=$this->client->request($method, $path, $body);
diff --git a/apps/files_external/templates/settings.php b/apps/files_external/templates/settings.php
index 78ca1c87fee..df8d7d6e2b5 100644
--- a/apps/files_external/templates/settings.php
+++ b/apps/files_external/templates/settings.php
@@ -83,7 +83,7 @@