1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/jirafeau_ynh.git synced 2024-09-03 19:35:53 +02:00

[enh] update to e32a48c6f4c05505465ed7fe3ca70cb703868d42

This commit is contained in:
Julien Malik 2015-03-23 12:04:48 +01:00
parent 5bd8961fec
commit d325ad352a
9 changed files with 66 additions and 66 deletions

View file

@ -43,8 +43,8 @@ $cfg['download_page'] = true;
* By enabling it, file-level deduplication won't work.
*/
$cfg['enable_crypt'] = false;
/* Split lenght of link refenrece. */
$cfg['link_name_lenght'] = 8;
/* Split length of link refenrece. */
$cfg['link_name_length'] = 8;
/* Upload password(s). Empty array disable password authentification.
* $cfg['upload_password'] = array(); // No password
* $cfg['upload_password'] = array('psw1'); // One password

View file

@ -148,7 +148,7 @@ if (!(isset ($_POST['action']) && strcmp ($_POST['action'], 'download') == 0))
<tr>
<input type = "hidden" name = "action" value = "clean_async"/>
<td class = "info">
<?php echo t('Clean old unfinished transferts'); ?>
<?php echo t('Clean old unfinished transfers'); ?>
</td>
<td></td>
<td>

View file

@ -134,7 +134,7 @@ if (!empty ($link['key']))
'<input type = "password" name = "key" />' .
'</td></tr>' .
'<tr><td>' .
t('By using our services, you accept of our'). ' <a href="' . $cfg['web_root'] . '/tos.php' . '">' . t('Term Of Service') . '</a>' .
t('By using our services, you accept our'). ' <a href="' . $cfg['web_root'] . '/tos.php' . '">' . t('Term Of Service') . '</a>' .
'</td></tr>' .
'<tr><td>';
?><input type="submit" id = "submit_download" value="<?php echo t('Download'); ?>"
@ -190,7 +190,7 @@ if ($cfg['download_page'] && !$password_challenged && !$do_download && !$do_prev
t('You are about to download') . ' "' . $link['file_name'] . '" (' . jirafeau_human_size($link['file_size']) . ')' .
'</td></tr>' .
'<tr><td>' .
t('By using our services, you accept of our'). ' <a href="' . $cfg['web_root'] . '/tos.php' . '">' . t('Term Of Service') . '</a>';
t('By using our services, you accept our'). ' <a href="' . $cfg['web_root'] . '/tos.php' . '">' . t('Term Of Service') . '</a>';
?></td></tr><tr><td><input type="submit" id = "submit_download" value="<?php echo t('Download'); ?>"
onclick="document.getElementById('submit').action='
<?php

View file

@ -89,9 +89,9 @@ function
jirafeau_check_var_dir ($path)
{
$mkdir_str1 = t('The following directory could not be created') . ':';
$mkdir_str2 = t('You should create this directory by hand.');
$mkdir_str2 = t('You should create this directory manually.');
$write_str1 = t('The following directory is not writable') . ':';
$write_str2 = t('You should give the write right to the web server on ' .
$write_str2 = t('You should give the write permission to the web server on ' .
'this directory.');
$solution_str = t('Here is a solution') . ':';
@ -136,8 +136,8 @@ if (!file_exists (JIRAFEAU_CFG))
echo '<div class="error"><p>' .
t('The local configuration file could not be created. Create a ' .
'<code>lib/config.local.php</code> file and give the write ' .
'right to the web server (preferred solution), or give the ' .
'write right to the web server on the <code>lib</code> ' .
'permission to the web server (preferred solution), or give the ' .
'write permission to the web server on the <code>lib</code> ' .
'directory.') .
'</p></div>';
require (JIRAFEAU_ROOT . 'lib/template/footer.php');
@ -150,7 +150,7 @@ if (!is_writable (JIRAFEAU_CFG) && !@chmod (JIRAFEAU_CFG, '0666'))
require (JIRAFEAU_ROOT . 'lib/template/header.php');
echo '<div class="error"><p>' .
t('The local configuration is not writable by the web server. ' .
'Give the write right to the web server on the ' .
'Give the write permission to the web server on the ' .
'<code>lib/config.local.php</code> file.') .
'</p></div>';
require (JIRAFEAU_ROOT . 'lib/template/footer.php');
@ -249,7 +249,7 @@ case 2:
"2"><?php echo
t
('Jirafeau has an administration interface (through admin.php). ' .
'You can set a password to access the intercace or let it be empty ' .
'You can set a password to access the interface or leave it be empty ' .
'to disable the interface.');
?></td> </tr> <tr> <td class = "label"><label for = "select_password"
><?php echo t('Administration password') . ':';
@ -282,7 +282,7 @@ case 3:
t
('The base address of Jirafeau is the first part of the URL, until ' .
'(and including) the last slash. For example: ' .
'"http://www.example.com/". Do not forget the ending slash!');
'"http://www.example.com/". Do not forget the trailing slash!');
?></td> </tr> <tr> <td class = "label"><label for = "input_web_root"
><?php echo t('Base address') . ':';
?></label></td>
@ -295,8 +295,8 @@ case 3:
</tr> <tr> <td class = "info" colspan = "2"><?php
echo t('The data directory is where your files and information about' .
' your files will be stored. You should put it outside your web ' .
'site, or at least restrict the access of this directory. Do not ' .
'forget the ending slash!');
'site, or at least restrict the access to this directory. Do not ' .
'forget the trailing slash!');
?></td> </tr> <tr> <td class = "label"><label for = "input_var_root"
><?php echo t('Data directory') . ':';
?></label></td>

View file

@ -43,8 +43,8 @@ $cfg['download_page'] = true;
* By enabling it, file-level deduplication won't work.
*/
$cfg['enable_crypt'] = false;
/* Split lenght of link refenrece. */
$cfg['link_name_lenght'] = 8;
/* Split length of link refenrece. */
$cfg['link_name_length'] = 8;
/* Upload password(s). Empty array disable password authentification.
* $cfg['upload_password'] = array(); // No password
* $cfg['upload_password'] = array('psw1'); // One password

View file

@ -904,7 +904,7 @@ jirafeau_async_push ($ref, $data, $code, $max_file_size)
* @param $ref asynchronous upload reference
* @param $code client code for this operation
* @param $crypt boolean asking to crypt or not
* @param $link_name_length link name lenght
* @param $link_name_length link name length
* @return a string containing the download reference followed by a delete code or the string "Error"
*/
function

