Code cleaning
This commit is contained in:
parent
78ffe5a8c7
commit
efc7352404
19 changed files with 1222 additions and 1054 deletions
619
includes/cli.php
619
includes/cli.php
|
@ -1,34 +1,35 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$cli_commands=array();
|
$cli_commands=array();
|
||||||
function add_cli_command($command, $handler, $short_desc, $usage_args=false, $long_desc=false, $override=false) {
|
function add_cli_command($command, $handler, $short_desc, $usage_args=false, $long_desc=false,
|
||||||
global $cli_commands;
|
$override=false) {
|
||||||
if (array_key_exists($command, $cli_commands) && !$override) {
|
global $cli_commands;
|
||||||
logging('ERROR', sprintf(_("The CLI command '%s' already exists.", $command)));
|
if (array_key_exists($command, $cli_commands) && !$override) {
|
||||||
return False;
|
logging('ERROR', sprintf(_("The CLI command '%s' already exists.", $command)));
|
||||||
}
|
return False;
|
||||||
|
}
|
||||||
|
|
||||||
if (!is_callable($handler)) {
|
if (!is_callable($handler)) {
|
||||||
logging('ERROR', sprintf(_("The CLI command '%s' handler is not callable !"), $command));
|
logging('ERROR', sprintf(_("The CLI command '%s' handler is not callable !"), $command));
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
|
|
||||||
$cli_commands[$command] = array (
|
$cli_commands[$command] = array (
|
||||||
'handler' => $handler,
|
'handler' => $handler,
|
||||||
'short_desc' => $short_desc,
|
'short_desc' => $short_desc,
|
||||||
'usage_args' => $usage_args,
|
'usage_args' => $usage_args,
|
||||||
'long_desc' => $long_desc,
|
'long_desc' => $long_desc,
|
||||||
);
|
);
|
||||||
return True;
|
return True;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
**************************************************************************************************************
|
*************************************************************************************************
|
||||||
* /!\ Code after this message will only be execute on CLI context /!\
|
* /!\ Code after this message will only be execute on CLI context /!\
|
||||||
**************************************************************************************************************
|
*************************************************************************************************
|
||||||
*/
|
*/
|
||||||
if (php_sapi_name() != "cli")
|
if (php_sapi_name() != "cli")
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// Store current CLI command
|
// Store current CLI command
|
||||||
$cli_command = null;
|
$cli_command = null;
|
||||||
|
@ -38,105 +39,124 @@ $cli_command = null;
|
||||||
**/
|
**/
|
||||||
|
|
||||||
function usage($error=false) {
|
function usage($error=false) {
|
||||||
global $cli_commands, $cli_command, $argv;
|
global $cli_commands, $cli_command, $argv;
|
||||||
|
|
||||||
if ($error)
|
if ($error)
|
||||||
echo "$error\n\n";
|
echo "$error\n\n";
|
||||||
printf(_("Usage: %s [-h] [-qd] command\n"), basename($argv[0]));
|
printf(_("Usage: %s [-h] [-qd] command\n"), basename($argv[0]));
|
||||||
echo _(" -h Show this message\n");
|
echo _(" -h Show this message\n");
|
||||||
echo _(" -q / -d Quiet/Debug mode\n");
|
echo _(" -q / -d Quiet/Debug mode\n");
|
||||||
echo _(" --trace Trace mode (the most verbose)\n");
|
echo _(" --trace Trace mode (the most verbose)\n");
|
||||||
echo _(" command Command to run\n");
|
echo _(" command Command to run\n");
|
||||||
echo "\n";
|
echo "\n";
|
||||||
echo _("Available commands:\n");
|
echo _("Available commands:\n");
|
||||||
|
|
||||||
foreach ($cli_commands as $command => $info) {
|
foreach ($cli_commands as $command => $info) {
|
||||||
if ($cli_command && $command != $cli_command)
|
if ($cli_command && $command != $cli_command)
|
||||||
continue;
|
continue;
|
||||||
echo " ".str_replace("\n", "\n ", wordwrap("$command : "._($info['short_desc'])))."\n\n";
|
echo (
|
||||||
echo " ".basename($argv[0])." $command ".($info['usage_args']?_($info['usage_args']):'')."\n";
|
" ".str_replace(
|
||||||
if ($info['long_desc']) {
|
"\n", "\n ",
|
||||||
if (is_array($info['long_desc'])) {
|
wordwrap("$command : "._($info['short_desc'])))
|
||||||
$lines = array();
|
."\n\n");
|
||||||
foreach ($info['long_desc'] as $line)
|
echo (
|
||||||
$lines[] = _($line);
|
" ".basename($argv[0])." $command ".
|
||||||
$info['long_desc'] = implode("\n", $lines);
|
($info['usage_args']?_($info['usage_args']):'').
|
||||||
}
|
"\n");
|
||||||
else
|
if ($info['long_desc']) {
|
||||||
$info['long_desc'] = _($info['long_desc']);
|
if (is_array($info['long_desc'])) {
|
||||||
|
$lines = array();
|
||||||
|
foreach ($info['long_desc'] as $line)
|
||||||
|
$lines[] = _($line);
|
||||||
|
$info['long_desc'] = implode("\n", $lines);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
$info['long_desc'] = _($info['long_desc']);
|
||||||
|
|
||||||
echo "\n ".str_replace("\n", "\n ", wordwrap($info['long_desc']))."\n";
|
echo "\n ".str_replace("\n", "\n ", wordwrap($info['long_desc']))."\n";
|
||||||
}
|
}
|
||||||
echo "\n";
|
echo "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
exit(($error?1:0));
|
exit(($error?1:0));
|
||||||
}
|
}
|
||||||
|
|
||||||
function handle_cli_args() {
|
function handle_cli_args() {
|
||||||
global $log_level, $cli_commands, $cli_command, $argv;
|
global $log_level, $cli_commands, $cli_command, $argv;
|
||||||
$log_level = 'INFO';
|
$log_level = 'INFO';
|
||||||
$cli_command = false;
|
$cli_command = false;
|
||||||
$command_args = array();
|
$command_args = array();
|
||||||
for ($i=1; $i < count($argv); $i++) {
|
for ($i=1; $i < count($argv); $i++) {
|
||||||
if (array_key_exists($argv[$i], $cli_commands)) {
|
if (array_key_exists($argv[$i], $cli_commands)) {
|
||||||
if (!$cli_command)
|
if (!$cli_command)
|
||||||
$cli_command = $argv[$i];
|
$cli_command = $argv[$i];
|
||||||
else
|
else
|
||||||
usage(_("Only one command could be executed !"));
|
usage(_("Only one command could be executed !"));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
switch($argv[$i]) {
|
switch($argv[$i]) {
|
||||||
case '-h':
|
case '-h':
|
||||||
case '--help':
|
case '--help':
|
||||||
usage();
|
usage();
|
||||||
break;
|
break;
|
||||||
case '-d':
|
case '-d':
|
||||||
case '--debug':
|
case '--debug':
|
||||||
$log_level = 'DEBUG';
|
$log_level = 'DEBUG';
|
||||||
break;
|
break;
|
||||||
case '-q':
|
case '-q':
|
||||||
case '--quiet':
|
case '--quiet':
|
||||||
$log_level = 'WARNING';
|
$log_level = 'WARNING';
|
||||||
break;
|
break;
|
||||||
case '--trace':
|
case '--trace':
|
||||||
$log_level = 'TRACE';
|
$log_level = 'TRACE';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if ($cli_command)
|
if ($cli_command)
|
||||||
$command_args[] = $argv[$i];
|
$command_args[] = $argv[$i];
|
||||||
else
|
else
|
||||||
usage(
|
usage(
|
||||||
sprintf(_("Invalid parameter \"%s\".\nNote: Command's parameter/argument must be place after the command."), $argv[$i])
|
sprintf(
|
||||||
);
|
_("Invalid parameter \"%s\".\nNote: Command's parameter/argument must be place ".
|
||||||
}
|
"after the command."), $argv[$i]
|
||||||
}
|
)
|
||||||
}
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!$cli_command)
|
if (!$cli_command)
|
||||||
usage();
|
usage();
|
||||||
|
|
||||||
logging('DEBUG', 'Run '.basename($argv[0])." command $cli_command with argument(s) '".implode("', '", $command_args)."'");
|
logging(
|
||||||
|
'DEBUG', sprintf(
|
||||||
|
"Run %s command %s with argument(s) '%s'.",
|
||||||
|
basename($argv[0]), $cli_command,
|
||||||
|
implode("', '", $command_args)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$result = call_user_func($cli_commands[$cli_command]['handler'], $command_args);
|
$result = call_user_func($cli_commands[$cli_command]['handler'], $command_args);
|
||||||
|
|
||||||
exit($result?0:1);
|
exit($result?0:1);
|
||||||
}
|
}
|
||||||
catch(Exception $e) {
|
catch(Exception $e) {
|
||||||
log_exception(sprintf(_("An exception occured running command %s"), $cli_command));
|
log_exception(sprintf(_("An exception occured running command %s"), $cli_command));
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function print_item_info($item) {
|
function print_item_info($item) {
|
||||||
printf(_("Item #%s:\n"), $item['id']);
|
printf(_("Item #%s:\n"), $item['id']);
|
||||||
printf("\t"._("ID: %s")."\n", $item['id']);
|
printf("\t"._("ID: %s")."\n", $item['id']);
|
||||||
printf("\t"._("Name: '%s'")."\n", $item['name']);
|
printf("\t"._("Name: '%s'")."\n", $item['name']);
|
||||||
printf("\t"._("Date: %s")."\n", format_time($item['date']));
|
printf("\t"._("Date: %s")."\n", format_time($item['date']));
|
||||||
printf("\t"._("Description: %s")."\n", ($item['description']?"'".$item['description']."'":_("Not set")));
|
printf(
|
||||||
printf("\t"._("Status: %s")."\n", $item['status']);
|
"\t"._("Description: %s")."\n",
|
||||||
return true;
|
($item['description']?"'".$item['description']."'":_("Not set"))
|
||||||
|
);
|
||||||
|
printf("\t"._("Status: %s")."\n", $item['status']);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -146,235 +166,252 @@ function print_item_info($item) {
|
||||||
|
|
||||||
$orderbys = array('id', 'name', 'date', 'status', 'description');
|
$orderbys = array('id', 'name', 'date', 'status', 'description');
|
||||||
function cli_list($command_args) {
|
function cli_list($command_args) {
|
||||||
global $orderbys;
|
global $orderbys;
|
||||||
$params = array(
|
$params = array(
|
||||||
'order' => $orderbys[0],
|
'order' => $orderbys[0],
|
||||||
'order_direction' => 'ASC',
|
'order_direction' => 'ASC',
|
||||||
'all' => true,
|
'all' => true,
|
||||||
);
|
);
|
||||||
$patterns = array();
|
$patterns = array();
|
||||||
for($i=0; $i < count($command_args); $i++) {
|
for($i=0; $i < count($command_args); $i++) {
|
||||||
switch($command_args[$i]) {
|
switch($command_args[$i]) {
|
||||||
case '-o':
|
case '-o':
|
||||||
case '--orderby':
|
case '--orderby':
|
||||||
$i++;
|
$i++;
|
||||||
if(!in_array($command_args[$i], $orderbys))
|
if(!in_array($command_args[$i], $orderbys))
|
||||||
usage('Invalid --orderby clause');
|
usage('Invalid --orderby clause');
|
||||||
$params['order'] = $command_args[$i];
|
$params['order'] = $command_args[$i];
|
||||||
break;
|
break;
|
||||||
case '-r':
|
case '-r':
|
||||||
case '--reverse':
|
case '--reverse':
|
||||||
$params['order_direction'] = 'DESC';
|
$params['order_direction'] = 'DESC';
|
||||||
break;
|
break;
|
||||||
case '-s':
|
case '-s':
|
||||||
case '--status':
|
case '--status':
|
||||||
$i++;
|
$i++;
|
||||||
if(!check_status($command_args[$i]))
|
if(!check_status($command_args[$i]))
|
||||||
usage('Invalid -s/--status clause');
|
usage('Invalid -s/--status clause');
|
||||||
$params['status'] = $command_args[$i];
|
$params['status'] = $command_args[$i];
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$patterns[] = $command_args[$i];
|
$patterns[] = $command_args[$i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($patterns))
|
if (!empty($patterns))
|
||||||
$params['pattern'] = implode(' ', $patterns);
|
$params['pattern'] = implode(' ', $patterns);
|
||||||
|
|
||||||
$items = search_items($params);
|
$items = search_items($params);
|
||||||
if (!is_array($items)) {
|
if (!is_array($items)) {
|
||||||
logging("ERROR", "Invalid DB info return.\n");
|
logging("ERROR", "Invalid DB info return.\n");
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($items['count'] == 0){
|
if ($items['count'] == 0){
|
||||||
echo _("No item.\n");
|
echo _("No item.\n");
|
||||||
return True;
|
return True;
|
||||||
}
|
}
|
||||||
|
|
||||||
$tbl = new Console_Table();
|
$tbl = new Console_Table();
|
||||||
$tbl->setHeaders(
|
$tbl->setHeaders(
|
||||||
array(
|
array(
|
||||||
'ID',
|
'ID',
|
||||||
'Name',
|
'Name',
|
||||||
'Date',
|
'Date',
|
||||||
'Status',
|
'Status',
|
||||||
'Description',
|
'Description',
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
foreach($items['items'] as $info) {
|
foreach($items['items'] as $info) {
|
||||||
$tbl->addRow(
|
$tbl->addRow(
|
||||||
array(
|
array(
|
||||||
$info['id'],
|
$info['id'],
|
||||||
$info['name'],
|
$info['name'],
|
||||||
format_time($info['date']),
|
format_time($info['date']),
|
||||||
$info['status'],
|
$info['status'],
|
||||||
($info['description']?$info['description']:''),
|
($info['description']?$info['description']:''),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
echo $tbl->getTable();
|
echo $tbl->getTable();
|
||||||
echo "\n".sprintf(_("%d item(s)"), $items['count'])."\n";
|
echo "\n".sprintf(_("%d item(s)"), $items['count'])."\n";
|
||||||
return True;
|
return True;
|
||||||
}
|
}
|
||||||
add_cli_command(
|
add_cli_command(
|
||||||
'list',
|
'list',
|
||||||
'cli_list',
|
'cli_list',
|
||||||
___("List/search items"),
|
___("List/search items"),
|
||||||
___("[patterns]"),
|
___("[patterns]"),
|
||||||
array(
|
array(
|
||||||
___("-o|--orderby Ordering list criterion. Possible values:"),
|
___("-o|--orderby Ordering list criterion. Possible values:"),
|
||||||
" - ".implode("\n - ", $orderbys),
|
" - ".implode("\n - ", $orderbys),
|
||||||
___("-r|--reverse Reverse order"),
|
___("-r|--reverse Reverse order"),
|
||||||
___("-s|--status Filter on status. Possible values:"),
|
___("-s|--status Filter on status. Possible values:"),
|
||||||
" - ".implode("\n - ", array_keys($status_list)),
|
" - ".implode("\n - ", array_keys($status_list)),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
function cli_show($command_args) {
|
function cli_show($command_args) {
|
||||||
if (count($command_args) != 1 || !check_id($command_args[0]))
|
if (count($command_args) != 1 || !check_id($command_args[0]))
|
||||||
usage(_('You must provide a valid ID.'));
|
usage(_('You must provide a valid ID.'));
|
||||||
|
|
||||||
$item_id = $command_args[0];
|
$item_id = $command_args[0];
|
||||||
$item = get_item($item_id);
|
$item = get_item($item_id);
|
||||||
|
|
||||||
if (!$item)
|
if (!$item)
|
||||||
logging('FATAL', sprintf(_("Item #%s not found."), $item_id));
|
logging('FATAL', sprintf(_("Item #%s not found."), $item_id));
|
||||||
|
|
||||||
print_item_info($item);
|
print_item_info($item);
|
||||||
return True;
|
return True;
|
||||||
}
|
}
|
||||||
add_cli_command(
|
add_cli_command(
|
||||||
'show',
|
'show',
|
||||||
'cli_show',
|
'cli_show',
|
||||||
___("Show item"),
|
___("Show item"),
|
||||||
___("[ID]")
|
___("[ID]")
|
||||||
);
|
);
|
||||||
|
|
||||||
function cli_delete($command_args) {
|
function cli_delete($command_args) {
|
||||||
if (count($command_args) != 1)
|
if (count($command_args) != 1)
|
||||||
usage(_('You must provide item ID.'));
|
usage(_('You must provide item ID.'));
|
||||||
|
|
||||||
// Check URI
|
// Check URI
|
||||||
if (!check_id($command_args[0]))
|
if (!check_id($command_args[0]))
|
||||||
logging('FATAL', _("Invalid item ID"));
|
logging('FATAL', _("Invalid item ID"));
|
||||||
|
|
||||||
// Check exist
|
// Check exist
|
||||||
$item_id = $command_args[0];
|
$item_id = $command_args[0];
|
||||||
$item = get_item($item_id);
|
$item = get_item($item_id);
|
||||||
if (!$item)
|
if (!$item)
|
||||||
logging('FATAL', sprintf(_("Item #%s not found."), $item_id));
|
logging('FATAL', sprintf(_("Item #%s not found."), $item_id));
|
||||||
|
|
||||||
print_item_info($item);
|
print_item_info($item);
|
||||||
|
|
||||||
// Sure ?
|
// Sure ?
|
||||||
echo _("Are you sure you want to delete this item? Type 'yes' to continue: ");
|
echo _("Are you sure you want to delete this item? Type 'yes' to continue: ");
|
||||||
$handle = fopen ("php://stdin","r");
|
$handle = fopen ("php://stdin","r");
|
||||||
$line = fgets($handle);
|
$line = fgets($handle);
|
||||||
if(trim($line) != 'yes'){
|
if(trim($line) != 'yes'){
|
||||||
logging('WARNING', _("User cancel"));
|
logging('WARNING', _("User cancel"));
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
echo "\n";
|
echo "\n";
|
||||||
|
|
||||||
if (!delete_item($item['id']))
|
if (!delete_item($item['id']))
|
||||||
logging('FATAL', sprintf(_("An error occured deleting item #%d."), $item_id));
|
logging('FATAL', sprintf(_("An error occured deleting item #%d."), $item_id));
|
||||||
|
|
||||||
return True;
|
return True;
|
||||||
}
|
}
|
||||||
add_cli_command(
|
add_cli_command(
|
||||||
'delete',
|
'delete',
|
||||||
'cli_delete',
|
'cli_delete',
|
||||||
___("Delete item"),
|
___("Delete item"),
|
||||||
___("[item ID]")
|
___("[item ID]")
|
||||||
);
|
);
|
||||||
|
|
||||||
function cli_export($command_args) {
|
function cli_export($command_args) {
|
||||||
$fd = fopen((count($command_args) >= 1?$command_args[0]:'php://output'), 'w');
|
$fd = fopen((count($command_args) >= 1?$command_args[0]:'php://output'), 'w');
|
||||||
export_items($fd);
|
export_items($fd);
|
||||||
fclose($fd);
|
fclose($fd);
|
||||||
logging('INFO', "Items export to '".(count($command_args) >= 1?$command_args[0]:'STDOUT')."'.");
|
logging('INFO', "Items export to '".(count($command_args) >= 1?$command_args[0]:'STDOUT')."'.");
|
||||||
}
|
}
|
||||||
add_cli_command(
|
add_cli_command(
|
||||||
'export',
|
'export',
|
||||||
'cli_export',
|
'cli_export',
|
||||||
___("Export items (as CSV)"),
|
___("Export items (as CSV)"),
|
||||||
___("[output file path]")
|
___("[output file path]")
|
||||||
);
|
);
|
||||||
|
|
||||||
function cli_restore($command_args) {
|
function cli_restore($command_args) {
|
||||||
$fd = fopen((count($command_args) >= 1?$command_args[0]:'php://stdin'), 'r');
|
$fd = fopen((count($command_args) >= 1?$command_args[0]:'php://stdin'), 'r');
|
||||||
restore_items($fd);
|
restore_items($fd);
|
||||||
fclose($fd);
|
fclose($fd);
|
||||||
logging('INFO', "Items restored from '".(count($command_args) >= 1?$command_args[0]:'STDIN')."'.");
|
logging('INFO', sprint(
|
||||||
|
"Items restored from '%s'",
|
||||||
|
(count($command_args) >= 1?$command_args[0]:'STDIN')
|
||||||
|
));
|
||||||
}
|
}
|
||||||
add_cli_command(
|
add_cli_command(
|
||||||
'restore',
|
'restore',
|
||||||
'cli_restore',
|
'cli_restore',
|
||||||
___("Restore items (from CSV)"),
|
___("Restore items (from CSV)"),
|
||||||
___("[input file path]")
|
___("[input file path]")
|
||||||
);
|
);
|
||||||
|
|
||||||
function cli_cron($command_args) {
|
function cli_cron($command_args) {
|
||||||
global $item_max_age;
|
global $item_max_age;
|
||||||
if (!isset($item_max_age))
|
if (!isset($item_max_age))
|
||||||
$item_max_age = 30;
|
$item_max_age = 30;
|
||||||
|
|
||||||
$just_try = false;
|
$just_try = false;
|
||||||
for($i=0; $i < count($command_args); $i++) {
|
for($i=0; $i < count($command_args); $i++) {
|
||||||
switch($command_args[$i]) {
|
switch($command_args[$i]) {
|
||||||
case '-m':
|
case '-m':
|
||||||
case '--max-age':
|
case '--max-age':
|
||||||
$i++;
|
$i++;
|
||||||
if(!check_id($command_args[$i]))
|
if(!check_id($command_args[$i]))
|
||||||
usage('Invalid -m|--max-age clause');
|
usage('Invalid -m|--max-age clause');
|
||||||
$item_max_age = $command_args[$i];
|
$item_max_age = $command_args[$i];
|
||||||
break;
|
break;
|
||||||
case '-j':
|
case '-j':
|
||||||
case '--just-try':
|
case '--just-try':
|
||||||
$just_try = true;
|
$just_try = true;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
usage('Invalid parameter '.$command_args[$i]);
|
usage('Invalid parameter '.$command_args[$i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!is_int($item_max_age) || $item_max_age <= 0)
|
if (!is_int($item_max_age) || $item_max_age <= 0)
|
||||||
logging('FATAL', 'Invalid $item_max_age value set in configuration: it\'s must be a positive integer.');
|
logging(
|
||||||
logging('DEBUG', "cli_cron(): item max age = $item_max_age day(s)");
|
'FATAL',
|
||||||
|
'Invalid $item_max_age value set in configuration: it\'s must be a positive integer.');
|
||||||
|
logging('DEBUG', "cli_cron(): item max age = $item_max_age day(s)");
|
||||||
|
|
||||||
$limit = time() - ($item_max_age * 86400);
|
$limit = time() - ($item_max_age * 86400);
|
||||||
logging('DEBUG', "Handle items expiration with creation date limit ".format_time($limit).".");
|
logging('DEBUG', "Handle items expiration with creation date limit ".format_time($limit).".");
|
||||||
|
|
||||||
$items = search_items(array('all' => true));
|
$items = search_items(array('all' => true));
|
||||||
$error = false;
|
$error = false;
|
||||||
foreach($items['items'] as $item) {
|
foreach($items['items'] as $item) {
|
||||||
if ($item['date'] < $limit) {
|
if ($item['date'] < $limit) {
|
||||||
if ($just_try) {
|
if ($just_try) {
|
||||||
logging('DEBUG', 'Just-try mode: do not really delete item #'.$item['id'].' ('.$item['name'].', creation date: '.format_time($item['date']).')');
|
logging('DEBUG', sprintf(
|
||||||
}
|
'Just-try mode: do not really delete item #%s (%s, creation date: %s)',
|
||||||
else if (delete_item($item['id'])) {
|
$item['id'], $item['name'], format_time($item['date'])
|
||||||
logging('INFO', 'item #'.$item['id'].' ('.$item['name'].') deleted (creation date: '.format_time($item['date']).')');
|
));
|
||||||
remove_item_attachments($item['id']);
|
}
|
||||||
}
|
else if (delete_item($item['id'])) {
|
||||||
else {
|
logging('INFO', sprintf(
|
||||||
logging('ERROR', 'Fail to delete item "'.$item['id'].'" ('.$item['name'].', creation date: '.format_time($item['date']).')');
|
'Item #%s (%s) deleted (creation date: %s)',
|
||||||
$error = true;
|
|
||||||
}
|
));
|
||||||
}
|
remove_item_attachments($item['id']);
|
||||||
else {
|
}
|
||||||
logging('DEBUG', 'item "'.$item['id'].'" ('.$item['name'].') still valid (creation date: '.format_time($item['date']).')');
|
else {
|
||||||
}
|
logging('ERROR', sprintf(
|
||||||
}
|
'Fail to delete item "%s" (%s, creation date: %s)',
|
||||||
exit($error?1:0);
|
$item['id'], $item['name'], format_time($item['date'])
|
||||||
|
));
|
||||||
|
$error = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
logging('DEBUG', sprintf(
|
||||||
|
'Item "%s" (%s) still valid (creation date: %s)',
|
||||||
|
$item['id'], $item['name'], format_time($item['date'])
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exit($error?1:0);
|
||||||
}
|
}
|
||||||
add_cli_command(
|
add_cli_command(
|
||||||
'cron',
|
'cron',
|
||||||
'cli_cron',
|
'cli_cron',
|
||||||
___("Cron to handle item expiration"),
|
___("Cron to handle item expiration"),
|
||||||
false,
|
false,
|
||||||
array (
|
array (
|
||||||
___("-j/--just-try Just-try mode : do not really removed expired item(s)"),
|
___("-j/--just-try Just-try mode : do not really removed expired item(s)"),
|
||||||
___("-m/--max-age Item expiration limit (in days, optional)"),
|
___("-m/--max-age Item expiration limit (in days, optional)"),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
|
@ -44,8 +44,8 @@ $smarty_templates_c_dir = "$tmp_root_dir/templates_c";
|
||||||
$default_locale = 'en_US.UTF8';
|
$default_locale = 'en_US.UTF8';
|
||||||
|
|
||||||
// Session
|
// Session
|
||||||
$session_timeout = 1800; // Session timeout dur to inactivity (in seconds)
|
$session_timeout = 1800; // Session timeout dur to inactivity (in seconds)
|
||||||
$session_max_duration = 43200; // Session max duration (in seconds, default : 12h)
|
$session_max_duration = 43200; // Session max duration (in seconds, default : 12h)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Database configuration
|
* Database configuration
|
||||||
|
@ -69,8 +69,8 @@ $db_pwd="items";
|
||||||
$db_options=array();
|
$db_options=array();
|
||||||
|
|
||||||
// Date/Datetime format in database (strptime format)
|
// Date/Datetime format in database (strptime format)
|
||||||
$db_date_format = '%Y-%m-%d'; // Exemple : 2018-10-12
|
$db_date_format = '%Y-%m-%d'; // Exemple : 2018-10-12
|
||||||
$db_datetime_format = '%Y-%m-%d %H:%M:%S'; // Exemple : 2018-10-12 18:06:59
|
$db_datetime_format = '%Y-%m-%d %H:%M:%S'; // Exemple : 2018-10-12 18:06:59
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -81,8 +81,8 @@ $db_pwd="items";
|
||||||
$db_options=array();
|
$db_options=array();
|
||||||
|
|
||||||
// Date/Datetime format in database (strptime format)
|
// Date/Datetime format in database (strptime format)
|
||||||
$db_date_format = '%Y-%m-%d'; // Exemple : 2018-10-12
|
$db_date_format = '%Y-%m-%d'; // Exemple : 2018-10-12
|
||||||
$db_datetime_format = '%Y-%m-%d %H:%M:%S'; // Exemple : 2018-10-12 18:06:59
|
$db_datetime_format = '%Y-%m-%d %H:%M:%S'; // Exemple : 2018-10-12 18:06:59
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -118,5 +118,5 @@ $mail_catch_all = false;
|
||||||
|
|
||||||
// Load local configuration file is present
|
// Load local configuration file is present
|
||||||
if (is_file("$root_dir_path/includes/config.local.php")) {
|
if (is_file("$root_dir_path/includes/config.local.php")) {
|
||||||
require "$root_dir_path/includes/config.local.php";
|
require "$root_dir_path/includes/config.local.php";
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,13 +4,13 @@ error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED);
|
||||||
|
|
||||||
// Root directory path
|
// Root directory path
|
||||||
if (__FILE__ != "") {
|
if (__FILE__ != "") {
|
||||||
$script = __FILE__;
|
$script = __FILE__;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Fallback method : detect path from core.php path
|
// Fallback method : detect path from core.php path
|
||||||
foreach(get_included_files() as $script)
|
foreach(get_included_files() as $script)
|
||||||
if (basename($script) == 'core.php')
|
if (basename($script) == 'core.php')
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$root_dir_path=realpath(dirname($script).'/../');
|
$root_dir_path=realpath(dirname($script).'/../');
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ require_once('config.inc.php');
|
||||||
|
|
||||||
// Check $public_root_url end
|
// Check $public_root_url end
|
||||||
if (substr($public_root_url, -1)=='/') {
|
if (substr($public_root_url, -1)=='/') {
|
||||||
$public_root_url=substr($public_root_url, 0, -1);
|
$public_root_url=substr($public_root_url, 0, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Define upload_tmp_dir
|
// Define upload_tmp_dir
|
||||||
|
@ -59,4 +59,4 @@ require_once('mail.php');
|
||||||
// Initialize translation
|
// Initialize translation
|
||||||
init_translation();
|
init_translation();
|
||||||
foreach($status_list as $key => $value)
|
foreach($status_list as $key => $value)
|
||||||
$status_list[$key] = _($value);
|
$status_list[$key] = _($value);
|
||||||
|
|
207
includes/db.php
207
includes/db.php
|
@ -182,15 +182,15 @@ function update_item($id, $changes) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function change_item_status($id, $status) {
|
function change_item_status($id, $status) {
|
||||||
if (update_item($id, array('status' => $status))) {
|
if (update_item($id, array('status' => $status))) {
|
||||||
logging('INFO', "Status of item #$id changed to $status.");
|
logging('INFO', "Status of item #$id changed to $status.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function archive_item($id) {
|
function archive_item($id) {
|
||||||
return change_item_status($id, 'archived');
|
return change_item_status($id, 'archived');
|
||||||
}
|
}
|
||||||
|
|
||||||
function delete_item($id) {
|
function delete_item($id) {
|
||||||
|
@ -285,7 +285,13 @@ function search_items($params) {
|
||||||
if (!empty($where))
|
if (!empty($where))
|
||||||
$query -> where($where);
|
$query -> where($where);
|
||||||
foreach ($patterns_where as $patterns_word)
|
foreach ($patterns_where as $patterns_word)
|
||||||
call_user_func_array(array($query, 'where'), array_merge(array('('.implode(' OR ', array_keys($patterns_word)).')'), array_values($patterns_word)));
|
call_user_func_array(
|
||||||
|
array($query, 'where'),
|
||||||
|
array_merge(
|
||||||
|
array('('.implode(' OR ', array_keys($patterns_word)).')'),
|
||||||
|
array_values($patterns_word)
|
||||||
|
)
|
||||||
|
);
|
||||||
$result = $query -> orderBy($orderby)
|
$result = $query -> orderBy($orderby)
|
||||||
-> limit($limit)
|
-> limit($limit)
|
||||||
-> offset($offset)
|
-> offset($offset)
|
||||||
|
@ -315,7 +321,13 @@ function search_items($params) {
|
||||||
if (!empty($where))
|
if (!empty($where))
|
||||||
$query_count -> where($where);
|
$query_count -> where($where);
|
||||||
foreach ($patterns_where as $patterns_word)
|
foreach ($patterns_where as $patterns_word)
|
||||||
call_user_func_array(array($query_count, 'where'), array_merge(array('('.implode(' OR ', array_keys($patterns_word)).')'), array_values($patterns_word)));
|
call_user_func_array(
|
||||||
|
array($query_count, 'where'),
|
||||||
|
array_merge(
|
||||||
|
array('('.implode(' OR ', array_keys($patterns_word)).')'),
|
||||||
|
array_values($patterns_word)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
$result_count = $query_count -> execute();
|
$result_count = $query_count -> execute();
|
||||||
|
|
||||||
|
@ -327,7 +339,9 @@ function search_items($params) {
|
||||||
return array(
|
return array(
|
||||||
'count' => $count['count'],
|
'count' => $count['count'],
|
||||||
'first' => $offset+1,
|
'first' => $offset+1,
|
||||||
'last' => ($offset+$nb_by_page<$count['count']?$offset+$nb_by_page:$count['count']),
|
'last' => (
|
||||||
|
$offset+$nb_by_page<$count['count']?
|
||||||
|
$offset+$nb_by_page:$count['count']),
|
||||||
'nb_pages' => ceil($count['count']/$nb_by_page),
|
'nb_pages' => ceil($count['count']/$nb_by_page),
|
||||||
'page' => $page,
|
'page' => $page,
|
||||||
'items' => $items,
|
'items' => $items,
|
||||||
|
@ -345,97 +359,102 @@ function search_items($params) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function export_items($fd=null) {
|
function export_items($fd=null) {
|
||||||
if (!$fd) $fd = fopen('php://output', 'w');
|
if (!$fd) $fd = fopen('php://output', 'w');
|
||||||
fputcsv(
|
fputcsv(
|
||||||
$fd,
|
$fd,
|
||||||
array (
|
array (
|
||||||
'id',
|
'id',
|
||||||
'name',
|
'name',
|
||||||
'date',
|
'date',
|
||||||
'status',
|
'status',
|
||||||
'description',
|
'description',
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$items = get_items();
|
$items = get_items();
|
||||||
foreach($items as $item) {
|
foreach($items as $item) {
|
||||||
fputcsv(
|
fputcsv(
|
||||||
$fd,
|
$fd,
|
||||||
array(
|
array(
|
||||||
$item['id'],
|
$item['id'],
|
||||||
$item['name'],
|
$item['name'],
|
||||||
$item['date'],
|
$item['date'],
|
||||||
$item['status'],
|
$item['status'],
|
||||||
$item['description'],
|
$item['description'],
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return True;
|
return True;
|
||||||
}
|
}
|
||||||
|
|
||||||
function restore_items($fd=null) {
|
function restore_items($fd=null) {
|
||||||
global $fpdo;
|
global $fpdo;
|
||||||
if (!$fd) $fd = fopen('php://stdin', 'r');
|
if (!$fd) $fd = fopen('php://stdin', 'r');
|
||||||
try {
|
try {
|
||||||
$result = $fpdo -> deleteFrom('item')
|
$result = $fpdo -> deleteFrom('item')
|
||||||
-> execute();
|
-> execute();
|
||||||
if ($result === false) {
|
if ($result === false) {
|
||||||
logging('ERROR', "An unknown error occured truncating item table in database.");
|
logging('ERROR', "An unknown error occured truncating item table in database.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception $e) {
|
catch (Exception $e) {
|
||||||
logging('ERROR', "Error truncating item table in database : ".$e->getMessage());
|
logging('ERROR', "Error truncating item table in database : ".$e->getMessage());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$first_row = false;
|
$first_row = false;
|
||||||
$line = 0;
|
$line = 0;
|
||||||
$restored = 0;
|
$restored = 0;
|
||||||
$error = false;
|
$error = false;
|
||||||
$datetime_fields = array (
|
$datetime_fields = array (
|
||||||
'date',
|
'date',
|
||||||
);
|
);
|
||||||
// Map fields to support hold CSV files format
|
// Map fields to support hold CSV files format
|
||||||
$mapping = array (
|
$mapping = array (
|
||||||
'creation_date' => 'date',
|
'creation_date' => 'date',
|
||||||
'desc' => 'description',
|
'desc' => 'description',
|
||||||
);
|
);
|
||||||
|
|
||||||
while (($row = fgetcsv($fd)) !== FALSE) {
|
while (($row = fgetcsv($fd)) !== FALSE) {
|
||||||
$line++;
|
$line++;
|
||||||
if ($first_row === false) {
|
if ($first_row === false) {
|
||||||
$first_row = $row;
|
$first_row = $row;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
$values = array();
|
$values = array();
|
||||||
for ($i=0; $i < count($first_row); $i++) {
|
for ($i=0; $i < count($first_row); $i++) {
|
||||||
if (!$row[$i]) continue;
|
if (!$row[$i]) continue;
|
||||||
$field = (array_key_exists($first_row[$i], $mapping)?$mapping[$first_row[$i]]:$first_row[$i]);
|
$field = (
|
||||||
$value = (in_array($field, $datetime_fields)?db_time2datetime($row[$i]):$row[$i]);
|
array_key_exists($first_row[$i], $mapping)?
|
||||||
$values[$field] = $value;
|
$mapping[$first_row[$i]]:
|
||||||
}
|
$first_row[$i]);
|
||||||
$result = $fpdo -> insertInto('item')
|
$value = (in_array($field, $datetime_fields)?db_time2datetime($row[$i]):$row[$i]);
|
||||||
-> values($values)
|
$values[$field] = $value;
|
||||||
-> execute();
|
}
|
||||||
|
$result = $fpdo -> insertInto('item')
|
||||||
|
-> values($values)
|
||||||
|
-> execute();
|
||||||
|
|
||||||
if ($result !== false) {
|
if ($result !== false) {
|
||||||
$restored++;
|
$restored++;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
logging('ERROR', "Unkwown error occured restoring item from line #$line :\n".print_r($values, true));
|
logging('ERROR', "Unkwown error occured restoring item from line #$line :\n".print_r($values, true));
|
||||||
$error = true;
|
$error = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception $e) {
|
catch (Exception $e) {
|
||||||
logging('ERROR', "Error restoring item from line #$line : ".$e->getMessage()."\n".print_r($values, true));
|
logging(
|
||||||
$error = true;
|
'ERROR',
|
||||||
}
|
"Error restoring item from line #$line : ".$e->getMessage()."\n".print_r($values, true));
|
||||||
}
|
$error = true;
|
||||||
logging('INFO', "$restored items restored");
|
}
|
||||||
|
}
|
||||||
|
logging('INFO', "$restored items restored");
|
||||||
|
|
||||||
// Trigger hooks
|
// Trigger hooks
|
||||||
trigger_hook('items_restored');
|
trigger_hook('items_restored');
|
||||||
|
|
||||||
return !$error;
|
return !$error;
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,7 +83,8 @@ function check_email($value, $domain=NULL, $checkDns=true) {
|
||||||
/*
|
/*
|
||||||
* Handling item POST data
|
* Handling item POST data
|
||||||
*/
|
*/
|
||||||
function handle_item_post_data(&$info, $enabled_fields=null, $required_fields=null, &$item=null, &$changes=null) {
|
function handle_item_post_data(&$info, $enabled_fields=null, $required_fields=null, &$item=null,
|
||||||
|
&$changes=null) {
|
||||||
$field_errors=array();
|
$field_errors=array();
|
||||||
if (isset($_POST['submit'])) {
|
if (isset($_POST['submit'])) {
|
||||||
logging('DEBUG', 'POST data : '.vardump($_POST));
|
logging('DEBUG', 'POST data : '.vardump($_POST));
|
||||||
|
@ -113,7 +114,10 @@ function handle_item_post_data(&$info, $enabled_fields=null, $required_fields=nu
|
||||||
}
|
}
|
||||||
|
|
||||||
// description
|
// description
|
||||||
if (isset($_POST['description']) && (!$enabled_fields || in_array('description', $enabled_fields))) {
|
if (
|
||||||
|
isset($_POST['description']) &&
|
||||||
|
(!$enabled_fields || in_array('description', $enabled_fields))
|
||||||
|
) {
|
||||||
if (check_is_empty(trim($_POST['description']))) {
|
if (check_is_empty(trim($_POST['description']))) {
|
||||||
$info['description'] = null;
|
$info['description'] = null;
|
||||||
}
|
}
|
||||||
|
@ -221,132 +225,143 @@ function can_do($item, $status=array()) {
|
||||||
* Generic Data/value helpers
|
* Generic Data/value helpers
|
||||||
*/
|
*/
|
||||||
function vardump($data) {
|
function vardump($data) {
|
||||||
ob_start();
|
ob_start();
|
||||||
var_dump($data);
|
var_dump($data);
|
||||||
$data = ob_get_contents();
|
$data = ob_get_contents();
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
function check_is_empty($val) {
|
function check_is_empty($val) {
|
||||||
switch(gettype($val)) {
|
switch(gettype($val)) {
|
||||||
case "boolean":
|
case "boolean":
|
||||||
case "integer":
|
case "integer":
|
||||||
case "double":
|
case "double":
|
||||||
case "object":
|
case "object":
|
||||||
case "resource":
|
case "resource":
|
||||||
return False;
|
return False;
|
||||||
case "array":
|
case "array":
|
||||||
case "string":
|
case "string":
|
||||||
if ($val == "0") return false;
|
if ($val == "0") return false;
|
||||||
return empty($val);
|
return empty($val);
|
||||||
case "NULL":
|
case "NULL":
|
||||||
return True;
|
return True;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Generic file/directory helpers
|
* Generic file/directory helpers
|
||||||
*/
|
*/
|
||||||
function dump_file($file_path, $max_age=3600) {
|
function dump_file($file_path, $max_age=3600) {
|
||||||
if (is_file($file_path)) {
|
if (is_file($file_path)) {
|
||||||
header('Content-Type: '.mime_content_type($file_path));
|
header('Content-Type: '.mime_content_type($file_path));
|
||||||
$last_modified_time = filemtime($file_path);
|
$last_modified_time = filemtime($file_path);
|
||||||
$etag = md5_file($file_path);
|
$etag = md5_file($file_path);
|
||||||
header("Cache-Control: max-age=$max_age, must-revalidate");
|
header("Cache-Control: max-age=$max_age, must-revalidate");
|
||||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s", $last_modified_time)." GMT");
|
header("Last-Modified: ".gmdate("D, d M Y H:i:s", $last_modified_time)." GMT");
|
||||||
header("Etag: $etag");
|
header("Etag: $etag");
|
||||||
|
|
||||||
if ((isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && @strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) == $last_modified_time) || (isset($_SERVER['HTTP_IF_NONE_MATCH']) && trim($_SERVER['HTTP_IF_NONE_MATCH']) == $etag)) {
|
if (
|
||||||
header("HTTP/1.1 304 Not Modified");
|
(
|
||||||
exit();
|
isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) &&
|
||||||
}
|
@strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) == $last_modified_time
|
||||||
|
) || (
|
||||||
|
isset($_SERVER['HTTP_IF_NONE_MATCH']) &&
|
||||||
|
trim($_SERVER['HTTP_IF_NONE_MATCH']) == $etag
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
header("HTTP/1.1 304 Not Modified");
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
header('Pragma: public');
|
header('Pragma: public');
|
||||||
header('Content-Length: ' . filesize($file_path));
|
header('Content-Length: ' . filesize($file_path));
|
||||||
readfile($file_path);
|
readfile($file_path);
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
header("HTTP/1.1 404 Not found");
|
header("HTTP/1.1 404 Not found");
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
function delete_directory($dir, $recursive=true) {
|
function delete_directory($dir, $recursive=true) {
|
||||||
$files = array_diff(scandir($dir), array('.','..'));
|
$files = array_diff(scandir($dir), array('.','..'));
|
||||||
if ($recursive) {
|
if ($recursive) {
|
||||||
foreach ($files as $file) {
|
foreach ($files as $file) {
|
||||||
if (is_dir("$dir/$file")) {
|
if (is_dir("$dir/$file")) {
|
||||||
if (!delete_directory("$dir/$file", true)) {
|
if (!delete_directory("$dir/$file", true)) {
|
||||||
logging('ERROR', "delete_directory($dir) : Fail to delete sub-directory '$dir/$file'.");
|
logging('ERROR', "delete_directory($dir) : Fail to delete sub-directory '$dir/$file'.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!unlink("$dir/$file")) {
|
else if (!unlink("$dir/$file")) {
|
||||||
logging('ERROR', "delete_directory($dir) : Fail to delete '$dir/$file'.");
|
logging('ERROR', "delete_directory($dir) : Fail to delete '$dir/$file'.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!empty($files)) {
|
else if (!empty($files)) {
|
||||||
logging('ERROR', "delete_directory($dir) : Directory is not empty.");
|
logging('ERROR', "delete_directory($dir) : Directory is not empty.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return rmdir($dir);
|
return rmdir($dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Run external command helper
|
* Run external command helper
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* Run external command
|
* Run external command
|
||||||
*
|
*
|
||||||
* @param[in] $command string|array The command. It's could be an array of the command with its arguments.
|
* @param $command string|array The command. It's could be an array of the command with its
|
||||||
* @param[in] $data_stdin string|null The command arguments (optional, default: null)
|
* arguments.
|
||||||
* @param[in] $escape_command_args boolean If true, the command will be escaped (optional, default: true)
|
* @param $data_stdin string|null The command arguments (optional, default: null)
|
||||||
*
|
* @param $escape_command_args boolean If true, the command will be escaped
|
||||||
* @retval false|array An array of return code, stdout and stderr result or False in case of fatal error
|
* (optional, default: true)
|
||||||
**/
|
*
|
||||||
function run_external_command($command, $data_stdin=null, $escape_command_args=true) {
|
* @return false|array An array of return code, stdout and stderr result or False in case of fatal
|
||||||
if (array($command))
|
* error
|
||||||
$command = implode(' ', $command);
|
**/
|
||||||
if ($escape_command_args)
|
function run_external_command($command, $data_stdin=null, $escape_command_args=true) {
|
||||||
$command = escapeshellcmd($command);
|
if (array($command))
|
||||||
logging('DEBUG', "Run external command: '$command'");
|
$command = implode(' ', $command);
|
||||||
$descriptorspec = array(
|
if ($escape_command_args)
|
||||||
0 => array("pipe", "r"), // stdin
|
$command = escapeshellcmd($command);
|
||||||
1 => array("pipe", "w"), // stdout
|
logging('DEBUG', "Run external command: '$command'");
|
||||||
2 => array("pipe", "w"), // stderr
|
$descriptorspec = array(
|
||||||
);
|
0 => array("pipe", "r"), // stdin
|
||||||
$process = proc_open($command, $descriptorspec, $pipes);
|
1 => array("pipe", "w"), // stdout
|
||||||
|
2 => array("pipe", "w"), // stderr
|
||||||
|
);
|
||||||
|
$process = proc_open($command, $descriptorspec, $pipes);
|
||||||
|
|
||||||
if (!is_resource($process)) {
|
if (!is_resource($process)) {
|
||||||
logging('ERROR', "Fail to run external command: '$command'");
|
logging('ERROR', "Fail to run external command: '$command'");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!is_null($data_stdin)) {
|
if (!is_null($data_stdin)) {
|
||||||
fwrite($pipes[0], $data_stdin);
|
fwrite($pipes[0], $data_stdin);
|
||||||
}
|
}
|
||||||
fclose($pipes[0]);
|
fclose($pipes[0]);
|
||||||
|
|
||||||
$stdout = stream_get_contents($pipes[1]);
|
$stdout = stream_get_contents($pipes[1]);
|
||||||
fclose($pipes[1]);
|
fclose($pipes[1]);
|
||||||
|
|
||||||
$stderr = stream_get_contents($pipes[2]);
|
$stderr = stream_get_contents($pipes[2]);
|
||||||
fclose($pipes[2]);
|
fclose($pipes[2]);
|
||||||
|
|
||||||
$return_value = proc_close($process);
|
$return_value = proc_close($process);
|
||||||
|
|
||||||
$error = (!empty($stderr) || $return_value != 0);
|
$error = (!empty($stderr) || $return_value != 0);
|
||||||
logging(
|
logging(
|
||||||
($error?'ERROR':'DEBUG'),
|
($error?'ERROR':'DEBUG'),
|
||||||
"External command ".($error?"error":"result").":\n".
|
"External command ".($error?"error":"result").":\n".
|
||||||
"\tCommand : $command\n".
|
"\tCommand : $command\n".
|
||||||
"\tReturn code: $return_value\n".
|
"\tReturn code: $return_value\n".
|
||||||
"\tOutput:\n".
|
"\tOutput:\n".
|
||||||
"\t\t- Stdout :\n$stdout\n\n".
|
"\t\t- Stdout :\n$stdout\n\n".
|
||||||
"\t\t- Stderr :\n$stderr"
|
"\t\t- Stderr :\n$stderr"
|
||||||
);
|
);
|
||||||
|
|
||||||
return array($return_value, $stdout, $stderr);
|
return array($return_value, $stdout, $stderr);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,95 +5,99 @@ $hooks = array();
|
||||||
/**
|
/**
|
||||||
* Registered a hook on a specific event
|
* Registered a hook on a specific event
|
||||||
*
|
*
|
||||||
* @param[in] $event string The event name
|
* @param $event string The event name
|
||||||
* @param[in] $callable callable The callable to run on event
|
* @param $callable callable The callable to run on event
|
||||||
* @param[in] $param mixed Paremeter that will be pass to the callable
|
* @param $param mixed Paremeter that will be pass to the callable
|
||||||
* Use an array if you have multiple parameters to pass
|
* Use an array if you have multiple parameters to pass
|
||||||
*
|
*
|
||||||
* @retval void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function register_hook($event, $callable, $param=NULL) {
|
function register_hook($event, $callable, $param=NULL) {
|
||||||
global $hooks;
|
global $hooks;
|
||||||
if (!array_key_exists($event, $hooks))
|
if (!array_key_exists($event, $hooks))
|
||||||
$hooks[$event] = array();
|
$hooks[$event] = array();
|
||||||
$hooks[$event][] = array (
|
$hooks[$event][] = array (
|
||||||
'callable' => $callable,
|
'callable' => $callable,
|
||||||
'param' => $param,
|
'param' => $param,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run triggered actions on specific event
|
* Run triggered actions on specific event
|
||||||
*
|
*
|
||||||
* @param[in] $event string Event name
|
* @param $event string Event name
|
||||||
*
|
*
|
||||||
* @retval boolean True if all triggered actions succefully runned, false otherwise
|
* @return boolean True if all triggered actions succefully runned, false otherwise
|
||||||
*/
|
*/
|
||||||
function trigger_hook($event_name, $event_data=null) {
|
function trigger_hook($event_name, $event_data=null) {
|
||||||
global $hooks;
|
global $hooks;
|
||||||
$return = true;
|
$return = true;
|
||||||
|
|
||||||
if (isset($hooks[$event_name]) && is_array($hooks[$event_name])) {
|
if (isset($hooks[$event_name]) && is_array($hooks[$event_name])) {
|
||||||
if ($event_name == 'all')
|
if ($event_name == 'all')
|
||||||
$event = new Event($event_data['event_name'], $event_data['event_data']);
|
$event = new Event($event_data['event_name'], $event_data['event_data']);
|
||||||
else
|
else
|
||||||
$event = new Event($event_name, $event_data);
|
$event = new Event($event_name, $event_data);
|
||||||
foreach ($hooks[$event_name] as $e) {
|
foreach ($hooks[$event_name] as $e) {
|
||||||
if (is_callable($e['callable'])) {
|
if (is_callable($e['callable'])) {
|
||||||
try {
|
try {
|
||||||
call_user_func_array($e['callable'],array($event, &$e['param']));
|
call_user_func_array($e['callable'],array($event, &$e['param']));
|
||||||
}
|
}
|
||||||
catch(Exception $e) {
|
catch(Exception $e) {
|
||||||
logException($e, "An exception occured running hook ".format_callable($e['callable'])." on event $event_name");
|
logException(
|
||||||
$return = false;
|
$e, "An exception occured running hook ".format_callable($e['callable']).
|
||||||
}
|
" on event $event_name");
|
||||||
}
|
$return = false;
|
||||||
else {
|
}
|
||||||
logging('ERROR', "The hook ".format_callable($e['callable'])." on event $event_name is not callable.");
|
}
|
||||||
$return = false;
|
else {
|
||||||
}
|
logging(
|
||||||
}
|
'ERROR',
|
||||||
}
|
"The hook ".format_callable($e['callable'])." on event $event_name is not callable.");
|
||||||
else
|
$return = false;
|
||||||
logging('DEBUG', "No hook registered for event $event_name.");
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
logging('DEBUG', "No hook registered for event $event_name.");
|
||||||
|
|
||||||
// Handle 'all' event
|
// Handle 'all' event
|
||||||
if ($event_name != 'all') {
|
if ($event_name != 'all') {
|
||||||
trigger_hook (
|
trigger_hook (
|
||||||
'all',
|
'all',
|
||||||
array (
|
array (
|
||||||
'event_name' => $event_name,
|
'event_name' => $event_name,
|
||||||
'event_data' => $event_data,
|
'event_data' => $event_data,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
class Event implements JsonSerializable {
|
class Event implements JsonSerializable {
|
||||||
private $name;
|
private $name;
|
||||||
private $data;
|
private $data;
|
||||||
|
|
||||||
function __construct($name, $data) {
|
function __construct($name, $data) {
|
||||||
$this -> name = $name;
|
$this -> name = $name;
|
||||||
$this -> data = $data;
|
$this -> data = $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
function __get($key) {
|
function __get($key) {
|
||||||
if ($key == 'name')
|
if ($key == 'name')
|
||||||
return $this -> name;
|
return $this -> name;
|
||||||
elseif ($key == 'data')
|
elseif ($key == 'data')
|
||||||
return $this -> data;
|
return $this -> data;
|
||||||
elseif (is_array($this -> data) && array_key_exists($key, $this -> data))
|
elseif (is_array($this -> data) && array_key_exists($key, $this -> data))
|
||||||
return $this -> data[$key];
|
return $this -> data[$key];
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function jsonSerialize() {
|
public function jsonSerialize() {
|
||||||
return array (
|
return array (
|
||||||
'name' => $this -> name,
|
'name' => $this -> name,
|
||||||
'data' => $this -> data,
|
'data' => $this -> data,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,90 +15,107 @@ $_log_file_fd=null;
|
||||||
|
|
||||||
// Log Levels
|
// Log Levels
|
||||||
$_log_levels=array(
|
$_log_levels=array(
|
||||||
'TRACE' => 0,
|
'TRACE' => 0,
|
||||||
'DEBUG' => 1,
|
'DEBUG' => 1,
|
||||||
'INFO' => 2,
|
'INFO' => 2,
|
||||||
'WARNING' => 3,
|
'WARNING' => 3,
|
||||||
'ERROR' => 4,
|
'ERROR' => 4,
|
||||||
'FATAL' => 5,
|
'FATAL' => 5,
|
||||||
);
|
);
|
||||||
|
|
||||||
function logging($level, $message) {
|
function logging($level, $message) {
|
||||||
global $log_file, $_log_file_fd, $_log_levels, $log_level, $argv;
|
global $log_file, $_log_file_fd, $_log_levels, $log_level, $argv, $auth_user;
|
||||||
|
|
||||||
if (!array_key_exists($level, $_log_levels)) $level = 'INFO';
|
if (!array_key_exists($level, $_log_levels)) $level = 'INFO';
|
||||||
$level_id = $_log_levels[$level];
|
$level_id = $_log_levels[$level];
|
||||||
|
|
||||||
if (!array_key_exists($log_level, $_log_levels)) $log_level = 'INFO';
|
if (!array_key_exists($log_level, $_log_levels)) $log_level = 'INFO';
|
||||||
$log_level_id = $_log_levels[$log_level];
|
$log_level_id = $_log_levels[$log_level];
|
||||||
|
|
||||||
if ($level_id < $log_level_id) return true;
|
if ($level_id < $log_level_id) return true;
|
||||||
if(is_null($_log_file_fd)) {
|
if(is_null($_log_file_fd)) {
|
||||||
$_log_file_fd = fopen($log_file, 'a');
|
$_log_file_fd = fopen($log_file, 'a');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (php_sapi_name() == "cli") {
|
if (php_sapi_name() == "cli") {
|
||||||
$msg=date('Y/m/d H:i:s').' - '.basename($argv[0])." - $level - $message\n";
|
$msg = implode(' - ', array(
|
||||||
}
|
date('Y/m/d H:i:s'),
|
||||||
else {
|
basename($argv[0]),
|
||||||
// With auth enabled
|
$level,
|
||||||
// global $auth_user;
|
$message
|
||||||
// $msg=date('Y/m/d H:i:s').' - '.$_SERVER['REQUEST_URI'].' - '.$_SERVER['REMOTE_ADDR']." - $auth_user - $level - $message\n";
|
))."\n";
|
||||||
$msg=date('Y/m/d H:i:s').' - '.$_SERVER['REQUEST_URI'].' - '.$_SERVER['REMOTE_ADDR']." - $level - $message\n";
|
}
|
||||||
}
|
else {
|
||||||
|
$msg = array(
|
||||||
|
date('Y/m/d H:i:s'),
|
||||||
|
$_SERVER['REQUEST_URI'],
|
||||||
|
$_SERVER['REMOTE_ADDR'],
|
||||||
|
);
|
||||||
|
if (isset($auth_user))
|
||||||
|
$msg[] = ($auth_user?$auth_user:'anonymous');
|
||||||
|
$msg[] = $level;
|
||||||
|
$msg[] = $message;
|
||||||
|
$msg = implode(' - ', $msg)."\n";
|
||||||
|
}
|
||||||
|
|
||||||
fwrite($_log_file_fd , $msg);
|
fwrite($_log_file_fd , $msg);
|
||||||
|
|
||||||
if ($level == 'FATAL')
|
if ($level == 'FATAL')
|
||||||
if (function_exists('fatal_error'))
|
if (function_exists('fatal_error'))
|
||||||
fatal_error($message);
|
fatal_error($message);
|
||||||
else
|
else
|
||||||
die("\n$message\n\n");
|
die("\n$message\n\n");
|
||||||
elseif (php_sapi_name() == "cli")
|
elseif (php_sapi_name() == "cli")
|
||||||
echo $msg;
|
echo $msg;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function change_log_file($file) {
|
function change_log_file($file) {
|
||||||
global $log_file, $_log_file_fd;
|
global $log_file, $_log_file_fd;
|
||||||
if ($file == $log_file) return True;
|
if ($file == $log_file) return True;
|
||||||
if ($_log_file_fd) {
|
if ($_log_file_fd) {
|
||||||
fclose($_log_file_fd);
|
fclose($_log_file_fd);
|
||||||
$_log_file_fd = false;
|
$_log_file_fd = false;
|
||||||
}
|
}
|
||||||
$log_file = $file;
|
$log_file = $file;
|
||||||
return True;
|
return True;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle exception logging
|
// Handle exception logging
|
||||||
function get_debug_backtrace_context($ignore_last=0) {
|
function get_debug_backtrace_context($ignore_last=0) {
|
||||||
$traces = debug_backtrace();
|
$traces = debug_backtrace();
|
||||||
|
|
||||||
// Also ignore this function it self
|
// Also ignore this function it self
|
||||||
$ignore_last++;
|
$ignore_last++;
|
||||||
|
|
||||||
if (!is_array($traces) || count($traces) <= $ignore_last)
|
if (!is_array($traces) || count($traces) <= $ignore_last)
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
$msg = array();
|
$msg = array();
|
||||||
for ($i=$ignore_last; $i < count($traces); $i++) {
|
for ($i=$ignore_last; $i < count($traces); $i++) {
|
||||||
$trace = array("#$i");
|
$trace = array("#$i");
|
||||||
if (isset($traces[$i]['file']))
|
if (isset($traces[$i]['file']))
|
||||||
$trace[] = $traces[$i]['file'].(isset($traces[$i]['line'])?":".$traces[$i]['line']:"");
|
$trace[] = $traces[$i]['file'].(isset($traces[$i]['line'])?":".$traces[$i]['line']:"");
|
||||||
if (isset($traces[$i]['class']) && isset($traces[$i]['function']))
|
if (isset($traces[$i]['class']) && isset($traces[$i]['function']))
|
||||||
$trace[] = $traces[$i]['class'] . " " . $traces[$i]['type'] . " " . $traces[$i]['function']. "()";
|
$trace[] = implode(" ", array(
|
||||||
elseif (isset($traces[$i]['function']))
|
$traces[$i]['class'],
|
||||||
$trace[] = $traces[$i]['function']. "()";
|
$traces[$i]['type'],
|
||||||
$msg[] = implode(" - ", $trace);
|
$traces[$i]['function']. "()"));
|
||||||
}
|
elseif (isset($traces[$i]['function']))
|
||||||
|
$trace[] = $traces[$i]['function']. "()";
|
||||||
|
$msg[] = implode(" - ", $trace);
|
||||||
|
}
|
||||||
|
|
||||||
return implode("\n", $msg);
|
return implode("\n", $msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
function log_exception($exception, $prefix='') {
|
function log_exception($exception, $prefix='') {
|
||||||
logging("ERROR", ($prefix?"$prefix :\n":"An exception occured :\n"). get_debug_backtrace_context(1). "\n" .
|
logging(
|
||||||
"## ".$exception->getFile().":".$exception->getLine(). " : ". $exception->getMessage());
|
"ERROR",
|
||||||
|
($prefix?"$prefix :\n":"An exception occured :\n").
|
||||||
|
get_debug_backtrace_context(1). "\n" .
|
||||||
|
"## ".$exception->getFile().":".$exception->getLine(). " : ". $exception->getMessage());
|
||||||
}
|
}
|
||||||
set_exception_handler('log_exception');
|
set_exception_handler('log_exception');
|
||||||
|
|
||||||
|
@ -108,6 +125,6 @@ function log_php_eror($errno, $errstr, $errfile, $errline) {
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
if ($log_level == 'DEBUG')
|
if ($log_level == 'DEBUG')
|
||||||
set_error_handler('log_php_eror', E_ALL & ~E_STRICT);
|
set_error_handler('log_php_eror', E_ALL & ~E_STRICT);
|
||||||
else
|
else
|
||||||
set_error_handler('log_php_eror', E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED);
|
set_error_handler('log_php_eror', E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED);
|
||||||
|
|
|
@ -4,12 +4,15 @@
|
||||||
require_once($php_mail_path);
|
require_once($php_mail_path);
|
||||||
require_once($php_mail_mime_path);
|
require_once($php_mail_mime_path);
|
||||||
|
|
||||||
function send_mail($from, $to, $subject, $msg, $headers=array(), $attachments=array(), $crlf="\r\n") {
|
function send_mail($from, $to, $subject, $msg, $headers=array(), $attachments=array(),
|
||||||
|
$crlf="\r\n") {
|
||||||
global $mail_send_method, $mail_headers, $mail_send_params, $mail_catch_all, $mail_sender;
|
global $mail_send_method, $mail_headers, $mail_send_params, $mail_catch_all, $mail_sender;
|
||||||
$mail_obj = Mail::factory($mail_send_method, $mail_send_params);
|
$mail_obj = Mail::factory($mail_send_method, $mail_send_params);
|
||||||
|
|
||||||
if ($mail_catch_all) {
|
if ($mail_catch_all) {
|
||||||
$msg .= sprintf(_("\n\n\nMail initialy intended for %s."), (is_array($to)?implode(',', $to):$to));
|
$msg .= sprintf(
|
||||||
|
_("\n\n\nMail initialy intended for %s."),
|
||||||
|
(is_array($to)?implode(',', $to):$to));
|
||||||
$to = $mail_catch_all;
|
$to = $mail_catch_all;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ if (php_sapi_name() == "cli")
|
||||||
|
|
||||||
// Define session max duration
|
// Define session max duration
|
||||||
if (!isset($session_max_duration))
|
if (!isset($session_max_duration))
|
||||||
$session_max_duration = (12*60*60); // Default to 12h
|
$session_max_duration = (12*60*60); // Default to 12h
|
||||||
ini_set('session.gc_maxlifetime', $session_max_duration);
|
ini_set('session.gc_maxlifetime', $session_max_duration);
|
||||||
ini_set('session.cookie_lifetime', $session_max_duration);
|
ini_set('session.cookie_lifetime', $session_max_duration);
|
||||||
|
|
||||||
|
@ -13,23 +13,26 @@ session_start();
|
||||||
|
|
||||||
// Init session key
|
// Init session key
|
||||||
if (!isset($_SESSION['session_key'])) {
|
if (!isset($_SESSION['session_key'])) {
|
||||||
$_SESSION['session_key']=uniqid();
|
$_SESSION['session_key']=uniqid();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle session timeout
|
// Handle session timeout
|
||||||
if ($session_timeout) {
|
if ($session_timeout) {
|
||||||
if (!isset($_SESSION['session_last_access'])) {
|
if (!isset($_SESSION['session_last_access'])) {
|
||||||
logging('DEBUG', 'Set initial session last access');
|
logging('DEBUG', 'Set initial session last access');
|
||||||
$_SESSION['session_last_access'] = time();
|
$_SESSION['session_last_access'] = time();
|
||||||
}
|
}
|
||||||
elseif ($_SESSION['session_last_access'] > (time() - $session_timeout)) {
|
elseif ($_SESSION['session_last_access'] > (time() - $session_timeout)) {
|
||||||
logging('DEBUG', 'Session timeout not expired, update session last access (Previous value : '.$_SESSION['session_last_access'].')');
|
logging(
|
||||||
$_SESSION['session_last_access'] = time();
|
'DEBUG',
|
||||||
}
|
'Session timeout not expired, update session last access '.
|
||||||
else {
|
'(Previous value : '.$_SESSION['session_last_access'].')');
|
||||||
logging('INFO', 'Session destroyed due to inactivity');
|
$_SESSION['session_last_access'] = time();
|
||||||
session_destroy();
|
}
|
||||||
}
|
else {
|
||||||
|
logging('INFO', 'Session destroyed due to inactivity');
|
||||||
|
session_destroy();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function check_session_key($value=null) {
|
function check_session_key($value=null) {
|
||||||
|
|
|
@ -202,7 +202,11 @@ function smarty_item_status($params) {
|
||||||
else
|
else
|
||||||
$class='danger';
|
$class='danger';
|
||||||
echo "<span class='badge badge-$class'>";
|
echo "<span class='badge badge-$class'>";
|
||||||
echo array_key_exists($params['item']['status'], $status_list)?$status_list[$params['item']['status']]:"Inconnu (".$params['item']['status'].")";
|
echo (
|
||||||
|
array_key_exists($params['item']['status'], $status_list)?
|
||||||
|
$status_list[$params['item']['status']]:
|
||||||
|
"Inconnu (".$params['item']['status'].")"
|
||||||
|
);
|
||||||
echo "</span>";
|
echo "</span>";
|
||||||
}
|
}
|
||||||
smarty_register_function('item_status','smarty_item_status');
|
smarty_register_function('item_status','smarty_item_status');
|
||||||
|
@ -223,7 +227,10 @@ function smarty_table_ordered_th($params, $smarty) {
|
||||||
echo "<a href='".$params['url']."?order=".$params['order']."'>".$params['text']."</a>";
|
echo "<a href='".$params['url']."?order=".$params['order']."'>".$params['text']."</a>";
|
||||||
}
|
}
|
||||||
if ($params['order']==$params['search']['order']) {
|
if ($params['order']==$params['search']['order']) {
|
||||||
echo ' <i class="fa fa-sort-'.(strtolower($params['search']['order_direction'])=='asc'?'up':'down').'" aria-hidden="true"></i>';
|
echo (
|
||||||
|
' <i class="fa fa-sort-'.
|
||||||
|
(strtolower($params['search']['order_direction'])=='asc'?'up':'down').
|
||||||
|
'" aria-hidden="true"></i>');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
smarty_register_function('table_ordered_th','smarty_table_ordered_th');
|
smarty_register_function('table_ordered_th','smarty_table_ordered_th');
|
||||||
|
|
|
@ -9,6 +9,14 @@
|
||||||
if (php_sapi_name() != "cli")
|
if (php_sapi_name() != "cli")
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert PO file to JSON file
|
||||||
|
*
|
||||||
|
* @param string $locale The locale of the input PO file
|
||||||
|
* @param string $path The path of the input PO file
|
||||||
|
*
|
||||||
|
* @return string JSON encoded file content
|
||||||
|
*/
|
||||||
function po2json($locale, $path) {
|
function po2json($locale, $path) {
|
||||||
$fileHandler = new \Sepia\PoParser\SourceHandler\FileSystem($path);
|
$fileHandler = new \Sepia\PoParser\SourceHandler\FileSystem($path);
|
||||||
$poparser = new \Sepia\PoParser\Parser($fileHandler);
|
$poparser = new \Sepia\PoParser\Parser($fileHandler);
|
||||||
|
|
|
@ -61,7 +61,7 @@ function lang2locale($lang, $default=null) {
|
||||||
*
|
*
|
||||||
* @param string $msg The message to translate
|
* @param string $msg The message to translate
|
||||||
*
|
*
|
||||||
* @return string The message without transformation
|
* @return string The message without transformation
|
||||||
*/
|
*/
|
||||||
function ___($msg) {
|
function ___($msg) {
|
||||||
return $msg;
|
return $msg;
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
function get_item_from_url($id, $fatal=false) {
|
function get_item_from_url($id, $fatal=false) {
|
||||||
if (!check_id($id))
|
if (!check_id($id))
|
||||||
logging('FATAL', _('Invalid element identifier.'));
|
logging('FATAL', _('Invalid element identifier.'));
|
||||||
|
|
||||||
$item = get_item($id);
|
$item = get_item($id);
|
||||||
if(!is_array($item)) {
|
if(!is_array($item)) {
|
||||||
$error = sprintf(_("Item #% s not found."), $id);
|
$error = sprintf(_("Item #% s not found."), $id);
|
||||||
if ($fatal)
|
if ($fatal)
|
||||||
logging('FATAL', $error);
|
logging('FATAL', $error);
|
||||||
add_error($error);
|
add_error($error);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return $item;
|
return $item;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,11 @@ function handle_search($request) {
|
||||||
global $smarty, $status_list;
|
global $smarty, $status_list;
|
||||||
|
|
||||||
// Manage params
|
// Manage params
|
||||||
if((isset($_REQUEST['clear']) && $_REQUEST['clear']=='true') || !isset($_SESSION['search']) || !is_array($_SESSION['search'])) {
|
if(
|
||||||
|
(isset($_REQUEST['clear']) && $_REQUEST['clear']=='true') ||
|
||||||
|
!isset($_SESSION['search']) ||
|
||||||
|
!is_array($_SESSION['search'])
|
||||||
|
) {
|
||||||
$_SESSION['search']=array(
|
$_SESSION['search']=array(
|
||||||
'pattern' => false,
|
'pattern' => false,
|
||||||
'status' => 'all',
|
'status' => 'all',
|
||||||
|
@ -81,7 +85,10 @@ function handle_search($request) {
|
||||||
logging('DEBUG', 'Search params : '.vardump($_SESSION['search']));
|
logging('DEBUG', 'Search params : '.vardump($_SESSION['search']));
|
||||||
$result = search_items($_SESSION['search']);
|
$result = search_items($_SESSION['search']);
|
||||||
if (!is_array($result))
|
if (!is_array($result))
|
||||||
fatal_error(_("An error occurred while listing the items. If the problem persists, please contact support."));
|
fatal_error(
|
||||||
|
_("An error occurred while listing the items. ".
|
||||||
|
"If the problem persists, please contact support.")
|
||||||
|
);
|
||||||
|
|
||||||
$smarty -> assign('result', $result);
|
$smarty -> assign('result', $result);
|
||||||
$smarty -> assign('search', $_SESSION['search']);
|
$smarty -> assign('search', $_SESSION['search']);
|
||||||
|
@ -117,7 +124,10 @@ function handle_show($request) {
|
||||||
'js/myconfirm.js',
|
'js/myconfirm.js',
|
||||||
));
|
));
|
||||||
|
|
||||||
display_template("show.tpl", sprintf(_("Element %s"), (is_array($item)?$item['name']:"#".$request -> id)));
|
display_template(
|
||||||
|
"show.tpl",
|
||||||
|
sprintf(_("Element %s"), (is_array($item)?$item['name']:"#".$request -> id))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
add_url_handler('|^item/(?P<id>[0-9]+)$|', 'handle_show');
|
add_url_handler('|^item/(?P<id>[0-9]+)$|', 'handle_show');
|
||||||
|
|
||||||
|
@ -139,7 +149,9 @@ function handle_create($request) {
|
||||||
logging('DEBUG', 'Validated data : '.vardump($info));
|
logging('DEBUG', 'Validated data : '.vardump($info));
|
||||||
logging('DEBUG', 'Fields errors : '.vardump($field_errors));
|
logging('DEBUG', 'Fields errors : '.vardump($field_errors));
|
||||||
if (isset($_POST['submit']) && !empty($field_errors))
|
if (isset($_POST['submit']) && !empty($field_errors))
|
||||||
add_error(_("There are errors preventing this item from being saved. Please correct them before attempting to add this item."));
|
add_error(
|
||||||
|
_("There are errors preventing this item from being saved. ".
|
||||||
|
"Please correct them before attempting to add this item."));
|
||||||
$smarty->assign('submited', isset($_POST['submit']));
|
$smarty->assign('submited', isset($_POST['submit']));
|
||||||
$smarty->assign('info', $info);
|
$smarty->assign('info', $info);
|
||||||
$smarty->assign('field_errors', $field_errors);
|
$smarty->assign('field_errors', $field_errors);
|
||||||
|
@ -183,7 +195,9 @@ function handle_modify($request) {
|
||||||
logging('DEBUG', 'Fields errors : '.vardump($field_errors));
|
logging('DEBUG', 'Fields errors : '.vardump($field_errors));
|
||||||
$smarty->assign('submited', isset($_POST['submit']));
|
$smarty->assign('submited', isset($_POST['submit']));
|
||||||
if (isset($_POST['submit']) && !empty($field_errors))
|
if (isset($_POST['submit']) && !empty($field_errors))
|
||||||
add_error(_("There are errors preventing this item from being saved. Please correct them before attempting to save your changes."));
|
add_error(
|
||||||
|
_("There are errors preventing this item from being saved. ".
|
||||||
|
"Please correct them before attempting to save your changes."));
|
||||||
$smarty->assign('info', (!empty($info)?$info:$item));
|
$smarty->assign('info', (!empty($info)?$info:$item));
|
||||||
$smarty->assign('item_id', $item['id']);
|
$smarty->assign('item_id', $item['id']);
|
||||||
$smarty->assign('field_errors', $field_errors);
|
$smarty->assign('field_errors', $field_errors);
|
||||||
|
@ -212,7 +226,9 @@ function handle_archive($request) {
|
||||||
add_error(_('You cannot archive this item.'));
|
add_error(_('You cannot archive this item.'));
|
||||||
}
|
}
|
||||||
else if (archive_item($item['id']) === true) {
|
else if (archive_item($item['id']) === true) {
|
||||||
add_message(sprintf(_("The element '% s' has been archived successfully."), $item['name']));
|
add_message(sprintf(
|
||||||
|
_("The element '% s' has been archived successfully."),
|
||||||
|
$item['name']));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
add_error(_('An error occurred while archiving this item.'));
|
add_error(_('An error occurred while archiving this item.'));
|
||||||
|
@ -232,7 +248,9 @@ function handle_delete($request) {
|
||||||
add_error(_('You cannot delete this item.'));
|
add_error(_('You cannot delete this item.'));
|
||||||
}
|
}
|
||||||
else if (delete_item($item['id']) === true) {
|
else if (delete_item($item['id']) === true) {
|
||||||
add_message(sprintf(_("The element '% s' has been deleted successfully."), $item['name']));
|
add_message(sprintf(
|
||||||
|
_("The element '% s' has been deleted successfully."),
|
||||||
|
$item['name']));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
add_error(_('An error occurred while deleting this item.'));
|
add_error(_('An error occurred while deleting this item.'));
|
||||||
|
|
169
includes/url.php
169
includes/url.php
|
@ -26,14 +26,17 @@ $url_patterns =array();
|
||||||
/**
|
/**
|
||||||
* Add an URL pattern
|
* Add an URL pattern
|
||||||
*
|
*
|
||||||
* @param[in] $pattern string The URL pattern (required)
|
* @param $pattern string The URL pattern (required)
|
||||||
* @param[in] $handler callable The URL pattern handler (must be callable, required)
|
* @param $handler callable The URL pattern handler (must be callable, required)
|
||||||
* @param[in] $authenticated boolean Permit to define if this URL is accessible only for authenticated users (optional, default: true)
|
* @param $authenticated boolean Permit to define if this URL is accessible only for
|
||||||
* @param[in] $override boolean Allow override if a command already exists with the same name (optional, default: false)
|
* authenticated users (optional, default: true)
|
||||||
* @param[in] $api_mode boolean Enable API mode (optional, default: false)
|
* @param $override boolean Allow override if a command already exists with the
|
||||||
* @param[in] $methods array|null HTTP method (optional, default: array('GET', 'POST'))
|
* same name (optional, default: false)
|
||||||
|
* @param $api_mode boolean Enable API mode (optional, default: false)
|
||||||
|
* @param $methods array|null HTTP method (optional, default: array('GET', 'POST'))
|
||||||
**/
|
**/
|
||||||
function add_url_handler($pattern, $handler=null, $authenticated=false, $override=true, $api_mode=false, $methods=null) {
|
function add_url_handler($pattern, $handler=null, $authenticated=false, $override=true,
|
||||||
|
$api_mode=false, $methods=null) {
|
||||||
if (is_null($methods))
|
if (is_null($methods))
|
||||||
$methods = array('GET', 'POST');
|
$methods = array('GET', 'POST');
|
||||||
elseif (!is_array($methods))
|
elseif (!is_array($methods))
|
||||||
|
@ -57,7 +60,10 @@ function add_url_handler($pattern, $handler=null, $authenticated=false, $overrid
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
elseif ($override) {
|
elseif ($override) {
|
||||||
logging('DEBUG', "URL : override pattern '$pattern' with handler '$handler' (old handler = '".$url_patterns[$pattern]."')");
|
logging(
|
||||||
|
'DEBUG',
|
||||||
|
"URL : override pattern '$pattern' with handler '$handler' ".
|
||||||
|
"(old handler = '".$url_patterns[$pattern]."')");
|
||||||
$url_patterns[$pattern] = array(
|
$url_patterns[$pattern] = array(
|
||||||
'handler' => $handler,
|
'handler' => $handler,
|
||||||
'authenticated' => $authenticated,
|
'authenticated' => $authenticated,
|
||||||
|
@ -75,13 +81,13 @@ function add_url_handler($pattern, $handler=null, $authenticated=false, $overrid
|
||||||
* Error 404 page
|
* Error 404 page
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Error 404 handler
|
* Error 404 handler
|
||||||
*
|
*
|
||||||
* @param[in] $request UrlRequest|null The request (optional, default: null)
|
* @param $request UrlRequest|null The request (optional, default: null)
|
||||||
*
|
*
|
||||||
* @retval void
|
* @return void
|
||||||
**/
|
**/
|
||||||
function error_404($request=null) {
|
function error_404($request=null) {
|
||||||
display_template('error_404.tpl', _("Whoops ! Page not found"));
|
display_template('error_404.tpl', _("Whoops ! Page not found"));
|
||||||
exit();
|
exit();
|
||||||
|
@ -94,19 +100,23 @@ function set_404_url_handler($handler=null) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Interprets the requested URL and return the corresponding UrlRequest object
|
* Interprets the requested URL and return the corresponding UrlRequest object
|
||||||
*
|
*
|
||||||
* @param[in] $default_url string|null The default URL if current one does not
|
* @param $default_url string|null The default URL if current one does not
|
||||||
* match with any configured pattern.
|
* match with any configured pattern.
|
||||||
*
|
*
|
||||||
* @retval UrlRequest The UrlRequest object corresponding to the the requested URL.
|
* @return UrlRequest The UrlRequest object corresponding to the the requested URL.
|
||||||
*/
|
*/
|
||||||
function get_request($default_url=null) {
|
function get_request($default_url=null) {
|
||||||
global $url_patterns, $_404_url_handler;
|
global $url_patterns, $_404_url_handler;
|
||||||
$current_url = get_current_url();
|
$current_url = get_current_url();
|
||||||
if ($current_url === false) {
|
if ($current_url === false) {
|
||||||
logging('FATAL', _('Unable to determine the requested page. If the problem persists, please contact support.'));
|
logging(
|
||||||
|
'FATAL',
|
||||||
|
_('Unable to determine the requested page. '.
|
||||||
|
'If the problem persists, please contact support.')
|
||||||
|
);
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
if (!is_array($url_patterns)) {
|
if (!is_array($url_patterns)) {
|
||||||
|
@ -115,7 +125,11 @@ function get_request($default_url=null) {
|
||||||
}
|
}
|
||||||
|
|
||||||
logging('DEBUG', "URL : current url = '$current_url'");
|
logging('DEBUG', "URL : current url = '$current_url'");
|
||||||
logging('DEBUG', "URL : check current url with the following URL patterns :\n - ".implode("\n - ", array_keys($url_patterns)));
|
logging(
|
||||||
|
'DEBUG',
|
||||||
|
"URL : check current url with the following URL patterns :\n - ".
|
||||||
|
implode("\n - ", array_keys($url_patterns))
|
||||||
|
);
|
||||||
foreach ($url_patterns as $pattern => $handler_infos) {
|
foreach ($url_patterns as $pattern => $handler_infos) {
|
||||||
$m = url_match($pattern, $current_url, $handler_infos['methods']);
|
$m = url_match($pattern, $current_url, $handler_infos['methods']);
|
||||||
if (is_array($m)) {
|
if (is_array($m)) {
|
||||||
|
@ -134,7 +148,9 @@ function get_request($default_url=null) {
|
||||||
}
|
}
|
||||||
// Error 404
|
// Error 404
|
||||||
$api_mode = (strpos($current_url, 'api/') === 0);
|
$api_mode = (strpos($current_url, 'api/') === 0);
|
||||||
logging('DEBUG', "Current URL match with no pattern. Use error 404 handler (API mode=$api_mode).");
|
logging(
|
||||||
|
'DEBUG',
|
||||||
|
"Current URL match with no pattern. Use error 404 handler (API mode=$api_mode).");
|
||||||
return new UrlRequest(
|
return new UrlRequest(
|
||||||
$current_url,
|
$current_url,
|
||||||
array(
|
array(
|
||||||
|
@ -148,11 +164,11 @@ function get_request($default_url=null) {
|
||||||
/**
|
/**
|
||||||
* Check if the current requested URL match with a specific pattern
|
* Check if the current requested URL match with a specific pattern
|
||||||
*
|
*
|
||||||
* @param[in] $pattern string The URL pattern
|
* @param $pattern string The URL pattern
|
||||||
* @param[in] $current_url string|false The current URL (optional)
|
* @param $current_url string|false The current URL (optional)
|
||||||
* @param[in] $methods array|null HTTP method (optional, default: no check)
|
* @param $methods array|null HTTP method (optional, default: no check)
|
||||||
*
|
*
|
||||||
* @retval array|false The URL info if pattern matched, false otherwise.
|
* @return array|false The URL info if pattern matched, false otherwise.
|
||||||
**/
|
**/
|
||||||
function url_match($pattern, $current_url=false, $methods=null) {
|
function url_match($pattern, $current_url=false, $methods=null) {
|
||||||
if ($methods && !in_array($_SERVER['REQUEST_METHOD'], $methods))
|
if ($methods && !in_array($_SERVER['REQUEST_METHOD'], $methods))
|
||||||
|
@ -162,16 +178,19 @@ function url_match($pattern, $current_url=false, $methods=null) {
|
||||||
if (!$current_url) return False;
|
if (!$current_url) return False;
|
||||||
}
|
}
|
||||||
if (preg_match($pattern, $current_url, $m)) {
|
if (preg_match($pattern, $current_url, $m)) {
|
||||||
logging('DEBUG', "URL : Match found with pattern '$pattern' :\n\t".str_replace("\n", "\n\t", print_r($m, 1)));
|
logging(
|
||||||
|
'DEBUG',
|
||||||
|
"URL : Match found with pattern '$pattern' :\n\t".
|
||||||
|
str_replace("\n", "\n\t", print_r($m, 1)));
|
||||||
return $m;
|
return $m;
|
||||||
}
|
}
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Retreive current requested URL and return it
|
* Retreive current requested URL and return it
|
||||||
*
|
*
|
||||||
* @retval string|false The current request URL or false if fail
|
* @return string|false The current request URL or false if fail
|
||||||
**/
|
**/
|
||||||
function get_current_url() {
|
function get_current_url() {
|
||||||
logging('DEBUG', "URL : request URI = '".$_SERVER['REQUEST_URI']."'");
|
logging('DEBUG', "URL : request URI = '".$_SERVER['REQUEST_URI']."'");
|
||||||
|
@ -183,7 +202,9 @@ function get_current_url() {
|
||||||
return '';
|
return '';
|
||||||
|
|
||||||
if (substr($_SERVER['REQUEST_URI'], 0, strlen($base)) != $base) {
|
if (substr($_SERVER['REQUEST_URI'], 0, strlen($base)) != $base) {
|
||||||
logging('ERROR', "URL : request URI (".$_SERVER['REQUEST_URI'].") does not start with rewrite base ($base)");
|
logging(
|
||||||
|
'ERROR',
|
||||||
|
"URL : request URI (".$_SERVER['REQUEST_URI'].") does not start with rewrite base ($base)");
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -206,7 +227,7 @@ function get_current_url() {
|
||||||
/**
|
/**
|
||||||
* Try to detect rewrite base from public root URL
|
* Try to detect rewrite base from public root URL
|
||||||
*
|
*
|
||||||
* @retval string The detected rewrite base
|
* @return string The detected rewrite base
|
||||||
**/
|
**/
|
||||||
function get_rewrite_base() {
|
function get_rewrite_base() {
|
||||||
global $public_root_url;
|
global $public_root_url;
|
||||||
|
@ -220,9 +241,9 @@ function get_rewrite_base() {
|
||||||
/**
|
/**
|
||||||
* Trigger redirect to specified URL (or homepage if omited)
|
* Trigger redirect to specified URL (or homepage if omited)
|
||||||
*
|
*
|
||||||
* @param[in] $go string|false The destination URL
|
* @param $go string|false The destination URL
|
||||||
*
|
*
|
||||||
* @retval void
|
* @return void
|
||||||
**/
|
**/
|
||||||
function redirect($go=false) {
|
function redirect($go=false) {
|
||||||
global $public_root_url;
|
global $public_root_url;
|
||||||
|
@ -244,7 +265,10 @@ function redirect($go=false) {
|
||||||
|
|
||||||
// Prevent loop
|
// Prevent loop
|
||||||
if (isset($_SESSION['last_redirect']) && $_SESSION['last_redirect'] == $url)
|
if (isset($_SESSION['last_redirect']) && $_SESSION['last_redirect'] == $url)
|
||||||
logging('FATAL', _('Unable to determine the requested page (loop detected). If the problem persists, please contact support.'));
|
logging(
|
||||||
|
'FATAL',
|
||||||
|
_('Unable to determine the requested page (loop detected). '.
|
||||||
|
'If the problem persists, please contact support.'));
|
||||||
else
|
else
|
||||||
$_SESSION['last_redirect'] = $url;
|
$_SESSION['last_redirect'] = $url;
|
||||||
|
|
||||||
|
@ -256,10 +280,10 @@ function redirect($go=false) {
|
||||||
/**
|
/**
|
||||||
* Handle the current requested URL
|
* Handle the current requested URL
|
||||||
*
|
*
|
||||||
* @param[in] $default_url string|null The default URL if current one does not
|
* @param $default_url string|null The default URL if current one does not
|
||||||
* match with any configured pattern.
|
* match with any configured pattern.
|
||||||
*
|
*
|
||||||
* @retval void
|
* @return void
|
||||||
**/
|
**/
|
||||||
function handle_request($default_url=null) {
|
function handle_request($default_url=null) {
|
||||||
global $smarty, $api_mode;
|
global $smarty, $api_mode;
|
||||||
|
@ -284,7 +308,8 @@ function handle_request($default_url=null) {
|
||||||
return call_user_func($request -> handler, $request);
|
return call_user_func($request -> handler, $request);
|
||||||
}
|
}
|
||||||
catch (Exception $e) {
|
catch (Exception $e) {
|
||||||
log_exception($e, "An exception occured running URL handler function ".$request -> handler."()");
|
log_exception(
|
||||||
|
$e, "An exception occured running URL handler function ".$request -> handler."()");
|
||||||
logging('FATAL', _("This request could not be processed correctly."));
|
logging('FATAL', _("This request could not be processed correctly."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -292,9 +317,9 @@ function handle_request($default_url=null) {
|
||||||
/**
|
/**
|
||||||
* Remove trailing slash in specified URL
|
* Remove trailing slash in specified URL
|
||||||
*
|
*
|
||||||
* @param[in] $url string The URL
|
* @param $url string The URL
|
||||||
*
|
*
|
||||||
* @retval string The specified URL without trailing slash
|
* @return string The specified URL without trailing slash
|
||||||
**/
|
**/
|
||||||
function remove_trailing_slash($url) {
|
function remove_trailing_slash($url) {
|
||||||
if ($url == '/')
|
if ($url == '/')
|
||||||
|
@ -310,9 +335,9 @@ function remove_trailing_slash($url) {
|
||||||
* Check if session key is present and valid and set AJAX
|
* Check if session key is present and valid and set AJAX
|
||||||
* mode.
|
* mode.
|
||||||
*
|
*
|
||||||
* @param[in] $session_key string The current session key (optional)
|
* @param $session_key string The current session key (optional)
|
||||||
*
|
*
|
||||||
* @retval void
|
* @return void
|
||||||
**/
|
**/
|
||||||
function check_ajax_request($session_key=null) {
|
function check_ajax_request($session_key=null) {
|
||||||
global $ajax, $debug_ajax;
|
global $ajax, $debug_ajax;
|
||||||
|
@ -328,18 +353,25 @@ function check_ajax_request($session_key=null) {
|
||||||
/**
|
/**
|
||||||
* Get the public absolute URL
|
* Get the public absolute URL
|
||||||
*
|
*
|
||||||
* @param[in] $relative_url string|null Relative URL to convert (Default: current URL)
|
* @param $relative_url string|null Relative URL to convert (Default: current URL)
|
||||||
*
|
*
|
||||||
* @retval string The public absolute URL
|
* @return string The public absolute URL
|
||||||
**/
|
**/
|
||||||
function get_absolute_url($relative_url=null) {
|
function get_absolute_url($relative_url=null) {
|
||||||
global $public_root_url;
|
global $public_root_url;
|
||||||
if (!is_string($relative_url))
|
if (!is_string($relative_url))
|
||||||
$relative_url = get_current_url();
|
$relative_url = get_current_url();
|
||||||
if ($public_root_url[0] == '/') {
|
if ($public_root_url[0] == '/') {
|
||||||
logging('DEBUG', "URL :: get_absolute_url($relative_url): configured public root URL is relative ($public_root_url) => try to detect it from current request infos.");
|
logging(
|
||||||
$public_root_url = 'http'.(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on'?'s':'').'://'.$_SERVER['HTTP_HOST'].$public_root_url;
|
'DEBUG',
|
||||||
logging('DEBUG', "URL :: get_absolute_url($relative_url): detected public_root_url: $public_root_url");
|
"URL :: get_absolute_url($relative_url): configured public root URL is relative ".
|
||||||
|
"($public_root_url) => try to detect it from current request infos.");
|
||||||
|
$public_root_url = (
|
||||||
|
'http'.(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on'?'s':'').'://'.
|
||||||
|
$_SERVER['HTTP_HOST'].$public_root_url);
|
||||||
|
logging(
|
||||||
|
'DEBUG',
|
||||||
|
"URL :: get_absolute_url($relative_url): detected public_root_url: $public_root_url");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (substr($relative_url, 0, 1) == '/')
|
if (substr($relative_url, 0, 1) == '/')
|
||||||
|
@ -352,23 +384,23 @@ function get_absolute_url($relative_url=null) {
|
||||||
/**
|
/**
|
||||||
* Check if specified URL is absolute
|
* Check if specified URL is absolute
|
||||||
*
|
*
|
||||||
* @param[in] $url string The URL to check
|
* @param $url string The URL to check
|
||||||
*
|
*
|
||||||
* @retval boolean True if specified URL is absolute, False otherwise
|
* @return boolean True if specified URL is absolute, False otherwise
|
||||||
**/
|
**/
|
||||||
function is_absolute_url($url) {
|
function is_absolute_url($url) {
|
||||||
return boolval(preg_match('#^https?://#', $url));
|
return boolval(preg_match('#^https?://#', $url));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Add parameter in specified URL
|
* Add parameter in specified URL
|
||||||
*
|
*
|
||||||
* @param[in] &$url string The reference of the URL
|
* @param &$url string The reference of the URL
|
||||||
* @param[in] $param string The parameter name
|
* @param $param string The parameter name
|
||||||
* @param[in] $value string The parameter value
|
* @param $value string The parameter value
|
||||||
* @param[in] $encode boolean Set if parameter value must be URL encoded (optional, default: true)
|
* @param $encode boolean Set if parameter value must be URL encoded (optional, default: true)
|
||||||
*
|
*
|
||||||
* @retval string|null The completed URL
|
* @return string|null The completed URL
|
||||||
*/
|
*/
|
||||||
function add_url_parameter(&$url, $param, $value, $encode=true) {
|
function add_url_parameter(&$url, $param, $value, $encode=true) {
|
||||||
if (strpos($url, '?') === false)
|
if (strpos($url, '?') === false)
|
||||||
|
@ -404,17 +436,21 @@ class UrlRequest {
|
||||||
public function __construct($current_url, $handler_infos, $url_params=array()) {
|
public function __construct($current_url, $handler_infos, $url_params=array()) {
|
||||||
$this -> current_url = $current_url;
|
$this -> current_url = $current_url;
|
||||||
$this -> handler = $handler_infos['handler'];
|
$this -> handler = $handler_infos['handler'];
|
||||||
$this -> authenticated = (isset($handler_infos['authenticated'])?boolval($handler_infos['authenticated']):true);
|
$this -> authenticated = (
|
||||||
$this -> api_mode = (isset($handler_infos['api_mode'])?boolval($handler_infos['api_mode']):false);
|
isset($handler_infos['authenticated'])?
|
||||||
|
boolval($handler_infos['authenticated']):true);
|
||||||
|
$this -> api_mode = (
|
||||||
|
isset($handler_infos['api_mode'])?
|
||||||
|
boolval($handler_infos['api_mode']):false);
|
||||||
$this -> url_params = $url_params;
|
$this -> url_params = $url_params;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get request info
|
* Get request info
|
||||||
*
|
*
|
||||||
* @param[in] $key string The name of the info
|
* @param $key string The name of the info
|
||||||
*
|
*
|
||||||
* @retval mixed The value
|
* @return mixed The value
|
||||||
**/
|
**/
|
||||||
public function __get($key) {
|
public function __get($key) {
|
||||||
if ($key == 'current_url')
|
if ($key == 'current_url')
|
||||||
|
@ -439,9 +475,9 @@ class UrlRequest {
|
||||||
/**
|
/**
|
||||||
* Check is request info is set
|
* Check is request info is set
|
||||||
*
|
*
|
||||||
* @param[in] $key string The name of the info
|
* @param $key string The name of the info
|
||||||
*
|
*
|
||||||
* @retval boolval True is info is set, False otherwise
|
* @return boolval True is info is set, False otherwise
|
||||||
**/
|
**/
|
||||||
public function __isset($key) {
|
public function __isset($key) {
|
||||||
if (in_array($key, array('current_url', 'handler', 'authenticated')))
|
if (in_array($key, array('current_url', 'handler', 'authenticated')))
|
||||||
|
@ -452,10 +488,11 @@ class UrlRequest {
|
||||||
/**
|
/**
|
||||||
* Get request parameter
|
* Get request parameter
|
||||||
*
|
*
|
||||||
* @param[in] $parameter string The name of the parameter
|
* @param $parameter string The name of the parameter
|
||||||
* @param[in] $decode string If true, the parameter value will be urldecoded (optional, default: true)
|
* @param $decode string If true, the parameter value will be urldecoded
|
||||||
|
* (optional, default: true)
|
||||||
*
|
*
|
||||||
* @retval mixed The value or false if parameter does not exists
|
* @return mixed The value or false if parameter does not exists
|
||||||
**/
|
**/
|
||||||
public function get_param($parameter, $decode=true) {
|
public function get_param($parameter, $decode=true) {
|
||||||
if (array_key_exists($parameter, $this->url_params)) {
|
if (array_key_exists($parameter, $this->url_params)) {
|
||||||
|
@ -466,10 +503,10 @@ class UrlRequest {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Get request referer (if known)
|
* Get request referer (if known)
|
||||||
*
|
*
|
||||||
* @retval string|null The request referer URL if known, null otherwise
|
* @return string|null The request referer URL if known, null otherwise
|
||||||
*/
|
*/
|
||||||
public function get_referer() {
|
public function get_referer() {
|
||||||
if (isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER'])
|
if (isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER'])
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: \n"
|
"Project-Id-Version: \n"
|
||||||
"POT-Creation-Date: 2022-04-24 16:47+0200\n"
|
"POT-Creation-Date: 2022-04-24 17:42+0200\n"
|
||||||
"PO-Revision-Date: \n"
|
"PO-Revision-Date: \n"
|
||||||
"Last-Translator: Benjamin Renard <brenard@easter-eggs.com>\n"
|
"Last-Translator: Benjamin Renard <brenard@easter-eggs.com>\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
|
@ -17,8 +17,8 @@ msgid "Invalid element identifier."
|
||||||
msgstr "Identifiant d'élément invalide."
|
msgstr "Identifiant d'élément invalide."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-helpers.php:9
|
#: /home/brenard/dev/eesyphp/includes/url-helpers.php:9
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:205
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:219
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:229
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:245
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Item #% s not found."
|
msgid "Item #% s not found."
|
||||||
msgstr "L'élément #%s est introuvable."
|
msgstr "L'élément #%s est introuvable."
|
||||||
|
@ -40,11 +40,11 @@ msgstr "Une erreur est survenue en affichant cette page."
|
||||||
msgid "Hello world !"
|
msgid "Hello world !"
|
||||||
msgstr "Bonjour tout le monde !"
|
msgstr "Bonjour tout le monde !"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:27
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:31
|
||||||
msgid "Any"
|
msgid "Any"
|
||||||
msgstr "Peu importe"
|
msgstr "Peu importe"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:84
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:89
|
||||||
msgid ""
|
msgid ""
|
||||||
"An error occurred while listing the items. If the problem persists, please "
|
"An error occurred while listing the items. If the problem persists, please "
|
||||||
"contact support."
|
"contact support."
|
||||||
|
@ -52,25 +52,25 @@ msgstr ""
|
||||||
"Une erreur est survenue en listant les éléments. Si le problème persiste, "
|
"Une erreur est survenue en listant les éléments. Si le problème persiste, "
|
||||||
"merci de prendre contact avec le support."
|
"merci de prendre contact avec le support."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:97
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:104
|
||||||
msgid "Search"
|
msgid "Search"
|
||||||
msgstr "Rechercher"
|
msgstr "Rechercher"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:120
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:129
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Element %s"
|
msgid "Element %s"
|
||||||
msgstr "Élément %s"
|
msgstr "Élément %s"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:132
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:142
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "The element '% s' has been created."
|
msgid "The element '% s' has been created."
|
||||||
msgstr "L'élément '%s' a bien été créé."
|
msgstr "L'élément '%s' a bien été créé."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:136
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:146
|
||||||
msgid "An error occurred while saving this item."
|
msgid "An error occurred while saving this item."
|
||||||
msgstr "Une erreur est survenue en enregistrant cet élément."
|
msgstr "Une erreur est survenue en enregistrant cet élément."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:142
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:153
|
||||||
msgid ""
|
msgid ""
|
||||||
"There are errors preventing this item from being saved. Please correct them "
|
"There are errors preventing this item from being saved. Please correct them "
|
||||||
"before attempting to add this item."
|
"before attempting to add this item."
|
||||||
|
@ -78,29 +78,29 @@ msgstr ""
|
||||||
"Des erreurs empêchent l'enregistrement de cet élément. Merci de les corriger "
|
"Des erreurs empêchent l'enregistrement de cet élément. Merci de les corriger "
|
||||||
"avant de tenter d'ajouter cet élément."
|
"avant de tenter d'ajouter cet élément."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:148
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:160
|
||||||
msgid "New"
|
msgid "New"
|
||||||
msgstr "Nouveau"
|
msgstr "Nouveau"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:158
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:170
|
||||||
msgid "You cannot edit this item."
|
msgid "You cannot edit this item."
|
||||||
msgstr "Vous ne pouvez pas modifier cet élément."
|
msgstr "Vous ne pouvez pas modifier cet élément."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:171
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:183
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "You have not made any changes to element '% s'."
|
msgid "You have not made any changes to element '% s'."
|
||||||
msgstr "Vous n'avez apporté aucune modification à l'élément '%s'."
|
msgstr "Vous n'avez apporté aucune modification à l'élément '%s'."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:175
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:187
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "The element '% s' has been updated successfully."
|
msgid "The element '% s' has been updated successfully."
|
||||||
msgstr "L'élément '%s' a bien été mise à jour."
|
msgstr "L'élément '%s' a bien été mise à jour."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:179
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:191
|
||||||
msgid "An error occurred while updating this item."
|
msgid "An error occurred while updating this item."
|
||||||
msgstr "Une erreur est survenue en mettant à jour cet élément."
|
msgstr "Une erreur est survenue en mettant à jour cet élément."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:186
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:199
|
||||||
msgid ""
|
msgid ""
|
||||||
"There are errors preventing this item from being saved. Please correct them "
|
"There are errors preventing this item from being saved. Please correct them "
|
||||||
"before attempting to save your changes."
|
"before attempting to save your changes."
|
||||||
|
@ -108,38 +108,38 @@ msgstr ""
|
||||||
"Des erreurs empêchent l'enregistrement de cet élément. Merci de les corriger "
|
"Des erreurs empêchent l'enregistrement de cet élément. Merci de les corriger "
|
||||||
"avant de tenter d'enregistrer vos modifications."
|
"avant de tenter d'enregistrer vos modifications."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:196
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:210
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Element %s: Modification"
|
msgid "Element %s: Modification"
|
||||||
msgstr "Élément %s : Modification"
|
msgstr "Élément %s : Modification"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:209
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:223
|
||||||
msgid "This item is already archived."
|
msgid "This item is already archived."
|
||||||
msgstr "Cet élément est déjà archivé."
|
msgstr "Cet élément est déjà archivé."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:212
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:226
|
||||||
msgid "You cannot archive this item."
|
msgid "You cannot archive this item."
|
||||||
msgstr "Vous ne pouvez pas archiver cet élément."
|
msgstr "Vous ne pouvez pas archiver cet élément."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:215
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:230
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "The element '% s' has been archived successfully."
|
msgid "The element '% s' has been archived successfully."
|
||||||
msgstr "L'élément '%s' a bien été archivé."
|
msgstr "L'élément '%s' a bien été archivé."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:218
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:234
|
||||||
msgid "An error occurred while archiving this item."
|
msgid "An error occurred while archiving this item."
|
||||||
msgstr "Une erreur est survenue en archivant cet élément."
|
msgstr "Une erreur est survenue en archivant cet élément."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:232
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:248
|
||||||
msgid "You cannot delete this item."
|
msgid "You cannot delete this item."
|
||||||
msgstr "Vous ne pouvez pas supprimer cet élément."
|
msgstr "Vous ne pouvez pas supprimer cet élément."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:235
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:252
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "The element '% s' has been deleted successfully."
|
msgid "The element '% s' has been deleted successfully."
|
||||||
msgstr "L'élément '%s' a bien été supprimé."
|
msgstr "L'élément '%s' a bien été supprimé."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:238
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:256
|
||||||
msgid "An error occurred while deleting this item."
|
msgid "An error occurred while deleting this item."
|
||||||
msgstr "Une erreur est survenue en supprimant cet élément."
|
msgstr "Une erreur est survenue en supprimant cet élément."
|
||||||
|
|
||||||
|
@ -163,106 +163,106 @@ msgstr "Refusé"
|
||||||
msgid "Archived"
|
msgid "Archived"
|
||||||
msgstr "Archivé"
|
msgstr "Archivé"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:51
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:59
|
||||||
msgid "Fail to list PHP files."
|
msgid "Fail to list PHP files."
|
||||||
msgstr "Impossible de lister les fichiers PHP."
|
msgstr "Impossible de lister les fichiers PHP."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:68
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:76
|
||||||
msgid "Fail to extract messages from PHP files using xgettext."
|
msgid "Fail to extract messages from PHP files using xgettext."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Impossible d'extraire les messages depuis les fichiers PHP en utilisant "
|
"Impossible d'extraire les messages depuis les fichiers PHP en utilisant "
|
||||||
"xgettext."
|
"xgettext."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:78
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:86
|
||||||
msgid "Fail to list JS files."
|
msgid "Fail to list JS files."
|
||||||
msgstr "Impossible de lister les fichiers JS."
|
msgstr "Impossible de lister les fichiers JS."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:95
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:103
|
||||||
msgid "Fail to extract messages from JS files using xgettext."
|
msgid "Fail to extract messages from JS files using xgettext."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Impossible d'extraire les messages depuis les fichiers JS en utilisant "
|
"Impossible d'extraire les messages depuis les fichiers JS en utilisant "
|
||||||
"xgettext."
|
"xgettext."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:108
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:116
|
||||||
msgid ""
|
msgid ""
|
||||||
"Fail to extract messages from template files using tsmarty2c.php script."
|
"Fail to extract messages from template files using tsmarty2c.php script."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Impossible d'extraire les messages depuis les fichiers template en utilisant "
|
"Impossible d'extraire les messages depuis les fichiers template en utilisant "
|
||||||
"le script tsmarty2c.php."
|
"le script tsmarty2c.php."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:134
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:142
|
||||||
msgid "Fail to merge messages using msgcat."
|
msgid "Fail to merge messages using msgcat."
|
||||||
msgstr "Impossible de fusionner les messages en utilisant msgcat."
|
msgstr "Impossible de fusionner les messages en utilisant msgcat."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:139
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:147
|
||||||
msgid "Extract messages that need to be translated"
|
msgid "Extract messages that need to be translated"
|
||||||
msgstr "Extraire les messages devant être traduit"
|
msgstr "Extraire les messages devant être traduit"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:141
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:149
|
||||||
msgid "This command could be used to generate/update lang/messages.pot file."
|
msgid "This command could be used to generate/update lang/messages.pot file."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Cette commande peut-être utilisée pour générer/mettre à jour le fichier lang/"
|
"Cette commande peut-être utilisée pour générer/mettre à jour le fichier lang/"
|
||||||
"messages.pot."
|
"messages.pot."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:159
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:167
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Compendium file %s not found."
|
msgid "Compendium file %s not found."
|
||||||
msgstr "Fichier compendium %s introuvable."
|
msgstr "Fichier compendium %s introuvable."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:171
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:179
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "POT file not found (%s). Please run extract_messages first."
|
msgid "POT file not found (%s). Please run extract_messages first."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Fichier POT introuvable (%s). Merci de lancer la commande extract_messages "
|
"Fichier POT introuvable (%s). Merci de lancer la commande extract_messages "
|
||||||
"pour commencer."
|
"pour commencer."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:186
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:194
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:325
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:333
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Lang directory '%s' found"
|
msgid "Lang directory '%s' found"
|
||||||
msgstr "Dossier de langue '%s' trouvé"
|
msgstr "Dossier de langue '%s' trouvé"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:193
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:201
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:332
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:340
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "LC_MESSAGES directory not found in lang '%s' directory, ignore it."
|
msgid "LC_MESSAGES directory not found in lang '%s' directory, ignore it."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Le dossier LC_MESSAGES est introuvable dans le dossier de langue '%s', on "
|
"Le dossier LC_MESSAGES est introuvable dans le dossier de langue '%s', on "
|
||||||
"l'ignore."
|
"l'ignore."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:210
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:218
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Fail to init messages in %s PO file using msginit (%s)."
|
msgid "Fail to init messages in %s PO file using msginit (%s)."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Impossible d'initialiser les messages dans le fichier PO %s en utilisant "
|
"Impossible d'initialiser les messages dans le fichier PO %s en utilisant "
|
||||||
"msginit (%s)."
|
"msginit (%s)."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:230
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:238
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Fail to update messages in %s PO file using msgmerge (%s)."
|
msgid "Fail to update messages in %s PO file using msgmerge (%s)."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Impossible de mettre à jour les messages dans les fichiers PO %s en "
|
"Impossible de mettre à jour les messages dans les fichiers PO %s en "
|
||||||
"utilisant msgmerge (%s)."
|
"utilisant msgmerge (%s)."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:238
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:246
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:342
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:350
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "PO file not found in lang '%s' directory, ignore it."
|
msgid "PO file not found in lang '%s' directory, ignore it."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Le fichier PO est introuvable dans le dossier de langue '%s', on l'ignore."
|
"Le fichier PO est introuvable dans le dossier de langue '%s', on l'ignore."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:247
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:255
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:390
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:398
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Fail to open root lang directory (%s)."
|
msgid "Fail to open root lang directory (%s)."
|
||||||
msgstr "Impossible d'ouvrir le dossier racine des langues (%s)."
|
msgstr "Impossible d'ouvrir le dossier racine des langues (%s)."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:252
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:260
|
||||||
msgid "Update messages in translation PO lang files"
|
msgid "Update messages in translation PO lang files"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Mettre à jour les messages dans les fichiers de traduction PO existants"
|
"Mettre à jour les messages dans les fichiers de traduction PO existants"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:254
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:262
|
||||||
msgid ""
|
msgid ""
|
||||||
"This command could be used to init/update PO files in lang/*/LC_MESSAGES "
|
"This command could be used to init/update PO files in lang/*/LC_MESSAGES "
|
||||||
"directories."
|
"directories."
|
||||||
|
@ -270,28 +270,28 @@ msgstr ""
|
||||||
"Cette commande peut-être utilisée pour initialiser/mettre à jour les "
|
"Cette commande peut-être utilisée pour initialiser/mettre à jour les "
|
||||||
"fichiers PO les dossiers lang/*/LC_MESSAGES."
|
"fichiers PO les dossiers lang/*/LC_MESSAGES."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:281
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:289
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Lang alias symlink found: %s -> %s"
|
msgid "Lang alias symlink found: %s -> %s"
|
||||||
msgstr "Lien symbolique d'alias de langue trouvé : %s -> %s"
|
msgstr "Lien symbolique d'alias de langue trouvé : %s -> %s"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:291
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:299
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "JSON catalog symlink for %s -> %s created (%s)"
|
msgid "JSON catalog symlink for %s -> %s created (%s)"
|
||||||
msgstr "Lien symbolique de catalogue JSON pour %s -> %s créé (%s)"
|
msgstr "Lien symbolique de catalogue JSON pour %s -> %s créé (%s)"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:299
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:307
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Fail to create JSON catalog symlink for %s -> %s (%s)"
|
msgid "Fail to create JSON catalog symlink for %s -> %s (%s)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Impossible de créer le lien symbolique de catalogue JSON pour %s -> %s (%s)"
|
"Impossible de créer le lien symbolique de catalogue JSON pour %s -> %s (%s)"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:309
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:317
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "JSON catalog symlink for %s -> %s already exist (%s)"
|
msgid "JSON catalog symlink for %s -> %s already exist (%s)"
|
||||||
msgstr "Le lien symbolique du catalogue JSON pour %s -> %s existe déjà (%s)"
|
msgstr "Le lien symbolique du catalogue JSON pour %s -> %s existe déjà (%s)"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:317
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:325
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"JSON catalog file for %s already exist, but it's not a symlink to %s (%s)"
|
"JSON catalog file for %s already exist, but it's not a symlink to %s (%s)"
|
||||||
|
@ -299,29 +299,29 @@ msgstr ""
|
||||||
"Le catalogue JSON pour %s existe, mais il ne s'agit par d'un lien symbolique "
|
"Le catalogue JSON pour %s existe, mais il ne s'agit par d'un lien symbolique "
|
||||||
"vers %s (%s)"
|
"vers %s (%s)"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:356
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:364
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Fail to compile messages from %s PO file as MO file using msgfmt (%s)."
|
msgid "Fail to compile messages from %s PO file as MO file using msgfmt (%s)."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Impossible de compiler les messages depuis le fichier PO %s en tant que "
|
"Impossible de compiler les messages depuis le fichier PO %s en tant que "
|
||||||
"fichier MO en utilisant msgfmt (%s)."
|
"fichier MO en utilisant msgfmt (%s)."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:367
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:375
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Fail to open %s JSON catalog file in write mode (%s)."
|
msgid "Fail to open %s JSON catalog file in write mode (%s)."
|
||||||
msgstr "Impossible d'ouvrir le catalogue JSON %s en mode écriture (%s)."
|
msgstr "Impossible d'ouvrir le catalogue JSON %s en mode écriture (%s)."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:374
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:382
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Fail to write %s JSON catalog in file (%s)."
|
msgid "Fail to write %s JSON catalog in file (%s)."
|
||||||
msgstr "Impossible d'écrire le fichier du catalogue JSON %s (%s)."
|
msgstr "Impossible d'écrire le fichier du catalogue JSON %s (%s)."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:381
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:389
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s JSON catalog writed (%s)."
|
msgid "%s JSON catalog writed (%s)."
|
||||||
msgstr "Catalogue JSON %s créé (%s)."
|
msgstr "Catalogue JSON %s créé (%s)."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:396
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:404
|
||||||
msgid ""
|
msgid ""
|
||||||
"Compile messages from existing translation PO lang files to corresponding MO "
|
"Compile messages from existing translation PO lang files to corresponding MO "
|
||||||
"files and JSON catalogs"
|
"files and JSON catalogs"
|
||||||
|
@ -329,7 +329,7 @@ msgstr ""
|
||||||
"Compiler les messages depuis les fichiers PO de traduction existants vers "
|
"Compiler les messages depuis les fichiers PO de traduction existants vers "
|
||||||
"les fichiers MO et les catalogues JSON correspondant"
|
"les fichiers MO et les catalogues JSON correspondant"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:401
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:409
|
||||||
msgid ""
|
msgid ""
|
||||||
"This command could be used to compile PO files in lang/*/LC_MESSAGES "
|
"This command could be used to compile PO files in lang/*/LC_MESSAGES "
|
||||||
"directories to MO files and as JSON catalogs in public_html/translations."
|
"directories to MO files and as JSON catalogs in public_html/translations."
|
||||||
|
@ -338,7 +338,7 @@ msgstr ""
|
||||||
"dossiers lang/*/LC_MESSAGES en fichiers MO and en tant que catalogues JSON "
|
"dossiers lang/*/LC_MESSAGES en fichiers MO and en tant que catalogues JSON "
|
||||||
"dans public_html/translations."
|
"dans public_html/translations."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/mail.php:12
|
#: /home/brenard/dev/eesyphp/includes/mail.php:14
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"\n"
|
"\n"
|
||||||
|
@ -351,11 +351,11 @@ msgstr ""
|
||||||
"\n"
|
"\n"
|
||||||
"Mail originalement destiné à %s."
|
"Mail originalement destiné à %s."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url.php:86
|
#: /home/brenard/dev/eesyphp/includes/url.php:92
|
||||||
msgid "Whoops ! Page not found"
|
msgid "Whoops ! Page not found"
|
||||||
msgstr "Oups ! Page introuvable"
|
msgstr "Oups ! Page introuvable"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url.php:109
|
#: /home/brenard/dev/eesyphp/includes/url.php:117
|
||||||
msgid ""
|
msgid ""
|
||||||
"Unable to determine the requested page. If the problem persists, please "
|
"Unable to determine the requested page. If the problem persists, please "
|
||||||
"contact support."
|
"contact support."
|
||||||
|
@ -363,7 +363,7 @@ msgstr ""
|
||||||
"Impossible de déterminer la page demandée. Si le problème persiste, merci de "
|
"Impossible de déterminer la page demandée. Si le problème persiste, merci de "
|
||||||
"prendre contact avec le support."
|
"prendre contact avec le support."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url.php:247
|
#: /home/brenard/dev/eesyphp/includes/url.php:270
|
||||||
msgid ""
|
msgid ""
|
||||||
"Unable to determine the requested page (loop detected). If the problem "
|
"Unable to determine the requested page (loop detected). If the problem "
|
||||||
"persists, please contact support."
|
"persists, please contact support."
|
||||||
|
@ -371,54 +371,54 @@ msgstr ""
|
||||||
"Impossible de déterminer la page demandée (boucle détectée). Si le problème "
|
"Impossible de déterminer la page demandée (boucle détectée). Si le problème "
|
||||||
"persiste, merci de prendre contact avec le support."
|
"persiste, merci de prendre contact avec le support."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url.php:271
|
#: /home/brenard/dev/eesyphp/includes/url.php:295
|
||||||
msgid "This request cannot be processed."
|
msgid "This request cannot be processed."
|
||||||
msgstr "Cette requête ne peut être traitée."
|
msgstr "Cette requête ne peut être traitée."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url.php:288
|
#: /home/brenard/dev/eesyphp/includes/url.php:313
|
||||||
msgid "This request could not be processed correctly."
|
msgid "This request could not be processed correctly."
|
||||||
msgstr "Cette requête n'a put être traitée correctement."
|
msgstr "Cette requête n'a put être traitée correctement."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:7
|
#: /home/brenard/dev/eesyphp/includes/cli.php:8
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "The CLI command '%s' already exists."
|
msgid "The CLI command '%s' already exists."
|
||||||
msgstr "La commande CLI '%s' n'existe pas."
|
msgstr "La commande CLI '%s' n'existe pas."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:12
|
#: /home/brenard/dev/eesyphp/includes/cli.php:13
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "The CLI command '%s' handler is not callable !"
|
msgid "The CLI command '%s' handler is not callable !"
|
||||||
msgstr "La fonction implémentant la commande CLI '%s' n'est pas exécutable !"
|
msgstr "La fonction implémentant la commande CLI '%s' n'est pas exécutable !"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:45
|
#: /home/brenard/dev/eesyphp/includes/cli.php:46
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Usage: %s [-h] [-qd] command\n"
|
msgid "Usage: %s [-h] [-qd] command\n"
|
||||||
msgstr "Utilisation: %s [-h] [-qd] commande\n"
|
msgstr "Utilisation: %s [-h] [-qd] commande\n"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:46
|
#: /home/brenard/dev/eesyphp/includes/cli.php:47
|
||||||
msgid " -h Show this message\n"
|
msgid " -h Show this message\n"
|
||||||
msgstr " -h Affiche ce message\n"
|
msgstr " -h Affiche ce message\n"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:47
|
#: /home/brenard/dev/eesyphp/includes/cli.php:48
|
||||||
msgid " -q / -d Quiet/Debug mode\n"
|
msgid " -q / -d Quiet/Debug mode\n"
|
||||||
msgstr " -q / -d Mode silencieux/debug\n"
|
msgstr " -q / -d Mode silencieux/debug\n"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:48
|
#: /home/brenard/dev/eesyphp/includes/cli.php:49
|
||||||
msgid " --trace Trace mode (the most verbose)\n"
|
msgid " --trace Trace mode (the most verbose)\n"
|
||||||
msgstr " --trace Mode trace (le plus verbeux)\n"
|
msgstr " --trace Mode trace (le plus verbeux)\n"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:49
|
#: /home/brenard/dev/eesyphp/includes/cli.php:50
|
||||||
msgid " command Command to run\n"
|
msgid " command Command to run\n"
|
||||||
msgstr " command La commande à exécuter\n"
|
msgstr " command La commande à exécuter\n"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:51
|
#: /home/brenard/dev/eesyphp/includes/cli.php:52
|
||||||
msgid "Available commands:\n"
|
msgid "Available commands:\n"
|
||||||
msgstr "Commandes disponibles:\n"
|
msgstr "Commandes disponibles:\n"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:86
|
#: /home/brenard/dev/eesyphp/includes/cli.php:94
|
||||||
msgid "Only one command could be executed !"
|
msgid "Only one command could be executed !"
|
||||||
msgstr "Une seul commande peut-être exécutée !"
|
msgstr "Une seul commande peut-être exécutée !"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:110
|
#: /home/brenard/dev/eesyphp/includes/cli.php:119
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Invalid parameter \"%s\".\n"
|
"Invalid parameter \"%s\".\n"
|
||||||
|
@ -428,150 +428,150 @@ msgstr ""
|
||||||
"Note : Les paramètres/arguments de la requête doivent être placés après "
|
"Note : Les paramètres/arguments de la requête doivent être placés après "
|
||||||
"celle-ci."
|
"celle-ci."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:127
|
#: /home/brenard/dev/eesyphp/includes/cli.php:144
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "An exception occured running command %s"
|
msgid "An exception occured running command %s"
|
||||||
msgstr "Une exception est survenue en exécutant la commande %s"
|
msgstr "Une exception est survenue en exécutant la commande %s"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:133
|
#: /home/brenard/dev/eesyphp/includes/cli.php:150
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Item #%s:\n"
|
msgid "Item #%s:\n"
|
||||||
msgstr "Élément #%s :\n"
|
msgstr "Élément #%s :\n"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:134
|
#: /home/brenard/dev/eesyphp/includes/cli.php:151
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "ID: %s"
|
msgid "ID: %s"
|
||||||
msgstr "ID : %s"
|
msgstr "ID : %s"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:135
|
#: /home/brenard/dev/eesyphp/includes/cli.php:152
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Name: '%s'"
|
msgid "Name: '%s'"
|
||||||
msgstr "Nom : %s"
|
msgstr "Nom : %s"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:136
|
#: /home/brenard/dev/eesyphp/includes/cli.php:153
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Date: %s"
|
msgid "Date: %s"
|
||||||
msgstr "Date : %s"
|
msgstr "Date : %s"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:137
|
#: /home/brenard/dev/eesyphp/includes/cli.php:155
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Description: %s"
|
msgid "Description: %s"
|
||||||
msgstr "Description : %s"
|
msgstr "Description : %s"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:137
|
#: /home/brenard/dev/eesyphp/includes/cli.php:156
|
||||||
msgid "Not set"
|
msgid "Not set"
|
||||||
msgstr "Non-défini"
|
msgstr "Non-défini"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:138
|
#: /home/brenard/dev/eesyphp/includes/cli.php:158
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Status: %s"
|
msgid "Status: %s"
|
||||||
msgstr "Statut : %s"
|
msgstr "Statut : %s"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:191
|
#: /home/brenard/dev/eesyphp/includes/cli.php:211
|
||||||
msgid "No item.\n"
|
msgid "No item.\n"
|
||||||
msgstr "Aucun élément.\n"
|
msgstr "Aucun élément.\n"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:217
|
#: /home/brenard/dev/eesyphp/includes/cli.php:237
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%d item(s)"
|
msgid "%d item(s)"
|
||||||
msgstr "%d élément(s)"
|
msgstr "%d élément(s)"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:223
|
#: /home/brenard/dev/eesyphp/includes/cli.php:243
|
||||||
msgid "List/search items"
|
msgid "List/search items"
|
||||||
msgstr "Lister/rechercher les éléments"
|
msgstr "Lister/rechercher les éléments"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:224
|
#: /home/brenard/dev/eesyphp/includes/cli.php:244
|
||||||
msgid "[patterns]"
|
msgid "[patterns]"
|
||||||
msgstr "[mots clés]"
|
msgstr "[mots clés]"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:226
|
#: /home/brenard/dev/eesyphp/includes/cli.php:246
|
||||||
msgid "-o|--orderby Ordering list criterion. Possible values:"
|
msgid "-o|--orderby Ordering list criterion. Possible values:"
|
||||||
msgstr "-o|--orderby Critère de tri de la liste. Valeurs possibles :"
|
msgstr "-o|--orderby Critère de tri de la liste. Valeurs possibles :"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:228
|
#: /home/brenard/dev/eesyphp/includes/cli.php:248
|
||||||
msgid "-r|--reverse Reverse order"
|
msgid "-r|--reverse Reverse order"
|
||||||
msgstr "-r|--reverse Ordre inverse"
|
msgstr "-r|--reverse Ordre inverse"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:229
|
#: /home/brenard/dev/eesyphp/includes/cli.php:249
|
||||||
msgid "-s|--status Filter on status. Possible values:"
|
msgid "-s|--status Filter on status. Possible values:"
|
||||||
msgstr "-s|--status Filtrer sur le statut. Valeurs possibles :"
|
msgstr "-s|--status Filtrer sur le statut. Valeurs possibles :"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:236
|
#: /home/brenard/dev/eesyphp/includes/cli.php:256
|
||||||
msgid "You must provide a valid ID."
|
msgid "You must provide a valid ID."
|
||||||
msgstr "Vous devez fournir un ID valide."
|
msgstr "Vous devez fournir un ID valide."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:242
|
#: /home/brenard/dev/eesyphp/includes/cli.php:262
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:266
|
#: /home/brenard/dev/eesyphp/includes/cli.php:286
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Item #%s not found."
|
msgid "Item #%s not found."
|
||||||
msgstr "Élément #%s introuvable."
|
msgstr "Élément #%s introuvable."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:250
|
#: /home/brenard/dev/eesyphp/includes/cli.php:270
|
||||||
msgid "Show item"
|
msgid "Show item"
|
||||||
msgstr "Voir un élément"
|
msgstr "Voir un élément"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:251
|
#: /home/brenard/dev/eesyphp/includes/cli.php:271
|
||||||
msgid "[ID]"
|
msgid "[ID]"
|
||||||
msgstr "[ID]"
|
msgstr "[ID]"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:256
|
#: /home/brenard/dev/eesyphp/includes/cli.php:276
|
||||||
msgid "You must provide item ID."
|
msgid "You must provide item ID."
|
||||||
msgstr "Vous devez fournir un ID valide."
|
msgstr "Vous devez fournir un ID valide."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:260
|
#: /home/brenard/dev/eesyphp/includes/cli.php:280
|
||||||
msgid "Invalid item ID"
|
msgid "Invalid item ID"
|
||||||
msgstr "ID d'élément invalide"
|
msgstr "ID d'élément invalide"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:271
|
#: /home/brenard/dev/eesyphp/includes/cli.php:291
|
||||||
msgid "Are you sure you want to delete this item? Type 'yes' to continue: "
|
msgid "Are you sure you want to delete this item? Type 'yes' to continue: "
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Êtes-vous sûre de vouloir supprimer cet élément ? Taper 'yes' pour "
|
"Êtes-vous sûre de vouloir supprimer cet élément ? Taper 'yes' pour "
|
||||||
"continuer : "
|
"continuer : "
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:275
|
#: /home/brenard/dev/eesyphp/includes/cli.php:295
|
||||||
msgid "User cancel"
|
msgid "User cancel"
|
||||||
msgstr "L'utilisateur a annulé"
|
msgstr "L'utilisateur a annulé"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:281
|
#: /home/brenard/dev/eesyphp/includes/cli.php:301
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "An error occured deleting item #%d."
|
msgid "An error occured deleting item #%d."
|
||||||
msgstr "Une erreur est survenue en supprimant l'élément #%d."
|
msgstr "Une erreur est survenue en supprimant l'élément #%d."
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:288
|
#: /home/brenard/dev/eesyphp/includes/cli.php:308
|
||||||
msgid "Delete item"
|
msgid "Delete item"
|
||||||
msgstr "Supprimer un élément"
|
msgstr "Supprimer un élément"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:289
|
#: /home/brenard/dev/eesyphp/includes/cli.php:309
|
||||||
msgid "[item ID]"
|
msgid "[item ID]"
|
||||||
msgstr "[ID de l'élément]"
|
msgstr "[ID de l'élément]"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:301
|
#: /home/brenard/dev/eesyphp/includes/cli.php:321
|
||||||
msgid "Export items (as CSV)"
|
msgid "Export items (as CSV)"
|
||||||
msgstr "Exporter les éléments (au format CSV)"
|
msgstr "Exporter les éléments (au format CSV)"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:302
|
#: /home/brenard/dev/eesyphp/includes/cli.php:322
|
||||||
msgid "[output file path]"
|
msgid "[output file path]"
|
||||||
msgstr "[chemin du fichier de sortie]"
|
msgstr "[chemin du fichier de sortie]"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:314
|
#: /home/brenard/dev/eesyphp/includes/cli.php:337
|
||||||
msgid "Restore items (from CSV)"
|
msgid "Restore items (from CSV)"
|
||||||
msgstr "Restaurer les éléments (depuis un fichier CSV)"
|
msgstr "Restaurer les éléments (depuis un fichier CSV)"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:315
|
#: /home/brenard/dev/eesyphp/includes/cli.php:338
|
||||||
msgid "[input file path]"
|
msgid "[input file path]"
|
||||||
msgstr "[chemin du fichier d'entrée]"
|
msgstr "[chemin du fichier d'entrée]"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:374
|
#: /home/brenard/dev/eesyphp/includes/cli.php:411
|
||||||
msgid "Cron to handle item expiration"
|
msgid "Cron to handle item expiration"
|
||||||
msgstr "Cron gérant l'expiration des éléments"
|
msgstr "Cron gérant l'expiration des éléments"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:377
|
#: /home/brenard/dev/eesyphp/includes/cli.php:414
|
||||||
msgid "-j/--just-try Just-try mode : do not really removed expired item(s)"
|
msgid "-j/--just-try Just-try mode : do not really removed expired item(s)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"-j/--just-try Mode just-try : Ne supprime pas réellement les éléments "
|
"-j/--just-try Mode just-try : Ne supprime pas réellement les éléments "
|
||||||
"expirés"
|
"expirés"
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:378
|
#: /home/brenard/dev/eesyphp/includes/cli.php:415
|
||||||
msgid "-m/--max-age Item expiration limit (in days, optional)"
|
msgid "-m/--max-age Item expiration limit (in days, optional)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"-m/--max-age Limite d'expiration des éléments (en secondes, optionnel)"
|
"-m/--max-age Limite d'expiration des éléments (en secondes, optionnel)"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"POT-Creation-Date: 2022-04-24 16:47+0200\n"
|
"POT-Creation-Date: 2022-04-24 17:42+0200\n"
|
||||||
"PO-Revision-Date: 2022-04-24 16:47+0200\n"
|
"PO-Revision-Date: 2022-04-24 17:42+0200\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=utf-8\n"
|
"Content-Type: text/plain; charset=utf-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
|
@ -1,7 +1,7 @@
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"POT-Creation-Date: 2022-04-24 16:47+0200\n"
|
"POT-Creation-Date: 2022-04-24 17:42+0200\n"
|
||||||
"PO-Revision-Date: 2022-04-24 16:47+0200\n"
|
"PO-Revision-Date: 2022-04-24 17:42+0200\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
@ -11,8 +11,8 @@ msgid "Invalid element identifier."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-helpers.php:9
|
#: /home/brenard/dev/eesyphp/includes/url-helpers.php:9
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:205
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:219
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:229
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:245
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Item #% s not found."
|
msgid "Item #% s not found."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -34,100 +34,100 @@ msgstr ""
|
||||||
msgid "Hello world !"
|
msgid "Hello world !"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:27
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:31
|
||||||
msgid "Any"
|
msgid "Any"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:84
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:89
|
||||||
msgid ""
|
msgid ""
|
||||||
"An error occurred while listing the items. If the problem persists, please "
|
"An error occurred while listing the items. If the problem persists, please "
|
||||||
"contact support."
|
"contact support."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:97
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:104
|
||||||
msgid "Search"
|
msgid "Search"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:120
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:129
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Element %s"
|
msgid "Element %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:132
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:142
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "The element '% s' has been created."
|
msgid "The element '% s' has been created."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:136
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:146
|
||||||
msgid "An error occurred while saving this item."
|
msgid "An error occurred while saving this item."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:142
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:153
|
||||||
msgid ""
|
msgid ""
|
||||||
"There are errors preventing this item from being saved. Please correct them "
|
"There are errors preventing this item from being saved. Please correct them "
|
||||||
"before attempting to add this item."
|
"before attempting to add this item."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:148
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:160
|
||||||
msgid "New"
|
msgid "New"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:158
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:170
|
||||||
msgid "You cannot edit this item."
|
msgid "You cannot edit this item."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:171
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:183
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "You have not made any changes to element '% s'."
|
msgid "You have not made any changes to element '% s'."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:175
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:187
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "The element '% s' has been updated successfully."
|
msgid "The element '% s' has been updated successfully."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:179
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:191
|
||||||
msgid "An error occurred while updating this item."
|
msgid "An error occurred while updating this item."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:186
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:199
|
||||||
msgid ""
|
msgid ""
|
||||||
"There are errors preventing this item from being saved. Please correct them "
|
"There are errors preventing this item from being saved. Please correct them "
|
||||||
"before attempting to save your changes."
|
"before attempting to save your changes."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:196
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:210
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Element %s: Modification"
|
msgid "Element %s: Modification"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:209
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:223
|
||||||
msgid "This item is already archived."
|
msgid "This item is already archived."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:212
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:226
|
||||||
msgid "You cannot archive this item."
|
msgid "You cannot archive this item."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:215
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:230
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "The element '% s' has been archived successfully."
|
msgid "The element '% s' has been archived successfully."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:218
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:234
|
||||||
msgid "An error occurred while archiving this item."
|
msgid "An error occurred while archiving this item."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:232
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:248
|
||||||
msgid "You cannot delete this item."
|
msgid "You cannot delete this item."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:235
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:252
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "The element '% s' has been deleted successfully."
|
msgid "The element '% s' has been deleted successfully."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:238
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:256
|
||||||
msgid "An error occurred while deleting this item."
|
msgid "An error occurred while deleting this item."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -151,152 +151,152 @@ msgstr ""
|
||||||
msgid "Archived"
|
msgid "Archived"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:51
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:59
|
||||||
msgid "Fail to list PHP files."
|
msgid "Fail to list PHP files."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:68
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:76
|
||||||
msgid "Fail to extract messages from PHP files using xgettext."
|
msgid "Fail to extract messages from PHP files using xgettext."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:78
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:86
|
||||||
msgid "Fail to list JS files."
|
msgid "Fail to list JS files."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:95
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:103
|
||||||
msgid "Fail to extract messages from JS files using xgettext."
|
msgid "Fail to extract messages from JS files using xgettext."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:108
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:116
|
||||||
msgid ""
|
msgid ""
|
||||||
"Fail to extract messages from template files using tsmarty2c.php script."
|
"Fail to extract messages from template files using tsmarty2c.php script."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:134
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:142
|
||||||
msgid "Fail to merge messages using msgcat."
|
msgid "Fail to merge messages using msgcat."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:139
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:147
|
||||||
msgid "Extract messages that need to be translated"
|
msgid "Extract messages that need to be translated"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:141
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:149
|
||||||
msgid "This command could be used to generate/update lang/messages.pot file."
|
msgid "This command could be used to generate/update lang/messages.pot file."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:159
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:167
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Compendium file %s not found."
|
msgid "Compendium file %s not found."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:171
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:179
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "POT file not found (%s). Please run extract_messages first."
|
msgid "POT file not found (%s). Please run extract_messages first."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:186
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:194
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:325
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:333
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Lang directory '%s' found"
|
msgid "Lang directory '%s' found"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:193
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:201
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:332
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:340
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "LC_MESSAGES directory not found in lang '%s' directory, ignore it."
|
msgid "LC_MESSAGES directory not found in lang '%s' directory, ignore it."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:210
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:218
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Fail to init messages in %s PO file using msginit (%s)."
|
msgid "Fail to init messages in %s PO file using msginit (%s)."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:230
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:238
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Fail to update messages in %s PO file using msgmerge (%s)."
|
msgid "Fail to update messages in %s PO file using msgmerge (%s)."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:238
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:246
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:342
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:350
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "PO file not found in lang '%s' directory, ignore it."
|
msgid "PO file not found in lang '%s' directory, ignore it."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:247
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:255
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:390
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:398
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Fail to open root lang directory (%s)."
|
msgid "Fail to open root lang directory (%s)."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:252
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:260
|
||||||
msgid "Update messages in translation PO lang files"
|
msgid "Update messages in translation PO lang files"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:254
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:262
|
||||||
msgid ""
|
msgid ""
|
||||||
"This command could be used to init/update PO files in lang/*/LC_MESSAGES "
|
"This command could be used to init/update PO files in lang/*/LC_MESSAGES "
|
||||||
"directories."
|
"directories."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:281
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:289
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Lang alias symlink found: %s -> %s"
|
msgid "Lang alias symlink found: %s -> %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:291
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:299
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "JSON catalog symlink for %s -> %s created (%s)"
|
msgid "JSON catalog symlink for %s -> %s created (%s)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:299
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:307
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Fail to create JSON catalog symlink for %s -> %s (%s)"
|
msgid "Fail to create JSON catalog symlink for %s -> %s (%s)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:309
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:317
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "JSON catalog symlink for %s -> %s already exist (%s)"
|
msgid "JSON catalog symlink for %s -> %s already exist (%s)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:317
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:325
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"JSON catalog file for %s already exist, but it's not a symlink to %s (%s)"
|
"JSON catalog file for %s already exist, but it's not a symlink to %s (%s)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:356
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:364
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Fail to compile messages from %s PO file as MO file using msgfmt (%s)."
|
msgid "Fail to compile messages from %s PO file as MO file using msgfmt (%s)."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:367
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:375
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Fail to open %s JSON catalog file in write mode (%s)."
|
msgid "Fail to open %s JSON catalog file in write mode (%s)."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:374
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:382
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Fail to write %s JSON catalog in file (%s)."
|
msgid "Fail to write %s JSON catalog in file (%s)."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:381
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:389
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s JSON catalog writed (%s)."
|
msgid "%s JSON catalog writed (%s)."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:396
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:404
|
||||||
msgid ""
|
msgid ""
|
||||||
"Compile messages from existing translation PO lang files to corresponding MO "
|
"Compile messages from existing translation PO lang files to corresponding MO "
|
||||||
"files and JSON catalogs"
|
"files and JSON catalogs"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:401
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:409
|
||||||
msgid ""
|
msgid ""
|
||||||
"This command could be used to compile PO files in lang/*/LC_MESSAGES "
|
"This command could be used to compile PO files in lang/*/LC_MESSAGES "
|
||||||
"directories to MO files and as JSON catalogs in public_html/translations."
|
"directories to MO files and as JSON catalogs in public_html/translations."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/mail.php:12
|
#: /home/brenard/dev/eesyphp/includes/mail.php:14
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"\n"
|
"\n"
|
||||||
|
@ -305,216 +305,216 @@ msgid ""
|
||||||
"Mail initialy intended for %s."
|
"Mail initialy intended for %s."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url.php:86
|
#: /home/brenard/dev/eesyphp/includes/url.php:92
|
||||||
msgid "Whoops ! Page not found"
|
msgid "Whoops ! Page not found"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url.php:109
|
#: /home/brenard/dev/eesyphp/includes/url.php:117
|
||||||
msgid ""
|
msgid ""
|
||||||
"Unable to determine the requested page. If the problem persists, please "
|
"Unable to determine the requested page. If the problem persists, please "
|
||||||
"contact support."
|
"contact support."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url.php:247
|
#: /home/brenard/dev/eesyphp/includes/url.php:270
|
||||||
msgid ""
|
msgid ""
|
||||||
"Unable to determine the requested page (loop detected). If the problem "
|
"Unable to determine the requested page (loop detected). If the problem "
|
||||||
"persists, please contact support."
|
"persists, please contact support."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url.php:271
|
#: /home/brenard/dev/eesyphp/includes/url.php:295
|
||||||
msgid "This request cannot be processed."
|
msgid "This request cannot be processed."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url.php:288
|
#: /home/brenard/dev/eesyphp/includes/url.php:313
|
||||||
msgid "This request could not be processed correctly."
|
msgid "This request could not be processed correctly."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:7
|
#: /home/brenard/dev/eesyphp/includes/cli.php:8
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "The CLI command '%s' already exists."
|
msgid "The CLI command '%s' already exists."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:12
|
#: /home/brenard/dev/eesyphp/includes/cli.php:13
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "The CLI command '%s' handler is not callable !"
|
msgid "The CLI command '%s' handler is not callable !"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:45
|
#: /home/brenard/dev/eesyphp/includes/cli.php:46
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Usage: %s [-h] [-qd] command\n"
|
msgid "Usage: %s [-h] [-qd] command\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:46
|
#: /home/brenard/dev/eesyphp/includes/cli.php:47
|
||||||
msgid " -h Show this message\n"
|
msgid " -h Show this message\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:47
|
#: /home/brenard/dev/eesyphp/includes/cli.php:48
|
||||||
msgid " -q / -d Quiet/Debug mode\n"
|
msgid " -q / -d Quiet/Debug mode\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:48
|
#: /home/brenard/dev/eesyphp/includes/cli.php:49
|
||||||
msgid " --trace Trace mode (the most verbose)\n"
|
msgid " --trace Trace mode (the most verbose)\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:49
|
#: /home/brenard/dev/eesyphp/includes/cli.php:50
|
||||||
msgid " command Command to run\n"
|
msgid " command Command to run\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:51
|
#: /home/brenard/dev/eesyphp/includes/cli.php:52
|
||||||
msgid "Available commands:\n"
|
msgid "Available commands:\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:86
|
#: /home/brenard/dev/eesyphp/includes/cli.php:94
|
||||||
msgid "Only one command could be executed !"
|
msgid "Only one command could be executed !"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:110
|
#: /home/brenard/dev/eesyphp/includes/cli.php:119
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Invalid parameter \"%s\".\n"
|
"Invalid parameter \"%s\".\n"
|
||||||
"Note: Command's parameter/argument must be place after the command."
|
"Note: Command's parameter/argument must be place after the command."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:127
|
#: /home/brenard/dev/eesyphp/includes/cli.php:144
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "An exception occured running command %s"
|
msgid "An exception occured running command %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:133
|
#: /home/brenard/dev/eesyphp/includes/cli.php:150
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Item #%s:\n"
|
msgid "Item #%s:\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:134
|
#: /home/brenard/dev/eesyphp/includes/cli.php:151
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "ID: %s"
|
msgid "ID: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:135
|
#: /home/brenard/dev/eesyphp/includes/cli.php:152
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Name: '%s'"
|
msgid "Name: '%s'"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:136
|
#: /home/brenard/dev/eesyphp/includes/cli.php:153
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Date: %s"
|
msgid "Date: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:137
|
#: /home/brenard/dev/eesyphp/includes/cli.php:155
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Description: %s"
|
msgid "Description: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:137
|
#: /home/brenard/dev/eesyphp/includes/cli.php:156
|
||||||
msgid "Not set"
|
msgid "Not set"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:138
|
#: /home/brenard/dev/eesyphp/includes/cli.php:158
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Status: %s"
|
msgid "Status: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:191
|
#: /home/brenard/dev/eesyphp/includes/cli.php:211
|
||||||
msgid "No item.\n"
|
msgid "No item.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:217
|
#: /home/brenard/dev/eesyphp/includes/cli.php:237
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%d item(s)"
|
msgid "%d item(s)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:223
|
#: /home/brenard/dev/eesyphp/includes/cli.php:243
|
||||||
msgid "List/search items"
|
msgid "List/search items"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:224
|
#: /home/brenard/dev/eesyphp/includes/cli.php:244
|
||||||
msgid "[patterns]"
|
msgid "[patterns]"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:226
|
#: /home/brenard/dev/eesyphp/includes/cli.php:246
|
||||||
msgid "-o|--orderby Ordering list criterion. Possible values:"
|
msgid "-o|--orderby Ordering list criterion. Possible values:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:228
|
#: /home/brenard/dev/eesyphp/includes/cli.php:248
|
||||||
msgid "-r|--reverse Reverse order"
|
msgid "-r|--reverse Reverse order"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:229
|
#: /home/brenard/dev/eesyphp/includes/cli.php:249
|
||||||
msgid "-s|--status Filter on status. Possible values:"
|
msgid "-s|--status Filter on status. Possible values:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:236
|
#: /home/brenard/dev/eesyphp/includes/cli.php:256
|
||||||
msgid "You must provide a valid ID."
|
msgid "You must provide a valid ID."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:242
|
#: /home/brenard/dev/eesyphp/includes/cli.php:262
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:266
|
#: /home/brenard/dev/eesyphp/includes/cli.php:286
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Item #%s not found."
|
msgid "Item #%s not found."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:250
|
#: /home/brenard/dev/eesyphp/includes/cli.php:270
|
||||||
msgid "Show item"
|
msgid "Show item"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:251
|
#: /home/brenard/dev/eesyphp/includes/cli.php:271
|
||||||
msgid "[ID]"
|
msgid "[ID]"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:256
|
#: /home/brenard/dev/eesyphp/includes/cli.php:276
|
||||||
msgid "You must provide item ID."
|
msgid "You must provide item ID."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:260
|
#: /home/brenard/dev/eesyphp/includes/cli.php:280
|
||||||
msgid "Invalid item ID"
|
msgid "Invalid item ID"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:271
|
#: /home/brenard/dev/eesyphp/includes/cli.php:291
|
||||||
msgid "Are you sure you want to delete this item? Type 'yes' to continue: "
|
msgid "Are you sure you want to delete this item? Type 'yes' to continue: "
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:275
|
#: /home/brenard/dev/eesyphp/includes/cli.php:295
|
||||||
msgid "User cancel"
|
msgid "User cancel"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:281
|
#: /home/brenard/dev/eesyphp/includes/cli.php:301
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "An error occured deleting item #%d."
|
msgid "An error occured deleting item #%d."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:288
|
#: /home/brenard/dev/eesyphp/includes/cli.php:308
|
||||||
msgid "Delete item"
|
msgid "Delete item"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:289
|
#: /home/brenard/dev/eesyphp/includes/cli.php:309
|
||||||
msgid "[item ID]"
|
msgid "[item ID]"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:301
|
#: /home/brenard/dev/eesyphp/includes/cli.php:321
|
||||||
msgid "Export items (as CSV)"
|
msgid "Export items (as CSV)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:302
|
#: /home/brenard/dev/eesyphp/includes/cli.php:322
|
||||||
msgid "[output file path]"
|
msgid "[output file path]"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:314
|
#: /home/brenard/dev/eesyphp/includes/cli.php:337
|
||||||
msgid "Restore items (from CSV)"
|
msgid "Restore items (from CSV)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:315
|
#: /home/brenard/dev/eesyphp/includes/cli.php:338
|
||||||
msgid "[input file path]"
|
msgid "[input file path]"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:374
|
#: /home/brenard/dev/eesyphp/includes/cli.php:411
|
||||||
msgid "Cron to handle item expiration"
|
msgid "Cron to handle item expiration"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:377
|
#: /home/brenard/dev/eesyphp/includes/cli.php:414
|
||||||
msgid "-j/--just-try Just-try mode : do not really removed expired item(s)"
|
msgid "-j/--just-try Just-try mode : do not really removed expired item(s)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:378
|
#: /home/brenard/dev/eesyphp/includes/cli.php:415
|
||||||
msgid "-m/--max-age Item expiration limit (in days, optional)"
|
msgid "-m/--max-age Item expiration limit (in days, optional)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,8 @@ msgid "Invalid element identifier."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-helpers.php:9
|
#: /home/brenard/dev/eesyphp/includes/url-helpers.php:9
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:205
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:219
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:229
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:245
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Item #% s not found."
|
msgid "Item #% s not found."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -26,100 +26,100 @@ msgstr ""
|
||||||
msgid "Hello world !"
|
msgid "Hello world !"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:27
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:31
|
||||||
msgid "Any"
|
msgid "Any"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:84
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:89
|
||||||
msgid ""
|
msgid ""
|
||||||
"An error occurred while listing the items. If the problem persists, please "
|
"An error occurred while listing the items. If the problem persists, please "
|
||||||
"contact support."
|
"contact support."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:97
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:104
|
||||||
msgid "Search"
|
msgid "Search"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:120
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:129
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Element %s"
|
msgid "Element %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:132
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:142
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "The element '% s' has been created."
|
msgid "The element '% s' has been created."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:136
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:146
|
||||||
msgid "An error occurred while saving this item."
|
msgid "An error occurred while saving this item."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:142
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:153
|
||||||
msgid ""
|
msgid ""
|
||||||
"There are errors preventing this item from being saved. Please correct them "
|
"There are errors preventing this item from being saved. Please correct them "
|
||||||
"before attempting to add this item."
|
"before attempting to add this item."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:148
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:160
|
||||||
msgid "New"
|
msgid "New"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:158
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:170
|
||||||
msgid "You cannot edit this item."
|
msgid "You cannot edit this item."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:171
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:183
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "You have not made any changes to element '% s'."
|
msgid "You have not made any changes to element '% s'."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:175
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:187
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "The element '% s' has been updated successfully."
|
msgid "The element '% s' has been updated successfully."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:179
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:191
|
||||||
msgid "An error occurred while updating this item."
|
msgid "An error occurred while updating this item."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:186
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:199
|
||||||
msgid ""
|
msgid ""
|
||||||
"There are errors preventing this item from being saved. Please correct them "
|
"There are errors preventing this item from being saved. Please correct them "
|
||||||
"before attempting to save your changes."
|
"before attempting to save your changes."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:196
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:210
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Element %s: Modification"
|
msgid "Element %s: Modification"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:209
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:223
|
||||||
msgid "This item is already archived."
|
msgid "This item is already archived."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:212
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:226
|
||||||
msgid "You cannot archive this item."
|
msgid "You cannot archive this item."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:215
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:230
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "The element '% s' has been archived successfully."
|
msgid "The element '% s' has been archived successfully."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:218
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:234
|
||||||
msgid "An error occurred while archiving this item."
|
msgid "An error occurred while archiving this item."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:232
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:248
|
||||||
msgid "You cannot delete this item."
|
msgid "You cannot delete this item."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:235
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:252
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "The element '% s' has been deleted successfully."
|
msgid "The element '% s' has been deleted successfully."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url-public.php:238
|
#: /home/brenard/dev/eesyphp/includes/url-public.php:256
|
||||||
msgid "An error occurred while deleting this item."
|
msgid "An error occurred while deleting this item."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -143,152 +143,152 @@ msgstr ""
|
||||||
msgid "Archived"
|
msgid "Archived"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:51
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:59
|
||||||
msgid "Fail to list PHP files."
|
msgid "Fail to list PHP files."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:68
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:76
|
||||||
msgid "Fail to extract messages from PHP files using xgettext."
|
msgid "Fail to extract messages from PHP files using xgettext."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:78
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:86
|
||||||
msgid "Fail to list JS files."
|
msgid "Fail to list JS files."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:95
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:103
|
||||||
msgid "Fail to extract messages from JS files using xgettext."
|
msgid "Fail to extract messages from JS files using xgettext."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:108
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:116
|
||||||
msgid ""
|
msgid ""
|
||||||
"Fail to extract messages from template files using tsmarty2c.php script."
|
"Fail to extract messages from template files using tsmarty2c.php script."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:134
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:142
|
||||||
msgid "Fail to merge messages using msgcat."
|
msgid "Fail to merge messages using msgcat."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:139
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:147
|
||||||
msgid "Extract messages that need to be translated"
|
msgid "Extract messages that need to be translated"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:141
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:149
|
||||||
msgid "This command could be used to generate/update lang/messages.pot file."
|
msgid "This command could be used to generate/update lang/messages.pot file."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:159
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:167
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Compendium file %s not found."
|
msgid "Compendium file %s not found."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:171
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:179
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "POT file not found (%s). Please run extract_messages first."
|
msgid "POT file not found (%s). Please run extract_messages first."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:186
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:194
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:325
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:333
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Lang directory '%s' found"
|
msgid "Lang directory '%s' found"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:193
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:201
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:332
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:340
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "LC_MESSAGES directory not found in lang '%s' directory, ignore it."
|
msgid "LC_MESSAGES directory not found in lang '%s' directory, ignore it."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:210
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:218
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Fail to init messages in %s PO file using msginit (%s)."
|
msgid "Fail to init messages in %s PO file using msginit (%s)."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:230
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:238
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Fail to update messages in %s PO file using msgmerge (%s)."
|
msgid "Fail to update messages in %s PO file using msgmerge (%s)."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:238
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:246
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:342
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:350
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "PO file not found in lang '%s' directory, ignore it."
|
msgid "PO file not found in lang '%s' directory, ignore it."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:247
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:255
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:390
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:398
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Fail to open root lang directory (%s)."
|
msgid "Fail to open root lang directory (%s)."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:252
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:260
|
||||||
msgid "Update messages in translation PO lang files"
|
msgid "Update messages in translation PO lang files"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:254
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:262
|
||||||
msgid ""
|
msgid ""
|
||||||
"This command could be used to init/update PO files in lang/*/LC_MESSAGES "
|
"This command could be used to init/update PO files in lang/*/LC_MESSAGES "
|
||||||
"directories."
|
"directories."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:281
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:289
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Lang alias symlink found: %s -> %s"
|
msgid "Lang alias symlink found: %s -> %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:291
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:299
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "JSON catalog symlink for %s -> %s created (%s)"
|
msgid "JSON catalog symlink for %s -> %s created (%s)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:299
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:307
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Fail to create JSON catalog symlink for %s -> %s (%s)"
|
msgid "Fail to create JSON catalog symlink for %s -> %s (%s)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:309
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:317
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "JSON catalog symlink for %s -> %s already exist (%s)"
|
msgid "JSON catalog symlink for %s -> %s already exist (%s)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:317
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:325
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"JSON catalog file for %s already exist, but it's not a symlink to %s (%s)"
|
"JSON catalog file for %s already exist, but it's not a symlink to %s (%s)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:356
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:364
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Fail to compile messages from %s PO file as MO file using msgfmt (%s)."
|
msgid "Fail to compile messages from %s PO file as MO file using msgfmt (%s)."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:367
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:375
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Fail to open %s JSON catalog file in write mode (%s)."
|
msgid "Fail to open %s JSON catalog file in write mode (%s)."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:374
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:382
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Fail to write %s JSON catalog in file (%s)."
|
msgid "Fail to write %s JSON catalog in file (%s)."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:381
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:389
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s JSON catalog writed (%s)."
|
msgid "%s JSON catalog writed (%s)."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:396
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:404
|
||||||
msgid ""
|
msgid ""
|
||||||
"Compile messages from existing translation PO lang files to corresponding MO "
|
"Compile messages from existing translation PO lang files to corresponding MO "
|
||||||
"files and JSON catalogs"
|
"files and JSON catalogs"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:401
|
#: /home/brenard/dev/eesyphp/includes/translation-cli.php:409
|
||||||
msgid ""
|
msgid ""
|
||||||
"This command could be used to compile PO files in lang/*/LC_MESSAGES "
|
"This command could be used to compile PO files in lang/*/LC_MESSAGES "
|
||||||
"directories to MO files and as JSON catalogs in public_html/translations."
|
"directories to MO files and as JSON catalogs in public_html/translations."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/mail.php:12
|
#: /home/brenard/dev/eesyphp/includes/mail.php:14
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"\n"
|
"\n"
|
||||||
|
@ -297,215 +297,215 @@ msgid ""
|
||||||
"Mail initialy intended for %s."
|
"Mail initialy intended for %s."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url.php:86
|
#: /home/brenard/dev/eesyphp/includes/url.php:92
|
||||||
msgid "Whoops ! Page not found"
|
msgid "Whoops ! Page not found"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url.php:109
|
#: /home/brenard/dev/eesyphp/includes/url.php:117
|
||||||
msgid ""
|
msgid ""
|
||||||
"Unable to determine the requested page. If the problem persists, please "
|
"Unable to determine the requested page. If the problem persists, please "
|
||||||
"contact support."
|
"contact support."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url.php:247
|
#: /home/brenard/dev/eesyphp/includes/url.php:270
|
||||||
msgid ""
|
msgid ""
|
||||||
"Unable to determine the requested page (loop detected). If the problem "
|
"Unable to determine the requested page (loop detected). If the problem "
|
||||||
"persists, please contact support."
|
"persists, please contact support."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url.php:271
|
#: /home/brenard/dev/eesyphp/includes/url.php:295
|
||||||
msgid "This request cannot be processed."
|
msgid "This request cannot be processed."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/url.php:288
|
#: /home/brenard/dev/eesyphp/includes/url.php:313
|
||||||
msgid "This request could not be processed correctly."
|
msgid "This request could not be processed correctly."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:7
|
#: /home/brenard/dev/eesyphp/includes/cli.php:8
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "The CLI command '%s' already exists."
|
msgid "The CLI command '%s' already exists."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:12
|
#: /home/brenard/dev/eesyphp/includes/cli.php:13
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "The CLI command '%s' handler is not callable !"
|
msgid "The CLI command '%s' handler is not callable !"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:45
|
#: /home/brenard/dev/eesyphp/includes/cli.php:46
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Usage: %s [-h] [-qd] command\n"
|
msgid "Usage: %s [-h] [-qd] command\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:46
|
#: /home/brenard/dev/eesyphp/includes/cli.php:47
|
||||||
msgid " -h Show this message\n"
|
msgid " -h Show this message\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:47
|
#: /home/brenard/dev/eesyphp/includes/cli.php:48
|
||||||
msgid " -q / -d Quiet/Debug mode\n"
|
msgid " -q / -d Quiet/Debug mode\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:48
|
#: /home/brenard/dev/eesyphp/includes/cli.php:49
|
||||||
msgid " --trace Trace mode (the most verbose)\n"
|
msgid " --trace Trace mode (the most verbose)\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:49
|
#: /home/brenard/dev/eesyphp/includes/cli.php:50
|
||||||
msgid " command Command to run\n"
|
msgid " command Command to run\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:51
|
#: /home/brenard/dev/eesyphp/includes/cli.php:52
|
||||||
msgid "Available commands:\n"
|
msgid "Available commands:\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:86
|
#: /home/brenard/dev/eesyphp/includes/cli.php:94
|
||||||
msgid "Only one command could be executed !"
|
msgid "Only one command could be executed !"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:110
|
#: /home/brenard/dev/eesyphp/includes/cli.php:119
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Invalid parameter \"%s\".\n"
|
"Invalid parameter \"%s\".\n"
|
||||||
"Note: Command's parameter/argument must be place after the command."
|
"Note: Command's parameter/argument must be place after the command."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:127
|
#: /home/brenard/dev/eesyphp/includes/cli.php:144
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "An exception occured running command %s"
|
msgid "An exception occured running command %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:133
|
#: /home/brenard/dev/eesyphp/includes/cli.php:150
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Item #%s:\n"
|
msgid "Item #%s:\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:134
|
#: /home/brenard/dev/eesyphp/includes/cli.php:151
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "ID: %s"
|
msgid "ID: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:135
|
#: /home/brenard/dev/eesyphp/includes/cli.php:152
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Name: '%s'"
|
msgid "Name: '%s'"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:136
|
#: /home/brenard/dev/eesyphp/includes/cli.php:153
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Date: %s"
|
msgid "Date: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:137
|
#: /home/brenard/dev/eesyphp/includes/cli.php:155
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Description: %s"
|
msgid "Description: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:137
|
#: /home/brenard/dev/eesyphp/includes/cli.php:156
|
||||||
msgid "Not set"
|
msgid "Not set"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:138
|
#: /home/brenard/dev/eesyphp/includes/cli.php:158
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Status: %s"
|
msgid "Status: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:191
|
#: /home/brenard/dev/eesyphp/includes/cli.php:211
|
||||||
msgid "No item.\n"
|
msgid "No item.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:217
|
#: /home/brenard/dev/eesyphp/includes/cli.php:237
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%d item(s)"
|
msgid "%d item(s)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:223
|
#: /home/brenard/dev/eesyphp/includes/cli.php:243
|
||||||
msgid "List/search items"
|
msgid "List/search items"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:224
|
#: /home/brenard/dev/eesyphp/includes/cli.php:244
|
||||||
msgid "[patterns]"
|
msgid "[patterns]"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:226
|
#: /home/brenard/dev/eesyphp/includes/cli.php:246
|
||||||
msgid "-o|--orderby Ordering list criterion. Possible values:"
|
msgid "-o|--orderby Ordering list criterion. Possible values:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:228
|
#: /home/brenard/dev/eesyphp/includes/cli.php:248
|
||||||
msgid "-r|--reverse Reverse order"
|
msgid "-r|--reverse Reverse order"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:229
|
#: /home/brenard/dev/eesyphp/includes/cli.php:249
|
||||||
msgid "-s|--status Filter on status. Possible values:"
|
msgid "-s|--status Filter on status. Possible values:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:236
|
#: /home/brenard/dev/eesyphp/includes/cli.php:256
|
||||||
msgid "You must provide a valid ID."
|
msgid "You must provide a valid ID."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:242
|
#: /home/brenard/dev/eesyphp/includes/cli.php:262
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:266
|
#: /home/brenard/dev/eesyphp/includes/cli.php:286
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Item #%s not found."
|
msgid "Item #%s not found."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:250
|
#: /home/brenard/dev/eesyphp/includes/cli.php:270
|
||||||
msgid "Show item"
|
msgid "Show item"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:251
|
#: /home/brenard/dev/eesyphp/includes/cli.php:271
|
||||||
msgid "[ID]"
|
msgid "[ID]"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:256
|
#: /home/brenard/dev/eesyphp/includes/cli.php:276
|
||||||
msgid "You must provide item ID."
|
msgid "You must provide item ID."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:260
|
#: /home/brenard/dev/eesyphp/includes/cli.php:280
|
||||||
msgid "Invalid item ID"
|
msgid "Invalid item ID"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:271
|
#: /home/brenard/dev/eesyphp/includes/cli.php:291
|
||||||
msgid "Are you sure you want to delete this item? Type 'yes' to continue: "
|
msgid "Are you sure you want to delete this item? Type 'yes' to continue: "
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:275
|
#: /home/brenard/dev/eesyphp/includes/cli.php:295
|
||||||
msgid "User cancel"
|
msgid "User cancel"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:281
|
#: /home/brenard/dev/eesyphp/includes/cli.php:301
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "An error occured deleting item #%d."
|
msgid "An error occured deleting item #%d."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:288
|
#: /home/brenard/dev/eesyphp/includes/cli.php:308
|
||||||
msgid "Delete item"
|
msgid "Delete item"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:289
|
#: /home/brenard/dev/eesyphp/includes/cli.php:309
|
||||||
msgid "[item ID]"
|
msgid "[item ID]"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:301
|
#: /home/brenard/dev/eesyphp/includes/cli.php:321
|
||||||
msgid "Export items (as CSV)"
|
msgid "Export items (as CSV)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:302
|
#: /home/brenard/dev/eesyphp/includes/cli.php:322
|
||||||
msgid "[output file path]"
|
msgid "[output file path]"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:314
|
#: /home/brenard/dev/eesyphp/includes/cli.php:337
|
||||||
msgid "Restore items (from CSV)"
|
msgid "Restore items (from CSV)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:315
|
#: /home/brenard/dev/eesyphp/includes/cli.php:338
|
||||||
msgid "[input file path]"
|
msgid "[input file path]"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:374
|
#: /home/brenard/dev/eesyphp/includes/cli.php:411
|
||||||
msgid "Cron to handle item expiration"
|
msgid "Cron to handle item expiration"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:377
|
#: /home/brenard/dev/eesyphp/includes/cli.php:414
|
||||||
msgid "-j/--just-try Just-try mode : do not really removed expired item(s)"
|
msgid "-j/--just-try Just-try mode : do not really removed expired item(s)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/brenard/dev/eesyphp/includes/cli.php:378
|
#: /home/brenard/dev/eesyphp/includes/cli.php:415
|
||||||
msgid "-m/--max-age Item expiration limit (in days, optional)"
|
msgid "-m/--max-age Item expiration limit (in days, optional)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
Loading…
Reference in a new issue