diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-11-04 21:12:18 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-11-04 21:12:18 +0100 |
commit | 4b940955ddb3266f625eae83da412a655efef319 (patch) | |
tree | 8ed6bb2fae2f5fa3cb61c630e3dc98af5e99d656 /apps | |
parent | 8a6bb7965d96b1c4297da8f5dbc9644fec7aeb0f (diff) | |
parent | 555dd5c261e52cf64f5a8eb6f4d03635cedafbbe (diff) | |
download | nextcloud-server-4b940955ddb3266f625eae83da412a655efef319.tar.gz nextcloud-server-4b940955ddb3266f625eae83da412a655efef319.zip |
merge master into filesystem
Diffstat (limited to 'apps')
70 files changed, 253 insertions, 120 deletions
diff --git a/apps/files/ajax/autocomplete.php b/apps/files/ajax/autocomplete.php index d0dab9c2bd7..7613a1cb77a 100644 --- a/apps/files/ajax/autocomplete.php +++ b/apps/files/ajax/autocomplete.php @@ -44,7 +44,7 @@ if(\OC\Files\Filesystem::file_exists($base) and \OC\Files\Filesystem::is_dir($ba if(substr(strtolower($file), 0, $queryLen)==$query) { $item=$base.$file; if((!$dirOnly or \OC\Files\Filesystem::is_dir($item))) { - $files[]=(object)array('id'=>$item,'label'=>$item,'name'=>$item); + $files[]=(object)array('id'=>$item, 'label'=>$item, 'name'=>$item); } } } diff --git a/apps/files/appinfo/filesync.php b/apps/files/appinfo/filesync.php index 3953fe3e137..62470077319 100644 --- a/apps/files/appinfo/filesync.php +++ b/apps/files/appinfo/filesync.php @@ -21,7 +21,7 @@ */ // load needed apps -$RUNTIME_APPTYPES=array('filesystem','authentication','logging'); +$RUNTIME_APPTYPES=array('filesystem', 'authentication', 'logging'); OC_App::loadApps($RUNTIME_APPTYPES); if(!OC_User::isLoggedIn()) { if(!isset($_SERVER['PHP_AUTH_USER'])) { @@ -36,7 +36,7 @@ if(!OC_User::isLoggedIn()) { } } -list($type,$file) = explode('/', substr($path_info,1+strlen($service)+1), 2); +list($type, $file) = explode('/', substr($path_info, 1+strlen($service)+1), 2); if ($type != 'oc_chunked') { OC_Response::setStatus(OC_Response::STATUS_NOT_FOUND); diff --git a/apps/files/appinfo/remote.php b/apps/files/appinfo/remote.php index f12430f24dd..400a978fb17 100644 --- a/apps/files/appinfo/remote.php +++ b/apps/files/appinfo/remote.php @@ -23,7 +23,7 @@ * */ // load needed apps -$RUNTIME_APPTYPES=array('filesystem','authentication','logging'); +$RUNTIME_APPTYPES=array('filesystem', 'authentication', 'logging'); OC_App::loadApps($RUNTIME_APPTYPES); diff --git a/apps/files/appinfo/update.php b/apps/files/appinfo/update.php index bcbbc6035fa..738864d7cff 100644 --- a/apps/files/appinfo/update.php +++ b/apps/files/appinfo/update.php @@ -5,7 +5,7 @@ $installedVersion=OCP\Config::getAppValue('files', 'installed_version'); if (version_compare($installedVersion, '1.1.6', '<')) { $query = OC_DB::prepare( "SELECT `propertyname`, `propertypath`, `userid` FROM `*PREFIX*properties`" ); $result = $query->execute(); - while( $row = $result->fetchRow()){ + while( $row = $result->fetchRow()) { if ( $row["propertyname"][0] != '{' ) { $query = OC_DB::prepare( 'UPDATE `*PREFIX*properties` SET `propertyname` = ? WHERE `userid` = ? AND `propertypath` = ?' ); $query->execute( array( '{DAV:}' + $row["propertyname"], $row["userid"], $row["propertypath"] )); @@ -39,7 +39,7 @@ foreach($filesToRemove as $file) { $success = OCP\Files::rmdirr($filepath); if($success === false) { //probably not sufficient privileges, give up and give a message. - OCP\Util::writeLog('files','Could not clean /files/ directory. Please remove everything except webdav.php from ' . OC::$SERVERROOT . '/files/', OCP\Util::ERROR); + OCP\Util::writeLog('files', 'Could not clean /files/ directory. Please remove everything except webdav.php from ' . OC::$SERVERROOT . '/files/', OCP\Util::ERROR); break; } } diff --git a/apps/files/download.php b/apps/files/download.php index b00a50a0452..8b9aac5fd6e 100644 --- a/apps/files/download.php +++ b/apps/files/download.php @@ -32,7 +32,7 @@ $filename = $_GET["file"]; if(!\OC\Files\Filesystem::file_exists($filename)) { header("HTTP/1.0 404 Not Found"); $tmpl = new OCP\Template( '', '404', 'guest' ); - $tmpl->assign('file',$filename); + $tmpl->assign('file', $filename); $tmpl->printPage(); exit; } diff --git a/apps/files/l10n/ar.php b/apps/files/l10n/ar.php index a5530851d2e..78b4915f4ed 100644 --- a/apps/files/l10n/ar.php +++ b/apps/files/l10n/ar.php @@ -11,11 +11,13 @@ "Size" => "حجم", "Modified" => "معدل", "Maximum upload size" => "الحد الأقصى لحجم الملفات التي يمكن رفعها", +"Save" => "حفظ", "New" => "جديد", "Text file" => "ملف", "Folder" => "مجلد", "Upload" => "إرفع", "Nothing in here. Upload something!" => "لا يوجد شيء هنا. إرفع بعض الملفات!", +"Share" => "شارك", "Download" => "تحميل", "Upload too large" => "حجم الترفيع أعلى من المسموح", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "حجم الملفات التي تريد ترفيعها أعلى من المسموح على الخادم." diff --git a/apps/files/l10n/bg_BG.php b/apps/files/l10n/bg_BG.php index 83873948162..0a3bf02e956 100644 --- a/apps/files/l10n/bg_BG.php +++ b/apps/files/l10n/bg_BG.php @@ -16,6 +16,7 @@ "Modified" => "Променено", "Maximum upload size" => "Макс. размер за качване", "0 is unlimited" => "0 означава без ограничение", +"Save" => "Запис", "New" => "Нов", "Text file" => "Текстов файл", "Folder" => "Папка", diff --git a/apps/files/l10n/ca.php b/apps/files/l10n/ca.php index a10ad5c16c5..068031bafc7 100644 --- a/apps/files/l10n/ca.php +++ b/apps/files/l10n/ca.php @@ -58,6 +58,7 @@ "New" => "Nou", "Text file" => "Fitxer de text", "Folder" => "Carpeta", +"From link" => "Des d'enllaç", "Upload" => "Puja", "Cancel upload" => "Cancel·la la pujada", "Nothing in here. Upload something!" => "Res per aquí. Pugeu alguna cosa!", diff --git a/apps/files/l10n/cs_CZ.php b/apps/files/l10n/cs_CZ.php index c216f6bce44..6d96033a8bc 100644 --- a/apps/files/l10n/cs_CZ.php +++ b/apps/files/l10n/cs_CZ.php @@ -58,6 +58,7 @@ "New" => "Nový", "Text file" => "Textový soubor", "Folder" => "Složka", +"From link" => "Z odkazu", "Upload" => "Odeslat", "Cancel upload" => "Zrušit odesílání", "Nothing in here. Upload something!" => "Žádný obsah. Nahrajte něco.", diff --git a/apps/files/l10n/de.php b/apps/files/l10n/de.php index f0c2f56a86e..f27565398b2 100644 --- a/apps/files/l10n/de.php +++ b/apps/files/l10n/de.php @@ -58,6 +58,7 @@ "New" => "Neu", "Text file" => "Textdatei", "Folder" => "Ordner", +"From link" => "Von einem Link", "Upload" => "Hochladen", "Cancel upload" => "Upload abbrechen", "Nothing in here. Upload something!" => "Alles leer. Lade etwas hoch!", diff --git a/apps/files/l10n/de_DE.php b/apps/files/l10n/de_DE.php index dd2ebbbdd1e..be8f83c0fca 100644 --- a/apps/files/l10n/de_DE.php +++ b/apps/files/l10n/de_DE.php @@ -58,6 +58,7 @@ "New" => "Neu", "Text file" => "Textdatei", "Folder" => "Ordner", +"From link" => "Von einem Link", "Upload" => "Hochladen", "Cancel upload" => "Upload abbrechen", "Nothing in here. Upload something!" => "Alles leer. Bitte laden Sie etwas hoch!", diff --git a/apps/files/l10n/eo.php b/apps/files/l10n/eo.php index bba06c3f9ce..4373bbf58b4 100644 --- a/apps/files/l10n/eo.php +++ b/apps/files/l10n/eo.php @@ -27,6 +27,7 @@ "Size" => "Grando", "Modified" => "Modifita", "seconds ago" => "sekundoj antaŭe", +"1 minute ago" => "antaŭ 1 minuto", "today" => "hodiaŭ", "yesterday" => "hieraŭ", "last month" => "lastamonate", diff --git a/apps/files/l10n/es.php b/apps/files/l10n/es.php index 8a337681466..04cf10f96b7 100644 --- a/apps/files/l10n/es.php +++ b/apps/files/l10n/es.php @@ -58,6 +58,7 @@ "New" => "Nuevo", "Text file" => "Archivo de texto", "Folder" => "Carpeta", +"From link" => "Desde el enlace", "Upload" => "Subir", "Cancel upload" => "Cancelar subida", "Nothing in here. Upload something!" => "Aquí no hay nada. ¡Sube algo!", diff --git a/apps/files/l10n/eu.php b/apps/files/l10n/eu.php index 2a923a28137..f99c2116077 100644 --- a/apps/files/l10n/eu.php +++ b/apps/files/l10n/eu.php @@ -27,6 +27,7 @@ "Size" => "Tamaina", "Modified" => "Aldatuta", "seconds ago" => "segundu", +"1 minute ago" => "orain dela minutu 1", "today" => "gaur", "yesterday" => "atzo", "last month" => "joan den hilabetean", diff --git a/apps/files/l10n/fa.php b/apps/files/l10n/fa.php index 2eb3b47ac0d..ea3aa43b8fa 100644 --- a/apps/files/l10n/fa.php +++ b/apps/files/l10n/fa.php @@ -8,6 +8,7 @@ "Failed to write to disk" => "نوشتن بر روی دیسک سخت ناموفق بود", "Files" => "فایل ها", "Delete" => "پاک کردن", +"Rename" => "تغییرنام", "replace" => "جایگزین", "cancel" => "لغو", "undo" => "بازگشت", @@ -20,6 +21,14 @@ "Name" => "نام", "Size" => "اندازه", "Modified" => "تغییر یافته", +"seconds ago" => "ثانیهها پیش", +"1 minute ago" => "1 دقیقه پیش", +"today" => "امروز", +"yesterday" => "دیروز", +"last month" => "ماه قبل", +"months ago" => "ماههای قبل", +"last year" => "سال قبل", +"years ago" => "سالهای قبل", "File handling" => "اداره پرونده ها", "Maximum upload size" => "حداکثر اندازه بارگزاری", "max. possible: " => "حداکثرمقدارممکن:", @@ -27,6 +36,7 @@ "Enable ZIP-download" => "فعال سازی بارگیری پرونده های فشرده", "0 is unlimited" => "0 نامحدود است", "Maximum input size for ZIP files" => "حداکثرمقدار برای بار گزاری پرونده های فشرده", +"Save" => "ذخیره", "New" => "جدید", "Text file" => "فایل متنی", "Folder" => "پوشه", diff --git a/apps/files/l10n/fi_FI.php b/apps/files/l10n/fi_FI.php index b17b542405d..5cbbc83edb0 100644 --- a/apps/files/l10n/fi_FI.php +++ b/apps/files/l10n/fi_FI.php @@ -7,6 +7,7 @@ "Missing a temporary folder" => "Väliaikaiskansiota ei ole olemassa", "Failed to write to disk" => "Levylle kirjoitus epäonnistui", "Files" => "Tiedostot", +"Unshare" => "Peru jakaminen", "Delete" => "Poista", "Rename" => "Nimeä uudelleen", "{new_name} already exists" => "{new_name} on jo olemassa", diff --git a/apps/files/l10n/fr.php b/apps/files/l10n/fr.php index aa63dbb0549..3068eb92747 100644 --- a/apps/files/l10n/fr.php +++ b/apps/files/l10n/fr.php @@ -58,6 +58,7 @@ "New" => "Nouveau", "Text file" => "Fichier texte", "Folder" => "Dossier", +"From link" => "Depuis le lien", "Upload" => "Envoyer", "Cancel upload" => "Annuler l'envoi", "Nothing in here. Upload something!" => "Il n'y a rien ici ! Envoyez donc quelque chose :)", diff --git a/apps/files/l10n/gl.php b/apps/files/l10n/gl.php index 1c5dfceb4f3..7b332d47df3 100644 --- a/apps/files/l10n/gl.php +++ b/apps/files/l10n/gl.php @@ -24,6 +24,14 @@ "Name" => "Nome", "Size" => "Tamaño", "Modified" => "Modificado", +"seconds ago" => "hai segundos", +"1 minute ago" => "hai 1 minuto", +"today" => "hoxe", +"yesterday" => "onte", +"last month" => "último mes", +"months ago" => "meses atrás", +"last year" => "último ano", +"years ago" => "anos atrás", "File handling" => "Manexo de ficheiro", "Maximum upload size" => "Tamaño máximo de envío", "max. possible: " => "máx. posible: ", diff --git a/apps/files/l10n/he.php b/apps/files/l10n/he.php index 1f63978abbf..fc169710df0 100644 --- a/apps/files/l10n/he.php +++ b/apps/files/l10n/he.php @@ -7,6 +7,7 @@ "Missing a temporary folder" => "תיקייה זמנית חסרה", "Failed to write to disk" => "הכתיבה לכונן נכשלה", "Files" => "קבצים", +"Unshare" => "הסר שיתוף", "Delete" => "מחיקה", "generating ZIP-file, it may take some time." => "יוצר קובץ ZIP, אנא המתן.", "Unable to upload your file as it is a directory or has 0 bytes" => "לא יכול להעלות את הקובץ מכיוון שזו תקיה או שמשקל הקובץ 0 בתים", @@ -17,6 +18,14 @@ "Name" => "שם", "Size" => "גודל", "Modified" => "זמן שינוי", +"seconds ago" => "שניות", +"1 minute ago" => "לפני דקה אחת", +"today" => "היום", +"yesterday" => "אתמול", +"last month" => "חודש שעבר", +"months ago" => "חודשים", +"last year" => "שנה שעברה", +"years ago" => "שנים", "File handling" => "טיפול בקבצים", "Maximum upload size" => "גודל העלאה מקסימלי", "max. possible: " => "המרבי האפשרי: ", @@ -24,6 +33,7 @@ "Enable ZIP-download" => "הפעלת הורדת ZIP", "0 is unlimited" => "0 - ללא הגבלה", "Maximum input size for ZIP files" => "גודל הקלט המרבי לקובצי ZIP", +"Save" => "שמירה", "New" => "חדש", "Text file" => "קובץ טקסט", "Folder" => "תיקייה", diff --git a/apps/files/l10n/hu_HU.php b/apps/files/l10n/hu_HU.php index c11469e3ed4..6ded4de4800 100644 --- a/apps/files/l10n/hu_HU.php +++ b/apps/files/l10n/hu_HU.php @@ -7,6 +7,7 @@ "Missing a temporary folder" => "Hiányzik az ideiglenes könyvtár", "Failed to write to disk" => "Nem írható lemezre", "Files" => "Fájlok", +"Unshare" => "Nem oszt meg", "Delete" => "Törlés", "replace" => "cserél", "cancel" => "mégse", @@ -20,6 +21,14 @@ "Name" => "Név", "Size" => "Méret", "Modified" => "Módosítva", +"seconds ago" => "másodperccel ezelőtt", +"1 minute ago" => "1 perccel ezelőtt", +"today" => "ma", +"yesterday" => "tegnap", +"last month" => "múlt hónapban", +"months ago" => "hónappal ezelőtt", +"last year" => "tavaly", +"years ago" => "évvel ezelőtt", "File handling" => "Fájlkezelés", "Maximum upload size" => "Maximális feltölthető fájlméret", "max. possible: " => "max. lehetséges", @@ -27,6 +36,7 @@ "Enable ZIP-download" => "ZIP-letöltés engedélyezése", "0 is unlimited" => "0 = korlátlan", "Maximum input size for ZIP files" => "ZIP file-ok maximum mérete", +"Save" => "Mentés", "New" => "Új", "Text file" => "Szövegfájl", "Folder" => "Mappa", diff --git a/apps/files/l10n/ia.php b/apps/files/l10n/ia.php index 21a0bb52374..bcebebc1405 100644 --- a/apps/files/l10n/ia.php +++ b/apps/files/l10n/ia.php @@ -1,17 +1,20 @@ <?php $TRANSLATIONS = array( "The uploaded file was only partially uploaded" => "Le file incargate solmente esseva incargate partialmente", "No file was uploaded" => "Nulle file esseva incargate", +"Missing a temporary folder" => "Manca un dossier temporari", "Files" => "Files", "Delete" => "Deler", "Name" => "Nomine", "Size" => "Dimension", "Modified" => "Modificate", "Maximum upload size" => "Dimension maxime de incargamento", +"Save" => "Salveguardar", "New" => "Nove", "Text file" => "File de texto", "Folder" => "Dossier", "Upload" => "Incargar", "Nothing in here. Upload something!" => "Nihil hic. Incarga alcun cosa!", +"Share" => "Compartir", "Download" => "Discargar", "Upload too large" => "Incargamento troppo longe" ); diff --git a/apps/files/l10n/id.php b/apps/files/l10n/id.php index cc067bf9a18..061d28c8f78 100644 --- a/apps/files/l10n/id.php +++ b/apps/files/l10n/id.php @@ -7,6 +7,7 @@ "Missing a temporary folder" => "Kehilangan folder temporer", "Failed to write to disk" => "Gagal menulis ke disk", "Files" => "Berkas", +"Unshare" => "batalkan berbagi", "Delete" => "Hapus", "replace" => "mengganti", "cancel" => "batalkan", @@ -20,6 +21,14 @@ "Name" => "Nama", "Size" => "Ukuran", "Modified" => "Dimodifikasi", +"seconds ago" => "beberapa detik yang lalu", +"1 minute ago" => "1 menit lalu", +"today" => "hari ini", +"yesterday" => "kemarin", +"last month" => "bulan kemarin", +"months ago" => "beberapa bulan lalu", +"last year" => "tahun kemarin", +"years ago" => "beberapa tahun lalu", "File handling" => "Penanganan berkas", "Maximum upload size" => "Ukuran unggah maksimum", "max. possible: " => "Kemungkinan maks:", @@ -27,6 +36,7 @@ "Enable ZIP-download" => "Aktifkan unduhan ZIP", "0 is unlimited" => "0 adalah tidak terbatas", "Maximum input size for ZIP files" => "Ukuran masukan maksimal untuk berkas ZIP", +"Save" => "simpan", "New" => "Baru", "Text file" => "Berkas teks", "Folder" => "Folder", diff --git a/apps/files/l10n/it.php b/apps/files/l10n/it.php index 91fda49e270..c767fb43b2b 100644 --- a/apps/files/l10n/it.php +++ b/apps/files/l10n/it.php @@ -58,6 +58,7 @@ "New" => "Nuovo", "Text file" => "File di testo", "Folder" => "Cartella", +"From link" => "Da collegamento", "Upload" => "Carica", "Cancel upload" => "Annulla invio", "Nothing in here. Upload something!" => "Non c'è niente qui. Carica qualcosa!", diff --git a/apps/files/l10n/ko.php b/apps/files/l10n/ko.php index 896e979dc8c..d2561e129dd 100644 --- a/apps/files/l10n/ko.php +++ b/apps/files/l10n/ko.php @@ -27,6 +27,7 @@ "Enable ZIP-download" => "ZIP- 다운로드 허용", "0 is unlimited" => "0은 무제한 입니다", "Maximum input size for ZIP files" => "ZIP 파일에 대한 최대 입력 크기", +"Save" => "저장", "New" => "새로 만들기", "Text file" => "텍스트 파일", "Folder" => "폴더", diff --git a/apps/files/l10n/ku_IQ.php b/apps/files/l10n/ku_IQ.php new file mode 100644 index 00000000000..3c40831b83a --- /dev/null +++ b/apps/files/l10n/ku_IQ.php @@ -0,0 +1,7 @@ +<?php $TRANSLATIONS = array( +"Name" => "ناو", +"Save" => "پاشکهوتکردن", +"Folder" => "بوخچه", +"Upload" => "بارکردن", +"Download" => "داگرتن" +); diff --git a/apps/files/l10n/lb.php b/apps/files/l10n/lb.php index 02f546ad85f..4e2ce1b1dbf 100644 --- a/apps/files/l10n/lb.php +++ b/apps/files/l10n/lb.php @@ -27,6 +27,7 @@ "Enable ZIP-download" => "ZIP-download erlaben", "0 is unlimited" => "0 ass onlimitéiert", "Maximum input size for ZIP files" => "Maximal Gréisst fir ZIP Fichieren", +"Save" => "Späicheren", "New" => "Nei", "Text file" => "Text Fichier", "Folder" => "Dossier", diff --git a/apps/files/l10n/lv.php b/apps/files/l10n/lv.php index e550f6dc5e5..6488ee534ec 100644 --- a/apps/files/l10n/lv.php +++ b/apps/files/l10n/lv.php @@ -2,6 +2,7 @@ "No file was uploaded" => "Neviens fails netika augšuplādēts", "Failed to write to disk" => "Nav iespējams saglabāt", "Files" => "Faili", +"Unshare" => "Pārtraukt līdzdalīšanu", "Delete" => "Izdzēst", "replace" => "aizvietot", "cancel" => "atcelt", diff --git a/apps/files/l10n/mk.php b/apps/files/l10n/mk.php index b908da2bb26..a3c43d266ff 100644 --- a/apps/files/l10n/mk.php +++ b/apps/files/l10n/mk.php @@ -24,6 +24,7 @@ "Enable ZIP-download" => "Овозможи ZIP симнување ", "0 is unlimited" => "0 е неограничено", "Maximum input size for ZIP files" => "Максимална големина за внес на ZIP датотеки", +"Save" => "Сними", "New" => "Ново", "Text file" => "Текстуална датотека", "Folder" => "Папка", diff --git a/apps/files/l10n/ms_MY.php b/apps/files/l10n/ms_MY.php index 1dabec18ea2..35dda3d8a6b 100644 --- a/apps/files/l10n/ms_MY.php +++ b/apps/files/l10n/ms_MY.php @@ -26,6 +26,7 @@ "Enable ZIP-download" => "Aktifkan muatturun ZIP", "0 is unlimited" => "0 adalah tanpa had", "Maximum input size for ZIP files" => "Saiz maksimum input untuk fail ZIP", +"Save" => "Simpan", "New" => "Baru", "Text file" => "Fail teks", "Folder" => "Folder", diff --git a/apps/files/l10n/nn_NO.php b/apps/files/l10n/nn_NO.php index 7af37057ce0..df8dcb0e9cf 100644 --- a/apps/files/l10n/nn_NO.php +++ b/apps/files/l10n/nn_NO.php @@ -11,6 +11,7 @@ "Size" => "Storleik", "Modified" => "Endra", "Maximum upload size" => "Maksimal opplastingsstorleik", +"Save" => "Lagre", "New" => "Ny", "Text file" => "Tekst fil", "Folder" => "Mappe", diff --git a/apps/files/l10n/oc.php b/apps/files/l10n/oc.php index 4542396a535..078545b6d55 100644 --- a/apps/files/l10n/oc.php +++ b/apps/files/l10n/oc.php @@ -27,6 +27,7 @@ "Size" => "Talha", "Modified" => "Modificat", "seconds ago" => "secondas", +"1 minute ago" => "1 minuta a", "today" => "uèi", "yesterday" => "ièr", "last month" => "mes passat", diff --git a/apps/files/l10n/pl_PL.php b/apps/files/l10n/pl_PL.php new file mode 100644 index 00000000000..157d9a41e4d --- /dev/null +++ b/apps/files/l10n/pl_PL.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"Save" => "Zapisz" +); diff --git a/apps/files/l10n/pt_BR.php b/apps/files/l10n/pt_BR.php index 43f961156f6..31de3f6e600 100644 --- a/apps/files/l10n/pt_BR.php +++ b/apps/files/l10n/pt_BR.php @@ -10,25 +10,39 @@ "Unshare" => "Descompartilhar", "Delete" => "Excluir", "Rename" => "Renomear", +"{new_name} already exists" => "{new_name} já existe", "replace" => "substituir", "suggest name" => "sugerir nome", "cancel" => "cancelar", +"replaced {new_name}" => "substituído {new_name}", "undo" => "desfazer", +"replaced {new_name} with {old_name}" => "Substituído {old_name} por {new_name} ", +"unshared {files}" => "{files} não compartilhados", +"deleted {files}" => "{files} apagados", "generating ZIP-file, it may take some time." => "gerando arquivo ZIP, isso pode levar um tempo.", "Unable to upload your file as it is a directory or has 0 bytes" => "Impossível enviar seus arquivo como diretório ou ele tem 0 bytes.", "Upload Error" => "Erro de envio", "Pending" => "Pendente", "1 file uploading" => "enviando 1 arquivo", +"{count} files uploading" => "Enviando {count} arquivos", "Upload cancelled." => "Envio cancelado.", "File upload is in progress. Leaving the page now will cancel the upload." => "Upload em andamento. Sair da página agora resultará no cancelamento do envio.", "Invalid name, '/' is not allowed." => "Nome inválido, '/' não é permitido.", +"{count} files scanned" => "{count} arquivos scaneados", "error while scanning" => "erro durante verificação", "Name" => "Nome", "Size" => "Tamanho", "Modified" => "Modificado", +"1 folder" => "1 pasta", +"{count} folders" => "{count} pastas", +"1 file" => "1 arquivo", +"{count} files" => "{count} arquivos", "seconds ago" => "segundos atrás", +"1 minute ago" => "1 minuto atrás", +"{minutes} minutes ago" => "{minutes} minutos atrás", "today" => "hoje", "yesterday" => "ontem", +"{days} days ago" => "{days} dias atrás", "last month" => "último mês", "months ago" => "meses atrás", "last year" => "último ano", @@ -44,6 +58,7 @@ "New" => "Novo", "Text file" => "Arquivo texto", "Folder" => "Pasta", +"From link" => "Do link", "Upload" => "Carregar", "Cancel upload" => "Cancelar upload", "Nothing in here. Upload something!" => "Nada aqui.Carrege alguma coisa!", diff --git a/apps/files/l10n/ro.php b/apps/files/l10n/ro.php index df0c4bd685b..4358e64e7b3 100644 --- a/apps/files/l10n/ro.php +++ b/apps/files/l10n/ro.php @@ -27,6 +27,7 @@ "Size" => "Dimensiune", "Modified" => "Modificat", "seconds ago" => "secunde în urmă", +"1 minute ago" => "1 minut în urmă", "today" => "astăzi", "yesterday" => "ieri", "last month" => "ultima lună", diff --git a/apps/files/l10n/ru_RU.php b/apps/files/l10n/ru_RU.php index 7630647e9ad..33d24ed74de 100644 --- a/apps/files/l10n/ru_RU.php +++ b/apps/files/l10n/ru_RU.php @@ -58,6 +58,7 @@ "New" => "Новый", "Text file" => "Текстовый файл", "Folder" => "Папка", +"From link" => "По ссылке", "Upload" => "Загрузить ", "Cancel upload" => "Отмена загрузки", "Nothing in here. Upload something!" => "Здесь ничего нет. Загрузите что-нибудь!", diff --git a/apps/files/l10n/si_LK.php b/apps/files/l10n/si_LK.php index 0f85061f8de..5a51f07f7c8 100644 --- a/apps/files/l10n/si_LK.php +++ b/apps/files/l10n/si_LK.php @@ -6,6 +6,7 @@ "Missing a temporary folder" => "තාවකාලික ෆොල්ඩරයක් සොයාගත නොහැක", "Failed to write to disk" => "තැටිගත කිරීම අසාර්ථකයි", "Files" => "ගොනු", +"Unshare" => "නොබෙදු", "Delete" => "මකන්න", "Rename" => "නැවත නම් කරන්න", "replace" => "ප්රතිස්ථාපනය කරන්න", @@ -18,8 +19,14 @@ "Size" => "ප්රමාණය", "Modified" => "වෙනස් කළ", "1 file" => "1 ගොනුවක්", +"seconds ago" => "තත්පරයන්ට පෙර", +"1 minute ago" => "1 මිනිත්තුවකට පෙර", "today" => "අද", "yesterday" => "පෙර දින", +"last month" => "පෙර මාසයේ", +"months ago" => "මාස කීපයකට පෙර", +"last year" => "පෙර අවුරුද්දේ", +"years ago" => "අවුරුදු කීපයකට පෙර", "File handling" => "ගොනු පරිහරණය", "Maximum upload size" => "උඩුගත කිරීමක උපරිම ප්රමාණය", "max. possible: " => "හැකි උපරිමය:", diff --git a/apps/files/l10n/sk_SK.php b/apps/files/l10n/sk_SK.php index 2b7991b3a2a..a8ec32c05e4 100644 --- a/apps/files/l10n/sk_SK.php +++ b/apps/files/l10n/sk_SK.php @@ -58,6 +58,7 @@ "New" => "Nový", "Text file" => "Textový súbor", "Folder" => "Priečinok", +"From link" => "Z odkazu", "Upload" => "Odoslať", "Cancel upload" => "Zrušiť odosielanie", "Nothing in here. Upload something!" => "Žiadny súbor. Nahrajte niečo!", diff --git a/apps/files/l10n/sr.php b/apps/files/l10n/sr.php index 99e4b12697c..b61b989f33a 100644 --- a/apps/files/l10n/sr.php +++ b/apps/files/l10n/sr.php @@ -11,6 +11,7 @@ "Size" => "Величина", "Modified" => "Задња измена", "Maximum upload size" => "Максимална величина пошиљке", +"Save" => "Сними", "New" => "Нови", "Text file" => "текстуални фајл", "Folder" => "фасцикла", diff --git a/apps/files/l10n/sr@latin.php b/apps/files/l10n/sr@latin.php index d8c7ef18989..d5a5920b372 100644 --- a/apps/files/l10n/sr@latin.php +++ b/apps/files/l10n/sr@latin.php @@ -11,6 +11,7 @@ "Size" => "Veličina", "Modified" => "Zadnja izmena", "Maximum upload size" => "Maksimalna veličina pošiljke", +"Save" => "Snimi", "Upload" => "Pošalji", "Nothing in here. Upload something!" => "Ovde nema ničeg. Pošaljite nešto!", "Download" => "Preuzmi", diff --git a/apps/files/l10n/sv.php b/apps/files/l10n/sv.php index d58ba61be33..eaf16242ef1 100644 --- a/apps/files/l10n/sv.php +++ b/apps/files/l10n/sv.php @@ -58,6 +58,7 @@ "New" => "Ny", "Text file" => "Textfil", "Folder" => "Mapp", +"From link" => "Från länk", "Upload" => "Ladda upp", "Cancel upload" => "Avbryt uppladdning", "Nothing in here. Upload something!" => "Ingenting här. Ladda upp något!", diff --git a/apps/files/l10n/tr.php b/apps/files/l10n/tr.php index ea5cbe484fa..cc9485010e4 100644 --- a/apps/files/l10n/tr.php +++ b/apps/files/l10n/tr.php @@ -7,7 +7,9 @@ "Missing a temporary folder" => "Geçici bir klasör eksik", "Failed to write to disk" => "Diske yazılamadı", "Files" => "Dosyalar", +"Unshare" => "Paylaşılmayan", "Delete" => "Sil", +"Rename" => "İsim değiştir.", "replace" => "değiştir", "cancel" => "iptal", "undo" => "geri al", @@ -28,6 +30,7 @@ "Enable ZIP-download" => "ZIP indirmeyi aktif et", "0 is unlimited" => "0 limitsiz demektir", "Maximum input size for ZIP files" => "ZIP dosyaları için en fazla girdi sayısı", +"Save" => "Kaydet", "New" => "Yeni", "Text file" => "Metin dosyası", "Folder" => "Klasör", diff --git a/apps/files/l10n/uk.php b/apps/files/l10n/uk.php index d487571d708..c2c3bbd21cb 100644 --- a/apps/files/l10n/uk.php +++ b/apps/files/l10n/uk.php @@ -6,6 +6,7 @@ "No file was uploaded" => "Не відвантажено жодного файлу", "Missing a temporary folder" => "Відсутній тимчасовий каталог", "Files" => "Файли", +"Unshare" => "Заборонити доступ", "Delete" => "Видалити", "undo" => "відмінити", "generating ZIP-file, it may take some time." => "Створення ZIP-файлу, це може зайняти певний час.", @@ -17,9 +18,18 @@ "Name" => "Ім'я", "Size" => "Розмір", "Modified" => "Змінено", +"seconds ago" => "секунди тому", +"1 minute ago" => "1 хвилину тому", +"today" => "сьогодні", +"yesterday" => "вчора", +"last month" => "минулого місяця", +"months ago" => "місяці тому", +"last year" => "минулого року", +"years ago" => "роки тому", "Maximum upload size" => "Максимальний розмір відвантажень", "max. possible: " => "макс.можливе:", "0 is unlimited" => "0 є безліміт", +"Save" => "Зберегти", "New" => "Створити", "Text file" => "Текстовий файл", "Folder" => "Папка", diff --git a/apps/files/l10n/zh_CN.GB2312.php b/apps/files/l10n/zh_CN.GB2312.php index f7e76c89bd4..e68efb72024 100644 --- a/apps/files/l10n/zh_CN.GB2312.php +++ b/apps/files/l10n/zh_CN.GB2312.php @@ -27,6 +27,7 @@ "Size" => "大小", "Modified" => "修改日期", "seconds ago" => "秒前", +"1 minute ago" => "1 分钟前", "today" => "今天", "yesterday" => "昨天", "last month" => "上个月", diff --git a/apps/files/l10n/zh_TW.php b/apps/files/l10n/zh_TW.php index 089381bcc5a..c2792d9dfb2 100644 --- a/apps/files/l10n/zh_TW.php +++ b/apps/files/l10n/zh_TW.php @@ -7,7 +7,9 @@ "Missing a temporary folder" => "遺失暫存資料夾", "Failed to write to disk" => "寫入硬碟失敗", "Files" => "檔案", +"Unshare" => "取消共享", "Delete" => "刪除", +"Rename" => "重新命名", "replace" => "取代", "cancel" => "取消", "generating ZIP-file, it may take some time." => "產生壓縮檔, 它可能需要一段時間.", @@ -19,6 +21,14 @@ "Name" => "名稱", "Size" => "大小", "Modified" => "修改", +"seconds ago" => "幾秒前", +"1 minute ago" => "1 分鐘前", +"today" => "今天", +"yesterday" => "昨天", +"last month" => "上個月", +"months ago" => "幾個月前", +"last year" => "去年", +"years ago" => "幾年前", "File handling" => "檔案處理", "Maximum upload size" => "最大上傳容量", "max. possible: " => "最大允許: ", @@ -26,6 +36,7 @@ "Enable ZIP-download" => "啟用 Zip 下載", "0 is unlimited" => "0代表沒有限制", "Maximum input size for ZIP files" => "針對ZIP檔案最大輸入大小", +"Save" => "儲存", "New" => "新增", "Text file" => "文字檔", "Folder" => "資料夾", diff --git a/apps/files/templates/admin.php b/apps/files/templates/admin.php index 5869ed21072..a60a1cebaf9 100644 --- a/apps/files/templates/admin.php +++ b/apps/files/templates/admin.php @@ -1,4 +1,4 @@ -<?php OCP\Util::addscript('files','admin'); ?> +<?php OCP\Util::addscript('files', 'admin'); ?> <form name="filesForm" action='#' method='post'> <fieldset class="personalblock"> diff --git a/apps/files/templates/index.php b/apps/files/templates/index.php index 7cdff024ddf..e2640c1113c 100644 --- a/apps/files/templates/index.php +++ b/apps/files/templates/index.php @@ -8,7 +8,7 @@ <ul class="popup popupTop"> <li style="background-image:url('<?php echo OCP\mimetype_icon('text/plain') ?>')" data-type='file'><p><?php echo $l->t('Text file');?></p></li> <li style="background-image:url('<?php echo OCP\mimetype_icon('dir') ?>')" data-type='folder'><p><?php echo $l->t('Folder');?></p></li> - <li style="background-image:url('<?php echo OCP\image_path('core','actions/public.png') ?>')" data-type='web'><p><?php echo $l->t('From link');?></p></li> + <li style="background-image:url('<?php echo OCP\image_path('core', 'actions/public.png') ?>')" data-type='web'><p><?php echo $l->t('From link');?></p></li> </ul> </div> <div class="file_upload_wrapper svg"> diff --git a/apps/files/templates/part.breadcrumb.php b/apps/files/templates/part.breadcrumb.php index 71b695f65f8..ead9ab1ed7d 100644 --- a/apps/files/templates/part.breadcrumb.php +++ b/apps/files/templates/part.breadcrumb.php @@ -1,6 +1,6 @@ <?php for($i=0; $i<count($_["breadcrumb"]); $i++): $crumb = $_["breadcrumb"][$i]; ?> - <div class="crumb <?php if($i == count($_["breadcrumb"])-1) echo 'last';?> svg" data-dir='<?php echo urlencode($crumb["dir"]);?>' style='background-image:url("<?php echo OCP\image_path('core','breadcrumb.png');?>")'> + <div class="crumb <?php if($i == count($_["breadcrumb"])-1) echo 'last';?> svg" data-dir='<?php echo urlencode($crumb["dir"]);?>' style='background-image:url("<?php echo OCP\image_path('core', 'breadcrumb.png');?>")'> <a href="<?php echo $_['baseURL'].urlencode($crumb["dir"]); ?>"><?php echo OCP\Util::sanitizeHTML($crumb["name"]); ?></a> </div> <?php endfor;?> diff --git a/apps/files/templates/part.list.php b/apps/files/templates/part.list.php index aaf9c5f57ee..4b5ac325672 100644 --- a/apps/files/templates/part.list.php +++ b/apps/files/templates/part.list.php @@ -14,10 +14,10 @@ $relative_modified_date = OCP\relative_modified_date($file['mtime']); $relative_date_color = round((time()-$file['mtime'])/60/60/24*14); // the older the file, the brighter the shade of grey; days*14 if($relative_date_color>200) $relative_date_color = 200; - $name = str_replace('+','%20', urlencode($file['name'])); - $name = str_replace('%2F','/', $name); - $directory = str_replace('+','%20', urlencode($file['directory'])); - $directory = str_replace('%2F','/', $directory); ?> + $name = str_replace('+', '%20', urlencode($file['name'])); + $name = str_replace('%2F', '/', $name); + $directory = str_replace('+', '%20', urlencode($file['directory'])); + $directory = str_replace('%2F', '/', $directory); ?> <tr data-id="<?php echo $file['id']; ?>" data-file="<?php echo $name;?>" data-type="<?php echo ($file['type'] == 'dir')?'dir':'file'?>" data-mime="<?php echo $file['mimetype']?>" data-size='<?php echo $file['size'];?>' data-permissions='<?php echo $file['permissions']; ?>'> <td class="filename svg" style="background-image:url(<?php if($file['type'] == 'dir') echo OCP\mimetype_icon('dir'); else echo OCP\mimetype_icon($file['mimetype']); ?>)"> <?php if(!isset($_['readonly']) || !$_['readonly']) { ?><input type="checkbox" /><?php } ?> diff --git a/apps/files_encryption/appinfo/app.php b/apps/files_encryption/appinfo/app.php index bb130a366be..3f76e910a52 100644 --- a/apps/files_encryption/appinfo/app.php +++ b/apps/files_encryption/appinfo/app.php @@ -6,9 +6,9 @@ OC::$CLASSPATH['OC_FileProxy_Encryption'] = 'apps/files_encryption/lib/proxy.php OC_FileProxy::register(new OC_FileProxy_Encryption()); -OCP\Util::connectHook('OC_User','post_login','OC_Crypt','loginListener'); +OCP\Util::connectHook('OC_User', 'post_login', 'OC_Crypt', 'loginListener'); -stream_wrapper_register('crypt','OC_CryptStream'); +stream_wrapper_register('crypt', 'OC_CryptStream'); if(!isset($_SESSION['enckey']) and OCP\User::isLoggedIn()) {//force the user to re-loggin if the encryption key isn't unlocked (happens when a user is logged in before the encryption app is enabled) OCP\User::logout(); diff --git a/apps/files_encryption/lib/crypt.php b/apps/files_encryption/lib/crypt.php index 8b566e0aa09..9f2d6852a2c 100644 --- a/apps/files_encryption/lib/crypt.php +++ b/apps/files_encryption/lib/crypt.php @@ -43,7 +43,7 @@ class OC_Crypt { self::init($params['uid'], $params['password']); } - public static function init($login,$password) { + public static function init($login, $password) { $view=new \OC\Files\View('/'); if(!$view->file_exists('/'.$login)) { $view->mkdir('/'.$login); diff --git a/apps/files_encryption/lib/cryptstream.php b/apps/files_encryption/lib/cryptstream.php index 340caee3fb6..ff81bd20fc2 100644 --- a/apps/files_encryption/lib/cryptstream.php +++ b/apps/files_encryption/lib/cryptstream.php @@ -23,7 +23,7 @@ /** * transparently encrypted filestream * - * you can use it as wrapper around an existing stream by setting OC_CryptStream::$sourceStreams['foo']=array('path'=>$path,'stream'=>$stream) + * you can use it as wrapper around an existing stream by setting OC_CryptStream::$sourceStreams['foo']=array('path'=>$path, 'stream'=>$stream) * and then fopen('crypt://streams/foo'); */ @@ -106,7 +106,7 @@ class OC_CryptStream{ if($currentPos%8192!=0) { //make sure we always start on a block start fseek($this->source, -($currentPos%8192), SEEK_CUR); - $encryptedBlock=fread($this->source,8192); + $encryptedBlock=fread($this->source, 8192); fseek($this->source, -($currentPos%8192), SEEK_CUR); $block=OC_Crypt::decrypt($encryptedBlock); $data=substr($block, 0, $currentPos%8192).$data; @@ -123,11 +123,11 @@ class OC_CryptStream{ $data=substr($data, 8192); } } - $this->size=max($this->size,$currentPos+$length); + $this->size=max($this->size, $currentPos+$length); return $length; } - public function stream_set_option($option,$arg1,$arg2) { + public function stream_set_option($option, $arg1, $arg2) { switch($option) { case STREAM_OPTION_BLOCKING: stream_set_blocking($this->source, $arg1); diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php index 49fb30ac291..8300c8ab7e9 100644 --- a/apps/files_encryption/lib/proxy.php +++ b/apps/files_encryption/lib/proxy.php @@ -59,7 +59,7 @@ class OC_FileProxy_Encryption extends OC_FileProxy{ * @return bool */ private static function isEncrypted($path) { - $metadata=\OC\Files\Filesystem::getFileInfo($path,''); + $metadata=\OC\Files\Filesystem::getFileInfo($path, ''); return isset($metadata['encrypted']) and (bool)$metadata['encrypted']; } @@ -68,15 +68,15 @@ class OC_FileProxy_Encryption extends OC_FileProxy{ if (!is_resource($data)) {//stream put contents should have been converter to fopen $size=strlen($data); $data=OC_Crypt::blockEncrypt($data); - \OC\Files\Filesystem::putFileInfo($path, array('encrypted'=>true,'size'=>$size),''); + \OC\Files\Filesystem::putFileInfo($path, array('encrypted'=>true, 'size'=>$size), ''); } } } public function postFile_get_contents($path,$data) { if(self::isEncrypted($path)) { - $cached=\OC\Files\Filesystem::getFileInfo($path,''); - $data=OC_Crypt::blockDecrypt($data,'',$cached['size']); + $cached=\OC\Files\Filesystem::getFileInfo($path, ''); + $data=OC_Crypt::blockDecrypt($data, '', $cached['size']); } return $data; } @@ -90,13 +90,13 @@ class OC_FileProxy_Encryption extends OC_FileProxy{ fclose($result); $result=fopen('crypt://'.$path,$meta['mode']); }elseif(self::shouldEncrypt($path) and $meta['mode']!='r' and $meta['mode']!='rb') { - if(\OC\Files\Filesystem::file_exists($path) and \OC\Files\Filesystem::filesize($path)>0) { + if(OC_Filesystem::file_exists($path) and OC_Filesystem::filesize($path)>0) { //first encrypt the target file so we don't end up with a half encrypted file - OCP\Util::writeLog('files_encryption','Decrypting '.$path.' before writing',OCP\Util::DEBUG); + OCP\Util::writeLog('files_encryption', 'Decrypting ' . $path . ' before writing', OCP\Util::DEBUG); $tmp=fopen('php://temp', 'w+'); OCP\Files::streamCopy($result,$tmp); fclose($result); - \OC\Files\Filesystem::file_put_contents($path,$tmp); + \OC\Files\Filesystem::file_put_contents($path, $tmp); fclose($tmp); } $result=fopen('crypt://'.$path,$meta['mode']); @@ -113,7 +113,7 @@ class OC_FileProxy_Encryption extends OC_FileProxy{ public function postStat($path,$data) { if(self::isEncrypted($path)) { - $cached=\OC\Files\Filesystem::getFileInfo($path,''); + $cached=\OC\Files\Filesystem::getFileInfo($path, ''); $data['size']=$cached['size']; } return $data; @@ -121,7 +121,7 @@ class OC_FileProxy_Encryption extends OC_FileProxy{ public function postFileSize($path,$size) { if(self::isEncrypted($path)) { - $cached=\OC\Files\Filesystem::getFileInfo($path,''); + $cached=\OC\Files\Filesystem::getFileInfo($path, ''); return $cached['size']; }else{ return $size; diff --git a/apps/files_encryption/settings.php b/apps/files_encryption/settings.php index 168124a8d22..ae28b088cd6 100644 --- a/apps/files_encryption/settings.php +++ b/apps/files_encryption/settings.php @@ -8,11 +8,11 @@ $tmpl = new OCP\Template( 'files_encryption', 'settings'); $blackList=explode(',', OCP\Config::getAppValue('files_encryption', 'type_blacklist', 'jpg,png,jpeg,avi,mpg,mpeg,mkv,mp3,oga,ogv,ogg')); -$enabled=(OCP\Config::getAppValue('files_encryption','enable_encryption','true')=='true'); -$tmpl->assign('blacklist',$blackList); -$tmpl->assign('encryption_enabled',$enabled); +$enabled=(OCP\Config::getAppValue('files_encryption', 'enable_encryption', 'true')=='true'); +$tmpl->assign('blacklist', $blackList); +$tmpl->assign('encryption_enabled', $enabled); -OCP\Util::addscript('files_encryption','settings'); -OCP\Util::addscript('core','multiselect'); +OCP\Util::addscript('files_encryption', 'settings'); +OCP\Util::addscript('core', 'multiselect'); return $tmpl->fetchPage(); diff --git a/apps/files_encryption/tests/encryption.php b/apps/files_encryption/tests/encryption.php index a7bc2df0e12..0e119f55bea 100644 --- a/apps/files_encryption/tests/encryption.php +++ b/apps/files_encryption/tests/encryption.php @@ -11,46 +11,46 @@ class Test_Encryption extends UnitTestCase { $key=uniqid(); $file=OC::$SERVERROOT.'/3rdparty/MDB2.php'; $source=file_get_contents($file); //nice large text file - $encrypted=OC_Crypt::encrypt($source,$key); - $decrypted=OC_Crypt::decrypt($encrypted,$key); + $encrypted=OC_Crypt::encrypt($source, $key); + $decrypted=OC_Crypt::decrypt($encrypted, $key); $decrypted=rtrim($decrypted, "\0"); - $this->assertNotEqual($encrypted,$source); - $this->assertEqual($decrypted,$source); + $this->assertNotEqual($encrypted, $source); + $this->assertEqual($decrypted, $source); - $chunk=substr($source,0,8192); - $encrypted=OC_Crypt::encrypt($chunk,$key); + $chunk=substr($source, 0, 8192); + $encrypted=OC_Crypt::encrypt($chunk, $key); $this->assertEqual(strlen($chunk), strlen($encrypted)); - $decrypted=OC_Crypt::decrypt($encrypted,$key); + $decrypted=OC_Crypt::decrypt($encrypted, $key); $decrypted=rtrim($decrypted, "\0"); - $this->assertEqual($decrypted,$chunk); + $this->assertEqual($decrypted, $chunk); - $encrypted=OC_Crypt::blockEncrypt($source,$key); - $decrypted=OC_Crypt::blockDecrypt($encrypted,$key); - $this->assertNotEqual($encrypted,$source); - $this->assertEqual($decrypted,$source); + $encrypted=OC_Crypt::blockEncrypt($source, $key); + $decrypted=OC_Crypt::blockDecrypt($encrypted, $key); + $this->assertNotEqual($encrypted, $source); + $this->assertEqual($decrypted, $source); $tmpFileEncrypted=OCP\Files::tmpFile(); - OC_Crypt::encryptfile($file,$tmpFileEncrypted,$key); + OC_Crypt::encryptfile($file, $tmpFileEncrypted, $key); $encrypted=file_get_contents($tmpFileEncrypted); - $decrypted=OC_Crypt::blockDecrypt($encrypted,$key); - $this->assertNotEqual($encrypted,$source); - $this->assertEqual($decrypted,$source); + $decrypted=OC_Crypt::blockDecrypt($encrypted, $key); + $this->assertNotEqual($encrypted, $source); + $this->assertEqual($decrypted, $source); $tmpFileDecrypted=OCP\Files::tmpFile(); - OC_Crypt::decryptfile($tmpFileEncrypted,$tmpFileDecrypted,$key); + OC_Crypt::decryptfile($tmpFileEncrypted, $tmpFileDecrypted, $key); $decrypted=file_get_contents($tmpFileDecrypted); - $this->assertEqual($decrypted,$source); + $this->assertEqual($decrypted, $source); $file=OC::$SERVERROOT.'/core/img/weather-clear.png'; $source=file_get_contents($file); //binary file - $encrypted=OC_Crypt::encrypt($source,$key); - $decrypted=OC_Crypt::decrypt($encrypted,$key); + $encrypted=OC_Crypt::encrypt($source, $key); + $decrypted=OC_Crypt::decrypt($encrypted, $key); $decrypted=rtrim($decrypted, "\0"); - $this->assertEqual($decrypted,$source); + $this->assertEqual($decrypted, $source); - $encrypted=OC_Crypt::blockEncrypt($source,$key); - $decrypted=OC_Crypt::blockDecrypt($encrypted,$key); - $this->assertEqual($decrypted,$source); + $encrypted=OC_Crypt::blockEncrypt($source, $key); + $decrypted=OC_Crypt::blockDecrypt($encrypted, $key); + $this->assertEqual($decrypted, $source); } @@ -59,14 +59,14 @@ class Test_Encryption extends UnitTestCase { $file=__DIR__.'/binary'; $source=file_get_contents($file); //binary file - $encrypted=OC_Crypt::encrypt($source,$key); - $decrypted=OC_Crypt::decrypt($encrypted,$key); + $encrypted=OC_Crypt::encrypt($source, $key); + $decrypted=OC_Crypt::decrypt($encrypted, $key); $decrypted=rtrim($decrypted, "\0"); - $this->assertEqual($decrypted,$source); + $this->assertEqual($decrypted, $source); - $encrypted=OC_Crypt::blockEncrypt($source,$key); - $decrypted=OC_Crypt::blockDecrypt($encrypted,$key, strlen($source)); - $this->assertEqual($decrypted,$source); + $encrypted=OC_Crypt::blockEncrypt($source, $key); + $decrypted=OC_Crypt::blockDecrypt($encrypted, $key, strlen($source)); + $this->assertEqual($decrypted, $source); } } diff --git a/apps/files_encryption/tests/stream.php b/apps/files_encryption/tests/stream.php index 5ea0da48017..67b5e98ae67 100644 --- a/apps/files_encryption/tests/stream.php +++ b/apps/files_encryption/tests/stream.php @@ -10,27 +10,27 @@ class Test_CryptStream extends UnitTestCase { private $tmpFiles=array(); function testStream() { - $stream=$this->getStream('test1','w', strlen('foobar')); - fwrite($stream,'foobar'); + $stream=$this->getStream('test1', 'w', strlen('foobar')); + fwrite($stream, 'foobar'); fclose($stream); - $stream=$this->getStream('test1','r', strlen('foobar')); - $data=fread($stream,6); + $stream=$this->getStream('test1', 'r', strlen('foobar')); + $data=fread($stream, 6); fclose($stream); - $this->assertEqual('foobar',$data); + $this->assertEqual('foobar', $data); $file=OC::$SERVERROOT.'/3rdparty/MDB2.php'; - $source=fopen($file,'r'); - $target=$this->getStream('test2','w',0); - OCP\Files::streamCopy($source,$target); + $source=fopen($file, 'r'); + $target=$this->getStream('test2', 'w', 0); + OCP\Files::streamCopy($source, $target); fclose($target); fclose($source); - $stream=$this->getStream('test2','r', filesize($file)); + $stream=$this->getStream('test2', 'r', filesize($file)); $data=stream_get_contents($stream); $original=file_get_contents($file); $this->assertEqual(strlen($original), strlen($data)); - $this->assertEqual($original,$data); + $this->assertEqual($original, $data); } /** @@ -40,7 +40,7 @@ class Test_CryptStream extends UnitTestCase { * @param int size * @return resource */ - function getStream($id,$mode,$size) { + function getStream($id, $mode, $size) { if($id==='') { $id=uniqid(); } @@ -50,36 +50,36 @@ class Test_CryptStream extends UnitTestCase { }else{ $file=$this->tmpFiles[$id]; } - $stream=fopen($file,$mode); - OC_CryptStream::$sourceStreams[$id]=array('path'=>'dummy'.$id,'stream'=>$stream,'size'=>$size); - return fopen('crypt://streams/'.$id,$mode); + $stream=fopen($file, $mode); + OC_CryptStream::$sourceStreams[$id]=array('path'=>'dummy'.$id, 'stream'=>$stream, 'size'=>$size); + return fopen('crypt://streams/'.$id, $mode); } function testBinary() { $file=__DIR__.'/binary'; $source=file_get_contents($file); - $stream=$this->getStream('test','w', strlen($source)); - fwrite($stream,$source); + $stream=$this->getStream('test', 'w', strlen($source)); + fwrite($stream, $source); fclose($stream); - $stream=$this->getStream('test','r', strlen($source)); + $stream=$this->getStream('test', 'r', strlen($source)); $data=stream_get_contents($stream); fclose($stream); $this->assertEqual(strlen($data), strlen($source)); - $this->assertEqual($source,$data); + $this->assertEqual($source, $data); $file=__DIR__.'/zeros'; $source=file_get_contents($file); - $stream=$this->getStream('test2','w', strlen($source)); - fwrite($stream,$source); + $stream=$this->getStream('test2', 'w', strlen($source)); + fwrite($stream, $source); fclose($stream); - $stream=$this->getStream('test2','r', strlen($source)); + $stream=$this->getStream('test2', 'r', strlen($source)); $data=stream_get_contents($stream); fclose($stream); $this->assertEqual(strlen($data), strlen($source)); - $this->assertEqual($source,$data); + $this->assertEqual($source, $data); } } diff --git a/apps/files_external/l10n/cs_CZ.php b/apps/files_external/l10n/cs_CZ.php index 51951c19bfd..8006be1a2f5 100644 --- a/apps/files_external/l10n/cs_CZ.php +++ b/apps/files_external/l10n/cs_CZ.php @@ -10,7 +10,7 @@ "Backend" => "Podpůrná vrstva", "Configuration" => "Nastavení", "Options" => "Možnosti", -"Applicable" => "Platný", +"Applicable" => "Přístupný pro", "Add mount point" => "Přidat bod připojení", "None set" => "Nenastaveno", "All Users" => "Všichni uživatelé", diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php index 14370d5f1fe..6c6c23b55c1 100755 --- a/apps/files_external/lib/config.php +++ b/apps/files_external/lib/config.php @@ -256,7 +256,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'".$mountPoint."' => ".str_replace("\n", '', var_export($mount, true)).",\n"; + $content .= "\t\t\t'".$mountPoint."' => ".str_replace("\n", '', var_export($mount, true)).", \n"; } $content .= "\t\t),\n"; diff --git a/apps/files_external/lib/google.php b/apps/files_external/lib/google.php index 3c88a70bc10..12f3e975071 100644 --- a/apps/files_external/lib/google.php +++ b/apps/files_external/lib/google.php @@ -399,8 +399,8 @@ class Google extends \OC\Files\Storage\Common { case 'x+': case 'c': case 'c+': - if (strrpos($path,'.') !== false) { - $ext = substr($path, strrpos($path,'.')); + if (strrpos($path, '.') !== false) { + $ext = substr($path, strrpos($path, '.')); } else { $ext = ''; } diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php index f40bb95b659..eeb12aa5749 100644 --- a/apps/files_sharing/lib/sharedstorage.php +++ b/apps/files_sharing/lib/sharedstorage.php @@ -422,7 +422,7 @@ class Shared extends \OC\Files\Storage\Common { * @param int $time * @return bool */ - public function hasUpdated($path,$time) { + public function hasUpdated($path, $time) { //TODO return false; } diff --git a/apps/files_versions/appinfo/app.php b/apps/files_versions/appinfo/app.php index 746f89a8139..599d302e6e4 100644 --- a/apps/files_versions/appinfo/app.php +++ b/apps/files_versions/appinfo/app.php @@ -5,7 +5,7 @@ OC::$CLASSPATH['OCA_Versions\Storage'] = 'apps/files_versions/lib/versions.php'; OC::$CLASSPATH['OCA_Versions\Hooks'] = 'apps/files_versions/lib/hooks.php'; OCP\App::registerAdmin('files_versions', 'settings'); -OCP\App::registerPersonal('files_versions','settings-personal'); +OCP\App::registerPersonal('files_versions', 'settings-personal'); OCP\Util::addscript('files_versions', 'versions'); diff --git a/apps/files_versions/history.php b/apps/files_versions/history.php index 0ebb34f45e4..deff735cedc 100644 --- a/apps/files_versions/history.php +++ b/apps/files_versions/history.php @@ -22,7 +22,7 @@ */ OCP\User::checkLoggedIn( ); -OCP\Util::addStyle('files_versions','versions'); +OCP\Util::addStyle('files_versions', 'versions'); $tmpl = new OCP\Template( 'files_versions', 'history', 'user' ); if ( isset( $_GET['path'] ) ) { diff --git a/apps/files_versions/lib/hooks.php b/apps/files_versions/lib/hooks.php index bc3a7fda9f7..4c07ed9bb71 100644 --- a/apps/files_versions/lib/hooks.php +++ b/apps/files_versions/lib/hooks.php @@ -64,7 +64,7 @@ class Hooks { $abs_newpath = \OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath('').$params['newpath'].'.v'; if(Storage::isversioned($rel_oldpath)) { $info=pathinfo($abs_newpath); - if(!file_exists($info['dirname'])) mkdir($info['dirname'],0750, true); + if(!file_exists($info['dirname'])) mkdir($info['dirname'], 0750, true); $versions = Storage::getVersions($rel_oldpath); foreach ($versions as $v) { rename($abs_oldpath.$v['version'], $abs_newpath.$v['version']); diff --git a/apps/files_versions/settings-personal.php b/apps/files_versions/settings-personal.php index 4fb866bd999..6555bc99c3e 100644 --- a/apps/files_versions/settings-personal.php +++ b/apps/files_versions/settings-personal.php @@ -2,6 +2,6 @@ $tmpl = new OCP\Template( 'files_versions', 'settings-personal'); -OCP\Util::addscript('files_versions','settings-personal'); +OCP\Util::addscript('files_versions', 'settings-personal'); return $tmpl->fetchPage(); diff --git a/apps/user_ldap/group_ldap.php b/apps/user_ldap/group_ldap.php index 6c6cc5679ba..63437310088 100644 --- a/apps/user_ldap/group_ldap.php +++ b/apps/user_ldap/group_ldap.php @@ -124,7 +124,7 @@ class GROUP_LDAP extends lib\Access implements \OCP\GroupInterface { $this->connection->ldapGroupFilter, $this->connection->ldapGroupMemberAssocAttr.'='.$uid )); - $groups = $this->fetchListOfGroups($filter, array($this->connection->ldapGroupDisplayName,'dn')); + $groups = $this->fetchListOfGroups($filter, array($this->connection->ldapGroupDisplayName, 'dn')); $groups = array_unique($this->ownCloudGroupNames($groups), SORT_LOCALE_STRING); $this->connection->writeToCache($cacheKey, $groups); diff --git a/apps/user_ldap/lib/connection.php b/apps/user_ldap/lib/connection.php index a570b29b793..ef92bbad40a 100644 --- a/apps/user_ldap/lib/connection.php +++ b/apps/user_ldap/lib/connection.php @@ -180,22 +180,22 @@ class Connection { * Caches the general LDAP configuration. */ private function readConfiguration($force = false) { - \OCP\Util::writeLog('user_ldap','Checking conf state: isConfigured? '.print_r($this->configured, true).' isForce? '.print_r($force, true).' configID? '.print_r($this->configID, true), \OCP\Util::DEBUG); + \OCP\Util::writeLog('user_ldap', 'Checking conf state: isConfigured? '.print_r($this->configured, true).' isForce? '.print_r($force, true).' configID? '.print_r($this->configID, true), \OCP\Util::DEBUG); if((!$this->configured || $force) && !is_null($this->configID)) { - \OCP\Util::writeLog('user_ldap','Reading the configuration', \OCP\Util::DEBUG); + \OCP\Util::writeLog('user_ldap', 'Reading the configuration', \OCP\Util::DEBUG); $this->config['ldapHost'] = \OCP\Config::getAppValue($this->configID, 'ldap_host', ''); $this->config['ldapPort'] = \OCP\Config::getAppValue($this->configID, 'ldap_port', 389); - $this->config['ldapAgentName'] = \OCP\Config::getAppValue($this->configID, 'ldap_dn',''); - $this->config['ldapAgentPassword'] = base64_decode(\OCP\Config::getAppValue($this->configID, 'ldap_agent_password','')); + $this->config['ldapAgentName'] = \OCP\Config::getAppValue($this->configID, 'ldap_dn', ''); + $this->config['ldapAgentPassword'] = base64_decode(\OCP\Config::getAppValue($this->configID, 'ldap_agent_password', '')); $this->config['ldapBase'] = \OCP\Config::getAppValue($this->configID, 'ldap_base', ''); - $this->config['ldapBaseUsers'] = \OCP\Config::getAppValue($this->configID, 'ldap_base_users',$this->config['ldapBase']); + $this->config['ldapBaseUsers'] = \OCP\Config::getAppValue($this->configID, 'ldap_base_users', $this->config['ldapBase']); $this->config['ldapBaseGroups'] = \OCP\Config::getAppValue($this->configID, 'ldap_base_groups', $this->config['ldapBase']); - $this->config['ldapTLS'] = \OCP\Config::getAppValue($this->configID, 'ldap_tls',0); + $this->config['ldapTLS'] = \OCP\Config::getAppValue($this->configID, 'ldap_tls', 0); $this->config['ldapNoCase'] = \OCP\Config::getAppValue($this->configID, 'ldap_nocase', 0); $this->config['turnOffCertCheck'] = \OCP\Config::getAppValue($this->configID, 'ldap_turn_off_cert_check', 0); $this->config['ldapUserDisplayName'] = mb_strtolower(\OCP\Config::getAppValue($this->configID, 'ldap_display_name', 'uid'), 'UTF-8'); - $this->config['ldapUserFilter'] = \OCP\Config::getAppValue($this->configID, 'ldap_userlist_filter','objectClass=person'); - $this->config['ldapGroupFilter'] = \OCP\Config::getAppValue($this->configID, 'ldap_group_filter','(objectClass=posixGroup)'); + $this->config['ldapUserFilter'] = \OCP\Config::getAppValue($this->configID, 'ldap_userlist_filter', 'objectClass=person'); + $this->config['ldapGroupFilter'] = \OCP\Config::getAppValue($this->configID, 'ldap_group_filter', '(objectClass=posixGroup)'); $this->config['ldapLoginFilter'] = \OCP\Config::getAppValue($this->configID, 'ldap_login_filter', '(uid=%uid)'); $this->config['ldapGroupDisplayName'] = mb_strtolower(\OCP\Config::getAppValue($this->configID, 'ldap_group_display_name', 'uid'), 'UTF-8'); $this->config['ldapQuotaAttribute'] = \OCP\Config::getAppValue($this->configID, 'ldap_quota_attr', ''); @@ -263,7 +263,7 @@ class Connection { if(empty($this->config['ldapGroupFilter']) && empty($this->config['ldapGroupMemberAssocAttr'])) { \OCP\Util::writeLog('user_ldap', 'No group filter is specified, LDAP group feature will not be used.', \OCP\Util::INFO); } - if(!in_array($this->config['ldapUuidAttribute'], array('auto','entryuuid', 'nsuniqueid', 'objectguid')) && (!is_null($this->configID))) { + if(!in_array($this->config['ldapUuidAttribute'], array('auto', 'entryuuid', 'nsuniqueid', 'objectguid')) && (!is_null($this->configID))) { \OCP\Config::setAppValue($this->configID, 'ldap_uuid_attribute', 'auto'); \OCP\Util::writeLog('user_ldap', 'Illegal value for the UUID Attribute, reset to autodetect.', \OCP\Util::INFO); } diff --git a/apps/user_ldap/settings.php b/apps/user_ldap/settings.php index f765151456a..2ee936d29a8 100644 --- a/apps/user_ldap/settings.php +++ b/apps/user_ldap/settings.php @@ -26,16 +26,12 @@ OCP\Util::addscript('user_ldap', 'settings'); OCP\Util::addstyle('user_ldap', 'settings'); if ($_POST) { + $clearCache = false; foreach($params as $param) { if(isset($_POST[$param])) { + $clearCache = true; if('ldap_agent_password' == $param) { OCP\Config::setAppValue('user_ldap', $param, base64_encode($_POST[$param])); - } elseif('ldap_cache_ttl' == $param) { - if(OCP\Config::getAppValue('user_ldap', $param,'') != $_POST[$param]) { - $ldap = new \OCA\user_ldap\lib\Connection('user_ldap'); - $ldap->clearCache(); - OCP\Config::setAppValue('user_ldap', $param, $_POST[$param]); - } } elseif('home_folder_naming_rule' == $param) { $value = empty($_POST[$param]) ? 'opt:username' : 'attr:'.$_POST[$param]; OCP\Config::setAppValue('user_ldap', $param, $value); @@ -54,12 +50,16 @@ if ($_POST) { OCP\Config::setAppValue('user_ldap', $param, 0); } } + if($clearCache) { + $ldap = new \OCA\user_ldap\lib\Connection('user_ldap'); + $ldap->clearCache(); + } } // fill template $tmpl = new OCP\Template( 'user_ldap', 'settings'); foreach($params as $param) { - $value = OCP\Config::getAppValue('user_ldap', $param,''); + $value = OCP\Config::getAppValue('user_ldap', $param, ''); $tmpl->assign($param, $value); } diff --git a/apps/user_ldap/tests/group_ldap.php b/apps/user_ldap/tests/group_ldap.php index 2acb8c35a19..f99902d32f5 100644 --- a/apps/user_ldap/tests/group_ldap.php +++ b/apps/user_ldap/tests/group_ldap.php @@ -32,8 +32,8 @@ class Test_Group_Ldap extends UnitTestCase { $this->assertIsA(OC_Group::getGroups(), gettype(array())); $this->assertIsA($group_ldap->getGroups(), gettype(array())); - $this->assertFalse(OC_Group::inGroup('john','dosers'), gettype(false)); - $this->assertFalse($group_ldap->inGroup('john','dosers'), gettype(false)); + $this->assertFalse(OC_Group::inGroup('john', 'dosers'), gettype(false)); + $this->assertFalse($group_ldap->inGroup('john', 'dosers'), gettype(false)); //TODO: check also for expected true result. This backend won't be able to do any modifications, maybe use a dummy for this. $this->assertIsA(OC_Group::getUserGroups('john doe'), gettype(array())); diff --git a/apps/user_webdavauth/appinfo/app.php b/apps/user_webdavauth/appinfo/app.php index 3ab323becce..c4c131b7ef0 100755 --- a/apps/user_webdavauth/appinfo/app.php +++ b/apps/user_webdavauth/appinfo/app.php @@ -23,7 +23,7 @@ require_once 'apps/user_webdavauth/user_webdavauth.php'; -OC_APP::registerAdmin('user_webdavauth','settings'); +OC_APP::registerAdmin('user_webdavauth', 'settings'); OC_User::registerBackend("WEBDAVAUTH"); OC_User::useBackend( "WEBDAVAUTH" ); diff --git a/apps/user_webdavauth/settings.php b/apps/user_webdavauth/settings.php index 4f1ddbbefda..497a3385caa 100755 --- a/apps/user_webdavauth/settings.php +++ b/apps/user_webdavauth/settings.php @@ -21,7 +21,6 @@ * */ -print_r($_POST); if($_POST) { if(isset($_POST['webdav_url'])) { diff --git a/apps/user_webdavauth/user_webdavauth.php b/apps/user_webdavauth/user_webdavauth.php index bd9f45d357b..5a16a4c992a 100755 --- a/apps/user_webdavauth/user_webdavauth.php +++ b/apps/user_webdavauth/user_webdavauth.php @@ -30,19 +30,19 @@ class OC_USER_WEBDAVAUTH extends OC_User_Backend { public function createUser() { // Can't create user - OC_Log::write('OC_USER_WEBDAVAUTH', 'Not possible to create users from web frontend using WebDAV user backend',3); + OC_Log::write('OC_USER_WEBDAVAUTH', 'Not possible to create users from web frontend using WebDAV user backend', 3); return false; } public function deleteUser() { // Can't delete user - OC_Log::write('OC_USER_WEBDAVAUTH', 'Not possible to delete users from web frontend using WebDAV user backend',3); + OC_Log::write('OC_USER_WEBDAVAUTH', 'Not possible to delete users from web frontend using WebDAV user backend', 3); return false; } public function setPassword ( $uid, $password ) { // We can't change user password - OC_Log::write('OC_USER_WEBDAVAUTH', 'Not possible to change password for users from web frontend using WebDAV user backend',3); + OC_Log::write('OC_USER_WEBDAVAUTH', 'Not possible to change password for users from web frontend using WebDAV user backend', 3); return false; } |