View file

@ -64,24 +64,24 @@ $tr = array (
'Give the password of this file' => 'Donnez le mot de passe pour ce fichier',
'Access denied' => 'Accès interdit',
'You are about to download' => 'Vous êtes sur le point de télécharger',
'By using our services, you accept of our' => 'En utilisant nos services, vous acceptez nos',
'By using our services, you accept our' => 'En utilisant nos services, vous acceptez nos',
'Term Of Service' => 'Conditions d\'utilisation',
/* functions.php */
'Internal error during file creation.' => 'Erreur interne lors la creation de fichier.',
/* install.hpp */
'This file was generated by the install process. You can edit it. Please see config.original.php to understand the configuration items.' => 'Ce fichier a été généré par le processus d\'installation. Vous pouvez l\'éditer. Merci de se référer à config.original.php pour comprendre les éléments de configuration.',
'The following directory could not be created' => 'Le dossier suivant ne peut être créé',
'You should create this directory by hand.' => 'Vous devriez creer manuelement ce dossier',
'You should create this directory manually.' => 'Vous devriez creer manuelement ce dossier',
'The following directory is not writable' => 'Le dossier suivant ne peut être créé',
'You should give the write right to the web server on this directory.' => 'Vous devriez donner le droits d\'écriture à ce repertoire pour le rendre accessible par le serveur web.',
'You should give the write permission to the web server on this directory.' => 'Vous devriez donner le droits d\'écriture à ce repertoire pour le rendre accessible par le serveur web.',
'Here is a solution' => 'Une solution possible',
'The local configuration file could not be created. Create a ' .
'<code>lib/config.local.php</code> file and give the write ' .
'right to the web server (preferred solution), or give the ' .
'write right to the web server on the <code>lib</code> ' .
'permission to the web server (preferred solution), or give the ' .
'write permission to the web server on the <code>lib</code> ' .
'directory.' => 'Le fichier de configuration local ne peut être créé. Creez le fichier <code>lib/config.local.php</code> et donnez lui les droits d\'écriture par le serveur web (solution préférable) ou bien donnez les accès en écriture au dossier <code>lib</code>',
'The local configuration is not writable by the web server. ' .
'Give the write right to the web server on the ' .
'Give the write permission to the web server on the ' .
'<code>lib/config.local.php</code> file.' => 'Le fichier de configuration local ne peut être écrit. Donnez les droits d\'écriture au fichier <code>lib/config.local.php</code> par le serveur web.',
'Installation of Jirafeau' => 'Installation de Jirafeau',
'step' => 'étape',
@ -93,10 +93,10 @@ $tr = array (
'Retry this step' => 'Ressayer cette étape',
'Jirafeau is now fully operational' => 'Jirafeau est maintenant utilisable',
'Information' => 'Information',
'The base address of Jirafeau is the first part of the URL, until (and including) the last slash. For example: "http://www.example.com/". Do not forget the ending slash!'
'The base address of Jirafeau is the first part of the URL, until (and including) the last slash. For example: "http://www.example.com/". Do not forget the trailing slash!'
=> 'L\'adresse d\'origine de Jirafeau est la première partie de l\'URL (slash de fin inclue). Par exemple: "http://www.exemple.com/". N\'oubliez pas le slash de fin !',
'Base address' => 'Addresse d\'origine',
'The data directory is where your files and information about your files will be stored. You should put it outside your web site, or at least restrict the access of this directory. Do not forget the ending slash!'
'The data directory is where your files and information about your files will be stored. You should put it outside your web site, or at least restrict the access to this directory. Do not forget the trailing slash!'
=> 'Le dossier "data" est là où seront stoqués les fichiers ainsi que leurs informations. Ce dossier ne devrait pas être accessible directement par l\'utilisateur. N\'oubliez pas le slash de fin !',
'Data directory' => 'Dossier de stockage des données',
'Jirafeau is internationalised. Choose a specific langage or choose Automatic (langage is provided by user\'s browser).'
@ -104,7 +104,7 @@ $tr = array (
'Choose the default language' => 'Choisissez la langue par defaut',
'Next step' => 'Etape suivante',
'Jirafeau has an administration interface (through admin.php). ' .
'You can set a password to access the intercace or let it be empty ' .
'You can set a password to access the interface or leave it empty ' .
'to disable the interface.' => 'Jirafeau a une interface d\'administration (accessible via admin.php). Vous pouvez saisir un mot de passe pour y acceder ou ne pas en mettre pour désactiver l\'accès à l\'interface.',
'Administration password' => 'Mot de passe d\'administration',
/* admin.php */
@ -114,7 +114,7 @@ $tr = array (
'Wrong password.' => 'Mot de passe invalide.',
'Admin interface' => 'Interface d\'administration',
'Clean expired files' => 'Nettoyer les fichiers périmés',
'Clean old unfinished transferts' => 'Nettoyer les anciens transferts inachevés',
'Clean old unfinished transfers' => 'Nettoyer les anciens transferts inachevés',
'Clean' => 'Nettoyage',
'Search files by name' => 'Rechercher les fichiers par leur nom',
'Search' => 'Rechercher',
@ -125,7 +125,7 @@ $tr = array (
'Search a specific link' => 'Rechercher un lien particulier',
'Number of cleaned files' => 'Nombre de fichiers nettoyés',
'Logout' => 'Déconnexion',
'You are now Logout' => 'Vous êtes maintenant déconnecté',
'You are now loggued out' => 'Vous êtes maintenant déconnecté',
'Link deleted' => 'Lien supprimé',
'Filename' => 'Nom',
'file' => 'fichier',
@ -161,17 +161,17 @@ $tr = array (
'Example' => 'Exemple',
'If a password has been set, send a POST request with it.' => 'Si un mot de passe a été définis, envoyer une requette POST avec.',
'Delete a file' => 'Supprimer un fichier',
'This will return "Ok" if succeded, "Error" otherwhise.' => 'Retourne "OK" en cas de succès, "Error" dans le cas contraire.',
'Get a generated scripts' => 'Récupérer un script généré',
'This will return "Ok" if succeeded, "Error" otherwhise.' => 'Retourne "OK" en cas de succès, "Error" dans le cas contraire.',
'Get a generated script' => 'Récupérer un script généré',
'This will return brut text content of the code.' => 'Renvoie le code sous forme the texte brut.',
'Initalize an asynchronous transfert' => 'Initialiser un transfert asynchrone',
'The goal is to permit to transfert big file, chunk by chunk.' => 'Le but est de permettre de transférer de gros fichiers, morceaux par morceaux.',
'Initalize an asynchronous transfer' => 'Initialiser un transfert asynchrone',
'The goal is to permit to transfer big file, chunk by chunk.' => 'Le but est de permettre de transférer de gros fichiers, morceaux par morceaux.',
'Chunks of data must be sent in order.' => 'Chaque morceau doit être envoyé dans l\'ordre.',
'First line is the asynchronous transfert reference and the second line the code to use in the next operation.'
'First line is the asynchronous transfer reference and the second line the code to use in the next operation.'
=> 'La première ligne correspond à la référence de transfert asynchrone, la seconde au code à utiliser dans la prochaine requette.',
'Push data during asynchronous transfert' => 'Envoyer des données pendant un transfert asynchrone',
'Push data during asynchronous transfer' => 'Envoyer des données pendant un transfert asynchrone',
'Returns the next code to use.' => 'Renvoie le prochain code à utiliser.',
'Finalize asynchronous transfert' => 'Finaliser un transfert asynchrone',
'Finalize asynchronous transfer' => 'Finaliser un transfert asynchrone',
'This will return "Ok" or "Error" string.' => 'Retourn la chaine "Ok" ou "Error".',
);
?>

View file

@ -44,24 +44,24 @@ $tr = array (
'Give the password of this file' => '',
'Access denied' => '',
'You are about to download' => '',
'By using our services, you accept of our' => '',
'By using our services, you accept our' => '',
'Term Of Service' => '',
/* functions.php */
'Internal error during file creation.' => '',
/* install.hpp */
'This file was generated by the install process. You can edit it. Please see config.original.php to understand the configuration items.' => '',
'The following directory could not be created' => '',
'You should create this directory by hand.' => '',
'You should create this directory manually.' => '',
'The following directory is not writable' => '',
'You should give the write right to the web server on this directory.' => '',
'Here is a solution' => 'Une solution possible',
'You should give the write permission to the web server on this directory.' => '',
'Here is a solution' => '',
'The local configuration file could not be created. Create a ' .
'<code>lib/config.local.php</code> file and give the write ' .
'right to the web server (preferred solution), or give the ' .
'write right to the web server on the <code>lib</code> ' .
'permission to the web server (preferred solution), or give the ' .
'write permission to the web server on the <code>lib</code> ' .
'directory.' => '',
'The local configuration is not writable by the web server. ' .
'Give the write right to the web server on the ' .
'Give the write permission to the web server on the ' .
'<code>lib/config.local.php</code> file.' => '',
'Installation of Jirafeau' => '',
'step' => '',
@ -73,10 +73,10 @@ $tr = array (
'Retry this step' => '',
'Jirafeau is now fully operational' => '',
'Information' => '',
'The base address of Jirafeau is the first part of the URL, until (and including) the last slash. For example: "http://www.example.com/". Do not forget the ending slash!'
'The base address of Jirafeau is the first part of the URL, until (and including) the last slash. For example: "http://www.example.com/". Do not forget the trailing slash!'
=> '',
'Base address' => 'Addresse d\'origine',
'The data directory is where your files and information about your files will be stored. You should put it outside your web site, or at least restrict the access of this directory. Do not forget the ending slash!'
'Base address' => '',
'The data directory is where your files and information about your files will be stored. You should put it outside your web site, or at least restrict the access to this directory. Do not forget the trailing slash!'
=> '',
'Data directory' => '',
'Jirafeau is internationalised. Choose a specific langage or choose Automatic (langage is provided by user\'s browser).'
@ -84,7 +84,7 @@ $tr = array (
'Choose the default language' => '',
'Next step' => '',
'' .
'You can set a password to access the intercace or let it be empty ' .
'You can set a password to access the interface or leave it empty ' .
'to disable the interface.' => '',
'Administration password' => '',
/* admin.php */
@ -94,7 +94,7 @@ $tr = array (
'Wrong password.' => '',
'Admin interface' => '',
'Clean expired files' => '',
'Clean old unfinished transferts' => '',
'Clean old unfinished transfers' => '',
'Clean' => '',
'Search files by name' => '',
'Search' => '',
@ -104,8 +104,8 @@ $tr = array (
'Search files by file hash' => '',
'Search a specific link' => '',
'Number of cleaned files' => '',
'Logout' => 'Déconnexion',
'You are now Logout' => '',
'Logout' => '',
'You are now loggued out' => '',
'Link deleted' => '',
'Filename' => '',
'file' => '',
@ -138,20 +138,20 @@ $tr = array (
'This will return brut text content.' => '',
'First line is the download reference and the second line the delete code.' => '',
'First line is the server capacity (in Bytes).' => '',
'Example' => 'Exemple',
'Example' => '',
'If a password has been set, send a POST request with it.' => '',
'Delete a file' => '',
'This will return "Ok" if succeded, "Error" otherwhise.' => '',
'Get a generated scripts' => '',
'This will return "Ok" if succeeded, "Error" otherwhise.' => '',
'Get a generated script' => '',
'This will return brut text content of the code.' => '',
'Initalize an asynchronous transfert' => '',
'The goal is to permit to transfert big file, chunk by chunk.' => '',
'Initalize an asynchronous transfer' => '',
'The goal is to permit to transfer big file, chunk by chunk.' => '',
'Chunks of data must be sent in order.' => '',
'First line is the asynchronous transfert reference and the second line the code to use in the next operation.'
'First line is the asynchronous transfer reference and the second line the code to use in the next operation.'
=> '',
'Push data during asynchronous transfert' => '',
'Push data during asynchronous transfer' => '',
'Returns the next code to use.' => '',
'Finalize asynchronous transfert' => '',
'Finalize asynchronous transfer' => '',
'This will return "Ok" or "Error" string.' => '',
);
?>

View file

@ -135,12 +135,12 @@ if ($_SERVER['REQUEST_METHOD'] == "GET" && count ($_GET) == 0)
echo "<b>h=</b>your_download_reference<i> (" . t('Required') . ")</i> <br />";
echo "<b>d=</b>yout_delete_code<i> (" . t('Required') . ")</i> <br />";
echo '</p>';
echo '<p>' . t('This will return "Ok" if succeded, "Error" otherwhise.') . '<br /></p>';
echo '<p>' . t('This will return "Ok" if succeeded, "Error" otherwhise.') . '<br /></p>';
echo '<p>';
echo t('Example') . ": <a href=\"" . $web_root . "script.php?h=30ngy0hsDcpfrF8zR7x9iU&amp;d=0d210a952\">" . $web_root . "script.php?h=30ngy0hsDcpfrF8zR7x9iU&amp;d=0d210a952</a> ";
echo '</p>';
echo '<h3>' . t('Get a generated scripts') . ':</h3>';
echo '<h3>' . t('Get a generated script') . ':</h3>';
echo '<p>';
echo t('Send a GET query to') . ': <i>' . $web_root . 'script.php</i><br />';
echo '<br />';
@ -157,9 +157,9 @@ if ($_SERVER['REQUEST_METHOD'] == "GET" && count ($_GET) == 0)
echo "$name: <a href=\"" . $web_root . "script.php?lang=$lang\">" . $web_root . "script.php?lang=$lang</a> ";
echo '</p>';
echo '<h3>' . t('Initalize an asynchronous transfert') . ':</h3>';
echo '<h3>' . t('Initalize an asynchronous transfer') . ':</h3>';
echo '<p>';
echo t('The goal is to permit to transfert big file, chunk by chunk.') . ' ';
echo t('The goal is to permit to transfer big file, chunk by chunk.') . ' ';
echo t('Chunks of data must be sent in order.');
echo '</p>';
echo '<p>';
@ -174,9 +174,9 @@ if ($_SERVER['REQUEST_METHOD'] == "GET" && count ($_GET) == 0)
echo "<b>upload_password=</b>your_upload_password<i> (" . t('Optional') . ")</i> <br />";
echo '</p>';
echo '<p>' . t('This will return brut text content.') . ' ' .
t('First line is the asynchronous transfert reference and the second line the code to use in the next operation.') . '<br /></p>';
t('First line is the asynchronous transfer reference and the second line the code to use in the next operation.') . '<br /></p>';
echo '<h3>' . t('Push data during asynchronous transfert') . ':</h3>';
echo '<h3>' . t('Push data during asynchronous transfer') . ':</h3>';
echo '<p>';
echo t('Send a GET query to') . ': <i>' . $web_root . 'script.php?push_async</i><br />';
echo '<br />';
@ -188,7 +188,7 @@ if ($_SERVER['REQUEST_METHOD'] == "GET" && count ($_GET) == 0)
echo '<p>' . t('This will return brut text content.') . ' ' .
t('Returns the next code to use.') . '<br /></p>';
echo '<h3>' . t('Finalize asynchronous transfert') . ':</h3>';
echo '<h3>' . t('Finalize asynchronous transfer') . ':</h3>';
echo '<p>';
echo t('Send a GET query to') . ': <i>' . $web_root . 'script.php?end_async</i><br />';
echo '<br />';
@ -273,7 +273,7 @@ if (isset ($_FILES['file']) && is_writable (VAR_FILES)
$res = jirafeau_upload ($_FILES['file'],
isset ($_POST['one_time_download']),
$key, $time, $_SERVER['REMOTE_ADDR'],
$cfg['enable_crypt'], $cfg['link_name_lenght']);
$cfg['enable_crypt'], $cfg['link_name_length']);
if (empty($res) || $res['error']['has_error'])
{
@ -587,7 +587,7 @@ elseif (isset ($_GET['end_async']))
|| !isset ($_POST['code']))
echo "Error";
else
echo jirafeau_async_end ($_POST['ref'], $_POST['code'], $cfg['enable_crypt'], $cfg['link_name_lenght']);
echo jirafeau_async_end ($_POST['ref'], $_POST['code'], $cfg['enable_crypt'], $cfg['link_name_length']);
}
else
echo "Error";