Skip to content

Commit

Permalink
Merge master into oc_preview
Browse files Browse the repository at this point in the history
  • Loading branch information
georgehrke committed Aug 14, 2013
2 parents e5761d9 + 994537a commit 4b5fb08
Show file tree
Hide file tree
Showing 1,362 changed files with 12,807 additions and 4,592 deletions.
2 changes: 1 addition & 1 deletion apps/files/ajax/download.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

$files_list = json_decode($files);
// in case we get only a single file
if ($files_list === NULL ) {
if (!is_array($files_list)) {
$files_list = array($files);
}

Expand Down
27 changes: 16 additions & 11 deletions apps/files/ajax/newfile.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ function progress($notification_code, $severity, $message, $message_code, $bytes
}
}

$target = $dir.'/'.$filename;

if($source) {
if(substr($source, 0, 8)!='https://' and substr($source, 0, 7)!='http://') {
OCP\JSON::error(array("data" => array( "message" => "Not a valid source" )));
Expand All @@ -62,7 +64,6 @@ function progress($notification_code, $severity, $message, $message_code, $bytes

$ctx = stream_context_create(null, array('notification' =>'progress'));
$sourceStream=fopen($source, 'rb', false, $ctx);
$target=$dir.'/'.$filename;
$result=\OC\Files\Filesystem::file_put_contents($target, $sourceStream);
if($result) {
$meta = \OC\Files\Filesystem::getFileInfo($target);
Expand All @@ -75,20 +76,24 @@ function progress($notification_code, $severity, $message, $message_code, $bytes
$eventSource->close();
exit();
} else {
$success = false;
if($content) {
if(\OC\Files\Filesystem::file_put_contents($dir.'/'.$filename, $content)) {
$meta = \OC\Files\Filesystem::getFileInfo($dir.'/'.$filename);
$id = $meta['fileid'];
OCP\JSON::success(array("data" => array('content'=>$content, 'id' => $id)));
exit();
}
}elseif(\OC\Files\Filesystem::touch($dir . '/' . $filename)) {
$meta = \OC\Files\Filesystem::getFileInfo($dir.'/'.$filename);
$success = \OC\Files\Filesystem::file_put_contents($target, $content);
} else {
$success = \OC\Files\Filesystem::touch($target);
}

if($success) {
$meta = \OC\Files\Filesystem::getFileInfo($target);
$id = $meta['fileid'];
OCP\JSON::success(array("data" => array('content'=>$content, 'id' => $id, 'mime' => $meta['mimetype'])));
$mime = $meta['mimetype'];
OCP\JSON::success(array('data' => array(
'id' => $id,
'mime' => $mime,
'content' => $content,
)));
exit();
}
}


OCP\JSON::error(array("data" => array( "message" => "Error when creating the file" )));
5 changes: 3 additions & 2 deletions apps/files/js/filelist.js
Original file line number Diff line number Diff line change
Expand Up @@ -453,13 +453,14 @@ $(document).ready(function(){
var currentUploads = parseInt(uploadtext.attr('currentUploads'));
currentUploads += 1;
uploadtext.attr('currentUploads', currentUploads);
var translatedText = n('files', 'Uploading %n file', 'Uploading %n files', currentUploads);
if(currentUploads === 1) {
var img = OC.imagePath('core', 'loading.gif');
data.context.find('td.filename').attr('style','background-image:url('+img+')');
uploadtext.text(t('files', '1 file uploading'));
uploadtext.text(translatedText);
uploadtext.show();
} else {
uploadtext.text(currentUploads + ' ' + t('files', 'files uploading'));
uploadtext.text(translatedText);
}
} else {
// add as stand-alone row to filelist
Expand Down
12 changes: 2 additions & 10 deletions apps/files/js/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -762,21 +762,13 @@ function procesSelection(){
$('#headerSize').text(humanFileSize(totalSize));
var selection='';
if(selectedFolders.length>0){
if(selectedFolders.length==1){
selection+=t('files','1 folder');
}else{
selection+=t('files','{count} folders',{count: selectedFolders.length});
}
selection += n('files', '%n folder', '%n folders', selectedFolders.length);
if(selectedFiles.length>0){
selection+=' & ';
}
}
if(selectedFiles.length>0){
if(selectedFiles.length==1){
selection+=t('files','1 file');
}else{
selection+=t('files','{count} files',{count: selectedFiles.length});
}
selection += n('files', '%n file', '%n files', selectedFiles.length);
}
$('#headerName>span.name').text(selection);
$('#modified').text('');
Expand Down
4 changes: 3 additions & 1 deletion apps/files/l10n/ar.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php $TRANSLATIONS = array(
<?php
$TRANSLATIONS = array(
"Could not move %s - File with this name already exists" => "فشل في نقل الملف %s - يوجد ملف بنفس هذا الاسم",
"Could not move %s" => "فشل في نقل %s",
"No file was uploaded. Unknown error" => "لم يتم رفع أي ملف , خطأ غير معروف",
Expand Down Expand Up @@ -69,3 +70,4 @@
"Current scanning" => "الفحص الحالي",
"Upgrading filesystem cache..." => "تحديث ذاكرة التخزين المؤقت(الكاش) الخاصة بملفات النظام ..."
);
$PLURAL_FORMS = "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;";
4 changes: 3 additions & 1 deletion apps/files/l10n/bg_BG.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php $TRANSLATIONS = array(
<?php
$TRANSLATIONS = array(
"There is no error, the file uploaded with success" => "Файлът е качен успешно",
"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Файлът който се опитвате да качите надвишава стойностите в MAX_FILE_SIZE в HTML формата.",
"The uploaded file was only partially uploaded" => "Файлът е качен частично",
Expand Down Expand Up @@ -39,3 +40,4 @@
"Files are being scanned, please wait." => "Файловете се претърсват, изчакайте.",
"file" => "файл"
);
$PLURAL_FORMS = "nplurals=2; plural=(n != 1);";
4 changes: 3 additions & 1 deletion apps/files/l10n/bn_BD.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php $TRANSLATIONS = array(
<?php
$TRANSLATIONS = array(
"Could not move %s - File with this name already exists" => "%s কে স্থানান্তর করা সম্ভব হলো না - এই নামের ফাইল বিদ্যমান",
"Could not move %s" => "%s কে স্থানান্তর করা সম্ভব হলো না",
"No file was uploaded. Unknown error" => "কোন ফাইল আপলোড করা হয় নি। সমস্যার কারণটি অজ্ঞাত।",
Expand Down Expand Up @@ -61,3 +62,4 @@
"Files are being scanned, please wait." => "ফাইলগুলো স্ক্যান করা হচ্ছে, দয়া করে অপেক্ষা করুন।",
"Current scanning" => "বর্তমান স্ক্যানিং"
);
$PLURAL_FORMS = "nplurals=2; plural=(n != 1);";
4 changes: 3 additions & 1 deletion apps/files/l10n/ca.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php $TRANSLATIONS = array(
<?php
$TRANSLATIONS = array(
"Could not move %s - File with this name already exists" => "No s'ha pogut moure %s - Ja hi ha un fitxer amb aquest nom",
"Could not move %s" => " No s'ha pogut moure %s",
"Unable to set upload directory." => "No es pot establir la carpeta de pujada.",
Expand Down Expand Up @@ -79,3 +80,4 @@
"files" => "fitxers",
"Upgrading filesystem cache..." => "Actualitzant la memòria de cau del sistema de fitxers..."
);
$PLURAL_FORMS = "nplurals=2; plural=(n != 1);";
4 changes: 3 additions & 1 deletion apps/files/l10n/cs_CZ.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php $TRANSLATIONS = array(
<?php
$TRANSLATIONS = array(
"Could not move %s - File with this name already exists" => "Nelze přesunout %s - již existuje soubor se stejným názvem",
"Could not move %s" => "Nelze přesunout %s",
"Unable to set upload directory." => "Nelze nastavit adresář pro nahrané soubory.",
Expand Down Expand Up @@ -79,3 +80,4 @@
"files" => "soubory",
"Upgrading filesystem cache..." => "Aktualizuji mezipaměť souborového systému..."
);
$PLURAL_FORMS = "nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;";
4 changes: 3 additions & 1 deletion apps/files/l10n/cy_GB.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php $TRANSLATIONS = array(
<?php
$TRANSLATIONS = array(
"Could not move %s - File with this name already exists" => "Methwyd symud %s - Mae ffeil gyda'r enw hwn eisoes yn bodoli",
"Could not move %s" => "Methwyd symud %s",
"No file was uploaded. Unknown error" => "Ni lwythwyd ffeil i fyny. Gwall anhysbys.",
Expand Down Expand Up @@ -71,3 +72,4 @@
"Current scanning" => "Sganio cyfredol",
"Upgrading filesystem cache..." => "Uwchraddio storfa system ffeiliau..."
);
$PLURAL_FORMS = "nplurals=4; plural=(n==1) ? 0 : (n==2) ? 1 : (n != 8 && n != 11) ? 2 : 3;";
4 changes: 3 additions & 1 deletion apps/files/l10n/da.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php $TRANSLATIONS = array(
<?php
$TRANSLATIONS = array(
"Could not move %s - File with this name already exists" => "Kunne ikke flytte %s - der findes allerede en fil med dette navn",
"Could not move %s" => "Kunne ikke flytte %s",
"Unable to set upload directory." => "Ude af stand til at vælge upload mappe.",
Expand Down Expand Up @@ -79,3 +80,4 @@
"files" => "filer",
"Upgrading filesystem cache..." => "Opgraderer filsystems cachen..."
);
$PLURAL_FORMS = "nplurals=2; plural=(n != 1);";
4 changes: 3 additions & 1 deletion apps/files/l10n/de.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php $TRANSLATIONS = array(
<?php
$TRANSLATIONS = array(
"Could not move %s - File with this name already exists" => "Konnte %s nicht verschieben. Eine Datei mit diesem Namen existiert bereits",
"Could not move %s" => "Konnte %s nicht verschieben",
"Unable to set upload directory." => "Das Upload-Verzeichnis konnte nicht gesetzt werden.",
Expand Down Expand Up @@ -79,3 +80,4 @@
"files" => "Dateien",
"Upgrading filesystem cache..." => "Dateisystem-Cache wird aktualisiert ..."
);
$PLURAL_FORMS = "nplurals=2; plural=(n != 1);";
4 changes: 3 additions & 1 deletion apps/files/l10n/de_DE.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php $TRANSLATIONS = array(
<?php
$TRANSLATIONS = array(
"Could not move %s - File with this name already exists" => "%s konnte nicht verschoben werden. Eine Datei mit diesem Namen existiert bereits.",
"Could not move %s" => "Konnte %s nicht verschieben",
"Unable to set upload directory." => "Das Upload-Verzeichnis konnte nicht gesetzt werden.",
Expand Down Expand Up @@ -79,3 +80,4 @@
"files" => "Dateien",
"Upgrading filesystem cache..." => "Dateisystem-Cache wird aktualisiert ..."
);
$PLURAL_FORMS = "nplurals=2; plural=(n != 1);";
7 changes: 6 additions & 1 deletion apps/files/l10n/el.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<?php $TRANSLATIONS = array(
<?php
$TRANSLATIONS = array(
"Could not move %s - File with this name already exists" => "Αδυναμία μετακίνησης του %s - υπάρχει ήδη αρχείο με αυτό το όνομα",
"Could not move %s" => "Αδυναμία μετακίνησης του %s",
"Unable to set upload directory." => "Αδυναμία ορισμού καταλόγου αποστολής.",
"Invalid Token" => "Μη έγκυρο Token",
"No file was uploaded. Unknown error" => "Δεν ανέβηκε κάποιο αρχείο. Άγνωστο σφάλμα",
"There is no error, the file uploaded with success" => "Δεν υπάρχει σφάλμα, το αρχείο εστάλει επιτυχώς",
"The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Το αρχείο που εστάλει υπερβαίνει την οδηγία μέγιστου επιτρεπτού μεγέθους \"upload_max_filesize\" του php.ini",
Expand Down Expand Up @@ -47,6 +50,7 @@
"{count} folders" => "{count} φάκελοι",
"1 file" => "1 αρχείο",
"{count} files" => "{count} αρχεία",
"%s could not be renamed" => "Αδυναμία μετονομασίας του %s",
"Upload" => "Μεταφόρτωση",
"File handling" => "Διαχείριση αρχείων",
"Maximum upload size" => "Μέγιστο μέγεθος αποστολής",
Expand Down Expand Up @@ -76,3 +80,4 @@
"files" => "αρχεία",
"Upgrading filesystem cache..." => "Ενημέρωση της μνήμης cache του συστήματος αρχείων..."
);
$PLURAL_FORMS = "nplurals=2; plural=(n != 1);";
4 changes: 3 additions & 1 deletion apps/files/l10n/[email protected]
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<?php $TRANSLATIONS = array(
<?php
$TRANSLATIONS = array(
"Download" => "Download"
);
$PLURAL_FORMS = "nplurals=2; plural=(n != 1);";
4 changes: 3 additions & 1 deletion apps/files/l10n/eo.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php $TRANSLATIONS = array(
<?php
$TRANSLATIONS = array(
"Could not move %s - File with this name already exists" => "Ne eblis movi %s: dosiero kun ĉi tiu nomo jam ekzistas",
"Could not move %s" => "Ne eblis movi %s",
"No file was uploaded. Unknown error" => "Neniu dosiero alŝutiĝis. Nekonata eraro.",
Expand Down Expand Up @@ -74,3 +75,4 @@
"files" => "dosieroj",
"Upgrading filesystem cache..." => "Ĝisdatiĝas dosiersistema kaŝmemoro..."
);
$PLURAL_FORMS = "nplurals=2; plural=(n != 1);";
4 changes: 3 additions & 1 deletion apps/files/l10n/es.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php $TRANSLATIONS = array(
<?php
$TRANSLATIONS = array(
"Could not move %s - File with this name already exists" => "No se pudo mover %s - Un archivo con ese nombre ya existe.",
"Could not move %s" => "No se pudo mover %s",
"Unable to set upload directory." => "Incapaz de crear directorio de subida.",
Expand Down Expand Up @@ -79,3 +80,4 @@
"files" => "archivos",
"Upgrading filesystem cache..." => "Actualizando caché del sistema de archivos"
);
$PLURAL_FORMS = "nplurals=2; plural=(n != 1);";
4 changes: 3 additions & 1 deletion apps/files/l10n/es_AR.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php $TRANSLATIONS = array(
<?php
$TRANSLATIONS = array(
"Could not move %s - File with this name already exists" => "No se pudo mover %s - Un archivo con este nombre ya existe",
"Could not move %s" => "No se pudo mover %s ",
"Unable to set upload directory." => "No fue posible crear el directorio de subida.",
Expand Down Expand Up @@ -79,3 +80,4 @@
"files" => "archivos",
"Upgrading filesystem cache..." => "Actualizando el cache del sistema de archivos"
);
$PLURAL_FORMS = "nplurals=2; plural=(n != 1);";
4 changes: 3 additions & 1 deletion apps/files/l10n/et_EE.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php $TRANSLATIONS = array(
<?php
$TRANSLATIONS = array(
"Could not move %s - File with this name already exists" => "Ei saa liigutada faili %s - samanimeline fail on juba olemas",
"Could not move %s" => "%s liigutamine ebaõnnestus",
"Unable to set upload directory." => "Üleslaadimiste kausta määramine ebaõnnestus.",
Expand Down Expand Up @@ -79,3 +80,4 @@
"files" => "faili",
"Upgrading filesystem cache..." => "Failisüsteemi puhvri uuendamine..."
);
$PLURAL_FORMS = "nplurals=2; plural=(n != 1);";
4 changes: 3 additions & 1 deletion apps/files/l10n/eu.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php $TRANSLATIONS = array(
<?php
$TRANSLATIONS = array(
"Could not move %s - File with this name already exists" => "Ezin da %s mugitu - Izen hau duen fitxategia dagoeneko existitzen da",
"Could not move %s" => "Ezin dira fitxategiak mugitu %s",
"Unable to set upload directory." => "Ezin da igoera direktorioa ezarri.",
Expand Down Expand Up @@ -79,3 +80,4 @@
"files" => "fitxategiak",
"Upgrading filesystem cache..." => "Fitxategi sistemaren katxea eguneratzen..."
);
$PLURAL_FORMS = "nplurals=2; plural=(n != 1);";
4 changes: 3 additions & 1 deletion apps/files/l10n/fa.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php $TRANSLATIONS = array(
<?php
$TRANSLATIONS = array(
"Could not move %s - File with this name already exists" => "%s نمی تواند حرکت کند - در حال حاضر پرونده با این نام وجود دارد. ",
"Could not move %s" => "%s نمی تواند حرکت کند ",
"Unable to set upload directory." => "قادر به تنظیم پوشه آپلود نمی باشد.",
Expand Down Expand Up @@ -79,3 +80,4 @@
"files" => "پرونده ها",
"Upgrading filesystem cache..." => "بهبود فایل سیستمی ذخیره گاه..."
);
$PLURAL_FORMS = "nplurals=1; plural=0;";
4 changes: 3 additions & 1 deletion apps/files/l10n/fi.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<?php $TRANSLATIONS = array(
<?php
$TRANSLATIONS = array(
"Save" => "tallentaa"
);
$PLURAL_FORMS = "nplurals=2; plural=(n != 1);";
4 changes: 3 additions & 1 deletion apps/files/l10n/fi_FI.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php $TRANSLATIONS = array(
<?php
$TRANSLATIONS = array(
"Could not move %s - File with this name already exists" => "Kohteen %s siirto ei onnistunut - Tiedosto samalla nimellä on jo olemassa",
"Could not move %s" => "Kohteen %s siirto ei onnistunut",
"No file was uploaded. Unknown error" => "Tiedostoa ei lähetetty. Tuntematon virhe",
Expand Down Expand Up @@ -71,3 +72,4 @@
"files" => "tiedostoa",
"Upgrading filesystem cache..." => "Päivitetään tiedostojärjestelmän välimuistia..."
);
$PLURAL_FORMS = "nplurals=2; plural=(n != 1);";
4 changes: 3 additions & 1 deletion apps/files/l10n/fr.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php $TRANSLATIONS = array(
<?php
$TRANSLATIONS = array(
"Could not move %s - File with this name already exists" => "Impossible de déplacer %s - Un fichier possédant ce nom existe déjà",
"Could not move %s" => "Impossible de déplacer %s",
"Unable to set upload directory." => "Impossible de définir le dossier pour l'upload, charger.",
Expand Down Expand Up @@ -79,3 +80,4 @@
"files" => "fichiers",
"Upgrading filesystem cache..." => "Mise à niveau du cache du système de fichier"
);
$PLURAL_FORMS = "nplurals=2; plural=(n > 1);";
4 changes: 3 additions & 1 deletion apps/files/l10n/gl.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php $TRANSLATIONS = array(
<?php
$TRANSLATIONS = array(
"Could not move %s - File with this name already exists" => "Non se moveu %s - Xa existe un ficheiro con ese nome.",
"Could not move %s" => "Non foi posíbel mover %s",
"Unable to set upload directory." => "Non é posíbel configurar o directorio de envíos.",
Expand Down Expand Up @@ -79,3 +80,4 @@
"files" => "ficheiros",
"Upgrading filesystem cache..." => "Anovando a caché do sistema de ficheiros..."
);
$PLURAL_FORMS = "nplurals=2; plural=(n != 1);";
4 changes: 3 additions & 1 deletion apps/files/l10n/he.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php $TRANSLATIONS = array(
<?php
$TRANSLATIONS = array(
"Could not move %s - File with this name already exists" => "לא ניתן להעביר את %s - קובץ בשם הזה כבר קיים",
"Could not move %s" => "לא ניתן להעביר את %s",
"No file was uploaded. Unknown error" => "לא הועלה קובץ. טעות בלתי מזוהה.",
Expand Down Expand Up @@ -63,3 +64,4 @@
"file" => "קובץ",
"files" => "קבצים"
);
$PLURAL_FORMS = "nplurals=2; plural=(n != 1);";
4 changes: 3 additions & 1 deletion apps/files/l10n/hi.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php $TRANSLATIONS = array(
<?php
$TRANSLATIONS = array(
"Error" => "त्रुटि",
"Share" => "साझा करें",
"Save" => "सहेजें"
);
$PLURAL_FORMS = "nplurals=2; plural=(n != 1);";
4 changes: 3 additions & 1 deletion apps/files/l10n/hr.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php $TRANSLATIONS = array(
<?php
$TRANSLATIONS = array(
"There is no error, the file uploaded with success" => "Nema pogreške, datoteka je poslana uspješno.",
"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Poslana datoteka prelazi veličinu prikazanu u MAX_FILE_SIZE direktivi u HTML formi",
"The uploaded file was only partially uploaded" => "Poslana datoteka je parcijalno poslana",
Expand Down Expand Up @@ -46,3 +47,4 @@
"file" => "datoteka",
"files" => "datoteke"
);
$PLURAL_FORMS = "nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;";
Loading

0 comments on commit 4b5fb08

Please sign in to comment.