Merge branch 'master' into encryption_improved_error_messages_4617

This commit is contained in:
Bjoern Schiessle 2013-09-30 15:08:53 +02:00
commit 4d79e7e673
197 changed files with 9331 additions and 1755 deletions

View file

@ -26,7 +26,7 @@ $files = array();
if($mimetypes && !in_array('httpd/unix-directory', $mimetypes)) {
foreach( \OC\Files\Filesystem::getDirectoryContent( $dir, 'httpd/unix-directory' ) as $file ) {
$file['directory'] = $dir;
$file['isPreviewAvailable'] = \OCP\Preview::isMimeSupported($file['mimetype']);
$file['isPreviewAvailable'] = \OC::$server->getPreviewManager()->isMimeSupported($file['mimetype']);
$file["date"] = OCP\Util::formatDate($file["mtime"]);
$file['mimetype_icon'] = \OCA\Files\Helper::determineIcon($file);
$files[] = $file;
@ -37,7 +37,7 @@ if (is_array($mimetypes) && count($mimetypes)) {
foreach ($mimetypes as $mimetype) {
foreach( \OC\Files\Filesystem::getDirectoryContent( $dir, $mimetype ) as $file ) {
$file['directory'] = $dir;
$file['isPreviewAvailable'] = \OCP\Preview::isMimeSupported($file['mimetype']);
$file['isPreviewAvailable'] = \OC::$server->getPreviewManager()->isMimeSupported($file['mimetype']);
$file["date"] = OCP\Util::formatDate($file["mtime"]);
$file['mimetype_icon'] = \OCA\Files\Helper::determineIcon($file);
$files[] = $file;
@ -46,7 +46,7 @@ if (is_array($mimetypes) && count($mimetypes)) {
} else {
foreach( \OC\Files\Filesystem::getDirectoryContent( $dir ) as $file ) {
$file['directory'] = $dir;
$file['isPreviewAvailable'] = \OCP\Preview::isMimeSupported($file['mimetype']);
$file['isPreviewAvailable'] = \OC::$server->getPreviewManager()->isMimeSupported($file['mimetype']);
$file["date"] = OCP\Util::formatDate($file["mtime"]);
$file['mimetype_icon'] = \OCA\Files\Helper::determineIcon($file);
$files[] = $file;

View file

@ -48,6 +48,7 @@ $defaults = new OC_Defaults();
$server->addPlugin(new Sabre_DAV_Auth_Plugin($authBackend, $defaults->getName()));
$server->addPlugin(new Sabre_DAV_Locks_Plugin($lockBackend));
$server->addPlugin(new Sabre_DAV_Browser_Plugin(false)); // Show something in the Browser, but no upload
$server->addPlugin(new OC_Connector_Sabre_AbortedUploadDetectionPlugin());
$server->addPlugin(new OC_Connector_Sabre_QuotaPlugin());
$server->addPlugin(new OC_Connector_Sabre_MaintenancePlugin());

View file

@ -653,7 +653,11 @@ function lazyLoadPreview(path, mime, ready, width, height) {
if ( ! height ) {
height = $('#filestable').data('preview-y');
}
var previewURL = OC.Router.generate('core_ajax_preview', {file: encodeURIComponent(path), x:width, y:height});
if( $('#publicUploadButtonMock').length ) {
var previewURL = OC.Router.generate('core_ajax_public_preview', {file: encodeURIComponent(path), x:width, y:height, t:$('#dirToken').val()});
} else {
var previewURL = OC.Router.generate('core_ajax_preview', {file: encodeURIComponent(path), x:width, y:height});
}
$.get(previewURL, function() {
previewURL = previewURL.replace('(', '%28');
previewURL = previewURL.replace(')', '%29');

View file

@ -13,10 +13,14 @@ $TRANSLATIONS = array(
"Missing a temporary folder" => "Falta un fitxer temporal",
"Failed to write to disk" => "Ha fallat en escriure al disc",
"Not enough storage available" => "No hi ha prou espai disponible",
"Upload failed. Could not get file info." => "La pujada ha fallat. No s'ha pogut obtenir informació del fitxer.",
"Upload failed. Could not find uploaded file" => "La pujada ha fallat. El fitxer pujat no s'ha trobat.",
"Invalid directory." => "Directori no vàlid.",
"Files" => "Fitxers",
"Unable to upload {filename} as it is a directory or has 0 bytes" => "No es pot pujar {filename} perquè és una carpeta o té 0 bytes",
"Not enough space available" => "No hi ha prou espai disponible",
"Upload cancelled." => "La pujada s'ha cancel·lat.",
"Could not get result from server." => "No hi ha resposta del servidor.",
"File upload is in progress. Leaving the page now will cancel the upload." => "Hi ha una pujada en curs. Si abandoneu la pàgina la pujada es cancel·larà.",
"URL cannot be empty." => "La URL no pot ser buida",
"Invalid folder name. Usage of 'Shared' is reserved by ownCloud" => "Nom de carpeta no vàlid. L'ús de 'Shared' està reservat per Owncloud",
@ -42,6 +46,7 @@ $TRANSLATIONS = array(
"Your storage is almost full ({usedSpacePercent}%)" => "El vostre espai d'emmagatzemament és gairebé ple ({usedSpacePercent}%)",
"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "L'encriptació s'ha desactivat però els vostres fitxers segueixen encriptats. Aneu a la vostra configuració personal per desencriptar els vostres fitxers.",
"Your download is being prepared. This might take some time if the files are big." => "S'està preparant la baixada. Pot trigar una estona si els fitxers són grans.",
"Error moving file" => "Error en moure el fitxer",
"Name" => "Nom",
"Size" => "Mida",
"Modified" => "Modificat",

View file

@ -41,6 +41,7 @@ $TRANSLATIONS = array(
"Your storage is almost full ({usedSpacePercent}%)" => "Ο αποθηκευτικός χώρος είναι σχεδόν γεμάτος ({usedSpacePercent}%)",
"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "Η κρυπτογράφηση απενεργοποιήθηκε, αλλά τα αρχεία σας είναι ακόμα κρυπτογραφημένα. Παρακαλούμε απενεργοποιήσετε την κρυπτογράφηση αρχείων από τις προσωπικές σας ρυθμίσεις",
"Your download is being prepared. This might take some time if the files are big." => "Η λήψη προετοιμάζεται. Αυτό μπορεί να πάρει ώρα εάν τα αρχεία έχουν μεγάλο μέγεθος.",
"Error moving file" => "Σφάλμα κατά τη μετακίνηση του αρχείου",
"Name" => "Όνομα",
"Size" => "Μέγεθος",
"Modified" => "Τροποποιήθηκε",

View file

@ -13,10 +13,14 @@ $TRANSLATIONS = array(
"Missing a temporary folder" => "Missing a temporary folder",
"Failed to write to disk" => "Failed to write to disk",
"Not enough storage available" => "Not enough storage available",
"Upload failed. Could not get file info." => "Upload failed. Could not get file info.",
"Upload failed. Could not find uploaded file" => "Upload failed. Could not find uploaded file",
"Invalid directory." => "Invalid directory.",
"Files" => "Files",
"Unable to upload {filename} as it is a directory or has 0 bytes" => "Unable to upload {filename} as it is a directory or has 0 bytes",
"Not enough space available" => "Not enough space available",
"Upload cancelled." => "Upload cancelled.",
"Could not get result from server." => "Could not get result from server.",
"File upload is in progress. Leaving the page now will cancel the upload." => "File upload is in progress. Leaving the page now will cancel the upload.",
"URL cannot be empty." => "URL cannot be empty.",
"Invalid folder name. Usage of 'Shared' is reserved by ownCloud" => "Invalid folder name. Usage of 'Shared' is reserved by ownCloud",
@ -37,11 +41,12 @@ $TRANSLATIONS = array(
"_Uploading %n file_::_Uploading %n files_" => array("Uploading %n file","Uploading %n files"),
"'.' is an invalid file name." => "'.' is an invalid file name.",
"File name cannot be empty." => "File name cannot be empty.",
"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed.",
"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Invalid name: '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed.",
"Your storage is full, files can not be updated or synced anymore!" => "Your storage is full, files can not be updated or synced anymore!",
"Your storage is almost full ({usedSpacePercent}%)" => "Your storage is almost full ({usedSpacePercent}%)",
"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files.",
"Your download is being prepared. This might take some time if the files are big." => "Your download is being prepared. This might take some time if the files are big.",
"Error moving file" => "Error moving file",
"Name" => "Name",
"Size" => "Size",
"Modified" => "Modified",

View file

@ -13,10 +13,14 @@ $TRANSLATIONS = array(
"Missing a temporary folder" => "Absence de dossier temporaire.",
"Failed to write to disk" => "Erreur d'écriture sur le disque",
"Not enough storage available" => "Plus assez d'espace de stockage disponible",
"Upload failed. Could not get file info." => "L'envoi a échoué. Impossible d'obtenir les informations du fichier.",
"Upload failed. Could not find uploaded file" => "L'envoi a échoué. Impossible de trouver le fichier envoyé.",
"Invalid directory." => "Dossier invalide.",
"Files" => "Fichiers",
"Unable to upload {filename} as it is a directory or has 0 bytes" => "Impossible d'envoyer {filename} car il s'agit d'un répertoire ou d'un fichier de taille nulle",
"Not enough space available" => "Espace disponible insuffisant",
"Upload cancelled." => "Envoi annulé.",
"Could not get result from server." => "Ne peut recevoir les résultats du serveur.",
"File upload is in progress. Leaving the page now will cancel the upload." => "L'envoi du fichier est en cours. Quitter cette page maintenant annulera l'envoi du fichier.",
"URL cannot be empty." => "L'URL ne peut-être vide",
"Invalid folder name. Usage of 'Shared' is reserved by ownCloud" => "Nom de dossier invalide. L'utilisation du mot 'Shared' est réservée à Owncloud",
@ -42,6 +46,7 @@ $TRANSLATIONS = array(
"Your storage is almost full ({usedSpacePercent}%)" => "Votre espace de stockage est presque plein ({usedSpacePercent}%)",
"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "Le chiffrement était désactivé mais vos fichiers sont toujours chiffrés. Veuillez vous rendre sur vos Paramètres personnels pour déchiffrer vos fichiers.",
"Your download is being prepared. This might take some time if the files are big." => "Votre téléchargement est cours de préparation. Ceci peut nécessiter un certain temps si les fichiers sont volumineux.",
"Error moving file" => "Erreur lors du déplacement du fichier",
"Name" => "Nom",
"Size" => "Taille",
"Modified" => "Modifié",

View file

@ -13,10 +13,14 @@ $TRANSLATIONS = array(
"Missing a temporary folder" => "Falta o cartafol temporal",
"Failed to write to disk" => "Produciuse un erro ao escribir no disco",
"Not enough storage available" => "Non hai espazo de almacenamento abondo",
"Upload failed. Could not get file info." => "O envío fracasou. Non foi posíbel obter información do ficheiro.",
"Upload failed. Could not find uploaded file" => "O envío fracasou. Non foi posíbel atopar o ficheiro enviado",
"Invalid directory." => "O directorio é incorrecto.",
"Files" => "Ficheiros",
"Unable to upload {filename} as it is a directory or has 0 bytes" => "Non é posíbel enviar {filename}, xa que ou é un directorio ou ten 0 bytes",
"Not enough space available" => "O espazo dispoñíbel é insuficiente",
"Upload cancelled." => "Envío cancelado.",
"Could not get result from server." => "Non foi posíbel obter o resultado do servidor.",
"File upload is in progress. Leaving the page now will cancel the upload." => "O envío do ficheiro está en proceso. Saír agora da páxina cancelará o envío.",
"URL cannot be empty." => "O URL non pode quedar baleiro.",
"Invalid folder name. Usage of 'Shared' is reserved by ownCloud" => "Nome de cartafol incorrecto. O uso de «Compartido» e «Shared» está reservado para o ownClod",
@ -42,6 +46,7 @@ $TRANSLATIONS = array(
"Your storage is almost full ({usedSpacePercent}%)" => "O seu espazo de almacenamento está case cheo ({usedSpacePercent}%)",
"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "O cifrado foi desactivado, mais os ficheiros están cifrados. Vaia á configuración persoal para descifrar os ficheiros.",
"Your download is being prepared. This might take some time if the files are big." => "Está a prepararse a súa descarga. Isto pode levar bastante tempo se os ficheiros son grandes.",
"Error moving file" => "Produciuse un erro ao mover o ficheiro",
"Name" => "Nome",
"Size" => "Tamaño",
"Modified" => "Modificado",

View file

@ -13,10 +13,14 @@ $TRANSLATIONS = array(
"Missing a temporary folder" => "Hiányzik egy ideiglenes mappa",
"Failed to write to disk" => "Nem sikerült a lemezre történő írás",
"Not enough storage available" => "Nincs elég szabad hely.",
"Upload failed. Could not get file info." => "A feltöltés nem sikerült. Az állományt leíró információk nem érhetők el.",
"Upload failed. Could not find uploaded file" => "A feltöltés nem sikerült. Nem található a feltöltendő állomány.",
"Invalid directory." => "Érvénytelen mappa.",
"Files" => "Fájlok",
"Unable to upload {filename} as it is a directory or has 0 bytes" => "A(z) {filename} állomány nem tölthető fel, mert ez vagy egy mappa, vagy pedig 0 bájtból áll.",
"Not enough space available" => "Nincs elég szabad hely",
"Upload cancelled." => "A feltöltést megszakítottuk.",
"Could not get result from server." => "A kiszolgálótól nem kapható meg az eredmény.",
"File upload is in progress. Leaving the page now will cancel the upload." => "Fájlfeltöltés van folyamatban. Az oldal elhagyása megszakítja a feltöltést.",
"URL cannot be empty." => "Az URL nem lehet semmi.",
"Invalid folder name. Usage of 'Shared' is reserved by ownCloud" => "Érvénytelen mappanév. A 'Shared' az ownCloud számára fenntartott elnevezés",
@ -31,15 +35,18 @@ $TRANSLATIONS = array(
"cancel" => "mégse",
"replaced {new_name} with {old_name}" => "{new_name} fájlt kicseréltük ezzel: {old_name}",
"undo" => "visszavonás",
"_%n folder_::_%n folders_" => array("",""),
"_%n file_::_%n files_" => array("",""),
"_Uploading %n file_::_Uploading %n files_" => array("",""),
"_%n folder_::_%n folders_" => array("%n mappa","%n mappa"),
"_%n file_::_%n files_" => array("%n állomány","%n állomány"),
"{dirs} and {files}" => "{dirs} és {files}",
"_Uploading %n file_::_Uploading %n files_" => array("%n állomány feltöltése","%n állomány feltöltése"),
"'.' 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 '*'",
"Your storage is full, files can not be updated or synced anymore!" => "A tároló tele van, a fájlok nem frissíthetőek vagy szinkronizálhatóak a jövőben.",
"Your storage is almost full ({usedSpacePercent}%)" => "A tároló majdnem tele van ({usedSpacePercent}%)",
"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "A titkosítási funkciót kikapcsolták, de az Ön állományai még mindig titkosított állapotban vannak. A személyes beállításoknál tudja a titkosítást feloldani.",
"Your download is being prepared. This might take some time if the files are big." => "Készül a letöltendő állomány. Ez eltarthat egy ideig, ha nagyok a fájlok.",
"Error moving file" => "Az állomány áthelyezése nem sikerült.",
"Name" => "Név",
"Size" => "Méret",
"Modified" => "Módosítva",

View file

@ -13,10 +13,14 @@ $TRANSLATIONS = array(
"Missing a temporary folder" => "Manglar ei mellombels mappe",
"Failed to write to disk" => "Klarte ikkje skriva til disk",
"Not enough storage available" => "Ikkje nok lagringsplass tilgjengeleg",
"Upload failed. Could not get file info." => "Feil ved opplasting. Klarte ikkje å henta filinfo.",
"Upload failed. Could not find uploaded file" => "Feil ved opplasting. Klarte ikkje å finna opplasta fil.",
"Invalid directory." => "Ugyldig mappe.",
"Files" => "Filer",
"Unable to upload {filename} as it is a directory or has 0 bytes" => "Klarte ikkje å lasta opp {filename} sidan det er ei mappe eller er 0 byte.",
"Not enough space available" => "Ikkje nok lagringsplass tilgjengeleg",
"Upload cancelled." => "Opplasting avbroten.",
"Could not get result from server." => "Klarte ikkje å henta resultat frå tenaren.",
"File upload is in progress. Leaving the page now will cancel the upload." => "Fila lastar no opp. Viss du forlèt sida no vil opplastinga verta avbroten.",
"URL cannot be empty." => "Nettadressa kan ikkje vera tom.",
"Invalid folder name. Usage of 'Shared' is reserved by ownCloud" => "Ugyldig mappenamn. Mappa «Shared» er reservert av ownCloud",
@ -42,6 +46,7 @@ $TRANSLATIONS = array(
"Your storage is almost full ({usedSpacePercent}%)" => "Lagringa di er nesten full ({usedSpacePercent} %)",
"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "Kryptering er skrudd av, men filene dine er enno krypterte. Du kan dekryptera filene i personlege innstillingar.",
"Your download is being prepared. This might take some time if the files are big." => "Gjer klar nedlastinga di. Dette kan ta ei stund viss filene er store.",
"Error moving file" => "Feil ved flytting av fil",
"Name" => "Namn",
"Size" => "Storleik",
"Modified" => "Endra",

View file

@ -18,6 +18,7 @@ $TRANSLATIONS = array(
"Upload cancelled." => "Завантаження перервано.",
"File upload is in progress. Leaving the page now will cancel the upload." => "Виконується завантаження файлу. Закриття цієї сторінки приведе до відміни завантаження.",
"URL cannot be empty." => "URL не може бути пустим.",
"Invalid folder name. Usage of 'Shared' is reserved by ownCloud" => "Неправильне ім'я теки. Використання 'Shared' зарезервовано ownCloud",
"Error" => "Помилка",
"Share" => "Поділитися",
"Delete permanently" => "Видалити назавжди",
@ -29,7 +30,7 @@ $TRANSLATIONS = array(
"cancel" => "відміна",
"replaced {new_name} with {old_name}" => "замінено {new_name} на {old_name}",
"undo" => "відмінити",
"_%n folder_::_%n folders_" => array("","",""),
"_%n folder_::_%n folders_" => array("%n тека","%n тека","%n теки"),
"_%n file_::_%n files_" => array("","",""),
"_Uploading %n file_::_Uploading %n files_" => array("","",""),
"'.' is an invalid file name." => "'.' це невірне ім'я файлу.",
@ -53,7 +54,7 @@ $TRANSLATIONS = array(
"Save" => "Зберегти",
"New" => "Створити",
"Text file" => "Текстовий файл",
"Folder" => "Папка",
"Folder" => "Тека",
"From link" => "З посилання",
"Deleted files" => "Видалено файлів",
"Cancel upload" => "Перервати завантаження",

View file

@ -39,8 +39,8 @@ class Helper
}
if($file['isPreviewAvailable']) {
$relativePath = substr($file['path'], 6);
return \OC_Helper::previewIcon($relativePath);
$pathForPreview = $file['directory'] . '/' . $file['name'];
return \OC_Helper::previewIcon($pathForPreview);
}
return \OC_Helper::mimetypeIcon($file['mimetype']);
}
@ -84,7 +84,7 @@ class Helper
}
}
$i['directory'] = $dir;
$i['isPreviewAvailable'] = \OCP\Preview::isMimeSupported($i['mimetype']);
$i['isPreviewAvailable'] = \OC::$server->getPreviewManager()->isMimeSupported($i['mimetype']);
$i['icon'] = \OCA\Files\Helper::determineIcon($i);
$files[] = $i;
}

View file

@ -47,7 +47,7 @@
<input type="hidden" name="permissions" value="<?php p($_['permissions']); ?>" id="permissions">
</div>
<div id="emptycontent" <?php if (!isset($_['files']) or !$_['isCreatable'] or count($_['files']) > 0 or !$_['ajaxLoad']):?>class="hidden"<?php endif; ?>><?php p($l->t('Nothing in here. Upload something!'))?></div>
<div id="emptycontent" <?php if (!isset($_['files']) or !$_['isCreatable'] or count($_['files']) > 0 or $_['ajaxLoad']):?>class="hidden"<?php endif; ?>><?php p($l->t('Nothing in here. Upload something!'))?></div>
<input type="hidden" id="disableSharing" data-status="<?php p($_['disableSharing']); ?>"></input>

View file

@ -1,6 +1,7 @@
<?php
$TRANSLATIONS = array(
"Saving..." => "Зберігаю...",
"personal settings" => "особисті налаштування",
"Encryption" => "Шифрування",
"Change Password" => "Змінити Пароль"
);

View file

@ -40,11 +40,14 @@ class Keymanager {
public static function getPrivateKey(\OC_FilesystemView $view, $user) {
$path = '/' . $user . '/' . 'files_encryption' . '/' . $user . '.private.key';
$key = false;
$proxyStatus = \OC_FileProxy::$enabled;
\OC_FileProxy::$enabled = false;
$key = $view->file_get_contents($path);
if ($view->file_exists($path)) {
$key = $view->file_get_contents($path);
}
\OC_FileProxy::$enabled = $proxyStatus;

View file

@ -50,9 +50,8 @@ class Proxy extends \OC_FileProxy {
private static function shouldEncrypt($path) {
if (is_null(self::$enableEncryption)) {
if (
\OCP\Config::getAppValue('files_encryption', 'enable_encryption', 'true') === 'true'
\OCP\App::isEnabled('files_encryption') === true
&& Crypt::mode() === 'server'
) {
@ -200,7 +199,7 @@ class Proxy extends \OC_FileProxy {
*/
public function preUnlink($path) {
// let the trashbin handle this
// let the trashbin handle this
if (\OCP\App::isEnabled('files_trashbin')) {
return true;
}
@ -291,7 +290,7 @@ class Proxy extends \OC_FileProxy {
// Close the original encrypted file
fclose($result);
// Open the file using the crypto stream wrapper
// Open the file using the crypto stream wrapper
// protocol and let it do the decryption work instead
$result = fopen('crypt://' . $path, $meta['mode']);

View file

@ -20,6 +20,7 @@
*/
namespace OC\Files\Cache;
use OCP\Share_Backend_Collection;
/**
* Metadata cache for shared files
@ -226,7 +227,36 @@ class Shared_Cache extends Cache {
* @return array of file data
*/
public function search($pattern) {
// TODO
// normalize pattern
$pattern = $this->normalize($pattern);
$ids = $this->getAll();
$files = array();
// divide into 1k chunks
$chunks = array_chunk($ids, 1000);
foreach ($chunks as $chunk) {
$placeholders = join(',', array_fill(0, count($chunk), '?'));
$sql = 'SELECT `fileid`, `storage`, `path`, `parent`, `name`, `mimetype`, `mimepart`, `size`, `mtime`,
`encrypted`, `unencrypted_size`, `etag`
FROM `*PREFIX*filecache` WHERE `name` LIKE ? AND `fileid` IN (' . $placeholders . ')';
$result = \OC_DB::executeAudited($sql, array_merge(array($pattern), $chunk));
while ($row = $result->fetchRow()) {
if (substr($row['path'], 0, 6)==='files/') {
$row['path'] = substr($row['path'],6); // remove 'files/' from path as it's relative to '/Shared'
}
$row['mimetype'] = $this->getMimetype($row['mimetype']);
$row['mimepart'] = $this->getMimetype($row['mimepart']);
$files[] = $row;
}
}
return $files;
}
/**
@ -244,13 +274,30 @@ class Shared_Cache extends Cache {
}
$mimetype = $this->getMimetypeId($mimetype);
$ids = $this->getAll();
$placeholders = join(',', array_fill(0, count($ids), '?'));
$query = \OC_DB::prepare('
SELECT `fileid`, `storage`, `path`, `parent`, `name`, `mimetype`, `mimepart`, `size`, `mtime`, `encrypted`
FROM `*PREFIX*filecache` WHERE ' . $where . ' AND `fileid` IN (' . $placeholders . ')'
);
$result = $query->execute(array_merge(array($mimetype), $ids));
return $result->fetchAll();
$files = array();
// divide into 1k chunks
$chunks = array_chunk($ids, 1000);
foreach ($chunks as $chunk) {
$placeholders = join(',', array_fill(0, count($ids), '?'));
$sql = 'SELECT `fileid`, `storage`, `path`, `parent`, `name`, `mimetype`, `mimepart`, `size`, `mtime`,
`encrypted`, `unencrypted_size`, `etag`
FROM `*PREFIX*filecache` WHERE ' . $where . ' AND `fileid` IN (' . $placeholders . ')';
$result = \OC_DB::executeAudited($sql, array_merge(array($mimetype), $chunk));
while ($row = $result->fetchRow()) {
if (substr($row['path'], 0, 6)==='files/') {
$row['path'] = substr($row['path'],6); // remove 'files/' from path as it's relative to '/Shared'
}
$row['mimetype'] = $this->getMimetype($row['mimetype']);
$row['mimepart'] = $this->getMimetype($row['mimepart']);
$files[] = $row;
}
}
return $files;
}
/**
@ -272,7 +319,20 @@ class Shared_Cache extends Cache {
* @return int[]
*/
public function getAll() {
return \OCP\Share::getItemsSharedWith('file', \OC_Share_Backend_File::FORMAT_GET_ALL);
$ids = \OCP\Share::getItemsSharedWith('file', \OC_Share_Backend_File::FORMAT_GET_ALL);
$folderBackend = \OCP\Share::getBackend('folder');
if ($folderBackend instanceof Share_Backend_Collection) {
foreach ($ids as $file) {
/** @var $folderBackend Share_Backend_Collection */
$children = $folderBackend->getChildren($file);
foreach ($children as $child) {
$ids[] = (int)$child['source'];
}
}
}
return $ids;
}
/**

View file

@ -188,7 +188,7 @@ if (isset($path)) {
} else {
$i['extension'] = '';
}
$i['isPreviewAvailable'] = \OCP\Preview::isMimeSupported($i['mimetype']);
$i['isPreviewAvailable'] = \OC::$server->getPreviewManager()->isMimeSupported($i['mimetype']);
}
$i['directory'] = $getPath;
$i['permissions'] = OCP\PERMISSION_READ;

View file

@ -8,8 +8,8 @@ $TRANSLATIONS = array(
"Delete permanently" => "Végleges törlés",
"Name" => "Név",
"Deleted" => "Törölve",
"_%n folder_::_%n folders_" => array("",""),
"_%n file_::_%n files_" => array("",""),
"_%n folder_::_%n folders_" => array("","%n mappa"),
"_%n file_::_%n files_" => array("","%n állomány"),
"restored" => "visszaállítva",
"Nothing in here. Your trash bin is empty!" => "Itt nincs semmi. Az Ön szemetes mappája üres!",
"Restore" => "Visszaállítás",

View file

@ -61,7 +61,7 @@ class Helper
$i['directory'] = '';
}
$i['permissions'] = \OCP\PERMISSION_READ;
$i['isPreviewAvailable'] = \OCP\Preview::isMimeSupported($r['mime']);
$i['isPreviewAvailable'] = \OC::$server->getPreviewManager()->isMimeSupported($r['mime']);
$i['icon'] = \OCA\Files\Helper::determineIcon($i);
$files[] = $i;
}

View file

@ -16,6 +16,7 @@ $TRANSLATIONS = array(
"Connection test failed" => "A kapcsolatellenőrzés eredménye: nem sikerült",
"Do you really want to delete the current Server Configuration?" => "Tényleg törölni szeretné a kiszolgáló beállításait?",
"Confirm Deletion" => "A törlés megerősítése",
"<b>Warning:</b> Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behavior. Please ask your system administrator to disable one of them." => "<b>Figyelem:</b> a user_ldap és user_webdavauth alkalmazások nem kompatibilisek. Együttes használatuk váratlan eredményekhez vezethet. Kérje meg a rendszergazdát, hogy a kettő közül kapcsolja ki az egyiket.",
"<b>Warning:</b> The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it." => "<b>Figyelmeztetés:</b> Az LDAP PHP modul nincs telepítve, ezért ez az alrendszer nem fog működni. Kérje meg a rendszergazdát, hogy telepítse!",
"Server configuration" => "A kiszolgálók beállításai",
"Add Server Configuration" => "Új kiszolgáló beállításának hozzáadása",
@ -29,8 +30,11 @@ $TRANSLATIONS = array(
"Password" => "Jelszó",
"For anonymous access, leave DN and Password empty." => "Bejelentkezés nélküli eléréshez ne töltse ki a DN és Jelszó mezőket!",
"User Login Filter" => "Szűrő a bejelentkezéshez",
"Defines the filter to apply, when login is attempted. %%uid replaces the username in the login action. Example: \"uid=%%uid\"" => "Ez a szűrő érvényes a bejelentkezés megkísérlésekor. Ekkor az %%uid változó helyére a bejelentkezési név kerül. Például: \"uid=%%uid\"",
"User List Filter" => "A felhasználók szűrője",
"Defines the filter to apply, when retrieving users (no placeholders). Example: \"objectClass=person\"" => "Ez a szűrő érvényes a felhasználók listázásakor (nincs helyettesíthető változó). Például: \"objectClass=person\"",
"Group Filter" => "A csoportok szűrője",
"Defines the filter to apply, when retrieving groups (no placeholders). Example: \"objectClass=posixGroup\"" => "Ez a szűrő érvényes a csoportok listázásakor (nincs helyettesíthető változó). Például: \"objectClass=posixGroup\"",
"Connection Settings" => "Kapcsolati beállítások",
"Configuration Active" => "A beállítás aktív",
"When unchecked, this configuration will be skipped." => "Ha nincs kipipálva, ez a beállítás kihagyódik.",
@ -39,19 +43,23 @@ $TRANSLATIONS = array(
"Give an optional backup host. It must be a replica of the main LDAP/AD server." => "Adjon meg egy opcionális másodkiszolgálót. Ez a fő LDAP/AD kiszolgáló szinkron másolata (replikája) kell legyen.",
"Backup (Replica) Port" => "A másodkiszolgáló (replika) portszáma",
"Disable Main Server" => "A fő szerver kihagyása",
"Only connect to the replica server." => "Csak a másodlagos (másolati) kiszolgálóhoz kapcsolódjunk.",
"Use TLS" => "Használjunk TLS-t",
"Do not use it additionally for LDAPS connections, it will fail." => "LDAPS kapcsolatok esetén ne kapcsoljuk be, mert nem fog működni.",
"Case insensitve LDAP server (Windows)" => "Az LDAP-kiszolgáló nem tesz különbséget a kis- és nagybetűk között (Windows)",
"Turn off SSL certificate validation." => "Ne ellenőrizzük az SSL-tanúsítvány érvényességét",
"Not recommended, use it for testing only! If connection only works with this option, import the LDAP server's SSL certificate in your %s server." => "Használata nem javasolt (kivéve tesztelési céllal). Ha a kapcsolat csak ezzel a beállítással működik, akkor importálja az LDAP-kiszolgáló SSL tanúsítványát a(z) %s kiszolgálóra!",
"Cache Time-To-Live" => "A gyorsítótár tárolási időtartama",
"in seconds. A change empties the cache." => "másodpercben. A változtatás törli a cache tartalmát.",
"Directory Settings" => "Címtár beállítások",
"User Display Name Field" => "A felhasználónév mezője",
"The LDAP attribute to use to generate the user's display name." => "Ebből az LDAP attribútumból képződik a felhasználó megjelenítendő neve.",
"Base User Tree" => "A felhasználói fa gyökere",
"One User Base DN per line" => "Soronként egy felhasználói fa gyökerét adhatjuk meg",
"User Search Attributes" => "A felhasználók lekérdezett attribútumai",
"Optional; one attribute per line" => "Nem kötelező megadni, soronként egy attribútum",
"Group Display Name Field" => "A csoport nevének mezője",
"The LDAP attribute to use to generate the groups's display name." => "Ebből az LDAP attribútumból képződik a csoport megjelenítendő neve.",
"Base Group Tree" => "A csoportfa gyökere",
"One Group Base DN per line" => "Soronként egy csoportfa gyökerét adhatjuk meg",
"Group Search Attributes" => "A csoportok lekérdezett attribútumai",

View file

@ -142,12 +142,7 @@ EOF
rm -rf coverage-html-$1
mkdir coverage-html-$1
php -f enable_all.php
if [ "$1" == "sqlite" ] ; then
# coverage only with sqlite - causes segfault on ci.tmit.eu - reason unknown
phpunit --configuration phpunit-autotest.xml --log-junit autotest-results-$1.xml --coverage-clover autotest-clover-$1.xml --coverage-html coverage-html-$1 $2 $3
else
phpunit --configuration phpunit-autotest.xml --log-junit autotest-results-$1.xml $2 $3
fi
phpunit --configuration phpunit-autotest.xml --log-junit autotest-results-$1.xml --coverage-clover autotest-clover-$1.xml --coverage-html coverage-html-$1 $2 $3
}
#

View file

@ -33,7 +33,7 @@ class Controller {
$image->show();
} else {
// Signalizes $.avatar() to display a defaultavatar
\OC_JSON::success();
\OC_JSON::success(array("data"=> array("displayname"=> \OC_User::getDisplayName($user)) ));
}
}

View file

@ -16,6 +16,7 @@
-moz-box-sizing: border-box; box-sizing: border-box;
background-color: #f8f8f8;
border-right: 1px solid #ccc;
padding-bottom: 44px;
}
#app-navigation > ul {
height: 100%;
@ -192,7 +193,7 @@
.settings-button {
display: block;
height: 32px;
height: 44px;
width: 100%;
padding: 0;
margin: 0;

View file

@ -69,7 +69,11 @@
var url = OC.Router.generate('core_avatar_get', {user: user, size: size})+'?requesttoken='+oc_requesttoken;
$.get(url, function(result) {
if (typeof(result) === 'object') {
$div.placeholder(user);
if (result.data && result.data.displayname) {
$div.placeholder(user, result.data.displayname);
} else {
$div.placeholder(user);
}
} else {
if (ie8fix === true) {
$div.html('<img src="'+url+'#'+Math.floor(Math.random()*1000)+'">');

View file

@ -36,10 +36,21 @@
*
* <div id="albumart" style="background-color: hsl(123, 90%, 65%); ... ">T</div>
*
* You may also call it like this, to have a different background, than the seed:
*
* $('#albumart').placeholder('The Album Title', 'Album Title');
*
* Resulting in:
*
* <div id="albumart" style="background-color: hsl(123, 90%, 65%); ... ">A</div>
*
*/
(function ($) {
$.fn.placeholder = function(seed) {
$.fn.placeholder = function(seed, text) {
// set optional argument "text" to value of "seed" if undefined
text = text || seed;
var hash = md5(seed),
maxRange = parseInt('ffffffffffffffffffffffffffffffff', 16),
hue = parseInt(hash, 16) / maxRange * 256,
@ -56,7 +67,7 @@
this.css('font-size', (height * 0.55) + 'px');
if(seed !== null && seed.length) {
this.html(seed[0].toUpperCase());
this.html(text[0].toUpperCase());
}
};
}(jQuery));

View file

@ -174,10 +174,10 @@ OC.Share={
var allowPublicUploadStatus = false;
$.each(data.shares, function(key, value) {
if (allowPublicUploadStatus) {
if (value.share_type === OC.Share.SHARE_TYPE_LINK) {
allowPublicUploadStatus = (value.permissions & OC.PERMISSION_CREATE) ? true : false;
return true;
}
allowPublicUploadStatus = (value.permissions & OC.PERMISSION_CREATE) ? true : false;
});
html += '<input id="shareWith" type="text" placeholder="'+t('core', 'Share with')+'" />';

View file

@ -59,6 +59,7 @@ $TRANSLATIONS = array(
"Ok" => "Ok",
"Error loading message template: {error}" => "Chyba při nahrávání šablony zprávy: {error}",
"_{count} file conflict_::_{count} file conflicts_" => array("","",""),
"One file conflict" => "Jeden konflikt souboru",
"Cancel" => "Zrušit",
"The object type is not specified." => "Není určen typ objektu.",
"Error" => "Chyba",

View file

@ -16,6 +16,8 @@ $TRANSLATIONS = array(
"Error adding %s to favorites." => "Fejl ved tilføjelse af %s til favoritter.",
"No categories selected for deletion." => "Ingen kategorier valgt",
"Error removing %s from favorites." => "Fejl ved fjernelse af %s fra favoritter.",
"Unknown filetype" => "Ukendt filtype",
"Invalid image" => "Ugyldigt billede",
"Sunday" => "Søndag",
"Monday" => "Mandag",
"Tuesday" => "Tirsdag",

View file

@ -58,8 +58,15 @@ $TRANSLATIONS = array(
"No" => "No",
"Ok" => "OK",
"Error loading message template: {error}" => "Error loading message template: {error}",
"_{count} file conflict_::_{count} file conflicts_" => array("",""),
"_{count} file conflict_::_{count} file conflicts_" => array("{count} file conflict","{count} file conflicts"),
"One file conflict" => "One file conflict",
"Which files do you want to keep?" => "Which files do you wish to keep?",
"If you select both versions, the copied file will have a number added to its name." => "If you select both versions, the copied file will have a number added to its name.",
"Cancel" => "Cancel",
"Continue" => "Continue",
"(all selected)" => "(all selected)",
"({count} selected)" => "({count} selected)",
"Error loading file exists template" => "Error loading file exists template",
"The object type is not specified." => "The object type is not specified.",
"Error" => "Error",
"The app name is not specified." => "The app name is not specified.",

View file

@ -19,6 +19,8 @@ $TRANSLATIONS = array(
"No image or file provided" => "Aucune image ou fichier fourni",
"Unknown filetype" => "Type de fichier inconnu",
"Invalid image" => "Image invalide",
"No temporary profile picture available, try again" => "Aucune image temporaire disponible pour le profil. Essayez à nouveau.",
"No crop data provided" => "Aucune donnée de culture fournie",
"Sunday" => "Dimanche",
"Monday" => "Lundi",
"Tuesday" => "Mardi",
@ -56,8 +58,15 @@ $TRANSLATIONS = array(
"No" => "Non",
"Ok" => "Ok",
"Error loading message template: {error}" => "Erreur de chargement du modèle de message : {error}",
"_{count} file conflict_::_{count} file conflicts_" => array("",""),
"_{count} file conflict_::_{count} file conflicts_" => array("{count} fichier en conflit","{count} fichiers en conflit"),
"One file conflict" => "Un conflit de fichier",
"Which files do you want to keep?" => "Quels fichiers désirez-vous garder ?",
"If you select both versions, the copied file will have a number added to its name." => "Si vous sélectionnez les deux versions, un nombre sera ajouté au nom du fichier copié.",
"Cancel" => "Annuler",
"Continue" => "Poursuivre",
"(all selected)" => "(tous sélectionnés)",
"({count} selected)" => "({count} sélectionnés)",
"Error loading file exists template" => "Erreur de chargement du modèle de fichier existant",
"The object type is not specified." => "Le type d'objet n'est pas spécifié.",
"Error" => "Erreur",
"The app name is not specified." => "Le nom de l'application n'est pas spécifié.",

View file

@ -58,8 +58,15 @@ $TRANSLATIONS = array(
"No" => "Non",
"Ok" => "Aceptar",
"Error loading message template: {error}" => "Produciuse un erro ao cargar o modelo da mensaxe: {error}",
"_{count} file conflict_::_{count} file conflicts_" => array("",""),
"_{count} file conflict_::_{count} file conflicts_" => array("{count} conflito de ficheiro","{count} conflitos de ficheiros"),
"One file conflict" => "Un conflito de ficheiro",
"Which files do you want to keep?" => "Que ficheiros quere conservar?",
"If you select both versions, the copied file will have a number added to its name." => "Se selecciona ambas versións, o ficheiro copiado terá un número engadido ao nome.",
"Cancel" => "Cancelar",
"Continue" => "Continuar",
"(all selected)" => "(todo o seleccionado)",
"({count} selected)" => "({count} seleccionados)",
"Error loading file exists template" => "Produciuse un erro ao cargar o modelo de ficheiro existente",
"The object type is not specified." => "Non se especificou o tipo de obxecto.",
"Error" => "Erro",
"The app name is not specified." => "Non se especificou o nome do aplicativo.",

View file

@ -53,18 +53,18 @@ $TRANSLATIONS = array(
"last year" => "anno scorso",
"years ago" => "anni fa",
"Choose" => "Scegli",
"Error loading file picker template: {error}" => "Errore nel caricamento del modello del selettore file: {error}",
"Error loading file picker template: {error}" => "Errore durante il caricamento del modello del selettore file: {error}",
"Yes" => "",
"No" => "No",
"Ok" => "Ok",
"Error loading message template: {error}" => "Errore nel caricamento del modello di messaggio: {error}",
"Error loading message template: {error}" => "Errore durante il caricamento del modello di messaggio: {error}",
"_{count} file conflict_::_{count} file conflicts_" => array("{count} file in conflitto","{count} file in conflitto"),
"One file conflict" => "Un conflitto tra file",
"One file conflict" => "Un file in conflitto",
"Which files do you want to keep?" => "Quali file vuoi mantenere?",
"If you select both versions, the copied file will have a number added to its name." => "Se selezioni entrambe le versioni, verrà aggiunto un numero al nome del file copiato.",
"If you select both versions, the copied file will have a number added to its name." => "Se selezioni entrambe le versioni, sarà aggiunto un numero al nome del file copiato.",
"Cancel" => "Annulla",
"Continue" => "Continua",
"(all selected)" => "(tutti selezionati)",
"(all selected)" => "(tutti i selezionati)",
"({count} selected)" => "({count} selezionati)",
"Error loading file exists template" => "Errore durante il caricamento del modello del file esistente",
"The object type is not specified." => "Il tipo di oggetto non è specificato.",

View file

@ -16,6 +16,11 @@ $TRANSLATIONS = array(
"Error adding %s to favorites." => "Klarte ikkje leggja til %s i favorittar.",
"No categories selected for deletion." => "Ingen kategoriar valt for sletting.",
"Error removing %s from favorites." => "Klarte ikkje fjerna %s frå favorittar.",
"No image or file provided" => "Inga bilete eller fil gitt",
"Unknown filetype" => "Ukjend filtype",
"Invalid image" => "Ugyldig bilete",
"No temporary profile picture available, try again" => "Inga midlertidig profilbilete tilgjengeleg, prøv igjen",
"No crop data provided" => "Ingen beskjeringsdata gitt",
"Sunday" => "Søndag",
"Monday" => "Måndag",
"Tuesday" => "Tysdag",
@ -48,11 +53,20 @@ $TRANSLATIONS = array(
"last year" => "i fjor",
"years ago" => "år sidan",
"Choose" => "Vel",
"Error loading file picker template: {error}" => "Klarte ikkje å lasta filplukkarmal: {error}",
"Yes" => "Ja",
"No" => "Nei",
"Ok" => "Greitt",
"_{count} file conflict_::_{count} file conflicts_" => array("",""),
"Error loading message template: {error}" => "Klarte ikkje å lasta meldingsmal: {error}",
"_{count} file conflict_::_{count} file conflicts_" => array("{count} filkonflikt","{count} filkonfliktar"),
"One file conflict" => "Éin filkonflikt",
"Which files do you want to keep?" => "Kva filer vil du spara?",
"If you select both versions, the copied file will have a number added to its name." => "Viss du vel begge utgåvene, vil den kopierte fila få eit tal lagt til namnet.",
"Cancel" => "Avbryt",
"Continue" => "Gå vidare",
"(all selected)" => "(alle valte)",
"({count} selected)" => "({count} valte)",
"Error loading file exists template" => "Klarte ikkje å lasta fil-finst-mal",
"The object type is not specified." => "Objekttypen er ikkje spesifisert.",
"Error" => "Feil",
"The app name is not specified." => "Programnamnet er ikkje spesifisert.",

View file

@ -16,6 +16,11 @@ $TRANSLATIONS = array(
"Error adding %s to favorites." => "Fel vid tillägg av %s till favoriter.",
"No categories selected for deletion." => "Inga kategorier valda för radering.",
"Error removing %s from favorites." => "Fel vid borttagning av %s från favoriter.",
"No image or file provided" => "Ingen bild eller fil har tillhandahållits",
"Unknown filetype" => "Okänd filtyp",
"Invalid image" => "Ogiltig bild",
"No temporary profile picture available, try again" => "Ingen temporär profilbild finns tillgänglig, försök igen",
"No crop data provided" => "Ingen beskärdata har angivits",
"Sunday" => "Söndag",
"Monday" => "Måndag",
"Tuesday" => "Tisdag",
@ -48,11 +53,20 @@ $TRANSLATIONS = array(
"last year" => "förra året",
"years ago" => "år sedan",
"Choose" => "Välj",
"Error loading file picker template: {error}" => "Fel uppstod för filväljarmall: {error}",
"Yes" => "Ja",
"No" => "Nej",
"Ok" => "Ok",
"_{count} file conflict_::_{count} file conflicts_" => array("",""),
"Error loading message template: {error}" => "Fel uppstod under inläsningen av meddelandemallen: {error}",
"_{count} file conflict_::_{count} file conflicts_" => array("{count} filkonflikt","{count} filkonflikter"),
"One file conflict" => "En filkonflikt",
"Which files do you want to keep?" => "Vilken fil vill du behålla?",
"If you select both versions, the copied file will have a number added to its name." => "Om du väljer båda versionerna kommer de kopierade filerna ha nummer tillagda i filnamnet.",
"Cancel" => "Avbryt",
"Continue" => "Fortsätt",
"(all selected)" => "(Alla valda)",
"({count} selected)" => "({count} valda)",
"Error loading file exists template" => "Fel uppstod filmall existerar",
"The object type is not specified." => "Objekttypen är inte specificerad.",
"Error" => "Fel",
"The app name is not specified." => " Namnet på appen är inte specificerad.",

View file

@ -79,7 +79,7 @@ try {
// We call ownCloud from the CLI (aka cron)
if ($appmode != 'cron') {
// Use cron in feature!
// Use cron in future!
OC_BackgroundJob::setExecutionType('cron');
}

View file

@ -31,7 +31,7 @@ try {
} catch (Exception $ex) {
//show the user a detailed error page
OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR);
\OCP\Util::writeLog('index', $ex->getMessage(), \OCP\Util::FATAL);
OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR);
OC_Template::printExceptionErrorPage($ex);
}

View file

@ -9,9 +9,9 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2013-09-20 10:44-0400\n"
"PO-Revision-Date: 2013-09-20 14:45+0000\n"
"Last-Translator: I Robot <owncloud-bot@tmit.eu>\n"
"POT-Creation-Date: 2013-09-24 12:58-0400\n"
"PO-Revision-Date: 2013-09-24 15:10+0000\n"
"Last-Translator: rogerc\n"
"Language-Team: Catalan (http://www.transifex.com/projects/p/owncloud/language/ca/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -78,23 +78,23 @@ msgstr "No hi ha prou espai disponible"
#: ajax/upload.php:120 ajax/upload.php:143
msgid "Upload failed. Could not get file info."
msgstr ""
msgstr "La pujada ha fallat. No s'ha pogut obtenir informació del fitxer."
#: ajax/upload.php:136
msgid "Upload failed. Could not find uploaded file"
msgstr ""
msgstr "La pujada ha fallat. El fitxer pujat no s'ha trobat."
#: ajax/upload.php:160
msgid "Invalid directory."
msgstr "Directori no vàlid."
#: appinfo/app.php:12
#: appinfo/app.php:11
msgid "Files"
msgstr "Fitxers"
#: js/file-upload.js:244
msgid "Unable to upload {filename} as it is a directory or has 0 bytes"
msgstr ""
msgstr "No es pot pujar {filename} perquè és una carpeta o té 0 bytes"
#: js/file-upload.js:255
msgid "Not enough space available"
@ -106,7 +106,7 @@ msgstr "La pujada s'ha cancel·lat."
#: js/file-upload.js:356
msgid "Could not get result from server."
msgstr ""
msgstr "No hi ha resposta del servidor."
#: js/file-upload.js:446
msgid ""
@ -223,7 +223,7 @@ msgstr "S'està preparant la baixada. Pot trigar una estona si els fitxers són
#: js/files.js:507 js/files.js:545
msgid "Error moving file"
msgstr ""
msgstr "Error en moure el fitxer"
#: js/files.js:558 templates/index.php:61
msgid "Name"

View file

@ -12,9 +12,9 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2013-09-22 12:55-0400\n"
"PO-Revision-Date: 2013-09-20 15:01+0000\n"
"Last-Translator: I Robot <owncloud-bot@tmit.eu>\n"
"POT-Creation-Date: 2013-09-27 00:01-0400\n"
"PO-Revision-Date: 2013-09-25 10:50+0000\n"
"Last-Translator: pstast <petr@stastny.eu>\n"
"Language-Team: Czech (Czech Republic) (http://www.transifex.com/projects/p/owncloud/language/cs_CZ/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -284,7 +284,7 @@ msgstr[2] ""
#: js/oc-dialogs.js:361
msgid "One file conflict"
msgstr ""
msgstr "Jeden konflikt souboru"
#: js/oc-dialogs.js:367
msgid "Which files do you want to keep?"
@ -325,7 +325,7 @@ msgstr "Není určen typ objektu."
#: js/oc-vcategories.js:110 js/oc-vcategories.js:125 js/oc-vcategories.js:136
#: js/oc-vcategories.js:172 js/oc-vcategories.js:189 js/oc-vcategories.js:195
#: js/oc-vcategories.js:199 js/share.js:129 js/share.js:142 js/share.js:149
#: js/share.js:645 js/share.js:657
#: js/share.js:656 js/share.js:668
msgid "Error"
msgstr "Chyba"
@ -345,7 +345,7 @@ msgstr "Sdílené"
msgid "Share"
msgstr "Sdílet"
#: js/share.js:131 js/share.js:685
#: js/share.js:131 js/share.js:696
msgid "Error while sharing"
msgstr "Chyba při sdílení"
@ -445,23 +445,23 @@ msgstr "smazat"
msgid "share"
msgstr "sdílet"
#: js/share.js:400 js/share.js:632
#: js/share.js:400 js/share.js:643
msgid "Password protected"
msgstr "Chráněno heslem"
#: js/share.js:645
#: js/share.js:656
msgid "Error unsetting expiration date"
msgstr "Chyba při odstraňování data vypršení platnosti"
#: js/share.js:657
#: js/share.js:668
msgid "Error setting expiration date"
msgstr "Chyba při nastavení data vypršení platnosti"
#: js/share.js:672
#: js/share.js:683
msgid "Sending ..."
msgstr "Odesílám ..."
#: js/share.js:683
#: js/share.js:694
msgid "Email sent"
msgstr "E-mail odeslán"

View file

@ -11,8 +11,8 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2013-09-22 12:55-0400\n"
"PO-Revision-Date: 2013-09-20 15:01+0000\n"
"POT-Creation-Date: 2013-09-27 00:01-0400\n"
"PO-Revision-Date: 2013-09-24 17:20+0000\n"
"Last-Translator: I Robot <owncloud-bot@tmit.eu>\n"
"Language-Team: Danish (http://www.transifex.com/projects/p/owncloud/language/da/)\n"
"MIME-Version: 1.0\n"
@ -100,11 +100,11 @@ msgstr ""
#: avatar/controller.php:81
msgid "Unknown filetype"
msgstr ""
msgstr "Ukendt filtype"
#: avatar/controller.php:85
msgid "Invalid image"
msgstr ""
msgstr "Ugyldigt billede"
#: avatar/controller.php:115 avatar/controller.php:142
msgid "No temporary profile picture available, try again"
@ -319,7 +319,7 @@ msgstr "Objekttypen er ikke angivet."
#: js/oc-vcategories.js:110 js/oc-vcategories.js:125 js/oc-vcategories.js:136
#: js/oc-vcategories.js:172 js/oc-vcategories.js:189 js/oc-vcategories.js:195
#: js/oc-vcategories.js:199 js/share.js:129 js/share.js:142 js/share.js:149
#: js/share.js:645 js/share.js:657
#: js/share.js:656 js/share.js:668
msgid "Error"
msgstr "Fejl"
@ -339,7 +339,7 @@ msgstr "Delt"
msgid "Share"
msgstr "Del"
#: js/share.js:131 js/share.js:685
#: js/share.js:131 js/share.js:696
msgid "Error while sharing"
msgstr "Fejl under deling"
@ -439,23 +439,23 @@ msgstr "slet"
msgid "share"
msgstr "del"
#: js/share.js:400 js/share.js:632
#: js/share.js:400 js/share.js:643
msgid "Password protected"
msgstr "Beskyttet med adgangskode"
#: js/share.js:645
#: js/share.js:656
msgid "Error unsetting expiration date"
msgstr "Fejl ved fjernelse af udløbsdato"
#: js/share.js:657
#: js/share.js:668
msgid "Error setting expiration date"
msgstr "Fejl under sætning af udløbsdato"
#: js/share.js:672
#: js/share.js:683
msgid "Sending ..."
msgstr "Sender ..."
#: js/share.js:683
#: js/share.js:694
msgid "Email sent"
msgstr "E-mail afsendt"

View file

@ -10,9 +10,9 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2013-09-16 11:33-0400\n"
"PO-Revision-Date: 2013-09-16 15:34+0000\n"
"Last-Translator: I Robot <owncloud-bot@tmit.eu>\n"
"POT-Creation-Date: 2013-09-27 00:01-0400\n"
"PO-Revision-Date: 2013-09-24 17:20+0000\n"
"Last-Translator: Sappe\n"
"Language-Team: Danish (http://www.transifex.com/projects/p/owncloud/language/da/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -58,15 +58,15 @@ msgstr "Upgradering af \"%s\" fejlede"
#: avatar.php:56
msgid "Custom profile pictures don't work with encryption yet"
msgstr ""
msgstr "Personligt profilbillede virker endnu ikke sammen med kryptering"
#: avatar.php:64
msgid "Unknown filetype"
msgstr ""
msgstr "Ukendt filtype"
#: avatar.php:69
msgid "Invalid image"
msgstr ""
msgstr "Ugyldigt billede"
#: defaults.php:35
msgid "web services under your control"
@ -167,15 +167,15 @@ msgstr "Adgangsfejl"
msgid "Token expired. Please reload page."
msgstr "Adgang er udløbet. Genindlæs siden."
#: search/provider/file.php:17 search/provider/file.php:35
#: search/provider/file.php:18 search/provider/file.php:36
msgid "Files"
msgstr "Filer"
#: search/provider/file.php:26 search/provider/file.php:33
#: search/provider/file.php:27 search/provider/file.php:34
msgid "Text"
msgstr "SMS"
#: search/provider/file.php:29
#: search/provider/file.php:30
msgid "Images"
msgstr "Billeder"

View file

@ -10,9 +10,9 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2013-09-20 10:45-0400\n"
"PO-Revision-Date: 2013-09-20 14:45+0000\n"
"Last-Translator: I Robot <owncloud-bot@tmit.eu>\n"
"POT-Creation-Date: 2013-09-27 00:01-0400\n"
"PO-Revision-Date: 2013-09-24 17:00+0000\n"
"Last-Translator: Sappe\n"
"Language-Team: Danish (http://www.transifex.com/projects/p/owncloud/language/da/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -89,42 +89,42 @@ msgstr "Kunne ikke opdatere app'en."
#: changepassword/controller.php:20
msgid "Wrong password"
msgstr ""
msgstr "Forkert kodeord"
#: changepassword/controller.php:42
msgid "No user supplied"
msgstr ""
msgstr "Intet brugernavn givet"
#: changepassword/controller.php:74
msgid ""
"Please provide an admin recovery password, otherwise all user data will be "
"lost"
msgstr ""
msgstr "Angiv venligst en admininstrator gendannelseskode, ellers vil alt brugerdata gå tabt"
#: changepassword/controller.php:79
msgid ""
"Wrong admin recovery password. Please check the password and try again."
msgstr ""
msgstr "Forkert admin gendannelseskode. Se venligst koden efter og prøv igen."
#: changepassword/controller.php:87
msgid ""
"Back-end doesn't support password change, but the users encryption key was "
"successfully updated."
msgstr ""
msgstr "Serveren understøtter ikke kodeordsskifte, men brugernes krypteringsnøgle blev opdateret."
#: changepassword/controller.php:92 changepassword/controller.php:103
msgid "Unable to change password"
msgstr ""
msgstr "Kunne ikke ændre kodeord"
#: js/apps.js:43
msgid "Update to {appversion}"
msgstr "Opdatér til {appversion}"
#: js/apps.js:49 js/apps.js:82 js/apps.js:108
#: js/apps.js:49 js/apps.js:82 js/apps.js:110
msgid "Disable"
msgstr "Deaktiver"
#: js/apps.js:49 js/apps.js:89 js/apps.js:102 js/apps.js:117
#: js/apps.js:49 js/apps.js:90 js/apps.js:103 js/apps.js:119
msgid "Enable"
msgstr "Aktiver"
@ -132,31 +132,31 @@ msgstr "Aktiver"
msgid "Please wait...."
msgstr "Vent venligst..."
#: js/apps.js:79 js/apps.js:80 js/apps.js:100
#: js/apps.js:79 js/apps.js:80 js/apps.js:101
msgid "Error while disabling app"
msgstr "Kunne ikke deaktivere app"
#: js/apps.js:99 js/apps.js:112 js/apps.js:113
#: js/apps.js:100 js/apps.js:114 js/apps.js:115
msgid "Error while enabling app"
msgstr "Kunne ikke aktivere app"
#: js/apps.js:123
#: js/apps.js:125
msgid "Updating...."
msgstr "Opdaterer...."
#: js/apps.js:126
#: js/apps.js:128
msgid "Error while updating app"
msgstr "Der opstod en fejl under app opgraderingen"
#: js/apps.js:126
#: js/apps.js:128
msgid "Error"
msgstr "Fejl"
#: js/apps.js:127 templates/apps.php:43
#: js/apps.js:129 templates/apps.php:43
msgid "Update"
msgstr "Opdater"
#: js/apps.js:130
#: js/apps.js:132
msgid "Updated"
msgstr "Opdateret"

View file

@ -5,14 +5,15 @@
# Translators:
# Efstathios Iosifidis <iefstathios@gmail.com>, 2013
# Efstathios Iosifidis <iosifidis@opensuse.org>, 2013
# gtsamis <gtsamis@yahoo.com>, 2013
# frerisp <petrosfreris@gmail.com>, 2013
msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2013-09-20 10:44-0400\n"
"PO-Revision-Date: 2013-09-20 14:45+0000\n"
"Last-Translator: I Robot <owncloud-bot@tmit.eu>\n"
"POT-Creation-Date: 2013-09-27 00:01-0400\n"
"PO-Revision-Date: 2013-09-25 12:10+0000\n"
"Last-Translator: gtsamis <gtsamis@yahoo.com>\n"
"Language-Team: Greek (http://www.transifex.com/projects/p/owncloud/language/el/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -89,7 +90,7 @@ msgstr ""
msgid "Invalid directory."
msgstr "Μη έγκυρος φάκελος."
#: appinfo/app.php:12
#: appinfo/app.php:11
msgid "Files"
msgstr "Αρχεία"
@ -224,7 +225,7 @@ msgstr "Η λήψη προετοιμάζεται. Αυτό μπορεί να π
#: js/files.js:507 js/files.js:545
msgid "Error moving file"
msgstr ""
msgstr "Σφάλμα κατά τη μετακίνηση του αρχείου"
#: js/files.js:558 templates/index.php:61
msgid "Name"

View file

@ -8,9 +8,9 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2013-09-22 12:55-0400\n"
"PO-Revision-Date: 2013-09-20 15:01+0000\n"
"Last-Translator: I Robot <owncloud-bot@tmit.eu>\n"
"POT-Creation-Date: 2013-09-24 12:58-0400\n"
"PO-Revision-Date: 2013-09-23 16:10+0000\n"
"Last-Translator: mnestis <transifex@mnestis.net>\n"
"Language-Team: English (United Kingdom) (http://www.transifex.com/projects/p/owncloud/language/en_GB/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -270,22 +270,22 @@ msgstr "Error loading message template: {error}"
#: js/oc-dialogs.js:347
msgid "{count} file conflict"
msgid_plural "{count} file conflicts"
msgstr[0] ""
msgstr[1] ""
msgstr[0] "{count} file conflict"
msgstr[1] "{count} file conflicts"
#: js/oc-dialogs.js:361
msgid "One file conflict"
msgstr ""
msgstr "One file conflict"
#: js/oc-dialogs.js:367
msgid "Which files do you want to keep?"
msgstr ""
msgstr "Which files do you wish to keep?"
#: js/oc-dialogs.js:368
msgid ""
"If you select both versions, the copied file will have a number added to its"
" name."
msgstr ""
msgstr "If you select both versions, the copied file will have a number added to its name."
#: js/oc-dialogs.js:376
msgid "Cancel"
@ -293,19 +293,19 @@ msgstr "Cancel"
#: js/oc-dialogs.js:386
msgid "Continue"
msgstr ""
msgstr "Continue"
#: js/oc-dialogs.js:433 js/oc-dialogs.js:446
msgid "(all selected)"
msgstr ""
msgstr "(all selected)"
#: js/oc-dialogs.js:436 js/oc-dialogs.js:449
msgid "({count} selected)"
msgstr ""
msgstr "({count} selected)"
#: js/oc-dialogs.js:457
msgid "Error loading file exists template"
msgstr ""
msgstr "Error loading file exists template"
#: js/oc-vcategories.js:5 js/oc-vcategories.js:85 js/oc-vcategories.js:102
#: js/oc-vcategories.js:117 js/oc-vcategories.js:132 js/oc-vcategories.js:162
@ -316,7 +316,7 @@ msgstr "The object type is not specified."
#: js/oc-vcategories.js:110 js/oc-vcategories.js:125 js/oc-vcategories.js:136
#: js/oc-vcategories.js:172 js/oc-vcategories.js:189 js/oc-vcategories.js:195
#: js/oc-vcategories.js:199 js/share.js:129 js/share.js:142 js/share.js:149
#: js/share.js:645 js/share.js:657
#: js/share.js:656 js/share.js:668
msgid "Error"
msgstr "Error"
@ -336,7 +336,7 @@ msgstr "Shared"
msgid "Share"
msgstr "Share"
#: js/share.js:131 js/share.js:685
#: js/share.js:131 js/share.js:696
msgid "Error while sharing"
msgstr "Error whilst sharing"
@ -436,23 +436,23 @@ msgstr "delete"
msgid "share"
msgstr "share"
#: js/share.js:400 js/share.js:632
#: js/share.js:400 js/share.js:643
msgid "Password protected"
msgstr "Password protected"
#: js/share.js:645
#: js/share.js:656
msgid "Error unsetting expiration date"
msgstr "Error unsetting expiration date"
#: js/share.js:657
#: js/share.js:668
msgid "Error setting expiration date"
msgstr "Error setting expiration date"
#: js/share.js:672
#: js/share.js:683
msgid "Sending ..."
msgstr "Sending ..."
#: js/share.js:683
#: js/share.js:694
msgid "Email sent"
msgstr "Email sent"

View file

@ -8,9 +8,9 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2013-09-20 10:44-0400\n"
"PO-Revision-Date: 2013-09-20 14:45+0000\n"
"Last-Translator: I Robot <owncloud-bot@tmit.eu>\n"
"POT-Creation-Date: 2013-09-24 12:58-0400\n"
"PO-Revision-Date: 2013-09-24 16:00+0000\n"
"Last-Translator: mnestis <transifex@mnestis.net>\n"
"Language-Team: English (United Kingdom) (http://www.transifex.com/projects/p/owncloud/language/en_GB/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -77,23 +77,23 @@ msgstr "Not enough storage available"
#: ajax/upload.php:120 ajax/upload.php:143
msgid "Upload failed. Could not get file info."
msgstr ""
msgstr "Upload failed. Could not get file info."
#: ajax/upload.php:136
msgid "Upload failed. Could not find uploaded file"
msgstr ""
msgstr "Upload failed. Could not find uploaded file"
#: ajax/upload.php:160
msgid "Invalid directory."
msgstr "Invalid directory."
#: appinfo/app.php:12
#: appinfo/app.php:11
msgid "Files"
msgstr "Files"
#: js/file-upload.js:244
msgid "Unable to upload {filename} as it is a directory or has 0 bytes"
msgstr ""
msgstr "Unable to upload {filename} as it is a directory or has 0 bytes"
#: js/file-upload.js:255
msgid "Not enough space available"
@ -105,7 +105,7 @@ msgstr "Upload cancelled."
#: js/file-upload.js:356
msgid "Could not get result from server."
msgstr ""
msgstr "Could not get result from server."
#: js/file-upload.js:446
msgid ""
@ -198,7 +198,7 @@ msgstr "File name cannot be empty."
msgid ""
"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not "
"allowed."
msgstr "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed."
msgstr "Invalid name: '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed."
#: js/files.js:51
msgid "Your storage is full, files can not be updated or synced anymore!"
@ -222,7 +222,7 @@ msgstr "Your download is being prepared. This might take some time if the files
#: js/files.js:507 js/files.js:545
msgid "Error moving file"
msgstr ""
msgstr "Error moving file"
#: js/files.js:558 templates/index.php:61
msgid "Name"

View file

@ -13,9 +13,9 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2013-09-22 12:55-0400\n"
"PO-Revision-Date: 2013-09-20 15:01+0000\n"
"Last-Translator: I Robot <owncloud-bot@tmit.eu>\n"
"POT-Creation-Date: 2013-09-27 00:01-0400\n"
"PO-Revision-Date: 2013-09-26 15:10+0000\n"
"Last-Translator: Christophe Lherieau <skimpax@gmail.com>\n"
"Language-Team: French (http://www.transifex.com/projects/p/owncloud/language/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -110,11 +110,11 @@ msgstr "Image invalide"
#: avatar/controller.php:115 avatar/controller.php:142
msgid "No temporary profile picture available, try again"
msgstr ""
msgstr "Aucune image temporaire disponible pour le profil. Essayez à nouveau."
#: avatar/controller.php:135
msgid "No crop data provided"
msgstr ""
msgstr "Aucune donnée de culture fournie"
#: js/config.php:32
msgid "Sunday"
@ -275,22 +275,22 @@ msgstr "Erreur de chargement du modèle de message : {error}"
#: js/oc-dialogs.js:347
msgid "{count} file conflict"
msgid_plural "{count} file conflicts"
msgstr[0] ""
msgstr[1] ""
msgstr[0] "{count} fichier en conflit"
msgstr[1] "{count} fichiers en conflit"
#: js/oc-dialogs.js:361
msgid "One file conflict"
msgstr ""
msgstr "Un conflit de fichier"
#: js/oc-dialogs.js:367
msgid "Which files do you want to keep?"
msgstr ""
msgstr "Quels fichiers désirez-vous garder ?"
#: js/oc-dialogs.js:368
msgid ""
"If you select both versions, the copied file will have a number added to its"
" name."
msgstr ""
msgstr "Si vous sélectionnez les deux versions, un nombre sera ajouté au nom du fichier copié."
#: js/oc-dialogs.js:376
msgid "Cancel"
@ -298,19 +298,19 @@ msgstr "Annuler"
#: js/oc-dialogs.js:386
msgid "Continue"
msgstr ""
msgstr "Poursuivre"
#: js/oc-dialogs.js:433 js/oc-dialogs.js:446
msgid "(all selected)"
msgstr ""
msgstr "(tous sélectionnés)"
#: js/oc-dialogs.js:436 js/oc-dialogs.js:449
msgid "({count} selected)"
msgstr ""
msgstr "({count} sélectionnés)"
#: js/oc-dialogs.js:457
msgid "Error loading file exists template"
msgstr ""
msgstr "Erreur de chargement du modèle de fichier existant"
#: js/oc-vcategories.js:5 js/oc-vcategories.js:85 js/oc-vcategories.js:102
#: js/oc-vcategories.js:117 js/oc-vcategories.js:132 js/oc-vcategories.js:162
@ -321,7 +321,7 @@ msgstr "Le type d'objet n'est pas spécifié."
#: js/oc-vcategories.js:110 js/oc-vcategories.js:125 js/oc-vcategories.js:136
#: js/oc-vcategories.js:172 js/oc-vcategories.js:189 js/oc-vcategories.js:195
#: js/oc-vcategories.js:199 js/share.js:129 js/share.js:142 js/share.js:149
#: js/share.js:645 js/share.js:657
#: js/share.js:656 js/share.js:668
msgid "Error"
msgstr "Erreur"
@ -341,7 +341,7 @@ msgstr "Partagé"
msgid "Share"
msgstr "Partager"
#: js/share.js:131 js/share.js:685
#: js/share.js:131 js/share.js:696
msgid "Error while sharing"
msgstr "Erreur lors de la mise en partage"
@ -441,23 +441,23 @@ msgstr "supprimer"
msgid "share"
msgstr "partager"
#: js/share.js:400 js/share.js:632
#: js/share.js:400 js/share.js:643
msgid "Password protected"
msgstr "Protégé par un mot de passe"
#: js/share.js:645
#: js/share.js:656
msgid "Error unsetting expiration date"
msgstr "Une erreur est survenue pendant la suppression de la date d'expiration"
#: js/share.js:657
#: js/share.js:668
msgid "Error setting expiration date"
msgstr "Erreur lors de la spécification de la date d'expiration"
#: js/share.js:672
#: js/share.js:683
msgid "Sending ..."
msgstr "En cours d'envoi ..."
#: js/share.js:683
#: js/share.js:694
msgid "Email sent"
msgstr "Email envoyé"

View file

@ -11,9 +11,9 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2013-09-20 10:44-0400\n"
"PO-Revision-Date: 2013-09-20 14:45+0000\n"
"Last-Translator: I Robot <owncloud-bot@tmit.eu>\n"
"POT-Creation-Date: 2013-09-24 12:58-0400\n"
"PO-Revision-Date: 2013-09-23 19:30+0000\n"
"Last-Translator: ogre_sympathique <ogre.sympathique@speed.1s.fr>\n"
"Language-Team: French (http://www.transifex.com/projects/p/owncloud/language/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -80,23 +80,23 @@ msgstr "Plus assez d'espace de stockage disponible"
#: ajax/upload.php:120 ajax/upload.php:143
msgid "Upload failed. Could not get file info."
msgstr ""
msgstr "L'envoi a échoué. Impossible d'obtenir les informations du fichier."
#: ajax/upload.php:136
msgid "Upload failed. Could not find uploaded file"
msgstr ""
msgstr "L'envoi a échoué. Impossible de trouver le fichier envoyé."
#: ajax/upload.php:160
msgid "Invalid directory."
msgstr "Dossier invalide."
#: appinfo/app.php:12
#: appinfo/app.php:11
msgid "Files"
msgstr "Fichiers"
#: js/file-upload.js:244
msgid "Unable to upload {filename} as it is a directory or has 0 bytes"
msgstr ""
msgstr "Impossible d'envoyer {filename} car il s'agit d'un répertoire ou d'un fichier de taille nulle"
#: js/file-upload.js:255
msgid "Not enough space available"
@ -108,7 +108,7 @@ msgstr "Envoi annulé."
#: js/file-upload.js:356
msgid "Could not get result from server."
msgstr ""
msgstr "Ne peut recevoir les résultats du serveur."
#: js/file-upload.js:446
msgid ""
@ -225,7 +225,7 @@ msgstr "Votre téléchargement est cours de préparation. Ceci peut nécessiter
#: js/files.js:507 js/files.js:545
msgid "Error moving file"
msgstr ""
msgstr "Erreur lors du déplacement du fichier"
#: js/files.js:558 templates/index.php:61
msgid "Name"

View file

@ -13,9 +13,9 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2013-09-20 10:45-0400\n"
"PO-Revision-Date: 2013-09-20 14:45+0000\n"
"Last-Translator: I Robot <owncloud-bot@tmit.eu>\n"
"POT-Creation-Date: 2013-09-27 00:01-0400\n"
"PO-Revision-Date: 2013-09-26 15:00+0000\n"
"Last-Translator: Christophe Lherieau <skimpax@gmail.com>\n"
"Language-Team: French (http://www.transifex.com/projects/p/owncloud/language/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -102,18 +102,18 @@ msgstr "Aucun utilisateur fourni"
msgid ""
"Please provide an admin recovery password, otherwise all user data will be "
"lost"
msgstr ""
msgstr "Veuillez fournir un mot de passe administrateur de récupération de données, sinon toutes les données de l'utilisateur seront perdues"
#: changepassword/controller.php:79
msgid ""
"Wrong admin recovery password. Please check the password and try again."
msgstr ""
msgstr "Mot de passe administrateur de récupération de données invalide. Veuillez vérifier le mot de passe et essayer à nouveau."
#: changepassword/controller.php:87
msgid ""
"Back-end doesn't support password change, but the users encryption key was "
"successfully updated."
msgstr ""
msgstr "L'infrastructure d'arrière-plan ne supporte pas la modification de mot de passe, mais la clef de chiffrement des utilisateurs a été mise à jour avec succès."
#: changepassword/controller.php:92 changepassword/controller.php:103
msgid "Unable to change password"
@ -123,11 +123,11 @@ msgstr "Impossible de modifier le mot de passe"
msgid "Update to {appversion}"
msgstr "Mettre à jour vers {appversion}"
#: js/apps.js:49 js/apps.js:82 js/apps.js:108
#: js/apps.js:49 js/apps.js:82 js/apps.js:110
msgid "Disable"
msgstr "Désactiver"
#: js/apps.js:49 js/apps.js:89 js/apps.js:102 js/apps.js:117
#: js/apps.js:49 js/apps.js:90 js/apps.js:103 js/apps.js:119
msgid "Enable"
msgstr "Activer"
@ -135,31 +135,31 @@ msgstr "Activer"
msgid "Please wait...."
msgstr "Veuillez patienter…"
#: js/apps.js:79 js/apps.js:80 js/apps.js:100
#: js/apps.js:79 js/apps.js:80 js/apps.js:101
msgid "Error while disabling app"
msgstr "Erreur lors de la désactivation de l'application"
#: js/apps.js:99 js/apps.js:112 js/apps.js:113
#: js/apps.js:100 js/apps.js:114 js/apps.js:115
msgid "Error while enabling app"
msgstr "Erreur lors de l'activation de l'application"
#: js/apps.js:123
#: js/apps.js:125
msgid "Updating...."
msgstr "Mise à jour..."
#: js/apps.js:126
#: js/apps.js:128
msgid "Error while updating app"
msgstr "Erreur lors de la mise à jour de l'application"
#: js/apps.js:126
#: js/apps.js:128
msgid "Error"
msgstr "Erreur"
#: js/apps.js:127 templates/apps.php:43
#: js/apps.js:129 templates/apps.php:43
msgid "Update"
msgstr "Mettre à jour"
#: js/apps.js:130
#: js/apps.js:132
msgid "Updated"
msgstr "Mise à jour effectuée avec succès"

View file

@ -8,9 +8,9 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2013-09-22 12:55-0400\n"
"PO-Revision-Date: 2013-09-20 15:01+0000\n"
"Last-Translator: I Robot <owncloud-bot@tmit.eu>\n"
"POT-Creation-Date: 2013-09-24 12:58-0400\n"
"PO-Revision-Date: 2013-09-23 10:30+0000\n"
"Last-Translator: mbouzada <mbouzada@gmail.com>\n"
"Language-Team: Galician (http://www.transifex.com/projects/p/owncloud/language/gl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -270,22 +270,22 @@ msgstr "Produciuse un erro ao cargar o modelo da mensaxe: {error}"
#: js/oc-dialogs.js:347
msgid "{count} file conflict"
msgid_plural "{count} file conflicts"
msgstr[0] ""
msgstr[1] ""
msgstr[0] "{count} conflito de ficheiro"
msgstr[1] "{count} conflitos de ficheiros"
#: js/oc-dialogs.js:361
msgid "One file conflict"
msgstr ""
msgstr "Un conflito de ficheiro"
#: js/oc-dialogs.js:367
msgid "Which files do you want to keep?"
msgstr ""
msgstr "Que ficheiros quere conservar?"
#: js/oc-dialogs.js:368
msgid ""
"If you select both versions, the copied file will have a number added to its"
" name."
msgstr ""
msgstr "Se selecciona ambas versións, o ficheiro copiado terá un número engadido ao nome."
#: js/oc-dialogs.js:376
msgid "Cancel"
@ -293,19 +293,19 @@ msgstr "Cancelar"
#: js/oc-dialogs.js:386
msgid "Continue"
msgstr ""
msgstr "Continuar"
#: js/oc-dialogs.js:433 js/oc-dialogs.js:446
msgid "(all selected)"
msgstr ""
msgstr "(todo o seleccionado)"
#: js/oc-dialogs.js:436 js/oc-dialogs.js:449
msgid "({count} selected)"
msgstr ""
msgstr "({count} seleccionados)"
#: js/oc-dialogs.js:457
msgid "Error loading file exists template"
msgstr ""
msgstr "Produciuse un erro ao cargar o modelo de ficheiro existente"
#: js/oc-vcategories.js:5 js/oc-vcategories.js:85 js/oc-vcategories.js:102
#: js/oc-vcategories.js:117 js/oc-vcategories.js:132 js/oc-vcategories.js:162
@ -316,7 +316,7 @@ msgstr "Non se especificou o tipo de obxecto."
#: js/oc-vcategories.js:110 js/oc-vcategories.js:125 js/oc-vcategories.js:136
#: js/oc-vcategories.js:172 js/oc-vcategories.js:189 js/oc-vcategories.js:195
#: js/oc-vcategories.js:199 js/share.js:129 js/share.js:142 js/share.js:149
#: js/share.js:645 js/share.js:657
#: js/share.js:656 js/share.js:668
msgid "Error"
msgstr "Erro"
@ -336,7 +336,7 @@ msgstr "Compartir"
msgid "Share"
msgstr "Compartir"
#: js/share.js:131 js/share.js:685
#: js/share.js:131 js/share.js:696
msgid "Error while sharing"
msgstr "Produciuse un erro ao compartir"
@ -436,23 +436,23 @@ msgstr "eliminar"
msgid "share"
msgstr "compartir"
#: js/share.js:400 js/share.js:632
#: js/share.js:400 js/share.js:643
msgid "Password protected"
msgstr "Protexido con contrasinal"
#: js/share.js:645
#: js/share.js:656
msgid "Error unsetting expiration date"
msgstr "Produciuse un erro ao retirar a data de caducidade"
#: js/share.js:657
#: js/share.js:668
msgid "Error setting expiration date"
msgstr "Produciuse un erro ao definir a data de caducidade"
#: js/share.js:672
#: js/share.js:683
msgid "Sending ..."
msgstr "Enviando..."
#: js/share.js:683
#: js/share.js:694
msgid "Email sent"
msgstr "Correo enviado"

View file

@ -8,9 +8,9 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2013-09-20 10:44-0400\n"
"PO-Revision-Date: 2013-09-20 14:45+0000\n"
"Last-Translator: I Robot <owncloud-bot@tmit.eu>\n"
"POT-Creation-Date: 2013-09-24 12:58-0400\n"
"PO-Revision-Date: 2013-09-23 10:30+0000\n"
"Last-Translator: mbouzada <mbouzada@gmail.com>\n"
"Language-Team: Galician (http://www.transifex.com/projects/p/owncloud/language/gl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -77,23 +77,23 @@ msgstr "Non hai espazo de almacenamento abondo"
#: ajax/upload.php:120 ajax/upload.php:143
msgid "Upload failed. Could not get file info."
msgstr ""
msgstr "O envío fracasou. Non foi posíbel obter información do ficheiro."
#: ajax/upload.php:136
msgid "Upload failed. Could not find uploaded file"
msgstr ""
msgstr "O envío fracasou. Non foi posíbel atopar o ficheiro enviado"
#: ajax/upload.php:160
msgid "Invalid directory."
msgstr "O directorio é incorrecto."
#: appinfo/app.php:12
#: appinfo/app.php:11
msgid "Files"
msgstr "Ficheiros"
#: js/file-upload.js:244
msgid "Unable to upload {filename} as it is a directory or has 0 bytes"
msgstr ""
msgstr "Non é posíbel enviar {filename}, xa que ou é un directorio ou ten 0 bytes"
#: js/file-upload.js:255
msgid "Not enough space available"
@ -105,7 +105,7 @@ msgstr "Envío cancelado."
#: js/file-upload.js:356
msgid "Could not get result from server."
msgstr ""
msgstr "Non foi posíbel obter o resultado do servidor."
#: js/file-upload.js:446
msgid ""
@ -222,7 +222,7 @@ msgstr "Está a prepararse a súa descarga. Isto pode levar bastante tempo se os
#: js/files.js:507 js/files.js:545
msgid "Error moving file"
msgstr ""
msgstr "Produciuse un erro ao mover o ficheiro"
#: js/files.js:558 templates/index.php:61
msgid "Name"

View file

@ -8,9 +8,9 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2013-09-20 10:44-0400\n"
"PO-Revision-Date: 2013-09-20 14:45+0000\n"
"Last-Translator: I Robot <owncloud-bot@tmit.eu>\n"
"POT-Creation-Date: 2013-09-27 00:01-0400\n"
"PO-Revision-Date: 2013-09-24 18:40+0000\n"
"Last-Translator: Laszlo Tornoci <torlasz@gmail.com>\n"
"Language-Team: Hungarian (Hungary) (http://www.transifex.com/projects/p/owncloud/language/hu_HU/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -77,23 +77,23 @@ msgstr "Nincs elég szabad hely."
#: ajax/upload.php:120 ajax/upload.php:143
msgid "Upload failed. Could not get file info."
msgstr ""
msgstr "A feltöltés nem sikerült. Az állományt leíró információk nem érhetők el."
#: ajax/upload.php:136
msgid "Upload failed. Could not find uploaded file"
msgstr ""
msgstr "A feltöltés nem sikerült. Nem található a feltöltendő állomány."
#: ajax/upload.php:160
msgid "Invalid directory."
msgstr "Érvénytelen mappa."
#: appinfo/app.php:12
#: appinfo/app.php:11
msgid "Files"
msgstr "Fájlok"
#: js/file-upload.js:244
msgid "Unable to upload {filename} as it is a directory or has 0 bytes"
msgstr ""
msgstr "A(z) {filename} állomány nem tölthető fel, mert ez vagy egy mappa, vagy pedig 0 bájtból áll."
#: js/file-upload.js:255
msgid "Not enough space available"
@ -105,7 +105,7 @@ msgstr "A feltöltést megszakítottuk."
#: js/file-upload.js:356
msgid "Could not get result from server."
msgstr ""
msgstr "A kiszolgálótól nem kapható meg az eredmény."
#: js/file-upload.js:446
msgid ""
@ -167,24 +167,24 @@ msgstr "visszavonás"
#: js/filelist.js:533 js/filelist.js:599 js/files.js:576
msgid "%n folder"
msgid_plural "%n folders"
msgstr[0] ""
msgstr[1] ""
msgstr[0] "%n mappa"
msgstr[1] "%n mappa"
#: js/filelist.js:534 js/filelist.js:600 js/files.js:582
msgid "%n file"
msgid_plural "%n files"
msgstr[0] ""
msgstr[1] ""
msgstr[0] "%n állomány"
msgstr[1] "%n állomány"
#: js/filelist.js:541
msgid "{dirs} and {files}"
msgstr ""
msgstr "{dirs} és {files}"
#: js/filelist.js:731 js/filelist.js:769
msgid "Uploading %n file"
msgid_plural "Uploading %n files"
msgstr[0] ""
msgstr[1] ""
msgstr[0] "%n állomány feltöltése"
msgstr[1] "%n állomány feltöltése"
#: js/files.js:25
msgid "'.' is an invalid file name."
@ -212,7 +212,7 @@ msgstr "A tároló majdnem tele van ({usedSpacePercent}%)"
msgid ""
"Encryption was disabled but your files are still encrypted. Please go to "
"your personal settings to decrypt your files."
msgstr ""
msgstr "A titkosítási funkciót kikapcsolták, de az Ön állományai még mindig titkosított állapotban vannak. A személyes beállításoknál tudja a titkosítást feloldani."
#: js/files.js:296
msgid ""
@ -222,7 +222,7 @@ msgstr "Készül a letöltendő állomány. Ez eltarthat egy ideig, ha nagyok a
#: js/files.js:507 js/files.js:545
msgid "Error moving file"
msgstr ""
msgstr "Az állomány áthelyezése nem sikerült."
#: js/files.js:558 templates/index.php:61
msgid "Name"

View file

@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2013-08-15 04:47-0400\n"
"PO-Revision-Date: 2013-08-15 08:48+0000\n"
"POT-Creation-Date: 2013-09-27 00:01-0400\n"
"PO-Revision-Date: 2013-09-24 18:40+0000\n"
"Last-Translator: I Robot <owncloud-bot@tmit.eu>\n"
"Language-Team: Hungarian (Hungary) (http://www.transifex.com/projects/p/owncloud/language/hu_HU/)\n"
"MIME-Version: 1.0\n"
@ -28,43 +28,43 @@ msgstr "Nem sikerült %s végleges törlése"
msgid "Couldn't restore %s"
msgstr "Nem sikerült %s visszaállítása"
#: js/trash.js:7 js/trash.js:100
#: js/trash.js:7 js/trash.js:102
msgid "perform restore operation"
msgstr "a visszaállítás végrehajtása"
#: js/trash.js:20 js/trash.js:48 js/trash.js:118 js/trash.js:146
#: js/trash.js:20 js/trash.js:49 js/trash.js:120 js/trash.js:148
msgid "Error"
msgstr "Hiba"
#: js/trash.js:36
#: js/trash.js:37
msgid "delete file permanently"
msgstr "az állomány végleges törlése"
#: js/trash.js:127
#: js/trash.js:129
msgid "Delete permanently"
msgstr "Végleges törlés"
#: js/trash.js:182 templates/index.php:17
#: js/trash.js:190 templates/index.php:21
msgid "Name"
msgstr "Név"
#: js/trash.js:183 templates/index.php:27
#: js/trash.js:191 templates/index.php:31
msgid "Deleted"
msgstr "Törölve"
#: js/trash.js:191
#: js/trash.js:199
msgid "%n folder"
msgid_plural "%n folders"
msgstr[0] ""
msgstr[1] ""
msgstr[1] "%n mappa"
#: js/trash.js:197
#: js/trash.js:205
msgid "%n file"
msgid_plural "%n files"
msgstr[0] ""
msgstr[1] ""
msgstr[1] "%n állomány"
#: lib/trash.php:819 lib/trash.php:821
#: lib/trashbin.php:814 lib/trashbin.php:816
msgid "restored"
msgstr "visszaállítva"
@ -72,11 +72,11 @@ msgstr "visszaállítva"
msgid "Nothing in here. Your trash bin is empty!"
msgstr "Itt nincs semmi. Az Ön szemetes mappája üres!"
#: templates/index.php:20 templates/index.php:22
#: templates/index.php:24 templates/index.php:26
msgid "Restore"
msgstr "Visszaállítás"
#: templates/index.php:30 templates/index.php:31
#: templates/index.php:34 templates/index.php:35
msgid "Delete"
msgstr "Törlés"

View file

@ -9,9 +9,9 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2013-09-07 04:40-0400\n"
"PO-Revision-Date: 2013-09-05 11:51+0000\n"
"Last-Translator: I Robot <owncloud-bot@tmit.eu>\n"
"POT-Creation-Date: 2013-09-27 00:01-0400\n"
"PO-Revision-Date: 2013-09-24 19:00+0000\n"
"Last-Translator: Laszlo Tornoci <torlasz@gmail.com>\n"
"Language-Team: Hungarian (Hungary) (http://www.transifex.com/projects/p/owncloud/language/hu_HU/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -92,7 +92,7 @@ msgid ""
"<b>Warning:</b> Apps user_ldap and user_webdavauth are incompatible. You may"
" experience unexpected behavior. Please ask your system administrator to "
"disable one of them."
msgstr ""
msgstr "<b>Figyelem:</b> a user_ldap és user_webdavauth alkalmazások nem kompatibilisek. Együttes használatuk váratlan eredményekhez vezethet. Kérje meg a rendszergazdát, hogy a kettő közül kapcsolja ki az egyiket."
#: templates/settings.php:12
msgid ""
@ -157,7 +157,7 @@ msgstr "Szűrő a bejelentkezéshez"
msgid ""
"Defines the filter to apply, when login is attempted. %%uid replaces the "
"username in the login action. Example: \"uid=%%uid\""
msgstr ""
msgstr "Ez a szűrő érvényes a bejelentkezés megkísérlésekor. Ekkor az %%uid változó helyére a bejelentkezési név kerül. Például: \"uid=%%uid\""
#: templates/settings.php:55
msgid "User List Filter"
@ -167,7 +167,7 @@ msgstr "A felhasználók szűrője"
msgid ""
"Defines the filter to apply, when retrieving users (no placeholders). "
"Example: \"objectClass=person\""
msgstr ""
msgstr "Ez a szűrő érvényes a felhasználók listázásakor (nincs helyettesíthető változó). Például: \"objectClass=person\""
#: templates/settings.php:59
msgid "Group Filter"
@ -177,7 +177,7 @@ msgstr "A csoportok szűrője"
msgid ""
"Defines the filter to apply, when retrieving groups (no placeholders). "
"Example: \"objectClass=posixGroup\""
msgstr ""
msgstr "Ez a szűrő érvényes a csoportok listázásakor (nincs helyettesíthető változó). Például: \"objectClass=posixGroup\""
#: templates/settings.php:66
msgid "Connection Settings"
@ -215,7 +215,7 @@ msgstr "A fő szerver kihagyása"
#: templates/settings.php:72
msgid "Only connect to the replica server."
msgstr ""
msgstr "Csak a másodlagos (másolati) kiszolgálóhoz kapcsolódjunk."
#: templates/settings.php:73
msgid "Use TLS"
@ -238,7 +238,7 @@ msgstr "Ne ellenőrizzük az SSL-tanúsítvány érvényességét"
msgid ""
"Not recommended, use it for testing only! If connection only works with this"
" option, import the LDAP server's SSL certificate in your %s server."
msgstr ""
msgstr "Használata nem javasolt (kivéve tesztelési céllal). Ha a kapcsolat csak ezzel a beállítással működik, akkor importálja az LDAP-kiszolgáló SSL tanúsítványát a(z) %s kiszolgálóra!"
#: templates/settings.php:76
msgid "Cache Time-To-Live"
@ -258,7 +258,7 @@ msgstr "A felhasználónév mezője"
#: templates/settings.php:80
msgid "The LDAP attribute to use to generate the user's display name."
msgstr ""
msgstr "Ebből az LDAP attribútumból képződik a felhasználó megjelenítendő neve."
#: templates/settings.php:81
msgid "Base User Tree"
@ -282,7 +282,7 @@ msgstr "A csoport nevének mezője"
#: templates/settings.php:83
msgid "The LDAP attribute to use to generate the groups's display name."
msgstr ""
msgstr "Ebből az LDAP attribútumból képződik a csoport megjelenítendő neve."
#: templates/settings.php:84
msgid "Base Group Tree"

View file

@ -11,9 +11,9 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2013-09-22 12:55-0400\n"
"PO-Revision-Date: 2013-09-22 13:40+0000\n"
"Last-Translator: nappo <leone@inventati.org>\n"
"POT-Creation-Date: 2013-09-29 00:02-0400\n"
"PO-Revision-Date: 2013-09-27 18:30+0000\n"
"Last-Translator: Vincenzo Reale <vinx.reale@gmail.com>\n"
"Language-Team: Italian (http://www.transifex.com/projects/p/owncloud/language/it/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -252,7 +252,7 @@ msgstr "Scegli"
#: js/oc-dialogs.js:146
msgid "Error loading file picker template: {error}"
msgstr "Errore nel caricamento del modello del selettore file: {error}"
msgstr "Errore durante il caricamento del modello del selettore file: {error}"
#: js/oc-dialogs.js:172
msgid "Yes"
@ -268,7 +268,7 @@ msgstr "Ok"
#: js/oc-dialogs.js:219
msgid "Error loading message template: {error}"
msgstr "Errore nel caricamento del modello di messaggio: {error}"
msgstr "Errore durante il caricamento del modello di messaggio: {error}"
#: js/oc-dialogs.js:347
msgid "{count} file conflict"
@ -278,7 +278,7 @@ msgstr[1] "{count} file in conflitto"
#: js/oc-dialogs.js:361
msgid "One file conflict"
msgstr "Un conflitto tra file"
msgstr "Un file in conflitto"
#: js/oc-dialogs.js:367
msgid "Which files do you want to keep?"
@ -288,7 +288,7 @@ msgstr "Quali file vuoi mantenere?"
msgid ""
"If you select both versions, the copied file will have a number added to its"
" name."
msgstr "Se selezioni entrambe le versioni, verrà aggiunto un numero al nome del file copiato."
msgstr "Se selezioni entrambe le versioni, sarà aggiunto un numero al nome del file copiato."
#: js/oc-dialogs.js:376
msgid "Cancel"
@ -300,7 +300,7 @@ msgstr "Continua"
#: js/oc-dialogs.js:433 js/oc-dialogs.js:446
msgid "(all selected)"
msgstr "(tutti selezionati)"
msgstr "(tutti i selezionati)"
#: js/oc-dialogs.js:436 js/oc-dialogs.js:449
msgid "({count} selected)"
@ -319,7 +319,7 @@ msgstr "Il tipo di oggetto non è specificato."
#: js/oc-vcategories.js:110 js/oc-vcategories.js:125 js/oc-vcategories.js:136
#: js/oc-vcategories.js:172 js/oc-vcategories.js:189 js/oc-vcategories.js:195
#: js/oc-vcategories.js:199 js/share.js:129 js/share.js:142 js/share.js:149
#: js/share.js:645 js/share.js:657
#: js/share.js:656 js/share.js:668
msgid "Error"
msgstr "Errore"
@ -339,7 +339,7 @@ msgstr "Condivisi"
msgid "Share"
msgstr "Condividi"
#: js/share.js:131 js/share.js:685
#: js/share.js:131 js/share.js:696
msgid "Error while sharing"
msgstr "Errore durante la condivisione"
@ -439,23 +439,23 @@ msgstr "elimina"
msgid "share"
msgstr "condividi"
#: js/share.js:400 js/share.js:632
#: js/share.js:400 js/share.js:643
msgid "Password protected"
msgstr "Protetta da password"
#: js/share.js:645
#: js/share.js:656
msgid "Error unsetting expiration date"
msgstr "Errore durante la rimozione della data di scadenza"
#: js/share.js:657
#: js/share.js:668
msgid "Error setting expiration date"
msgstr "Errore durante l'impostazione della data di scadenza"
#: js/share.js:672
#: js/share.js:683
msgid "Sending ..."
msgstr "Invio in corso..."
#: js/share.js:683
#: js/share.js:694
msgid "Email sent"
msgstr "Messaggio inviato"

View file

@ -10,9 +10,9 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2013-09-22 12:55-0400\n"
"PO-Revision-Date: 2013-09-20 15:01+0000\n"
"Last-Translator: I Robot <owncloud-bot@tmit.eu>\n"
"POT-Creation-Date: 2013-09-24 12:58-0400\n"
"PO-Revision-Date: 2013-09-24 08:30+0000\n"
"Last-Translator: unhammer <unhammer+dill@mm.st>\n"
"Language-Team: Norwegian Nynorsk (Norway) (http://www.transifex.com/projects/p/owncloud/language/nn_NO/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -95,23 +95,23 @@ msgstr "Klarte ikkje fjerna %s frå favorittar."
#: avatar/controller.php:62
msgid "No image or file provided"
msgstr ""
msgstr "Inga bilete eller fil gitt"
#: avatar/controller.php:81
msgid "Unknown filetype"
msgstr ""
msgstr "Ukjend filtype"
#: avatar/controller.php:85
msgid "Invalid image"
msgstr ""
msgstr "Ugyldig bilete"
#: avatar/controller.php:115 avatar/controller.php:142
msgid "No temporary profile picture available, try again"
msgstr ""
msgstr "Inga midlertidig profilbilete tilgjengeleg, prøv igjen"
#: avatar/controller.php:135
msgid "No crop data provided"
msgstr ""
msgstr "Ingen beskjeringsdata gitt"
#: js/config.php:32
msgid "Sunday"
@ -251,7 +251,7 @@ msgstr "Vel"
#: js/oc-dialogs.js:146
msgid "Error loading file picker template: {error}"
msgstr ""
msgstr "Klarte ikkje å lasta filplukkarmal: {error}"
#: js/oc-dialogs.js:172
msgid "Yes"
@ -267,27 +267,27 @@ msgstr "Greitt"
#: js/oc-dialogs.js:219
msgid "Error loading message template: {error}"
msgstr ""
msgstr "Klarte ikkje å lasta meldingsmal: {error}"
#: js/oc-dialogs.js:347
msgid "{count} file conflict"
msgid_plural "{count} file conflicts"
msgstr[0] ""
msgstr[1] ""
msgstr[0] "{count} filkonflikt"
msgstr[1] "{count} filkonfliktar"
#: js/oc-dialogs.js:361
msgid "One file conflict"
msgstr ""
msgstr "Éin filkonflikt"
#: js/oc-dialogs.js:367
msgid "Which files do you want to keep?"
msgstr ""
msgstr "Kva filer vil du spara?"
#: js/oc-dialogs.js:368
msgid ""
"If you select both versions, the copied file will have a number added to its"
" name."
msgstr ""
msgstr "Viss du vel begge utgåvene, vil den kopierte fila få eit tal lagt til namnet."
#: js/oc-dialogs.js:376
msgid "Cancel"
@ -295,19 +295,19 @@ msgstr "Avbryt"
#: js/oc-dialogs.js:386
msgid "Continue"
msgstr ""
msgstr "Gå vidare"
#: js/oc-dialogs.js:433 js/oc-dialogs.js:446
msgid "(all selected)"
msgstr ""
msgstr "(alle valte)"
#: js/oc-dialogs.js:436 js/oc-dialogs.js:449
msgid "({count} selected)"
msgstr ""
msgstr "({count} valte)"
#: js/oc-dialogs.js:457
msgid "Error loading file exists template"
msgstr ""
msgstr "Klarte ikkje å lasta fil-finst-mal"
#: js/oc-vcategories.js:5 js/oc-vcategories.js:85 js/oc-vcategories.js:102
#: js/oc-vcategories.js:117 js/oc-vcategories.js:132 js/oc-vcategories.js:162
@ -318,7 +318,7 @@ msgstr "Objekttypen er ikkje spesifisert."
#: js/oc-vcategories.js:110 js/oc-vcategories.js:125 js/oc-vcategories.js:136
#: js/oc-vcategories.js:172 js/oc-vcategories.js:189 js/oc-vcategories.js:195
#: js/oc-vcategories.js:199 js/share.js:129 js/share.js:142 js/share.js:149
#: js/share.js:645 js/share.js:657
#: js/share.js:656 js/share.js:668
msgid "Error"
msgstr "Feil"
@ -338,7 +338,7 @@ msgstr "Delt"
msgid "Share"
msgstr "Del"
#: js/share.js:131 js/share.js:685
#: js/share.js:131 js/share.js:696
msgid "Error while sharing"
msgstr "Feil ved deling"
@ -438,23 +438,23 @@ msgstr "slett"
msgid "share"
msgstr "del"
#: js/share.js:400 js/share.js:632
#: js/share.js:400 js/share.js:643
msgid "Password protected"
msgstr "Passordverna"
#: js/share.js:645
#: js/share.js:656
msgid "Error unsetting expiration date"
msgstr "Klarte ikkje fjerna utløpsdato"
#: js/share.js:657
#: js/share.js:668
msgid "Error setting expiration date"
msgstr "Klarte ikkje setja utløpsdato"
#: js/share.js:672
#: js/share.js:683
msgid "Sending ..."
msgstr "Sender …"
#: js/share.js:683
#: js/share.js:694
msgid "Email sent"
msgstr "E-post sendt"

View file

@ -5,13 +5,14 @@
# Translators:
# unhammer <unhammer+dill@mm.st>, 2013
# unhammer <unhammer+dill@mm.st>, 2013
# unhammer <unhammer+dill@mm.st>, 2013
msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2013-09-20 10:44-0400\n"
"PO-Revision-Date: 2013-09-20 14:45+0000\n"
"Last-Translator: I Robot <owncloud-bot@tmit.eu>\n"
"POT-Creation-Date: 2013-09-24 12:58-0400\n"
"PO-Revision-Date: 2013-09-24 08:20+0000\n"
"Last-Translator: unhammer <unhammer+dill@mm.st>\n"
"Language-Team: Norwegian Nynorsk (Norway) (http://www.transifex.com/projects/p/owncloud/language/nn_NO/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -78,23 +79,23 @@ msgstr "Ikkje nok lagringsplass tilgjengeleg"
#: ajax/upload.php:120 ajax/upload.php:143
msgid "Upload failed. Could not get file info."
msgstr ""
msgstr "Feil ved opplasting. Klarte ikkje å henta filinfo."
#: ajax/upload.php:136
msgid "Upload failed. Could not find uploaded file"
msgstr ""
msgstr "Feil ved opplasting. Klarte ikkje å finna opplasta fil."
#: ajax/upload.php:160
msgid "Invalid directory."
msgstr "Ugyldig mappe."
#: appinfo/app.php:12
#: appinfo/app.php:11
msgid "Files"
msgstr "Filer"
#: js/file-upload.js:244
msgid "Unable to upload {filename} as it is a directory or has 0 bytes"
msgstr ""
msgstr "Klarte ikkje å lasta opp {filename} sidan det er ei mappe eller er 0 byte."
#: js/file-upload.js:255
msgid "Not enough space available"
@ -106,7 +107,7 @@ msgstr "Opplasting avbroten."
#: js/file-upload.js:356
msgid "Could not get result from server."
msgstr ""
msgstr "Klarte ikkje å henta resultat frå tenaren."
#: js/file-upload.js:446
msgid ""
@ -223,7 +224,7 @@ msgstr "Gjer klar nedlastinga di. Dette kan ta ei stund viss filene er store."
#: js/files.js:507 js/files.js:545
msgid "Error moving file"
msgstr ""
msgstr "Feil ved flytting av fil"
#: js/files.js:558 templates/index.php:61
msgid "Name"

View file

@ -9,8 +9,8 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2013-09-16 11:33-0400\n"
"PO-Revision-Date: 2013-09-16 15:34+0000\n"
"POT-Creation-Date: 2013-09-24 12:58-0400\n"
"PO-Revision-Date: 2013-09-24 08:30+0000\n"
"Last-Translator: I Robot <owncloud-bot@tmit.eu>\n"
"Language-Team: Norwegian Nynorsk (Norway) (http://www.transifex.com/projects/p/owncloud/language/nn_NO/)\n"
"MIME-Version: 1.0\n"
@ -61,11 +61,11 @@ msgstr ""
#: avatar.php:64
msgid "Unknown filetype"
msgstr ""
msgstr "Ukjend filtype"
#: avatar.php:69
msgid "Invalid image"
msgstr ""
msgstr "Ugyldig bilete"
#: defaults.php:35
msgid "web services under your control"
@ -166,15 +166,15 @@ msgstr "Feil i autentisering"
msgid "Token expired. Please reload page."
msgstr ""
#: search/provider/file.php:17 search/provider/file.php:35
#: search/provider/file.php:18 search/provider/file.php:36
msgid "Files"
msgstr "Filer"
#: search/provider/file.php:26 search/provider/file.php:33
#: search/provider/file.php:27 search/provider/file.php:34
msgid "Text"
msgstr "Tekst"
#: search/provider/file.php:29
#: search/provider/file.php:30
msgid "Images"
msgstr ""

View file

@ -10,9 +10,9 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2013-09-20 10:45-0400\n"
"PO-Revision-Date: 2013-09-20 14:45+0000\n"
"Last-Translator: I Robot <owncloud-bot@tmit.eu>\n"
"POT-Creation-Date: 2013-09-24 12:58-0400\n"
"PO-Revision-Date: 2013-09-24 08:30+0000\n"
"Last-Translator: unhammer <unhammer+dill@mm.st>\n"
"Language-Team: Norwegian Nynorsk (Norway) (http://www.transifex.com/projects/p/owncloud/language/nn_NO/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -89,42 +89,42 @@ msgstr "Klarte ikkje oppdatera programmet."
#: changepassword/controller.php:20
msgid "Wrong password"
msgstr ""
msgstr "Feil passord"
#: changepassword/controller.php:42
msgid "No user supplied"
msgstr ""
msgstr "Ingen brukar gitt"
#: changepassword/controller.php:74
msgid ""
"Please provide an admin recovery password, otherwise all user data will be "
"lost"
msgstr ""
msgstr "Ver venleg og gi eit admingjenopprettingspassord, elles vil all brukardata gå tapt."
#: changepassword/controller.php:79
msgid ""
"Wrong admin recovery password. Please check the password and try again."
msgstr ""
msgstr "Feil admingjenopprettingspassord. Ver venleg og sjekk passordet og prøv igjen."
#: changepassword/controller.php:87
msgid ""
"Back-end doesn't support password change, but the users encryption key was "
"successfully updated."
msgstr ""
msgstr "Bakstykket støttar ikkje passordendring, men krypteringsnøkkelen til brukaren blei oppdatert."
#: changepassword/controller.php:92 changepassword/controller.php:103
msgid "Unable to change password"
msgstr ""
msgstr "Klarte ikkje å endra passordet"
#: js/apps.js:43
msgid "Update to {appversion}"
msgstr "Oppdater til {appversion}"
#: js/apps.js:49 js/apps.js:82 js/apps.js:108
#: js/apps.js:49 js/apps.js:82 js/apps.js:110
msgid "Disable"
msgstr "Slå av"
#: js/apps.js:49 js/apps.js:89 js/apps.js:102 js/apps.js:117
#: js/apps.js:49 js/apps.js:90 js/apps.js:103 js/apps.js:119
msgid "Enable"
msgstr "Slå på"
@ -132,37 +132,37 @@ msgstr "Slå på"
msgid "Please wait...."
msgstr "Ver venleg og vent …"
#: js/apps.js:79 js/apps.js:80 js/apps.js:100
#: js/apps.js:79 js/apps.js:80 js/apps.js:101
msgid "Error while disabling app"
msgstr "Klarte ikkje å skru av programmet"
#: js/apps.js:99 js/apps.js:112 js/apps.js:113
#: js/apps.js:100 js/apps.js:114 js/apps.js:115
msgid "Error while enabling app"
msgstr "Klarte ikkje å skru på programmet"
#: js/apps.js:123
#: js/apps.js:125
msgid "Updating...."
msgstr "Oppdaterer …"
#: js/apps.js:126
#: js/apps.js:128
msgid "Error while updating app"
msgstr "Feil ved oppdatering av app"
#: js/apps.js:126
#: js/apps.js:128
msgid "Error"
msgstr "Feil"
#: js/apps.js:127 templates/apps.php:43
#: js/apps.js:129 templates/apps.php:43
msgid "Update"
msgstr "Oppdater"
#: js/apps.js:130
#: js/apps.js:132
msgid "Updated"
msgstr "Oppdatert"
#: js/personal.js:220
msgid "Select a profile picture"
msgstr ""
msgstr "Vel eit profilbilete"
#: js/personal.js:265
msgid "Decrypting files... Please wait, this can take some time."
@ -492,31 +492,31 @@ msgstr "Fyll inn e-postadressa di for å gjera passordgjenoppretting mogleg"
#: templates/personal.php:86
msgid "Profile picture"
msgstr ""
msgstr "Profilbilete"
#: templates/personal.php:90
msgid "Upload new"
msgstr ""
msgstr "Last opp ny"
#: templates/personal.php:92
msgid "Select new from Files"
msgstr ""
msgstr "Vel ny frå Filer"
#: templates/personal.php:93
msgid "Remove image"
msgstr ""
msgstr "Fjern bilete"
#: templates/personal.php:94
msgid "Either png or jpg. Ideally square but you will be able to crop it."
msgstr ""
msgstr "Anten PNG eller JPG. Helst kvadratisk, men du får moglegheita til å beskjera det."
#: templates/personal.php:97
msgid "Abort"
msgstr ""
msgstr "Avbryt"
#: templates/personal.php:98
msgid "Choose as profile image"
msgstr ""
msgstr "Vel som profilbilete"
#: templates/personal.php:106 templates/personal.php:107
msgid "Language"

View file

@ -3,6 +3,7 @@
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
# Daniel Sandman <revoltism@gmail.com>, 2013
# Gunnar Norin <blittan@xbmc.org>, 2013
# medialabs, 2013
# Magnus Höglund <magnus@linux.com>, 2013
@ -11,9 +12,9 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2013-09-22 12:55-0400\n"
"PO-Revision-Date: 2013-09-20 15:01+0000\n"
"Last-Translator: I Robot <owncloud-bot@tmit.eu>\n"
"POT-Creation-Date: 2013-09-29 00:02-0400\n"
"PO-Revision-Date: 2013-09-28 02:02+0000\n"
"Last-Translator: Daniel Sandman <revoltism@gmail.com>\n"
"Language-Team: Swedish (http://www.transifex.com/projects/p/owncloud/language/sv/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -96,23 +97,23 @@ msgstr "Fel vid borttagning av %s från favoriter."
#: avatar/controller.php:62
msgid "No image or file provided"
msgstr ""
msgstr "Ingen bild eller fil har tillhandahållits"
#: avatar/controller.php:81
msgid "Unknown filetype"
msgstr ""
msgstr "Okänd filtyp"
#: avatar/controller.php:85
msgid "Invalid image"
msgstr ""
msgstr "Ogiltig bild"
#: avatar/controller.php:115 avatar/controller.php:142
msgid "No temporary profile picture available, try again"
msgstr ""
msgstr "Ingen temporär profilbild finns tillgänglig, försök igen"
#: avatar/controller.php:135
msgid "No crop data provided"
msgstr ""
msgstr "Ingen beskärdata har angivits"
#: js/config.php:32
msgid "Sunday"
@ -252,7 +253,7 @@ msgstr "Välj"
#: js/oc-dialogs.js:146
msgid "Error loading file picker template: {error}"
msgstr ""
msgstr "Fel uppstod för filväljarmall: {error}"
#: js/oc-dialogs.js:172
msgid "Yes"
@ -268,27 +269,27 @@ msgstr "Ok"
#: js/oc-dialogs.js:219
msgid "Error loading message template: {error}"
msgstr ""
msgstr "Fel uppstod under inläsningen av meddelandemallen: {error}"
#: js/oc-dialogs.js:347
msgid "{count} file conflict"
msgid_plural "{count} file conflicts"
msgstr[0] ""
msgstr[1] ""
msgstr[0] "{count} filkonflikt"
msgstr[1] "{count} filkonflikter"
#: js/oc-dialogs.js:361
msgid "One file conflict"
msgstr ""
msgstr "En filkonflikt"
#: js/oc-dialogs.js:367
msgid "Which files do you want to keep?"
msgstr ""
msgstr "Vilken fil vill du behålla?"
#: js/oc-dialogs.js:368
msgid ""
"If you select both versions, the copied file will have a number added to its"
" name."
msgstr ""
msgstr "Om du väljer båda versionerna kommer de kopierade filerna ha nummer tillagda i filnamnet."
#: js/oc-dialogs.js:376
msgid "Cancel"
@ -296,19 +297,19 @@ msgstr "Avbryt"
#: js/oc-dialogs.js:386
msgid "Continue"
msgstr ""
msgstr "Fortsätt"
#: js/oc-dialogs.js:433 js/oc-dialogs.js:446
msgid "(all selected)"
msgstr ""
msgstr "(Alla valda)"
#: js/oc-dialogs.js:436 js/oc-dialogs.js:449
msgid "({count} selected)"
msgstr ""
msgstr "({count} valda)"
#: js/oc-dialogs.js:457
msgid "Error loading file exists template"
msgstr ""
msgstr "Fel uppstod filmall existerar"
#: js/oc-vcategories.js:5 js/oc-vcategories.js:85 js/oc-vcategories.js:102
#: js/oc-vcategories.js:117 js/oc-vcategories.js:132 js/oc-vcategories.js:162
@ -319,7 +320,7 @@ msgstr "Objekttypen är inte specificerad."
#: js/oc-vcategories.js:110 js/oc-vcategories.js:125 js/oc-vcategories.js:136
#: js/oc-vcategories.js:172 js/oc-vcategories.js:189 js/oc-vcategories.js:195
#: js/oc-vcategories.js:199 js/share.js:129 js/share.js:142 js/share.js:149
#: js/share.js:645 js/share.js:657
#: js/share.js:656 js/share.js:668
msgid "Error"
msgstr "Fel"
@ -339,7 +340,7 @@ msgstr "Delad"
msgid "Share"
msgstr "Dela"
#: js/share.js:131 js/share.js:685
#: js/share.js:131 js/share.js:696
msgid "Error while sharing"
msgstr "Fel vid delning"
@ -439,23 +440,23 @@ msgstr "radera"
msgid "share"
msgstr "dela"
#: js/share.js:400 js/share.js:632
#: js/share.js:400 js/share.js:643
msgid "Password protected"
msgstr "Lösenordsskyddad"
#: js/share.js:645
#: js/share.js:656
msgid "Error unsetting expiration date"
msgstr "Fel vid borttagning av utgångsdatum"
#: js/share.js:657
#: js/share.js:668
msgid "Error setting expiration date"
msgstr "Fel vid sättning av utgångsdatum"
#: js/share.js:672
#: js/share.js:683
msgid "Sending ..."
msgstr "Skickar ..."
#: js/share.js:683
#: js/share.js:694
msgid "Email sent"
msgstr "E-post skickat"

View file

@ -3,6 +3,7 @@
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
# Daniel Sandman <revoltism@gmail.com>, 2013
# Gunnar Norin <blittan@xbmc.org>, 2013
# Jan Busk, 2013
# Jan Busk, 2013
@ -13,9 +14,9 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2013-09-20 10:45-0400\n"
"PO-Revision-Date: 2013-09-20 14:45+0000\n"
"Last-Translator: I Robot <owncloud-bot@tmit.eu>\n"
"POT-Creation-Date: 2013-09-29 00:02-0400\n"
"PO-Revision-Date: 2013-09-28 01:44+0000\n"
"Last-Translator: Daniel Sandman <revoltism@gmail.com>\n"
"Language-Team: Swedish (http://www.transifex.com/projects/p/owncloud/language/sv/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -92,42 +93,42 @@ msgstr "Kunde inte uppdatera appen."
#: changepassword/controller.php:20
msgid "Wrong password"
msgstr ""
msgstr "Fel lösenord"
#: changepassword/controller.php:42
msgid "No user supplied"
msgstr ""
msgstr "Ingen användare angiven"
#: changepassword/controller.php:74
msgid ""
"Please provide an admin recovery password, otherwise all user data will be "
"lost"
msgstr ""
msgstr "Ange ett återställningslösenord för administratören. Annars kommer all användardata förloras"
#: changepassword/controller.php:79
msgid ""
"Wrong admin recovery password. Please check the password and try again."
msgstr ""
msgstr "Felaktigt återställningslösenord för administratör. Kolla lösenordet och prova igen."
#: changepassword/controller.php:87
msgid ""
"Back-end doesn't support password change, but the users encryption key was "
"successfully updated."
msgstr ""
msgstr "Gränssnittet stödjer inte byte av lösenord, men användarnas krypteringsnyckel blev uppdaterad."
#: changepassword/controller.php:92 changepassword/controller.php:103
msgid "Unable to change password"
msgstr ""
msgstr "Kunde inte ändra lösenord"
#: js/apps.js:43
msgid "Update to {appversion}"
msgstr "Uppdatera till {appversion}"
#: js/apps.js:49 js/apps.js:82 js/apps.js:108
#: js/apps.js:49 js/apps.js:82 js/apps.js:110
msgid "Disable"
msgstr "Deaktivera"
#: js/apps.js:49 js/apps.js:89 js/apps.js:102 js/apps.js:117
#: js/apps.js:49 js/apps.js:90 js/apps.js:103 js/apps.js:119
msgid "Enable"
msgstr "Aktivera"
@ -135,43 +136,43 @@ msgstr "Aktivera"
msgid "Please wait...."
msgstr "Var god vänta..."
#: js/apps.js:79 js/apps.js:80 js/apps.js:100
#: js/apps.js:79 js/apps.js:80 js/apps.js:101
msgid "Error while disabling app"
msgstr "Fel vid inaktivering av app"
#: js/apps.js:99 js/apps.js:112 js/apps.js:113
#: js/apps.js:100 js/apps.js:114 js/apps.js:115
msgid "Error while enabling app"
msgstr "Fel vid aktivering av app"
#: js/apps.js:123
#: js/apps.js:125
msgid "Updating...."
msgstr "Uppdaterar..."
#: js/apps.js:126
#: js/apps.js:128
msgid "Error while updating app"
msgstr "Fel uppstod vid uppdatering av appen"
#: js/apps.js:126
#: js/apps.js:128
msgid "Error"
msgstr "Fel"
#: js/apps.js:127 templates/apps.php:43
#: js/apps.js:129 templates/apps.php:43
msgid "Update"
msgstr "Uppdatera"
#: js/apps.js:130
#: js/apps.js:132
msgid "Updated"
msgstr "Uppdaterad"
#: js/personal.js:220
#: js/personal.js:221
msgid "Select a profile picture"
msgstr ""
msgstr "Välj en profilbild"
#: js/personal.js:265
#: js/personal.js:266
msgid "Decrypting files... Please wait, this can take some time."
msgstr "Dekrypterar filer... Vänligen vänta, detta kan ta en stund."
#: js/personal.js:287
#: js/personal.js:288
msgid "Saving..."
msgstr "Sparar..."
@ -499,27 +500,27 @@ msgstr "Profilbild"
#: templates/personal.php:90
msgid "Upload new"
msgstr ""
msgstr "Ladda upp ny"
#: templates/personal.php:92
msgid "Select new from Files"
msgstr ""
msgstr "Välj ny från filer"
#: templates/personal.php:93
msgid "Remove image"
msgstr ""
msgstr "Radera bild"
#: templates/personal.php:94
msgid "Either png or jpg. Ideally square but you will be able to crop it."
msgstr ""
msgstr "Antingen png eller jpg. Helst fyrkantig, men du kommer att kunna beskära den."
#: templates/personal.php:97
msgid "Abort"
msgstr ""
msgstr "Avbryt"
#: templates/personal.php:98
msgid "Choose as profile image"
msgstr ""
msgstr "Välj som profilbild"
#: templates/personal.php:106 templates/personal.php:107
msgid "Language"

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud Core 5.0.0\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
"POT-Creation-Date: 2013-09-22 12:55-0400\n"
"POT-Creation-Date: 2013-09-29 00:02-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -316,7 +316,7 @@ msgstr ""
#: js/oc-vcategories.js:110 js/oc-vcategories.js:125 js/oc-vcategories.js:136
#: js/oc-vcategories.js:172 js/oc-vcategories.js:189 js/oc-vcategories.js:195
#: js/oc-vcategories.js:199 js/share.js:129 js/share.js:142 js/share.js:149
#: js/share.js:645 js/share.js:657
#: js/share.js:656 js/share.js:668
msgid "Error"
msgstr ""
@ -336,7 +336,7 @@ msgstr ""
msgid "Share"
msgstr ""
#: js/share.js:131 js/share.js:685
#: js/share.js:131 js/share.js:696
msgid "Error while sharing"
msgstr ""
@ -436,23 +436,23 @@ msgstr ""
msgid "share"
msgstr ""
#: js/share.js:400 js/share.js:632
#: js/share.js:400 js/share.js:643
msgid "Password protected"
msgstr ""
#: js/share.js:645
#: js/share.js:656
msgid "Error unsetting expiration date"
msgstr ""
#: js/share.js:657
#: js/share.js:668
msgid "Error setting expiration date"
msgstr ""
#: js/share.js:672
#: js/share.js:683
msgid "Sending ..."
msgstr ""
#: js/share.js:683
#: js/share.js:694
msgid "Email sent"
msgstr ""

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud Core 5.0.0\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
"POT-Creation-Date: 2013-09-22 12:51-0400\n"
"POT-Creation-Date: 2013-09-29 00:02-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud Core 5.0.0\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
"POT-Creation-Date: 2013-09-22 12:51-0400\n"
"POT-Creation-Date: 2013-09-29 00:02-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud Core 5.0.0\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
"POT-Creation-Date: 2013-09-22 12:54-0400\n"
"POT-Creation-Date: 2013-09-29 00:02-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud Core 5.0.0\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
"POT-Creation-Date: 2013-09-22 12:54-0400\n"
"POT-Creation-Date: 2013-09-29 00:02-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud Core 5.0.0\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
"POT-Creation-Date: 2013-09-22 12:54-0400\n"
"POT-Creation-Date: 2013-09-29 00:02-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud Core 5.0.0\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
"POT-Creation-Date: 2013-09-22 12:54-0400\n"
"POT-Creation-Date: 2013-09-29 00:02-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud Core 5.0.0\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
"POT-Creation-Date: 2013-09-22 12:56-0400\n"
"POT-Creation-Date: 2013-09-29 00:02-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud Core 5.0.0\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
"POT-Creation-Date: 2013-09-22 12:56-0400\n"
"POT-Creation-Date: 2013-09-29 00:02-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -116,11 +116,11 @@ msgstr ""
msgid "Update to {appversion}"
msgstr ""
#: js/apps.js:49 js/apps.js:82 js/apps.js:108
#: js/apps.js:49 js/apps.js:82 js/apps.js:110
msgid "Disable"
msgstr ""
#: js/apps.js:49 js/apps.js:89 js/apps.js:102 js/apps.js:117
#: js/apps.js:49 js/apps.js:90 js/apps.js:103 js/apps.js:119
msgid "Enable"
msgstr ""
@ -128,43 +128,43 @@ msgstr ""
msgid "Please wait...."
msgstr ""
#: js/apps.js:79 js/apps.js:80 js/apps.js:100
#: js/apps.js:79 js/apps.js:80 js/apps.js:101
msgid "Error while disabling app"
msgstr ""
#: js/apps.js:99 js/apps.js:112 js/apps.js:113
#: js/apps.js:100 js/apps.js:114 js/apps.js:115
msgid "Error while enabling app"
msgstr ""
#: js/apps.js:123
#: js/apps.js:125
msgid "Updating...."
msgstr ""
#: js/apps.js:126
#: js/apps.js:128
msgid "Error while updating app"
msgstr ""
#: js/apps.js:126
#: js/apps.js:128
msgid "Error"
msgstr ""
#: js/apps.js:127 templates/apps.php:43
#: js/apps.js:129 templates/apps.php:43
msgid "Update"
msgstr ""
#: js/apps.js:130
#: js/apps.js:132
msgid "Updated"
msgstr ""
#: js/personal.js:220
#: js/personal.js:221
msgid "Select a profile picture"
msgstr ""
#: js/personal.js:265
#: js/personal.js:266
msgid "Decrypting files... Please wait, this can take some time."
msgstr ""
#: js/personal.js:287
#: js/personal.js:288
msgid "Saving..."
msgstr ""

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud Core 5.0.0\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
"POT-Creation-Date: 2013-09-22 12:54-0400\n"
"POT-Creation-Date: 2013-09-29 00:02-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud Core 5.0.0\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
"POT-Creation-Date: 2013-09-22 12:54-0400\n"
"POT-Creation-Date: 2013-09-29 00:02-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View file

@ -8,9 +8,9 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2013-09-20 10:44-0400\n"
"PO-Revision-Date: 2013-09-20 14:45+0000\n"
"Last-Translator: I Robot <owncloud-bot@tmit.eu>\n"
"POT-Creation-Date: 2013-09-29 00:02-0400\n"
"PO-Revision-Date: 2013-09-27 19:42+0000\n"
"Last-Translator: zubr139 <zubr139@ukr.net>\n"
"Language-Team: Ukrainian (http://www.transifex.com/projects/p/owncloud/language/uk/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -87,7 +87,7 @@ msgstr ""
msgid "Invalid directory."
msgstr "Невірний каталог."
#: appinfo/app.php:12
#: appinfo/app.php:11
msgid "Files"
msgstr "Файли"
@ -118,7 +118,7 @@ msgstr "URL не може бути пустим."
#: js/file-upload.js:525 lib/app.php:53
msgid "Invalid folder name. Usage of 'Shared' is reserved by ownCloud"
msgstr ""
msgstr "Неправильне ім'я теки. Використання 'Shared' зарезервовано ownCloud"
#: js/file-upload.js:557 js/file-upload.js:573 js/files.js:507 js/files.js:545
msgid "Error"
@ -167,9 +167,9 @@ msgstr "відмінити"
#: js/filelist.js:533 js/filelist.js:599 js/files.js:576
msgid "%n folder"
msgid_plural "%n folders"
msgstr[0] ""
msgstr[1] ""
msgstr[2] ""
msgstr[0] "%n тека"
msgstr[1] "%n тека"
msgstr[2] "%n теки"
#: js/filelist.js:534 js/filelist.js:600 js/files.js:582
msgid "%n file"
@ -290,7 +290,7 @@ msgstr "Текстовий файл"
#: templates/index.php:11
msgid "Folder"
msgstr "Папка"
msgstr "Тека"
#: templates/index.php:13
msgid "From link"

View file

@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2013-09-18 11:46-0400\n"
"PO-Revision-Date: 2013-09-17 13:05+0000\n"
"POT-Creation-Date: 2013-09-29 00:02-0400\n"
"PO-Revision-Date: 2013-09-27 19:12+0000\n"
"Last-Translator: zubr139 <zubr139@ukr.net>\n"
"Language-Team: Ukrainian (http://www.transifex.com/projects/p/owncloud/language/uk/)\n"
"MIME-Version: 1.0\n"
@ -93,7 +93,7 @@ msgstr ""
#: templates/invalid_private_key.php:7
msgid "personal settings"
msgstr ""
msgstr "особисті налаштування"
#: templates/settings-admin.php:5 templates/settings-personal.php:4
msgid "Encryption"

View file

@ -3,13 +3,14 @@
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
# zubr139 <zubr139@ukr.net>, 2013
msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2013-09-20 10:45-0400\n"
"PO-Revision-Date: 2013-09-20 14:45+0000\n"
"Last-Translator: I Robot <owncloud-bot@tmit.eu>\n"
"POT-Creation-Date: 2013-09-29 00:02-0400\n"
"PO-Revision-Date: 2013-09-27 19:43+0000\n"
"Last-Translator: zubr139 <zubr139@ukr.net>\n"
"Language-Team: Ukrainian (http://www.transifex.com/projects/p/owncloud/language/uk/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -32,7 +33,7 @@ msgstr ""
#: ajax/changedisplayname.php:34
msgid "Unable to change display name"
msgstr "Не вдалося змінити зображене ім'я"
msgstr "Не вдалося змінити ім'я"
#: ajax/creategroup.php:10
msgid "Group already exists"
@ -117,11 +118,11 @@ msgstr ""
msgid "Update to {appversion}"
msgstr "Оновити до {appversion}"
#: js/apps.js:49 js/apps.js:82 js/apps.js:108
#: js/apps.js:49 js/apps.js:82 js/apps.js:110
msgid "Disable"
msgstr "Вимкнути"
#: js/apps.js:49 js/apps.js:89 js/apps.js:102 js/apps.js:117
#: js/apps.js:49 js/apps.js:90 js/apps.js:103 js/apps.js:119
msgid "Enable"
msgstr "Включити"
@ -129,43 +130,43 @@ msgstr "Включити"
msgid "Please wait...."
msgstr "Зачекайте, будь ласка..."
#: js/apps.js:79 js/apps.js:80 js/apps.js:100
#: js/apps.js:79 js/apps.js:80 js/apps.js:101
msgid "Error while disabling app"
msgstr ""
#: js/apps.js:99 js/apps.js:112 js/apps.js:113
#: js/apps.js:100 js/apps.js:114 js/apps.js:115
msgid "Error while enabling app"
msgstr ""
#: js/apps.js:123
#: js/apps.js:125
msgid "Updating...."
msgstr "Оновлюється..."
#: js/apps.js:126
#: js/apps.js:128
msgid "Error while updating app"
msgstr "Помилка при оновленні програми"
#: js/apps.js:126
#: js/apps.js:128
msgid "Error"
msgstr "Помилка"
#: js/apps.js:127 templates/apps.php:43
#: js/apps.js:129 templates/apps.php:43
msgid "Update"
msgstr "Оновити"
#: js/apps.js:130
#: js/apps.js:132
msgid "Updated"
msgstr "Оновлено"
#: js/personal.js:220
#: js/personal.js:221
msgid "Select a profile picture"
msgstr ""
#: js/personal.js:265
#: js/personal.js:266
msgid "Decrypting files... Please wait, this can take some time."
msgstr ""
#: js/personal.js:287
#: js/personal.js:288
msgid "Saving..."
msgstr "Зберігаю..."
@ -590,7 +591,7 @@ msgstr "Сховище"
#: templates/users.php:108
msgid "change display name"
msgstr "змінити зображене ім'я"
msgstr "змінити ім'я"
#: templates/users.php:112
msgid "set new password"

77
lib/allconfig.php Normal file
View file

@ -0,0 +1,77 @@
<?php
/**
* Copyright (c) 2013 Bart Visscher <bartv@thisnet.nl>
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
*
*/
namespace OC;
/**
* Class to combine all the configuration options ownCloud offers
*/
class AllConfig implements \OCP\IConfig {
/**
* Sets a new system wide value
* @param string $key the key of the value, under which will be saved
* @param string $value the value that should be stored
* @todo need a use case for this
*/
// public function setSystemValue($key, $value) {
// \OCP\Config::setSystemValue($key, $value);
// }
/**
* Looks up a system wide defined value
* @param string $key the key of the value, under which it was saved
* @return string the saved value
*/
public function getSystemValue($key) {
return \OCP\Config::getSystemValue($key, '');
}
/**
* Writes a new app wide value
* @param string $appName the appName that we want to store the value under
* @param string $key the key of the value, under which will be saved
* @param string $value the value that should be stored
*/
public function setAppValue($appName, $key, $value) {
\OCP\Config::setAppValue($appName, $key, $value);
}
/**
* Looks up an app wide defined value
* @param string $appName the appName that we stored the value under
* @param string $key the key of the value, under which it was saved
* @return string the saved value
*/
public function getAppValue($appName, $key) {
return \OCP\Config::getAppValue($appName, $key, '');
}
/**
* Set a user defined value
* @param string $userId the userId of the user that we want to store the value under
* @param string $appName the appName that we want to store the value under
* @param string $key the key under which the value is being stored
* @param string $value the value that you want to store
*/
public function setUserValue($userId, $appName, $key, $value) {
\OCP\Config::setUserValue($userId, $appName, $key, $value);
}
/**
* Shortcut for getting a user defined value
* @param string $userId the userId of the user that we want to store the value under
* @param string $appName the appName that we stored the value under
* @param string $key the key under which the value is being stored
*/
public function getUserValue($userId, $appName, $key){
return \OCP\Config::getUserValue($userId, $appName, $key);
}
}

View file

@ -27,8 +27,6 @@
* upgrading and removing apps.
*/
class OC_App{
static private $activeapp = '';
static private $navigation = array();
static private $settingsForms = array();
static private $adminForms = array();
static private $personalForms = array();
@ -271,7 +269,7 @@ class OC_App{
/**
* @brief adds an entry to the navigation
* @param string $data array containing the data
* @param array $data array containing the data
* @return bool
*
* This function adds a new entry to the navigation visible to users. $data
@ -287,11 +285,7 @@ class OC_App{
* the navigation. Lower values come first.
*/
public static function addNavigationEntry( $data ) {
$data['active']=false;
if(!isset($data['icon'])) {
$data['icon']='';
}
OC_App::$navigation[] = $data;
OC::$server->getNavigationManager()->add($data);
return true;
}
@ -305,9 +299,7 @@ class OC_App{
* highlighting the current position of the user.
*/
public static function setActiveNavigationEntry( $id ) {
// load all the apps, to make sure we have all the navigation entries
self::loadApps();
self::$activeapp = $id;
OC::$server->getNavigationManager()->setActiveEntry($id);
return true;
}
@ -315,15 +307,14 @@ class OC_App{
* @brief Get the navigation entries for the $app
* @param string $app app
* @return array of the $data added with addNavigationEntry
*
* Warning: destroys the existing entries
*/
public static function getAppNavigationEntries($app) {
if(is_file(self::getAppPath($app).'/appinfo/app.php')) {
$save = self::$navigation;
self::$navigation = array();
OC::$server->getNavigationManager()->clear();
require $app.'/appinfo/app.php';
$app_entries = self::$navigation;
self::$navigation = $save;
return $app_entries;
return OC::$server->getNavigationManager()->getAll();
}
return array();
}
@ -336,7 +327,7 @@ class OC_App{
* setActiveNavigationEntry
*/
public static function getActiveNavigationEntry() {
return self::$activeapp;
return OC::$server->getNavigationManager()->getActiveEntry();
}
/**
@ -419,8 +410,9 @@ class OC_App{
// This is private as well. It simply works, so don't ask for more details
private static function proceedNavigation( $list ) {
$activeapp = OC::$server->getNavigationManager()->getActiveEntry();
foreach( $list as &$naventry ) {
if( $naventry['id'] == self::$activeapp ) {
if( $naventry['id'] == $activeapp ) {
$naventry['active'] = true;
}
else{
@ -572,7 +564,8 @@ class OC_App{
* - active: boolean, signals if the user is on this navigation entry
*/
public static function getNavigation() {
$navigation = self::proceedNavigation( self::$navigation );
$entries = OC::$server->getNavigationManager()->getAll();
$navigation = self::proceedNavigation( $entries );
return $navigation;
}

98
lib/appframework/app.php Normal file
View file

@ -0,0 +1,98 @@
<?php
/**
* ownCloud - App Framework
*
* @author Bernhard Posselt
* @copyright 2012 Bernhard Posselt nukeawhale@gmail.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OC\AppFramework;
use OC\AppFramework\DependencyInjection\DIContainer;
use OCP\AppFramework\IAppContainer;
/**
* Entry point for every request in your app. You can consider this as your
* public static void main() method
*
* Handles all the dependency injection, controllers and output flow
*/
class App {
/**
* Shortcut for calling a controller method and printing the result
* @param string $controllerName the name of the controller under which it is
* stored in the DI container
* @param string $methodName the method that you want to call
* @param array $urlParams an array with variables extracted from the routes
* @param DIContainer $container an instance of a pimple container.
*/
public static function main($controllerName, $methodName, array $urlParams,
IAppContainer $container) {
$container['urlParams'] = $urlParams;
$controller = $container[$controllerName];
// initialize the dispatcher and run all the middleware before the controller
$dispatcher = $container['Dispatcher'];
list($httpHeaders, $responseHeaders, $output) =
$dispatcher->dispatch($controller, $methodName);
if(!is_null($httpHeaders)) {
header($httpHeaders);
}
foreach($responseHeaders as $name => $value) {
header($name . ': ' . $value);
}
if(!is_null($output)) {
header('Content-Length: ' . strlen($output));
print($output);
}
}
/**
* Shortcut for calling a controller method and printing the result.
* Similar to App:main except that no headers will be sent.
* This should be used for example when registering sections via
* \OC\AppFramework\Core\API::registerAdmin()
*
* @param string $controllerName the name of the controller under which it is
* stored in the DI container
* @param string $methodName the method that you want to call
* @param array $urlParams an array with variables extracted from the routes
* @param DIContainer $container an instance of a pimple container.
*/
public static function part($controllerName, $methodName, array $urlParams,
DIContainer $container){
$container['urlParams'] = $urlParams;
$controller = $container[$controllerName];
$dispatcher = $container['Dispatcher'];
list(, , $output) = $dispatcher->dispatch($controller, $methodName);
return $output;
}
}

View file

@ -0,0 +1,142 @@
<?php
/**
* ownCloud - App Framework
*
* @author Bernhard Posselt
* @copyright 2012 Bernhard Posselt nukeawhale@gmail.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OC\AppFramework\Controller;
use OC\AppFramework\Http\Request;
use OC\AppFramework\Core\API;
use OCP\AppFramework\Http\TemplateResponse;
/**
* Base class to inherit your controllers from
*/
abstract class Controller {
/**
* @var API instance of the api layer
*/
protected $api;
protected $request;
/**
* @param API $api an api wrapper instance
* @param Request $request an instance of the request
*/
public function __construct(API $api, Request $request){
$this->api = $api;
$this->request = $request;
}
/**
* Lets you access post and get parameters by the index
* @param string $key the key which you want to access in the URL Parameter
* placeholder, $_POST or $_GET array.
* The priority how they're returned is the following:
* 1. URL parameters
* 2. POST parameters
* 3. GET parameters
* @param mixed $default If the key is not found, this value will be returned
* @return mixed the content of the array
*/
public function params($key, $default=null){
return $this->request->getParam($key, $default);
}
/**
* Returns all params that were received, be it from the request
* (as GET or POST) or throuh the URL by the route
* @return array the array with all parameters
*/
public function getParams() {
return $this->request->getParams();
}
/**
* Returns the method of the request
* @return string the method of the request (POST, GET, etc)
*/
public function method() {
return $this->request->getMethod();
}
/**
* Shortcut for accessing an uploaded file through the $_FILES array
* @param string $key the key that will be taken from the $_FILES array
* @return array the file in the $_FILES element
*/
public function getUploadedFile($key) {
return $this->request->getUploadedFile($key);
}
/**
* Shortcut for getting env variables
* @param string $key the key that will be taken from the $_ENV array
* @return array the value in the $_ENV element
*/
public function env($key) {
return $this->request->getEnv($key);
}
/**
* Shortcut for getting cookie variables
* @param string $key the key that will be taken from the $_COOKIE array
* @return array the value in the $_COOKIE element
*/
public function cookie($key) {
return $this->request->getCookie($key);
}
/**
* Shortcut for rendering a template
* @param string $templateName the name of the template
* @param array $params the template parameters in key => value structure
* @param string $renderAs user renders a full page, blank only your template
* admin an entry in the admin settings
* @param array $headers set additional headers in name/value pairs
* @return \OCP\AppFramework\Http\TemplateResponse containing the page
*/
public function render($templateName, array $params=array(),
$renderAs='user', array $headers=array()){
$response = new TemplateResponse($this->api, $templateName);
$response->setParams($params);
$response->renderAs($renderAs);
foreach($headers as $name => $value){
$response->addHeader($name, $value);
}
return $response;
}
}

View file

@ -0,0 +1,348 @@
<?php
/**
* ownCloud - App Framework
*
* @author Bernhard Posselt
* @copyright 2012 Bernhard Posselt nukeawhale@gmail.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OC\AppFramework\Core;
use OCP\AppFramework\IApi;
/**
* This is used to wrap the owncloud static api calls into an object to make the
* code better abstractable for use in the dependency injection container
*
* Should you find yourself in need for more methods, simply inherit from this
* class and add your methods
*/
class API implements IApi{
private $appName;
/**
* constructor
* @param string $appName the name of your application
*/
public function __construct($appName){
$this->appName = $appName;
}
/**
* Gets the userid of the current user
* @return string the user id of the current user
*/
public function getUserId(){
return \OCP\User::getUser();
}
/**
* Adds a new javascript file
* @param string $scriptName the name of the javascript in js/ without the suffix
* @param string $appName the name of the app, defaults to the current one
*/
public function addScript($scriptName, $appName=null){
if($appName === null){
$appName = $this->appName;
}
\OCP\Util::addScript($appName, $scriptName);
}
/**
* Adds a new css file
* @param string $styleName the name of the css file in css/without the suffix
* @param string $appName the name of the app, defaults to the current one
*/
public function addStyle($styleName, $appName=null){
if($appName === null){
$appName = $this->appName;
}
\OCP\Util::addStyle($appName, $styleName);
}
/**
* shorthand for addScript for files in the 3rdparty directory
* @param string $name the name of the file without the suffix
*/
public function add3rdPartyScript($name){
\OCP\Util::addScript($this->appName . '/3rdparty', $name);
}
/**
* shorthand for addStyle for files in the 3rdparty directory
* @param string $name the name of the file without the suffix
*/
public function add3rdPartyStyle($name){
\OCP\Util::addStyle($this->appName . '/3rdparty', $name);
}
/**
* Returns the translation object
* @return \OC_L10N the translation object
*/
public function getTrans(){
# TODO: use public api
return \OC_L10N::get($this->appName);
}
/**
* Returns the URL for a route
* @param string $routeName the name of the route
* @param array $arguments an array with arguments which will be filled into the url
* @return string the url
*/
public function linkToRoute($routeName, $arguments=array()){
return \OCP\Util::linkToRoute($routeName, $arguments);
}
/**
* Returns an URL for an image or file
* @param string $file the name of the file
* @param string $appName the name of the app, defaults to the current one
*/
public function linkTo($file, $appName=null){
if($appName === null){
$appName = $this->appName;
}
return \OCP\Util::linkTo($appName, $file);
}
/**
* Returns the link to an image, like link to but only with prepending img/
* @param string $file the name of the file
* @param string $appName the name of the app, defaults to the current one
*/
public function imagePath($file, $appName=null){
if($appName === null){
$appName = $this->appName;
}
return \OCP\Util::imagePath($appName, $file);
}
/**
* Makes an URL absolute
* @param string $url the url
* @return string the absolute url
*/
public function getAbsoluteURL($url){
# TODO: use public api
return \OC_Helper::makeURLAbsolute($url);
}
/**
* links to a file
* @param string $file the name of the file
* @param string $appName the name of the app, defaults to the current one
* @deprecated replaced with linkToRoute()
* @return string the url
*/
public function linkToAbsolute($file, $appName=null){
if($appName === null){
$appName = $this->appName;
}
return \OCP\Util::linkToAbsolute($appName, $file);
}
/**
* Checks if the CSRF check was correct
* @return bool true if CSRF check passed
*/
public function passesCSRFCheck(){
# TODO: use public api
return \OC_Util::isCallRegistered();
}
/**
* Checks if an app is enabled
* @param string $appName the name of an app
* @return bool true if app is enabled
*/
public function isAppEnabled($appName){
return \OCP\App::isEnabled($appName);
}
/**
* Writes a function into the error log
* @param string $msg the error message to be logged
* @param int $level the error level
*/
public function log($msg, $level=null){
switch($level){
case 'debug':
$level = \OCP\Util::DEBUG;
break;
case 'info':
$level = \OCP\Util::INFO;
break;
case 'warn':
$level = \OCP\Util::WARN;
break;
case 'fatal':
$level = \OCP\Util::FATAL;
break;
default:
$level = \OCP\Util::ERROR;
break;
}
\OCP\Util::writeLog($this->appName, $msg, $level);
}
/**
* turns an owncloud path into a path on the filesystem
* @param string path the path to the file on the oc filesystem
* @return string the filepath in the filesystem
*/
public function getLocalFilePath($path){
# TODO: use public api
return \OC_Filesystem::getLocalFile($path);
}
/**
* used to return and open a new eventsource
* @return \OC_EventSource a new open EventSource class
*/
public function openEventSource(){
# TODO: use public api
return new \OC_EventSource();
}
/**
* @brief connects a function to a hook
* @param string $signalClass class name of emitter
* @param string $signalName name of signal
* @param string $slotClass class name of slot
* @param string $slotName name of slot, in another word, this is the
* name of the method that will be called when registered
* signal is emitted.
* @return bool, always true
*/
public function connectHook($signalClass, $signalName, $slotClass, $slotName) {
return \OCP\Util::connectHook($signalClass, $signalName, $slotClass, $slotName);
}
/**
* @brief Emits a signal. To get data from the slot use references!
* @param string $signalClass class name of emitter
* @param string $signalName name of signal
* @param array $params defautl: array() array with additional data
* @return bool, true if slots exists or false if not
*/
public function emitHook($signalClass, $signalName, $params = array()) {
return \OCP\Util::emitHook($signalClass, $signalName, $params);
}
/**
* @brief clear hooks
* @param string $signalClass
* @param string $signalName
*/
public function clearHook($signalClass=false, $signalName=false) {
if ($signalClass) {
\OC_Hook::clear($signalClass, $signalName);
}
}
/**
* Gets the content of an URL by using CURL or a fallback if it is not
* installed
* @param string $url the url that should be fetched
* @return string the content of the webpage
*/
public function getUrlContent($url) {
return \OC_Util::getUrlContent($url);
}
/**
* Register a backgroundjob task
* @param string $className full namespace and class name of the class
* @param string $methodName the name of the static method that should be
* called
*/
public function addRegularTask($className, $methodName) {
\OCP\Backgroundjob::addRegularTask($className, $methodName);
}
/**
* Returns a template
* @param string $templateName the name of the template
* @param string $renderAs how it should be rendered
* @param string $appName the name of the app
* @return \OCP\Template a new template
*/
public function getTemplate($templateName, $renderAs='user', $appName=null){
if($appName === null){
$appName = $this->appName;
}
if($renderAs === 'blank'){
return new \OCP\Template($appName, $templateName);
} else {
return new \OCP\Template($appName, $templateName, $renderAs);
}
}
/**
* Tells ownCloud to include a template in the admin overview
* @param string $mainPath the path to the main php file without the php
* suffix, relative to your apps directory! not the template directory
* @param string $appName the name of the app, defaults to the current one
*/
public function registerAdmin($mainPath, $appName=null) {
if($appName === null){
$appName = $this->appName;
}
\OCP\App::registerAdmin($appName, $mainPath);
}
/**
* get the filesystem info
*
* @param string $path
* @return array with the following keys:
* - size
* - mtime
* - mimetype
* - encrypted
* - versioned
*/
public function getFileInfo($path) {
return \OC\Files\Filesystem::getFileInfo($path);
}
}

View file

@ -0,0 +1,146 @@
<?php
/**
* ownCloud - App Framework
*
* @author Bernhard Posselt
* @copyright 2012 Bernhard Posselt nukeawhale@gmail.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OC\AppFramework\DependencyInjection;
use OC\AppFramework\Http\Http;
use OC\AppFramework\Http\Request;
use OC\AppFramework\Http\Dispatcher;
use OC\AppFramework\Core\API;
use OC\AppFramework\Middleware\MiddlewareDispatcher;
use OC\AppFramework\Middleware\Security\SecurityMiddleware;
use OC\AppFramework\Utility\SimpleContainer;
use OC\AppFramework\Utility\TimeFactory;
use OCP\AppFramework\IApi;
use OCP\AppFramework\IAppContainer;
use OCP\AppFramework\IMiddleWare;
use OCP\IServerContainer;
class DIContainer extends SimpleContainer implements IAppContainer{
/**
* @var array
*/
private $middleWares = array();
/**
* Put your class dependencies in here
* @param string $appName the name of the app
*/
public function __construct($appName){
$this['AppName'] = $appName;
$this->registerParameter('ServerContainer', \OC::$server);
$this['API'] = $this->share(function($c){
return new API($c['AppName']);
});
/**
* Http
*/
$this['Request'] = $this->share(function($c) {
/** @var $c SimpleContainer */
/** @var $server IServerContainer */
$server = $c->query('ServerContainer');
return $server->getRequest();
});
$this['Protocol'] = $this->share(function($c){
if(isset($_SERVER['SERVER_PROTOCOL'])) {
return new Http($_SERVER, $_SERVER['SERVER_PROTOCOL']);
} else {
return new Http($_SERVER);
}
});
$this['Dispatcher'] = $this->share(function($c) {
return new Dispatcher($c['Protocol'], $c['MiddlewareDispatcher']);
});
/**
* Middleware
*/
$this['SecurityMiddleware'] = $this->share(function($c){
return new SecurityMiddleware($c['API'], $c['Request']);
});
$this['MiddlewareDispatcher'] = $this->share(function($c){
$dispatcher = new MiddlewareDispatcher();
$dispatcher->registerMiddleware($c['SecurityMiddleware']);
foreach($this->middleWares as $middleWare) {
$dispatcher->registerMiddleware($middleWare);
}
return $dispatcher;
});
/**
* Utilities
*/
$this['TimeFactory'] = $this->share(function($c){
return new TimeFactory();
});
}
/**
* @return IApi
*/
function getCoreApi()
{
return $this->query('API');
}
/**
* @return \OCP\IServerContainer
*/
function getServer()
{
return $this->query('ServerContainer');
}
/**
* @param IMiddleWare $middleWare
* @return boolean
*/
function registerMiddleWare(IMiddleWare $middleWare) {
array_push($this->middleWares, $middleWare);
}
/**
* used to return the appname of the set application
* @return string the name of your application
*/
function getAppName() {
return $this->query('AppName');
}
}

View file

@ -0,0 +1,100 @@
<?php
/**
* ownCloud - App Framework
*
* @author Bernhard Posselt, Thomas Tanghus, Bart Visscher
* @copyright 2012 Bernhard Posselt nukeawhale@gmail.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OC\AppFramework\Http;
use \OC\AppFramework\Controller\Controller;
use \OC\AppFramework\Middleware\MiddlewareDispatcher;
/**
* Class to dispatch the request to the middleware dispatcher
*/
class Dispatcher {
private $middlewareDispatcher;
private $protocol;
/**
* @param Http $protocol the http protocol with contains all status headers
* @param MiddlewareDispatcher $middlewareDispatcher the dispatcher which
* runs the middleware
*/
public function __construct(Http $protocol,
MiddlewareDispatcher $middlewareDispatcher) {
$this->protocol = $protocol;
$this->middlewareDispatcher = $middlewareDispatcher;
}
/**
* Handles a request and calls the dispatcher on the controller
* @param Controller $controller the controller which will be called
* @param string $methodName the method name which will be called on
* the controller
* @return array $array[0] contains a string with the http main header,
* $array[1] contains headers in the form: $key => value, $array[2] contains
* the response output
*/
public function dispatch(Controller $controller, $methodName) {
$out = array(null, array(), null);
try {
$this->middlewareDispatcher->beforeController($controller,
$methodName);
$response = $controller->$methodName();
// if an exception appears, the middleware checks if it can handle the
// exception and creates a response. If no response is created, it is
// assumed that theres no middleware who can handle it and the error is
// thrown again
} catch(\Exception $exception){
$response = $this->middlewareDispatcher->afterException(
$controller, $methodName, $exception);
if (is_null($response)) {
throw $exception;
}
}
$response = $this->middlewareDispatcher->afterController(
$controller, $methodName, $response);
// get the output which should be printed and run the after output
// middleware to modify the response
$output = $response->render();
$out[2] = $this->middlewareDispatcher->beforeOutput(
$controller, $methodName, $output);
// depending on the cache object the headers need to be changed
$out[0] = $this->protocol->getStatusHeader($response->getStatus(),
$response->getLastModified(), $response->getETag());
$out[1] = $response->getHeaders();
return $out;
}
}

View file

@ -0,0 +1,50 @@
<?php
/**
* ownCloud - App Framework
*
* @author Bernhard Posselt
* @copyright 2012 Bernhard Posselt nukeawhale@gmail.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OC\AppFramework\Http;
/**
* Prompts the user to download the a file
*/
class DownloadResponse extends \OCP\AppFramework\Http\Response {
private $filename;
private $contentType;
/**
* Creates a response that prompts the user to download the file
* @param string $filename the name that the downloaded file should have
* @param string $contentType the mimetype that the downloaded file should have
*/
public function __construct($filename, $contentType) {
$this->filename = $filename;
$this->contentType = $contentType;
$this->addHeader('Content-Disposition', 'attachment; filename="' . $filename . '"');
$this->addHeader('Content-Type', $contentType);
}
}

View file

@ -0,0 +1,148 @@
<?php
/**
* ownCloud - App Framework
*
* @author Bernhard Posselt, Thomas Tanghus, Bart Visscher
* @copyright 2012 Bernhard Posselt nukeawhale@gmail.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OC\AppFramework\Http;
class Http extends \OCP\AppFramework\Http\Http{
private $server;
private $protocolVersion;
protected $headers;
/**
* @param $_SERVER $server
* @param string $protocolVersion the http version to use defaults to HTTP/1.1
*/
public function __construct($server, $protocolVersion='HTTP/1.1') {
$this->server = $server;
$this->protocolVersion = $protocolVersion;
$this->headers = array(
self::STATUS_CONTINUE => 'Continue',
self::STATUS_SWITCHING_PROTOCOLS => 'Switching Protocols',
self::STATUS_PROCESSING => 'Processing',
self::STATUS_OK => 'OK',
self::STATUS_CREATED => 'Created',
self::STATUS_ACCEPTED => 'Accepted',
self::STATUS_NON_AUTHORATIVE_INFORMATION => 'Non-Authorative Information',
self::STATUS_NO_CONTENT => 'No Content',
self::STATUS_RESET_CONTENT => 'Reset Content',
self::STATUS_PARTIAL_CONTENT => 'Partial Content',
self::STATUS_MULTI_STATUS => 'Multi-Status', // RFC 4918
self::STATUS_ALREADY_REPORTED => 'Already Reported', // RFC 5842
self::STATUS_IM_USED => 'IM Used', // RFC 3229
self::STATUS_MULTIPLE_CHOICES => 'Multiple Choices',
self::STATUS_MOVED_PERMANENTLY => 'Moved Permanently',
self::STATUS_FOUND => 'Found',
self::STATUS_SEE_OTHER => 'See Other',
self::STATUS_NOT_MODIFIED => 'Not Modified',
self::STATUS_USE_PROXY => 'Use Proxy',
self::STATUS_RESERVED => 'Reserved',
self::STATUS_TEMPORARY_REDIRECT => 'Temporary Redirect',
self::STATUS_BAD_REQUEST => 'Bad request',
self::STATUS_UNAUTHORIZED => 'Unauthorized',
self::STATUS_PAYMENT_REQUIRED => 'Payment Required',
self::STATUS_FORBIDDEN => 'Forbidden',
self::STATUS_NOT_FOUND => 'Not Found',
self::STATUS_METHOD_NOT_ALLOWED => 'Method Not Allowed',
self::STATUS_NOT_ACCEPTABLE => 'Not Acceptable',
self::STATUS_PROXY_AUTHENTICATION_REQUIRED => 'Proxy Authentication Required',
self::STATUS_REQUEST_TIMEOUT => 'Request Timeout',
self::STATUS_CONFLICT => 'Conflict',
self::STATUS_GONE => 'Gone',
self::STATUS_LENGTH_REQUIRED => 'Length Required',
self::STATUS_PRECONDITION_FAILED => 'Precondition failed',
self::STATUS_REQUEST_ENTITY_TOO_LARGE => 'Request Entity Too Large',
self::STATUS_REQUEST_URI_TOO_LONG => 'Request-URI Too Long',
self::STATUS_UNSUPPORTED_MEDIA_TYPE => 'Unsupported Media Type',
self::STATUS_REQUEST_RANGE_NOT_SATISFIABLE => 'Requested Range Not Satisfiable',
self::STATUS_EXPECTATION_FAILED => 'Expectation Failed',
self::STATUS_IM_A_TEAPOT => 'I\'m a teapot', // RFC 2324
self::STATUS_UNPROCESSABLE_ENTITY => 'Unprocessable Entity', // RFC 4918
self::STATUS_LOCKED => 'Locked', // RFC 4918
self::STATUS_FAILED_DEPENDENCY => 'Failed Dependency', // RFC 4918
self::STATUS_UPGRADE_REQUIRED => 'Upgrade required',
self::STATUS_PRECONDITION_REQUIRED => 'Precondition required', // draft-nottingham-http-new-status
self::STATUS_TOO_MANY_REQUESTS => 'Too Many Requests', // draft-nottingham-http-new-status
self::STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE => 'Request Header Fields Too Large', // draft-nottingham-http-new-status
self::STATUS_INTERNAL_SERVER_ERROR => 'Internal Server Error',
self::STATUS_NOT_IMPLEMENTED => 'Not Implemented',
self::STATUS_BAD_GATEWAY => 'Bad Gateway',
self::STATUS_SERVICE_UNAVAILABLE => 'Service Unavailable',
self::STATUS_GATEWAY_TIMEOUT => 'Gateway Timeout',
self::STATUS_HTTP_VERSION_NOT_SUPPORTED => 'HTTP Version not supported',
self::STATUS_VARIANT_ALSO_NEGOTIATES => 'Variant Also Negotiates',
self::STATUS_INSUFFICIENT_STORAGE => 'Insufficient Storage', // RFC 4918
self::STATUS_LOOP_DETECTED => 'Loop Detected', // RFC 5842
self::STATUS_BANDWIDTH_LIMIT_EXCEEDED => 'Bandwidth Limit Exceeded', // non-standard
self::STATUS_NOT_EXTENDED => 'Not extended',
self::STATUS_NETWORK_AUTHENTICATION_REQUIRED => 'Network Authentication Required', // draft-nottingham-http-new-status
);
}
/**
* Gets the correct header
* @param Http::CONSTANT $status the constant from the Http class
* @param \DateTime $lastModified formatted last modified date
* @param string $Etag the etag
*/
public function getStatusHeader($status, \DateTime $lastModified=null,
$ETag=null) {
if(!is_null($lastModified)) {
$lastModified = $lastModified->format(\DateTime::RFC2822);
}
// if etag or lastmodified have not changed, return a not modified
if ((isset($this->server['HTTP_IF_NONE_MATCH'])
&& trim($this->server['HTTP_IF_NONE_MATCH']) === $ETag)
||
(isset($this->server['HTTP_IF_MODIFIED_SINCE'])
&& trim($this->server['HTTP_IF_MODIFIED_SINCE']) ===
$lastModified)) {
$status = self::STATUS_NOT_MODIFIED;
}
// we have one change currently for the http 1.0 header that differs
// from 1.1: STATUS_TEMPORARY_REDIRECT should be STATUS_FOUND
// if this differs any more, we want to create childclasses for this
if($status === self::STATUS_TEMPORARY_REDIRECT
&& $this->protocolVersion === 'HTTP/1.0') {
$status = self::STATUS_FOUND;
}
return $this->protocolVersion . ' ' . $status . ' ' .
$this->headers[$status];
}
}

View file

@ -0,0 +1,56 @@
<?php
/**
* ownCloud - App Framework
*
* @author Bernhard Posselt
* @copyright 2012 Bernhard Posselt nukeawhale@gmail.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OC\AppFramework\Http;
use OCP\AppFramework\Http\Response;
/**
* Redirects to a different URL
*/
class RedirectResponse extends Response {
private $redirectURL;
/**
* Creates a response that redirects to a url
* @param string $redirectURL the url to redirect to
*/
public function __construct($redirectURL) {
$this->redirectURL = $redirectURL;
$this->setStatus(Http::STATUS_TEMPORARY_REDIRECT);
$this->addHeader('Location', $redirectURL);
}
/**
* @return string the url to redirect
*/
public function getRedirectURL() {
return $this->redirectURL;
}
}

View file

@ -0,0 +1,307 @@
<?php
/**
* ownCloud - Request
*
* @author Thomas Tanghus
* @copyright 2013 Thomas Tanghus (thomas@tanghus.net)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OC\AppFramework\Http;
use OCP\IRequest;
/**
* Class for accessing variables in the request.
* This class provides an immutable object with request variables.
*/
class Request implements \ArrayAccess, \Countable, IRequest {
protected $items = array();
protected $allowedKeys = array(
'get',
'post',
'files',
'server',
'env',
'cookies',
'urlParams',
'params',
'parameters',
'method'
);
/**
* @param array $vars An associative array with the following optional values:
* @param array 'params' the parsed json array
* @param array 'urlParams' the parameters which were matched from the URL
* @param array 'get' the $_GET array
* @param array 'post' the $_POST array
* @param array 'files' the $_FILES array
* @param array 'server' the $_SERVER array
* @param array 'env' the $_ENV array
* @param array 'session' the $_SESSION array
* @param array 'cookies' the $_COOKIE array
* @param string 'method' the request method (GET, POST etc)
* @see http://www.php.net/manual/en/reserved.variables.php
*/
public function __construct(array $vars=array()) {
foreach($this->allowedKeys as $name) {
$this->items[$name] = isset($vars[$name])
? $vars[$name]
: array();
}
$this->items['parameters'] = array_merge(
$this->items['params'],
$this->items['get'],
$this->items['post'],
$this->items['urlParams']
);
}
// Countable method.
public function count() {
return count(array_keys($this->items['parameters']));
}
/**
* ArrayAccess methods
*
* Gives access to the combined GET, POST and urlParams arrays
*
* Examples:
*
* $var = $request['myvar'];
*
* or
*
* if(!isset($request['myvar']) {
* // Do something
* }
*
* $request['myvar'] = 'something'; // This throws an exception.
*
* @param string $offset The key to lookup
* @return string|null
*/
public function offsetExists($offset) {
return isset($this->items['parameters'][$offset]);
}
/**
* @see offsetExists
*/
public function offsetGet($offset) {
return isset($this->items['parameters'][$offset])
? $this->items['parameters'][$offset]
: null;
}
/**
* @see offsetExists
*/
public function offsetSet($offset, $value) {
throw new \RuntimeException('You cannot change the contents of the request object');
}
/**
* @see offsetExists
*/
public function offsetUnset($offset) {
throw new \RuntimeException('You cannot change the contents of the request object');
}
// Magic property accessors
public function __set($name, $value) {
throw new \RuntimeException('You cannot change the contents of the request object');
}
/**
* Access request variables by method and name.
* Examples:
*
* $request->post['myvar']; // Only look for POST variables
* $request->myvar; or $request->{'myvar'}; or $request->{$myvar}
* Looks in the combined GET, POST and urlParams array.
*
* if($request->method !== 'POST') {
* throw new Exception('This function can only be invoked using POST');
* }
*
* @param string $name The key to look for.
* @return mixed|null
*/
public function __get($name) {
switch($name) {
case 'get':
case 'post':
case 'files':
case 'server':
case 'env':
case 'cookies':
case 'parameters':
case 'params':
case 'urlParams':
return isset($this->items[$name])
? $this->items[$name]
: null;
break;
case 'method':
return $this->items['method'];
break;
default;
return isset($this[$name])
? $this[$name]
: null;
break;
}
}
public function __isset($name) {
return isset($this->items['parameters'][$name]);
}
public function __unset($id) {
throw new \RunTimeException('You cannot change the contents of the request object');
}
/**
* Returns the value for a specific http header.
*
* This method returns null if the header did not exist.
*
* @param string $name
* @return string
*/
public function getHeader($name) {
$name = strtoupper(str_replace(array('-'),array('_'),$name));
if (isset($this->server['HTTP_' . $name])) {
return $this->server['HTTP_' . $name];
}
// There's a few headers that seem to end up in the top-level
// server array.
switch($name) {
case 'CONTENT_TYPE' :
case 'CONTENT_LENGTH' :
if (isset($this->server[$name])) {
return $this->server[$name];
}
break;
}
return null;
}
/**
* Lets you access post and get parameters by the index
* In case of json requests the encoded json body is accessed
*
* @param string $key the key which you want to access in the URL Parameter
* placeholder, $_POST or $_GET array.
* The priority how they're returned is the following:
* 1. URL parameters
* 2. POST parameters
* 3. GET parameters
* @param mixed $default If the key is not found, this value will be returned
* @return mixed the content of the array
*/
public function getParam($key, $default = null) {
return isset($this->parameters[$key])
? $this->parameters[$key]
: $default;
}
/**
* Returns all params that were received, be it from the request
* (as GET or POST) or throuh the URL by the route
* @return array the array with all parameters
*/
public function getParams() {
return $this->parameters;
}
/**
* Returns the method of the request
* @return string the method of the request (POST, GET, etc)
*/
public function getMethod() {
return $this->method;
}
/**
* Shortcut for accessing an uploaded file through the $_FILES array
* @param string $key the key that will be taken from the $_FILES array
* @return array the file in the $_FILES element
*/
public function getUploadedFile($key) {
return isset($this->files[$key]) ? $this->files[$key] : null;
}
/**
* Shortcut for getting env variables
* @param string $key the key that will be taken from the $_ENV array
* @return array the value in the $_ENV element
*/
public function getEnv($key) {
return isset($this->env[$key]) ? $this->env[$key] : null;
}
/**
* Shortcut for getting cookie variables
* @param string $key the key that will be taken from the $_COOKIE array
* @return array the value in the $_COOKIE element
*/
function getCookie($key) {
return isset($this->cookies[$key]) ? $this->cookies[$key] : null;
}
/**
* Returns the request body content.
*
* @param Boolean $asResource If true, a resource will be returned
*
* @return string|resource The request body content or a resource to read the body stream.
*
* @throws \LogicException
*/
function getContent($asResource = false) {
return null;
// if (false === $this->content || (true === $asResource && null !== $this->content)) {
// throw new \LogicException('getContent() can only be called once when using the resource return type.');
// }
//
// if (true === $asResource) {
// $this->content = false;
//
// return fopen('php://input', 'rb');
// }
//
// if (null === $this->content) {
// $this->content = file_get_contents('php://input');
// }
//
// return $this->content;
}
}

View file

@ -0,0 +1,100 @@
<?php
/**
* ownCloud - App Framework
*
* @author Bernhard Posselt
* @copyright 2012 Bernhard Posselt nukeawhale@gmail.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OC\AppFramework\Middleware;
use OCP\AppFramework\Http\Response;
/**
* Middleware is used to provide hooks before or after controller methods and
* deal with possible exceptions raised in the controller methods.
* They're modeled after Django's middleware system:
* https://docs.djangoproject.com/en/dev/topics/http/middleware/
*/
abstract class Middleware {
/**
* This is being run in normal order before the controller is being
* called which allows several modifications and checks
*
* @param Controller $controller the controller that is being called
* @param string $methodName the name of the method that will be called on
* the controller
*/
public function beforeController($controller, $methodName){
}
/**
* This is being run when either the beforeController method or the
* controller method itself is throwing an exception. The middleware is
* asked in reverse order to handle the exception and to return a response.
* If the response is null, it is assumed that the exception could not be
* handled and the error will be thrown again
*
* @param Controller $controller the controller that is being called
* @param string $methodName the name of the method that will be called on
* the controller
* @param \Exception $exception the thrown exception
* @throws \Exception the passed in exception if it cant handle it
* @return Response a Response object in case that the exception was handled
*/
public function afterException($controller, $methodName, \Exception $exception){
throw $exception;
}
/**
* This is being run after a successful controllermethod call and allows
* the manipulation of a Response object. The middleware is run in reverse order
*
* @param Controller $controller the controller that is being called
* @param string $methodName the name of the method that will be called on
* the controller
* @param Response $response the generated response from the controller
* @return Response a Response object
*/
public function afterController($controller, $methodName, Response $response){
return $response;
}
/**
* This is being run after the response object has been rendered and
* allows the manipulation of the output. The middleware is run in reverse order
*
* @param Controller $controller the controller that is being called
* @param string $methodName the name of the method that will be called on
* the controller
* @param string $output the generated output from a response
* @return string the output that should be printed
*/
public function beforeOutput($controller, $methodName, $output){
return $output;
}
}

View file

@ -0,0 +1,159 @@
<?php
/**
* ownCloud - App Framework
*
* @author Bernhard Posselt
* @copyright 2012 Bernhard Posselt nukeawhale@gmail.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OC\AppFramework\Middleware;
use OC\AppFramework\Controller\Controller;
use OCP\AppFramework\Http\Response;
/**
* This class is used to store and run all the middleware in correct order
*/
class MiddlewareDispatcher {
/**
* @var array array containing all the middlewares
*/
private $middlewares;
/**
* @var int counter which tells us what middlware was executed once an
* exception occurs
*/
private $middlewareCounter;
/**
* Constructor
*/
public function __construct(){
$this->middlewares = array();
$this->middlewareCounter = 0;
}
/**
* Adds a new middleware
* @param Middleware $middleware the middleware which will be added
*/
public function registerMiddleware(Middleware $middleWare){
array_push($this->middlewares, $middleWare);
}
/**
* returns an array with all middleware elements
* @return array the middlewares
*/
public function getMiddlewares(){
return $this->middlewares;
}
/**
* This is being run in normal order before the controller is being
* called which allows several modifications and checks
*
* @param Controller $controller the controller that is being called
* @param string $methodName the name of the method that will be called on
* the controller
*/
public function beforeController(Controller $controller, $methodName){
// we need to count so that we know which middlewares we have to ask in
// case theres an exception
for($i=0; $i<count($this->middlewares); $i++){
$this->middlewareCounter++;
$middleware = $this->middlewares[$i];
$middleware->beforeController($controller, $methodName);
}
}
/**
* This is being run when either the beforeController method or the
* controller method itself is throwing an exception. The middleware is asked
* in reverse order to handle the exception and to return a response.
* If the response is null, it is assumed that the exception could not be
* handled and the error will be thrown again
*
* @param Controller $controller the controller that is being called
* @param string $methodName the name of the method that will be called on
* the controller
* @param \Exception $exception the thrown exception
* @return Response a Response object if the middleware can handle the
* exception
* @throws \Exception the passed in exception if it cant handle it
*/
public function afterException(Controller $controller, $methodName, \Exception $exception){
for($i=$this->middlewareCounter-1; $i>=0; $i--){
$middleware = $this->middlewares[$i];
try {
return $middleware->afterException($controller, $methodName, $exception);
} catch(\Exception $exception){
continue;
}
}
throw $exception;
}
/**
* This is being run after a successful controllermethod call and allows
* the manipulation of a Response object. The middleware is run in reverse order
*
* @param Controller $controller the controller that is being called
* @param string $methodName the name of the method that will be called on
* the controller
* @param Response $response the generated response from the controller
* @return Response a Response object
*/
public function afterController(Controller $controller, $methodName, Response $response){
for($i=count($this->middlewares)-1; $i>=0; $i--){
$middleware = $this->middlewares[$i];
$response = $middleware->afterController($controller, $methodName, $response);
}
return $response;
}
/**
* This is being run after the response object has been rendered and
* allows the manipulation of the output. The middleware is run in reverse order
*
* @param Controller $controller the controller that is being called
* @param string $methodName the name of the method that will be called on
* the controller
* @param string $output the generated output from a response
* @return string the output that should be printed
*/
public function beforeOutput(Controller $controller, $methodName, $output){
for($i=count($this->middlewares)-1; $i>=0; $i--){
$middleware = $this->middlewares[$i];
$output = $middleware->beforeOutput($controller, $methodName, $output);
}
return $output;
}
}

View file

@ -0,0 +1,41 @@
<?php
/**
* ownCloud - App Framework
*
* @author Bernhard Posselt
* @copyright 2012 Bernhard Posselt nukeawhale@gmail.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OC\AppFramework\Middleware\Security;
/**
* Thrown when the security middleware encounters a security problem
*/
class SecurityException extends \Exception {
/**
* @param string $msg the security error message
* @param bool $ajax true if it resulted because of an ajax request
*/
public function __construct($msg, $code = 0) {
parent::__construct($msg, $code);
}
}

View file

@ -0,0 +1,136 @@
<?php
/**
* ownCloud - App Framework
*
* @author Bernhard Posselt
* @copyright 2012 Bernhard Posselt nukeawhale@gmail.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OC\AppFramework\Middleware\Security;
use OC\AppFramework\Controller\Controller;
use OC\AppFramework\Http\Http;
use OC\AppFramework\Http\Request;
use OC\AppFramework\Http\RedirectResponse;
use OC\AppFramework\Utility\MethodAnnotationReader;
use OC\AppFramework\Middleware\Middleware;
use OC\AppFramework\Core\API;
use OCP\AppFramework\Http\Response;
use OCP\AppFramework\Http\JSONResponse;
/**
* Used to do all the authentication and checking stuff for a controller method
* It reads out the annotations of a controller method and checks which if
* security things should be checked and also handles errors in case a security
* check fails
*/
class SecurityMiddleware extends Middleware {
private $api;
/**
* @var \OC\AppFramework\Http\Request
*/
private $request;
/**
* @param API $api an instance of the api
*/
public function __construct(API $api, Request $request){
$this->api = $api;
$this->request = $request;
}
/**
* This runs all the security checks before a method call. The
* security checks are determined by inspecting the controller method
* annotations
* @param string/Controller $controller the controllername or string
* @param string $methodName the name of the method
* @throws SecurityException when a security check fails
*/
public function beforeController($controller, $methodName){
// get annotations from comments
$annotationReader = new MethodAnnotationReader($controller, $methodName);
// this will set the current navigation entry of the app, use this only
// for normal HTML requests and not for AJAX requests
$this->api->activateNavigationEntry();
// security checks
$isPublicPage = $annotationReader->hasAnnotation('PublicPage');
if(!$isPublicPage) {
if(!$this->api->isLoggedIn()) {
throw new SecurityException('Current user is not logged in', Http::STATUS_UNAUTHORIZED);
}
if(!$annotationReader->hasAnnotation('NoAdminRequired')) {
if(!$this->api->isAdminUser($this->api->getUserId())) {
throw new SecurityException('Logged in user must be an admin', Http::STATUS_FORBIDDEN);
}
}
}
if(!$annotationReader->hasAnnotation('NoCSRFRequired')) {
if(!$this->api->passesCSRFCheck()) {
throw new SecurityException('CSRF check failed', Http::STATUS_PRECONDITION_FAILED);
}
}
}
/**
* If an SecurityException is being caught, ajax requests return a JSON error
* response and non ajax requests redirect to the index
* @param Controller $controller the controller that is being called
* @param string $methodName the name of the method that will be called on
* the controller
* @param \Exception $exception the thrown exception
* @throws \Exception the passed in exception if it cant handle it
* @return Response a Response object or null in case that the exception could not be handled
*/
public function afterException($controller, $methodName, \Exception $exception){
if($exception instanceof SecurityException){
if (stripos($this->request->getHeader('Accept'),'html')===false) {
$response = new JSONResponse(
array('message' => $exception->getMessage()),
$exception->getCode()
);
$this->api->log($exception->getMessage(), 'debug');
} else {
$url = $this->api->linkToAbsolute('index.php', ''); // TODO: replace with link to route
$response = new RedirectResponse($url);
$this->api->log($exception->getMessage(), 'debug');
}
return $response;
}
throw $exception;
}
}

View file

@ -0,0 +1,42 @@
<?php
/**
* ownCloud - App Framework
*
* @author Thomas Müller
* @copyright 2013 Thomas Müller thomas.mueller@tmit.eu
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OC\AppFramework\routing;
use \OC\AppFramework\App;
use \OC\AppFramework\DependencyInjection\DIContainer;
class RouteActionHandler {
private $controllerName;
private $actionName;
private $container;
public function __construct(DIContainer $container, $controllerName, $actionName) {
$this->controllerName = $controllerName;
$this->actionName = $actionName;
$this->container = $container;
}
public function __invoke($params) {
App::main($this->controllerName, $this->actionName, $params, $this->container);
}
}

View file

@ -0,0 +1,186 @@
<?php
/**
* ownCloud - App Framework
*
* @author Thomas Müller
* @copyright 2013 Thomas Müller thomas.mueller@tmit.eu
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OC\AppFramework\routing;
use OC\AppFramework\DependencyInjection\DIContainer;
/**
* Class RouteConfig
* @package OC\AppFramework\routing
*/
class RouteConfig {
private $container;
private $router;
private $routes;
private $appName;
/**
* @param \OC\AppFramework\DependencyInjection\DIContainer $container
* @param \OC_Router $router
* @param string $pathToYml
* @internal param $appName
*/
public function __construct(DIContainer $container, \OC_Router $router, $routes) {
$this->routes = $routes;
$this->container = $container;
$this->router = $router;
$this->appName = $container['AppName'];
}
/**
* The routes and resource will be registered to the \OC_Router
*/
public function register() {
// parse simple
$this->processSimpleRoutes($this->routes);
// parse resources
$this->processResources($this->routes);
}
/**
* Creates one route base on the give configuration
* @param $routes
* @throws \UnexpectedValueException
*/
private function processSimpleRoutes($routes)
{
$simpleRoutes = isset($routes['routes']) ? $routes['routes'] : array();
foreach ($simpleRoutes as $simpleRoute) {
$name = $simpleRoute['name'];
$url = $simpleRoute['url'];
$verb = isset($simpleRoute['verb']) ? strtoupper($simpleRoute['verb']) : 'GET';
$split = explode('#', $name, 2);
if (count($split) != 2) {
throw new \UnexpectedValueException('Invalid route name');
}
$controller = $split[0];
$action = $split[1];
$controllerName = $this->buildControllerName($controller);
$actionName = $this->buildActionName($action);
// register the route
$handler = new RouteActionHandler($this->container, $controllerName, $actionName);
$this->router->create($this->appName.'.'.$controller.'.'.$action, $url)->method($verb)->action($handler);
}
}
/**
* For a given name and url restful routes are created:
* - index
* - show
* - new
* - create
* - update
* - destroy
*
* @param $routes
*/
private function processResources($routes)
{
// declaration of all restful actions
$actions = array(
array('name' => 'index', 'verb' => 'GET', 'on-collection' => true),
array('name' => 'show', 'verb' => 'GET'),
array('name' => 'create', 'verb' => 'POST', 'on-collection' => true),
array('name' => 'update', 'verb' => 'PUT'),
array('name' => 'destroy', 'verb' => 'DELETE'),
);
$resources = isset($routes['resources']) ? $routes['resources'] : array();
foreach ($resources as $resource => $config) {
// the url parameter used as id to the resource
$resourceId = $this->buildResourceId($resource);
foreach($actions as $action) {
$url = $config['url'];
$method = $action['name'];
$verb = isset($action['verb']) ? strtoupper($action['verb']) : 'GET';
$collectionAction = isset($action['on-collection']) ? $action['on-collection'] : false;
if (!$collectionAction) {
$url = $url . '/' . $resourceId;
}
if (isset($action['url-postfix'])) {
$url = $url . '/' . $action['url-postfix'];
}
$controller = $resource;
$controllerName = $this->buildControllerName($controller);
$actionName = $this->buildActionName($method);
$routeName = $this->appName . '.' . strtolower($resource) . '.' . strtolower($method);
$this->router->create($routeName, $url)->method($verb)->action(
new RouteActionHandler($this->container, $controllerName, $actionName)
);
}
}
}
/**
* Based on a given route name the controller name is generated
* @param $controller
* @return string
*/
private function buildControllerName($controller)
{
return $this->underScoreToCamelCase(ucfirst($controller)) . 'Controller';
}
/**
* Based on the action part of the route name the controller method name is generated
* @param $action
* @return string
*/
private function buildActionName($action) {
return $this->underScoreToCamelCase($action);
}
/**
* Generates the id used in the url part o the route url
* @param $resource
* @return string
*/
private function buildResourceId($resource) {
return '{'.$this->underScoreToCamelCase(rtrim($resource, 's')).'Id}';
}
/**
* Underscored strings are converted to camel case strings
* @param $str string
* @return string
*/
private function underScoreToCamelCase($str) {
$pattern = "/_[a-z]?/";
return preg_replace_callback(
$pattern,
function ($matches) {
return strtoupper(ltrim($matches[0], "_"));
},
$str);
}
}

View file

@ -0,0 +1,61 @@
<?php
/**
* ownCloud - App Framework
*
* @author Bernhard Posselt
* @copyright 2012 Bernhard Posselt nukeawhale@gmail.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OC\AppFramework\Utility;
/**
* Reads and parses annotations from doc comments
*/
class MethodAnnotationReader {
private $annotations;
/**
* @param object $object an object or classname
* @param string $method the method which we want to inspect for annotations
*/
public function __construct($object, $method){
$this->annotations = array();
$reflection = new \ReflectionMethod($object, $method);
$docs = $reflection->getDocComment();
// extract everything prefixed by @ and first letter uppercase
preg_match_all('/@([A-Z]\w+)/', $docs, $matches);
$this->annotations = $matches[1];
}
/**
* Check if a method contains an annotation
* @param string $name the name of the annotation
* @return bool true if the annotation is found
*/
public function hasAnnotation($name){
return in_array($name, $this->annotations);
}
}

View file

@ -0,0 +1,44 @@
<?php
namespace OC\AppFramework\Utility;
// register 3rdparty autoloaders
require_once __DIR__ . '/../../../3rdparty/Pimple/Pimple.php';
/**
* Class SimpleContainer
*
* SimpleContainer is a simple implementation of IContainer on basis of \Pimple
*/
class SimpleContainer extends \Pimple implements \OCP\IContainer {
/**
* @param string $name name of the service to query for
* @return object registered service for the given $name
*/
public function query($name) {
return $this->offsetGet($name);
}
function registerParameter($name, $value)
{
$this[$name] = $value;
}
/**
* The given closure is call the first time the given service is queried.
* The closure has to return the instance for the given service.
* Created instance will be cached in case $shared is true.
*
* @param string $name name of the service to register another backend for
* @param callable $closure the closure to be called on service creation
*/
function registerService($name, \Closure $closure, $shared = true)
{
if ($shared) {
$this[$name] = \Pimple::share($closure);
} else {
$this[$name] = $closure;
}
}
}

View file

@ -0,0 +1,42 @@
<?php
/**
* ownCloud - App Framework
*
* @author Bernhard Posselt
* @copyright 2012 Bernhard Posselt nukeawhale@gmail.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OC\AppFramework\Utility;
/**
* Needed to mock calls to time()
*/
class TimeFactory {
/**
* @return int the result of a call to time()
*/
public function getTime() {
return time();
}
}

View file

@ -84,6 +84,11 @@ class OC {
*/
public static $loader = null;
/**
* @var \OC\Server
*/
public static $server = null;
public static function initPaths() {
// calculate the root directories
OC::$SERVERROOT = str_replace("\\", '/', substr(__DIR__, 0, -4));
@ -451,6 +456,9 @@ class OC {
stream_wrapper_register('quota', 'OC\Files\Stream\Quota');
stream_wrapper_register('oc', 'OC\Files\Stream\OC');
// setup the basic server
self::$server = new \OC\Server();
self::initTemplateEngine();
if (!self::$CLI) {
self::initSession();
@ -557,11 +565,13 @@ class OC {
if (OC_Config::getValue('installed', false)) { //don't try to do this before we are properly setup
// register cache cleanup jobs
try { //if this is executed before the upgrade to the new backgroundjob system is completed it will throw an exception
\OCP\BackgroundJob::registerJob('OC_Cache_FileGlobalGC');
\OCP\BackgroundJob::registerJob('OC\Cache\FileGlobalGC');
} catch (Exception $e) {
}
OC_Hook::connect('OC_User', 'post_login', 'OC_Cache_File', 'loginListener');
// NOTE: This will be replaced to use OCP
$userSession = \OC_User::getUserSession();
$userSession->listen('postLogin', '\OC\Cache\File', 'loginListener');
}
}

View file

@ -6,34 +6,36 @@
* See the COPYING-README file.
*/
class OC_Cache {
namespace OC;
class Cache {
/**
* @var OC_Cache $user_cache
* @var Cache $user_cache
*/
static protected $user_cache;
/**
* @var OC_Cache $global_cache
* @var Cache $global_cache
*/
static protected $global_cache;
/**
* get the global cache
* @return OC_Cache
* @return Cache
*/
static public function getGlobalCache() {
if (!self::$global_cache) {
self::$global_cache = new OC_Cache_FileGlobal();
self::$global_cache = new Cache\FileGlobal();
}
return self::$global_cache;
}
/**
* get the user cache
* @return OC_Cache
* @return Cache
*/
static public function getUserCache() {
if (!self::$user_cache) {
self::$user_cache = new OC_Cache_File();
self::$user_cache = new Cache\File();
}
return self::$user_cache;
}
@ -85,7 +87,7 @@ class OC_Cache {
/**
* clear the user cache of all entries starting with a prefix
* @param string prefix (optional)
* @param string $prefix (optional)
* @return bool
*/
static public function clear($prefix='') {
@ -93,6 +95,11 @@ class OC_Cache {
return $user_cache->clear($prefix);
}
/**
* creates cache key based on the files given
* @param $files
* @return string
*/
static public function generateCacheKeyFromFiles($files) {
$key = '';
sort($files);

12
lib/cache/broker.php vendored
View file

@ -6,8 +6,18 @@
* See the COPYING-README file.
*/
class OC_Cache_Broker {
namespace OC\Cache;
class Broker {
/**
* @var \OC\Cache
*/
protected $fast_cache;
/**
* @var \OC\Cache
*/
protected $slow_cache;
public function __construct($fast_cache, $slow_cache) {

13
lib/cache/file.php vendored
View file

@ -6,24 +6,25 @@
* See the COPYING-README file.
*/
namespace OC\Cache;
class OC_Cache_File{
class File {
protected $storage;
protected function getStorage() {
if (isset($this->storage)) {
return $this->storage;
}
if(OC_User::isLoggedIn()) {
\OC\Files\Filesystem::initMountPoints(OC_User::getUser());
if(\OC_User::isLoggedIn()) {
\OC\Files\Filesystem::initMountPoints(\OC_User::getUser());
$subdir = 'cache';
$view = new \OC\Files\View('/'.OC_User::getUser());
$view = new \OC\Files\View('/' . \OC_User::getUser());
if(!$view->file_exists($subdir)) {
$view->mkdir($subdir);
}
$this->storage = new \OC\Files\View('/'.OC_User::getUser().'/'.$subdir);
$this->storage = new \OC\Files\View('/' . \OC_User::getUser().'/'.$subdir);
return $this->storage;
}else{
OC_Log::write('core', 'Can\'t get cache storage, user not logged in', OC_Log::ERROR);
\OC_Log::write('core', 'Can\'t get cache storage, user not logged in', \OC_Log::ERROR);
return false;
}
}

View file

@ -6,10 +6,11 @@
* See the COPYING-README file.
*/
namespace OC\Cache;
class OC_Cache_FileGlobal{
class FileGlobal {
static protected function getCacheDir() {
$cache_dir = get_temp_dir().'/owncloud-'.OC_Util::getInstanceId().'/';
$cache_dir = get_temp_dir().'/owncloud-' . \OC_Util::getInstanceId().'/';
if (!is_dir($cache_dir)) {
mkdir($cache_dir);
}
@ -80,13 +81,13 @@ class OC_Cache_FileGlobal{
}
static public function gc() {
$last_run = OC_AppConfig::getValue('core', 'global_cache_gc_lastrun', 0);
$last_run = \OC_AppConfig::getValue('core', 'global_cache_gc_lastrun', 0);
$now = time();
if (($now - $last_run) < 300) {
// only do cleanup every 5 minutes
return;
}
OC_AppConfig::setValue('core', 'global_cache_gc_lastrun', $now);
\OC_AppConfig::setValue('core', 'global_cache_gc_lastrun', $now);
$cache_dir = self::getCacheDir();
if($cache_dir and is_dir($cache_dir)) {
$dh=opendir($cache_dir);

View file

@ -1,8 +1,9 @@
<?php
namespace OC\Cache;
class OC_Cache_FileGlobalGC extends \OC\BackgroundJob\Job{
class FileGlobalGC extends \OC\BackgroundJob\Job{
public function run($argument){
OC_Cache_FileGlobal::gc();
FileGlobal::gc();
}
}

Some files were not shown because too many files have changed in this diff Show more