diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..95330abc --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/templates_c/*.tpl.php +/templates_c/*menu.conf.php + diff --git a/broadcast-message.php b/broadcast-message.php index 16a4d7e3..b4b63830 100644 --- a/broadcast-message.php +++ b/broadcast-message.php @@ -38,6 +38,8 @@ if ($CONF['sendmail'] != 'YES') { exit; } +$error = 0; + $smtp_from_email = smtp_get_admin_email(); $allowed_domains = list_domains_for_admin(authentication_get_username()); diff --git a/common.php b/common.php index 28bea047..6425d377 100644 --- a/common.php +++ b/common.php @@ -60,8 +60,6 @@ function postfixadmin_autoload($class) { } spl_autoload_register('postfixadmin_autoload'); -require_once("$incpath/variables.inc.php"); - if(!is_file("$incpath/config.inc.php")) { die("config.inc.php is missing!"); } diff --git a/config.inc.php b/config.inc.php index 0867c896..15f09fbf 100644 --- a/config.inc.php +++ b/config.inc.php @@ -564,7 +564,7 @@ $CONF['new_quota_table'] = 'YES'; // $CONF['create_mailbox_subdirs_hostoptions']=array('novalidate-cert','norsh'); // See also the "Optional flags for names" table at // http://www.php.net/manual/en/function.imap-open.php -$CONF['create_mailbox_subdirs_hostoptions'] = array(''); +$CONF['create_mailbox_subdirs_hostoptions'] = array(); // Theme Config diff --git a/functions.inc.php b/functions.inc.php index 6ba7499c..73ea74fa 100644 --- a/functions.inc.php +++ b/functions.inc.php @@ -1,16 +1,16 @@ "\'" etc. * - * @param String (or Array) + * @param mixed string|array * @return String (or Array) of cleaned data, suitable for use within an SQL * statement. */ @@ -288,7 +288,7 @@ function escape_string ($string) { if(is_array($string)) { $clean = array(); foreach(array_keys($string) as $row) { - $clean[$row] = escape_string($string[$row]); + $clean[$row] = escape_string($string[$row]); } return $clean; } @@ -296,7 +296,9 @@ function escape_string ($string) { $string = stripslashes($string); } if (!is_numeric($string)) { + $link = db_connect(); + if ($CONF['database_type'] == "mysql") { $escaped_string = mysql_real_escape_string($string, $link); } @@ -330,7 +332,7 @@ function escape_string ($string) { * * @param String parameter name. * @param String (optional) - default value if key is not set. - * @return String + * @return String */ function safeget ($param, $default="") { $retval=$default; @@ -355,7 +357,7 @@ function safepost ($param, $default="") { /** * safeserver * @see safeget() - * @param String $param + * @param String $param * @param String $default (optional) * @return String value from $_SERVER[$param] or $default */ @@ -368,7 +370,7 @@ function safeserver ($param, $default="") { /** * safecookie * @see safeget() - * @param String $param + * @param String $param * @param String $default (optional) * @return String value from $_COOKIE[$param] or $default */ @@ -381,7 +383,7 @@ function safecookie ($param, $default="") { /** * safesession * @see safeget() - * @param String $param + * @param String $param * @param String $default (optional) * @return String value from $_SESSION[$param] or $default */ @@ -464,7 +466,7 @@ function get_domain_properties ($domain) { * * @param String idxfield - database field name to use as title * @param String query - core part of the query (starting at "FROM") - * @return String + * @return String */ function create_page_browser($idxfield, $querypart) { global $CONF; @@ -502,16 +504,16 @@ function create_page_browser($idxfield, $querypart) { $page_size_zerobase = $page_size - 1; $query = " SELECT * FROM ( - SELECT $idxfield AS label, @row := @row + 1 AS row $querypart + SELECT $idxfield AS label, @row := @row + 1 AS row $querypart ) idx WHERE MOD(idx.row, $page_size) IN (0,$page_size_zerobase) OR idx.row = $count_results - "; + "; if (db_pgsql()) { $query = " SELECT * FROM ( - SELECT $idxfield AS label, nextval('rowcount') AS row $querypart + SELECT $idxfield AS label, nextval('rowcount') AS row $querypart ) idx WHERE MOD(idx.row, $page_size) IN (0,$page_size_zerobase) OR idx.row = $count_results - "; + "; } if (db_sqlite()) { @@ -526,7 +528,7 @@ function create_page_browser($idxfield, $querypart) { # TODO: $query is MySQL-specific -# PostgreSQL: +# PostgreSQL: # http://www.postgresql.org/docs/8.1/static/sql-createsequence.html # http://www.postgresonline.com/journal/archives/79-Simulating-Row-Number-in-PostgreSQL-Pre-8.4.html # http://www.pg-forum.de/sql/1518-nummerierung-der-abfrageergebnisse.html @@ -597,7 +599,7 @@ function check_owner ($username, $domain) { /** - * List domains for an admin user. + * List domains for an admin user. * @param String $username * @return array of domain names. */ @@ -856,8 +858,8 @@ function validate_password($password) { /** - * Encrypt a password, using the apparopriate hashing mechanism as defined in - * config.inc.php ($CONF['encrypt']). + * Encrypt a password, using the apparopriate hashing mechanism as defined in + * config.inc.php ($CONF['encrypt']). * When wanting to compare one pw to another, it's necessary to provide the salt used - hence * the second parameter ($pw_db), which is the existing hash from the DB. * @@ -907,17 +909,17 @@ function pacrypt ($pw, $pw_db="") { $l = db_row($res["result"]); $password = $l[0]; } - + elseif ($CONF['encrypt'] == 'authlib') { $flavor = $CONF['authlib_default_flavor']; $salt = substr(create_salt(), 0, 2); # courier-authlib supports only two-character salts if(preg_match('/^{.*}/', $pw_db)) { // we have a flavor in the db -> use it instead of default flavor $result = preg_split('/[{}]/', $pw_db, 3); # split at { and/or } - $flavor = $result[1]; + $flavor = $result[1]; $salt = substr($result[2], 0, 2); } - + if(stripos($flavor, 'md5raw') === 0) { $password = '{' . $flavor . '}' . md5($pw); } elseif(stripos($flavor, 'md5') === 0) { @@ -930,14 +932,14 @@ function pacrypt ($pw, $pw_db="") { die("authlib_default_flavor '" . $flavor . "' unknown. Valid flavors are 'md5raw', 'md5', 'SHA' and 'crypt'"); } } - + elseif (preg_match("/^dovecot:/", $CONF['encrypt'])) { $split_method = preg_split ('/:/', $CONF['encrypt']); $method = strtoupper($split_method[1]); # If $pw_db starts with {method}, change $method accordingly if (!empty($pw_db) && preg_match('/^\{([A-Z0-9.-]+)\}.+/', $pw_db, $method_matches)) { $method = $method_matches[1]; } if (! preg_match("/^[A-Z0-9.-]+$/", $method)) { die("invalid dovecot encryption method"); } # TODO: check against a fixed list? - # if (strtolower($method) == 'md5-crypt') die("\$CONF['encrypt'] = 'dovecot:md5-crypt' will not work because dovecotpw generates a random salt each time. Please use \$CONF['encrypt'] = 'md5crypt' instead."); + # if (strtolower($method) == 'md5-crypt') die("\$CONF['encrypt'] = 'dovecot:md5-crypt' will not work because dovecotpw generates a random salt each time. Please use \$CONF['encrypt'] = 'md5crypt' instead."); # $crypt_method = preg_match ("/.*-CRYPT$/", $method); # digest-md5 and SCRAM-SHA-1 hashes include the username - until someone implements it, let's declare it as unsupported @@ -1147,7 +1149,7 @@ function smtp_mail ($to, $from, $data, $body = "") { $timeout = "30"; if ($body != "") { - $maildata = + $maildata = "To: " . $to . "\n" . "From: " . $from . "\n" . "Subject: " . encode_header ($data) . "\n" @@ -1238,12 +1240,22 @@ $DEBUG_TEXT = "\n * - call die() in case of connection problems * b) with $ignore_errors == TRUE * array($link, $error_text); + * + * @return resource connection to db (normally) */ -function db_connect ($ignore_errors = 0) { +function db_connect ($ignore_errors = false) { global $CONF; global $DEBUG_TEXT; if ($ignore_errors != 0) $DEBUG_TEXT = ''; $error_text = ''; + + static $link; + if (isset($link) && $link) { + if ($ignore_errors) { + return array($link, $error_text); + } + return $link; + } $link = 0; if ($CONF['database_type'] == "mysql") { @@ -1327,12 +1339,12 @@ function db_get_boolean($bool) { // return either true or false (unquoted strings) if($bool) { return 't'; - } + } return 'f'; } elseif(Config::Read('database_type') == 'mysql' || Config::Read('database_type') == 'mysqli' || db_sqlite()) { if($bool) { - return 1; - } + return 1; + } return 0; } else { die('Unknown value in $CONF[database_type]'); @@ -1412,21 +1424,18 @@ function db_query ($query, $ignore_errors = 0) { global $DEBUG_TEXT; $result = ""; $number_rows = ""; - static $link; + $link = db_connect (); $error_text = ""; if ($ignore_errors) $DEBUG_TEXT = ""; - # mysql and pgsql $link are resources, mysqli $link is an object - if (! (is_resource($link) || is_object($link) ) ) $link = db_connect (); - - if ($CONF['database_type'] == "mysql") $result = @mysql_query ($query, $link) + if ($CONF['database_type'] == "mysql") $result = @mysql_query ($query, $link) or $error_text = "Invalid query: " . mysql_error($link); - if ($CONF['database_type'] == "mysqli") $result = @mysqli_query ($link, $query) + if ($CONF['database_type'] == "mysqli") $result = @mysqli_query ($link, $query) or $error_text = "Invalid query: " . mysqli_error($link); if (db_sqlite()) $result = @$link->query($query) or $error_text = "Invalid query: " . $link->lastErrorMsg(); if (db_pgsql()) { - $result = @pg_query ($link, $query) + $result = @pg_query ($link, $query) or $error_text = "Invalid query: " . pg_last_error(); } if ($error_text != "" && $ignore_errors == 0) { @@ -1691,7 +1700,7 @@ function db_in_clause($field, $values) { * param array $condition: array('field' => 'value', 'field2' => 'value2, ...) * param array $struct - field structure, used for automatic bool conversion * param string $additional_raw_where - raw sniplet to include in the WHERE part - typically needs to start with AND - * param array $searchmode - operators to use (=, <, > etc.) - defaults to = if not specified for a field (see + * param array $searchmode - operators to use (=, <, > etc.) - defaults to = if not specified for a field (see * $allowed_operators for available operators) * Note: the $searchmode operator will only be used if a $condition for that field is set. * This also means you'll need to set a (dummy) condition for NULL and NOTNULL. @@ -1702,7 +1711,7 @@ function db_where_clause($condition, $struct, $additional_raw_where = '', $searc } elseif(!is_array($searchmode)) { die('db_where_cond: parameter $searchmode is not an array!'); } elseif (count($condition) == 0 && trim($additional_raw_where) == '') { - die("db_where_cond: parameter is an empty array!"); # die() might sound harsh, but can prevent information leaks + die("db_where_cond: parameter is an empty array!"); # die() might sound harsh, but can prevent information leaks } elseif(!is_array($struct)) { die('db_where_cond: parameter $struct is not an array!'); } @@ -1737,7 +1746,7 @@ function db_where_clause($condition, $struct, $additional_raw_where = '', $searc $querypart = $field . $operator . "'" . escape_string($value) . "'"; } - if($struct[$field]['select'] != '') { + if(!empty($struct[$field]['select'])) { $having_parts[$field] = $querypart; } else { $where_parts[$field] = $querypart; @@ -1831,9 +1840,9 @@ function alias_domain_postdeletion($alias_domain) { // // gen_show_status -// Action: Return a string of colored  's that indicate +// Action: Return a string of colored  's that indicate // the if an alias goto has an error or is sent to -// addresses list in show_custom_domains +// addresses list in show_custom_domains // Call: gen_show_status (string alias_address) // function gen_show_status ($show_alias) { @@ -1884,7 +1893,7 @@ function gen_show_status ($show_alias) { "'>" . $CONF['show_status_text'] . " "; } else { $stat_string .= $CONF['show_status_text'] . " "; - } + } } // POP/IMAP CHECK @@ -1901,7 +1910,7 @@ function gen_show_status ($show_alias) { "'>" . $CONF['show_status_text'] . " "; } else { $stat_string .= $CONF['show_status_text'] . " "; - } + } } // CUSTOM DESTINATION CHECK @@ -1912,11 +1921,11 @@ function gen_show_status ($show_alias) { "'>" . $CONF['show_status_text'] . " "; } else { $stat_string .= $CONF['show_status_text'] . " "; - } - } + } + } } else { $stat_string .= "; "; - } + } // $stat_string .= "    " . // "    "; @@ -1925,7 +1934,7 @@ function gen_show_status ($show_alias) { function getRemoteAddr() { $REMOTE_ADDR = 'localhost'; - if (isset($_SERVER['REMOTE_ADDR'])) + if (isset($_SERVER['REMOTE_ADDR'])) $REMOTE_ADDR = $_SERVER['REMOTE_ADDR']; return $REMOTE_ADDR; } diff --git a/index.php b/index.php index 13f6f370..e5f5e796 100644 --- a/index.php +++ b/index.php @@ -6,7 +6,7 @@ * This source file is subject to the GPL license that is bundled with * this package in the file LICENSE.TXT. * - * Further details on the project are available at http://postfixadmin.sf.net + * Further details on the project are available at http://postfixadmin.sf.net or https://github.com/postfixadmin/postfixadmin * * @version $Id$ * @license GNU GPL v2 or later. @@ -20,8 +20,12 @@ * Form POST \ GET Variables: -none- */ -$CONF['configured'] = FALSE; -@include_once('config.inc.php'); # hide error message because only $CONF['configured'] is checked here +$CONF = array('configured' => FALSE); + +if(file_exists(dirname(__FILE__) . '/config.inc.php')) { + require_once('config.inc.php'); +} + if ( $CONF['configured'] === TRUE ) { header ("Location: login.php"); diff --git a/languages/bg.lang b/languages/bg.lang index 90ce6f51..a325ecad 100644 --- a/languages/bg.lang +++ b/languages/bg.lang @@ -186,7 +186,7 @@ $PALANG['reply_every_mail'] = 'Reply on every mail'; # XXX $PALANG['reply_once_per_day'] = 'Reply once a day'; # XXX $PALANG['reply_once_per_week'] = 'Reply once per week'; # XXX -$PALANG['pViewlog_welcome'] = 'Разглеждане на последните 10 действия за '; +$PALANG['pViewlog_welcome'] = 'Разглеждане на последните %s действия за '; $PALANG['pViewlog_timestamp'] = 'Дата'; $PALANG['pViewlog_action'] = 'Действие'; $PALANG['pViewlog_data'] = 'Данни'; diff --git a/languages/ca.lang b/languages/ca.lang index 8addce90..fc6f030c 100644 --- a/languages/ca.lang +++ b/languages/ca.lang @@ -184,7 +184,7 @@ $PALANG['reply_every_mail'] = 'Reply on every mail'; # XXX $PALANG['reply_once_per_day'] = 'Reply once a day'; # XXX $PALANG['reply_once_per_week'] = 'Reply once per week'; # XXX -$PALANG['pViewlog_welcome'] = 'Veure les últimes 10 accions per '; +$PALANG['pViewlog_welcome'] = 'Veure les últimes %s accions per '; $PALANG['pViewlog_timestamp'] = 'Data/Hora'; $PALANG['pViewlog_action'] = 'Acció'; $PALANG['pViewlog_data'] = 'Dades'; diff --git a/languages/cn.lang b/languages/cn.lang index 43c725a9..05a0808f 100644 --- a/languages/cn.lang +++ b/languages/cn.lang @@ -185,7 +185,7 @@ $PALANG['reply_every_mail'] = 'Reply on every mail'; # XXX $PALANG['reply_once_per_day'] = 'Reply once a day'; # XXX $PALANG['reply_once_per_week'] = 'Reply once per week'; # XXX -$PALANG['pViewlog_welcome'] = '查看最新的10项操作日志 域名: '; +$PALANG['pViewlog_welcome'] = '查看最新的%s项操作日志 域名: '; $PALANG['pViewlog_timestamp'] = '时间'; $PALANG['pViewlog_action'] = '操作'; $PALANG['pViewlog_data'] = '内容'; diff --git a/languages/cs.lang b/languages/cs.lang index 618b8a31..1e7a90ba 100644 --- a/languages/cs.lang +++ b/languages/cs.lang @@ -193,7 +193,7 @@ $PALANG['reply_every_mail'] = 'Odpovědět na každý mail'; $PALANG['reply_once_per_day'] = 'Odpovědět jednou za den'; $PALANG['reply_once_per_week'] = 'Odpovědět jednou za týden'; -$PALANG['pViewlog_welcome'] = 'Prohlížet 10 posledních akcí pro '; +$PALANG['pViewlog_welcome'] = 'Prohlížet %s posledních akcí pro '; $PALANG['pViewlog_timestamp'] = 'Časová značka'; $PALANG['pViewlog_action'] = 'Akce'; $PALANG['pViewlog_data'] = 'Poznámka'; diff --git a/languages/da.lang b/languages/da.lang index e54bb414..9993d467 100644 --- a/languages/da.lang +++ b/languages/da.lang @@ -192,7 +192,7 @@ $PALANG['reply_every_mail'] = 'Reply on every mail'; # XXX $PALANG['reply_once_per_day'] = 'Reply once a day'; # XXX $PALANG['reply_once_per_week'] = 'Reply once per week'; # XXX -$PALANG['pViewlog_welcome'] = 'Vis de sidste 10 poster for '; +$PALANG['pViewlog_welcome'] = 'Vis de sidste %s poster for '; $PALANG['pViewlog_timestamp'] = 'Tidsstempel'; $PALANG['pViewlog_action'] = 'Handling'; $PALANG['pViewlog_data'] = 'Data'; diff --git a/languages/de.lang b/languages/de.lang index 3bcaee56..f23a3461 100644 --- a/languages/de.lang +++ b/languages/de.lang @@ -189,7 +189,7 @@ $PALANG['reply_every_mail'] = 'Jede Mail beantworten'; $PALANG['reply_once_per_day'] = 'Einmal pro Tag antworten'; $PALANG['reply_once_per_week'] = 'Einmal pro Woche antworten'; -$PALANG['pViewlog_welcome'] = 'Zeigt die letzten 10 Aktionen für '; +$PALANG['pViewlog_welcome'] = 'Zeigt die letzten %s Aktionen für '; $PALANG['pViewlog_timestamp'] = 'Zeitpunkt'; $PALANG['pViewlog_action'] = 'Aktion'; $PALANG['pViewlog_data'] = 'Daten'; diff --git a/languages/en.lang b/languages/en.lang index 84225d15..d486043b 100644 --- a/languages/en.lang +++ b/languages/en.lang @@ -190,7 +190,7 @@ $PALANG['reply_every_mail'] = 'Reply on every mail'; $PALANG['reply_once_per_day'] = 'Reply once a day'; $PALANG['reply_once_per_week'] = 'Reply once a week'; -$PALANG['pViewlog_welcome'] = 'View the last 10 actions for '; +$PALANG['pViewlog_welcome'] = 'View the last %s actions for '; $PALANG['pViewlog_timestamp'] = 'Timestamp'; $PALANG['pViewlog_action'] = 'Action'; $PALANG['pViewlog_data'] = 'Data'; diff --git a/languages/es.lang b/languages/es.lang index 09dc826d..fc27db64 100644 --- a/languages/es.lang +++ b/languages/es.lang @@ -186,7 +186,7 @@ $PALANG['reply_every_mail'] = 'Reply on every mail'; # XXX $PALANG['reply_once_per_day'] = 'Reply once a day'; # XXX $PALANG['reply_once_per_week'] = 'Reply once per week'; # XXX -$PALANG['pViewlog_welcome'] = 'Ver las últimas 10 acciones para '; +$PALANG['pViewlog_welcome'] = 'Ver las últimas %s acciones para '; $PALANG['pViewlog_timestamp'] = 'Fecha/Hora'; $PALANG['pViewlog_action'] = 'Acción'; $PALANG['pViewlog_data'] = 'Datos'; diff --git a/languages/et.lang b/languages/et.lang index d3002e68..1891edb4 100644 --- a/languages/et.lang +++ b/languages/et.lang @@ -185,7 +185,7 @@ $PALANG['reply_every_mail'] = 'Reply on every mail'; # XXX $PALANG['reply_once_per_day'] = 'Reply once a day'; # XXX $PALANG['reply_once_per_week'] = 'Reply once per week'; # XXX -$PALANG['pViewlog_welcome'] = 'Vaata 10 viimast muudatust domeeniga '; +$PALANG['pViewlog_welcome'] = 'Vaata %s viimast muudatust domeeniga '; $PALANG['pViewlog_timestamp'] = 'Ajatempel'; $PALANG['pViewlog_action'] = 'Toiming'; $PALANG['pViewlog_data'] = 'Andmed'; diff --git a/languages/eu.lang b/languages/eu.lang index 95b4c6c1..16a18e58 100644 --- a/languages/eu.lang +++ b/languages/eu.lang @@ -183,7 +183,7 @@ $PALANG['reply_every_mail'] = 'Reply on every mail'; # XXX $PALANG['reply_once_per_day'] = 'Reply once a day'; # XXX $PALANG['reply_once_per_week'] = 'Reply once per week'; # XXX -$PALANG['pViewlog_welcome'] = 'Honen azken 10 ekintzak ikusi '; +$PALANG['pViewlog_welcome'] = 'Honen azken %s ekintzak ikusi '; $PALANG['pViewlog_timestamp'] = 'Data/ordua'; $PALANG['pViewlog_action'] = 'Ekintza'; $PALANG['pViewlog_data'] = 'Datuak'; diff --git a/languages/fo.lang b/languages/fo.lang index 2e30c44f..4a95e15d 100644 --- a/languages/fo.lang +++ b/languages/fo.lang @@ -185,7 +185,7 @@ $PALANG['reply_every_mail'] = 'Reply on every mail'; # XXX $PALANG['reply_once_per_day'] = 'Reply once a day'; # XXX $PALANG['reply_once_per_week'] = 'Reply once per week'; # XXX -$PALANG['pViewlog_welcome'] = 'Vís seinastu 10 hendingarnar fyri '; +$PALANG['pViewlog_welcome'] = 'Vís seinastu %s hendingarnar fyri '; $PALANG['pViewlog_timestamp'] = 'Tíðarstempul'; $PALANG['pViewlog_action'] = 'Hending'; $PALANG['pViewlog_data'] = 'Dáta'; diff --git a/languages/fr.lang b/languages/fr.lang index 4ad11f60..e77c20aa 100644 --- a/languages/fr.lang +++ b/languages/fr.lang @@ -4,7 +4,8 @@ // Language file French // by Kuthz // updated by Olivier ETIENNE -// updated by Francois Grange (rumbaya @sf) +// updated by François GRANGE (rumbaya @sf) +// updated by Carlos FERREIRA (@acs_ferreira) // $PALANG['YES'] = 'Oui'; @@ -14,29 +15,29 @@ $PALANG['del'] = 'Effacer'; $PALANG['exit'] = 'Quitter'; $PALANG['cancel'] = 'Annuler'; $PALANG['save'] = 'Enregistrer les modifications'; -$PALANG['confirm'] = 'Etes vous sur de vouloir supprimer cet enregistrement\n'; -$PALANG['confirm_delete_admin'] = 'Do you really want to delete the admin %s?'; # XXX -$PALANG['confirm_delete_alias'] = 'Do you really want to delete the alias %s?'; # XXX -$PALANG['confirm_delete_aliasdomain'] = 'Do you really want to delete the alias domain %s?'; # XXX -$PALANG['confirm_delete_domain'] = 'Etes-vous sur de vouloir effacer tous les enregistrements dans ce domaine ? Cette opération ne pourra pas être annulée.\n (%s)'; # XXX text changed to: 'Do you really want to delete all records for the domain %s? This can not be undone' -$PALANG['confirm_delete_fetchmail'] = 'Do you really want to delete the fetchmail job %s?'; # XXX -$PALANG['confirm_delete_mailbox'] = 'Do you really want to delete the mailbox %s?'; # XXX -$PALANG['confirm_delete_vacation'] = 'Do you really want to delete the vacation message for %s?'; # XXX -$PALANG['no_delete_permissions'] = 'You are not allowed to delete %s!'; # XXX +$PALANG['confirm'] = 'Êtes-vous sûr de vouloir supprimer cet enregistrement\n'; +$PALANG['confirm_delete_admin'] = 'Êtes-vous sûr de vouloir supprimer l\'administrateur %s?'; +$PALANG['confirm_delete_alias'] = 'Êtes-vous sûr de vouloir supprimer l\'alias %s?'; +$PALANG['confirm_delete_aliasdomain'] = 'Êtes-vous sûr de vouloir supprimer l\'alias de domaine %s?'; +$PALANG['confirm_delete_domain'] = 'Êtes-vous sûr de vouloir effacer tous les enregistrements dans ce domaine ? Cette opération ne pourra pas être annulée.\n (%s)'; +$PALANG['confirm_delete_fetchmail'] = 'Êtes-vous sûr de vouloir supprimer la tâche de récupération de courrier %s?'; +$PALANG['confirm_delete_mailbox'] = 'Êtes-vous sûr de vouloir supprimer la boîte %s?'; +$PALANG['confirm_delete_vacation'] = 'Êtes-vous sûr de vouloir supprimer le message d\'absence pour %s?'; +$PALANG['no_delete_permissions'] = 'Vous n\'êtes pas autorisé à supprimer %s !'; $PALANG['check_update'] = 'Vérifier les mises à jour'; -$PALANG['invalid_parameter'] = 'Paramètres invalides!'; +$PALANG['invalid_parameter'] = 'Paramètres invalides !'; $PALANG['show'] = 'Afficher:'; $PALANG['all'] = 'Tous'; $PALANG['created'] = 'Créé'; $PALANG['unknown'] = 'inconnu'; -$PALANG['download_csv'] = 'Download this list as CSV file'; # XXX +$PALANG['download_csv'] = 'Télécharger cette liste au format CSV'; $PALANG['missing_field'] = 'Le champ %s est manquant'; -$PALANG['must_be_numeric'] = '%s doit être numérique'; -$PALANG['must_be_numeric_bigger_than_null'] = '%s must be numeric and bigger than 0'; # XXX +$PALANG['must_be_numeric'] = '%s doit être au format numérique'; +$PALANG['must_be_numeric_bigger_than_null'] = '%s doit être au format numérique et plus grand que 0'; $PALANG['must_be_boolean'] = '%s doit être booléen'; $PALANG['invalid_value_given'] = 'Valeur incorrecte pour %s'; -$PALANG['edit_not_allowed'] = 'You are not allowed to edit %s'; # XXX -$PALANG['searchparams'] = 'Search parameters:'; # XXX +$PALANG['edit_not_allowed'] = 'Vous n\'êtes pas autorisé à editer %s'; +$PALANG['searchparams'] = 'Paramètre de recherche :'; $PALANG['pFooter_logged_as'] = 'Connecté en tant que %s'; $PALANG['pLogin_welcome'] = 'Entrez votre adresse courriel pour administrer votre domaine.'; @@ -44,7 +45,7 @@ $PALANG['pLogin_username'] = 'Adresse courriel'; $PALANG['password'] = 'Mot de passe'; $PALANG['pLogin_language'] = 'Langue'; $PALANG['pLogin_button'] = 'Entrer'; -$PALANG['pLogin_failed'] = 'Votre email ou mot de passe est incorrect.'; +$PALANG['pLogin_failed'] = 'Votre courriel ou mot de passe est incorrect.'; $PALANG['pLogin_login_users'] = 'Utilisateurs, cliquez ici pour rejoindre votre section.'; $PALANG['pMenu_main'] = 'Menu principal'; @@ -58,7 +59,7 @@ $PALANG['pMenu_password'] = 'Mot de passe'; $PALANG['pMenu_viewlog'] = 'Journal'; $PALANG['pMenu_logout'] = 'Sortir'; -$PALANG['pMain_welcome'] = 'Bienvenue sur Postfix Admin!'; +$PALANG['pMain_welcome'] = 'Bienvenue sur Postfix Admin !'; $PALANG['pMain_overview'] = 'Visualiser vos alias et comptes courriels. (Modifier/Effacer)'; $PALANG['pMain_create_alias'] = 'Ajouter un nouvel alias à votre domaine.'; $PALANG['pMain_create_mailbox'] = 'Ajouter un nouveau compte courriel à votre domaine.'; @@ -73,25 +74,25 @@ $PALANG['pOverview_title'] = ':: Domaines définis'; $PALANG['pOverview_up_arrow'] = 'Remonter'; $PALANG['pOverview_right_arrow'] = 'Page suivante'; $PALANG['pOverview_left_arrow'] = 'Page précédente'; -$PALANG['pOverview_alias_domain_title'] = ':: Alias Domaine'; +$PALANG['pOverview_alias_domain_title'] = ':: Alias de Domaine'; $PALANG['pOverview_alias_title'] = ':: Alias'; $PALANG['pOverview_mailbox_title'] = ':: Comptes courriels'; $PALANG['go'] = 'Aller'; $PALANG['pOverview_welcome'] = 'Vue d\'ensemble pour '; -$PALANG['pOverview_alias_domain_aliases'] = 'Alias Domaines'; +$PALANG['pOverview_alias_domain_aliases'] = 'Alias de Domaines'; $PALANG['pOverview_alias_address'] = 'De'; $PALANG['active'] = 'Actif'; $PALANG['and_x_more'] = '[et %s en plus...]'; $PALANG['pOverview_mailbox_username'] = 'courriel'; $PALANG['name'] = 'Nom'; -$PALANG['pOverview_mailbox_quota'] = 'Limite (MB)'; +$PALANG['pOverview_mailbox_quota'] = 'Limite (Mo)'; $PALANG['pOverview_vacation_edit'] = 'REPONDEUR ACTIVE'; $PALANG['pOverview_vacation_option'] = 'Configurer le répondeur'; $PALANG['no_domains_for_this_admin'] = 'Vous n\'avez de permissions pour aucun domaine.'; -$PALANG['no_domains_exist'] = 'Vous devez créer au moins un domaine avant d\'utiliser Liste Virtuels.'; +$PALANG['no_domains_exist'] = 'Vous devez créer au moins un domaine avant d\'utiliser la Liste des Virtuels.'; $PALANG['domain'] = 'Domaine'; -$PALANG['pOverview_get_alias_domains'] = 'Alias Domaine'; +$PALANG['pOverview_get_alias_domains'] = 'Alias de Domaine'; $PALANG['mailboxes'] = 'Comptes courriels'; $PALANG['pOverview_get_quota'] = 'Limite compte courriels (MB)'; @@ -100,33 +101,33 @@ $PALANG['pDelete_delete_success'] = '%s supprimé.'; $PALANG['pDelete_domain_error'] = 'Ce domaine n\'est pas le votre '; $PALANG['pDelete_alias_error'] = 'Impossible d\'effacer cet alias '; $PALANG['pCreate_alias_domain_welcome'] = 'Les adresses mirroirs de l\'un de vos domaines vers un autre.'; -$PALANG['pCreate_alias_domain_alias'] = 'Alias Domaine'; -$PALANG['pCreate_alias_domain_alias_text'] = 'Le domaine dans lequel les courriels viennent.'; +$PALANG['pCreate_alias_domain_alias'] = 'Alias de Domaine'; +$PALANG['pCreate_alias_domain_alias_text'] = 'Le domaine de récéption du courrier (source).'; $PALANG['pCreate_alias_domain_target'] = 'Domaine Cible'; -$PALANG['pCreate_alias_domain_target_text'] = 'Le domaine o??s mails doivent aller.'; -$PALANG['pCreate_alias_domain_error1'] = 'Vous n\'etes pas autorisé a créer la configuration choisie.'; -$PALANG['pCreate_alias_domain_error2'] = 'La configuration choisie est invalide, merci d\'en choisir une autre!'; -$PALANG['alias_domain_already_exists'] = 'Ce domaine est déjà un alias de domaine!'; -$PALANG['alias_domain_does_not_exist'] = 'Ce domaine n\'est pas un alias de domaine!'; -$PALANG['alias_domain_create_failed'] = 'Echec de la création de l\'alias de domaine!'; -$PALANG['alias_domain_change_failed'] = 'Echec de la modification de l\'alias de domaine!'; +$PALANG['pCreate_alias_domain_target_text'] = 'Le domaine qui va réceptionner le courrier à la place.'; +$PALANG['pCreate_alias_domain_error1'] = 'Vous n\'êtes pas autorisé a créer la configuration choisie.'; +$PALANG['pCreate_alias_domain_error2'] = 'La configuration choisie est invalide, merci d\'en choisir une autre !'; +$PALANG['alias_domain_already_exists'] = 'Ce domaine est déjà un alias de domaine !'; +$PALANG['alias_domain_does_not_exist'] = 'Ce domaine n\'est pas un alias de domaine !'; +$PALANG['alias_domain_create_failed'] = 'Échec de la création de l\'alias de domaine !'; +$PALANG['alias_domain_change_failed'] = 'Échec de la modification de l\'alias de domaine !'; $PALANG['pCreate_alias_domain_error4'] = 'Tous les domaines sont déjà un alias.'; $PALANG['pCreate_alias_domain_success'] = 'L\'alias de domaine %s a été créé.'; $PALANG['alias_domain_changed'] = 'L\'alias de domaine %s a été modifié.'; -$PALANG['alias_domain_to_itsself'] = 'Un domaine ne peut pas être son propre alias!'; -$PALANG['delete_domain_aliasdomain_target'] = 'Le domaine est la cible d\un ou plusieurs alias de domains et ne peut-être supprimé! (Supprimez les alias de domaine d\'abord.)'; -$PALANG['pCreate_alias_address_text_error1'] = 'Cet alias n\'est pas valide!'; -$PALANG['alias_does_not_exist'] = 'Cet alias n\'existe pas!'; -$PALANG['email_address_already_exists'] = 'Ce compte courriel existe déjà, choisissez-en un autre!'; +$PALANG['alias_domain_to_itsself'] = 'Un domaine ne peut pas être son propre alias !'; +$PALANG['delete_domain_aliasdomain_target'] = 'Le domaine est la cible d\'un ou plusieurs alias de domaine et ne peut-être supprimé ! (Supprimez les alias de domaine d\'abord.)'; +$PALANG['pCreate_alias_address_text_error1'] = 'Cet alias n\'est pas valide !'; +$PALANG['alias_does_not_exist'] = 'Cet alias n\'existe pas !'; +$PALANG['email_address_already_exists'] = 'Ce compte courriel existe déjà, choisissez-en un autre !'; $PALANG['pCreate_alias_address_text_error3'] = 'Vous avez atteint votre limite d\'alias créés !'; $PALANG['pCreate_alias_goto_text'] = 'Destinataires des courriels.'; -$PALANG['pCreate_alias_goto_text_error'] = 'le champ À contient des erreurs!'; -$PALANG['pCreate_alias_result_error'] = 'Echec de la création de l\'alias %s!'; +$PALANG['pCreate_alias_goto_text_error'] = 'le champ À contient des erreurs !'; +$PALANG['pCreate_alias_result_error'] = 'Échec de la création de l\'alias %s !'; $PALANG['pCreate_alias_result_success'] = 'L\'alias %s a été ajouté !'; -$PALANG['alias_updated'] = 'L\'alias %s a été mis à jour!'; # XXX -$PALANG['pCreate_alias_catchall_text'] = 'Pour ajouter un alias global, utilisez "*". Pour un transfert de domaine à domaine, utilisez "*@domain.tld" dans le champs A.'; # XXX check/beautify - was split in two lines before -$PALANG['mailbox_alias_cant_be_deleted'] = 'Cet alias appartient à un compte courriel et ne peut être supprimé!'; -$PALANG['protected_alias_cant_be_deleted'] = 'The alias %s is protected and can only be deleted by a superadmin'; # XXX +$PALANG['alias_updated'] = 'L\'alias %s a été mis à jour !'; +$PALANG['pCreate_alias_catchall_text'] = 'Pour ajouter un alias global, utilisez "*". Pour un transfert de domaine à domaine, utilisez "*@domain.tld" dans le champ À.'; +$PALANG['mailbox_alias_cant_be_deleted'] = 'Cet alias appartient à un compte courriel et ne peut être supprimé !'; +$PALANG['protected_alias_cant_be_deleted'] = 'L\'alias %s est protégé et ne peut être supprimé que par un Super Administrateur.'; $PALANG['pEdit_alias_welcome'] = 'Modifier les paramètres de transfert.'; $PALANG['pEdit_alias_help'] = 'Cibles multiples acceptées, une entrée par ligne.'; @@ -134,30 +135,30 @@ $PALANG['alias'] = 'Alias'; $PALANG['to'] = 'À'; $PALANG['pEdit_alias_goto_text_error1'] = 'Vous devez entrer quelques choses dans le champ À'; $PALANG['pEdit_alias_goto_text_error2'] = 'L\'adresse courriel que vous avez entré est invalide: '; -$PALANG['pEdit_alias_domain_result_error'] = 'Impossible de modifier cet alias de domaine!'; -$PALANG['pEdit_alias_forward_and_store'] = 'Transferer une copie.'; -$PALANG['pEdit_alias_forward_only'] = 'Transferer les messages sans conserver de copie.'; -$PALANG['pEdit_alias_result_error'] = 'Echec de la modification de l\'alias %s!'; +$PALANG['pEdit_alias_domain_result_error'] = 'Impossible de modifier cet alias de domaine !'; +$PALANG['pEdit_alias_forward_and_store'] = 'Transférer une copie.'; +$PALANG['pEdit_alias_forward_only'] = 'Transférer les messages sans conserver de copie.'; +$PALANG['pEdit_alias_result_error'] = 'Échec de la modification de l\'alias %s !'; $PALANG['pCreate_mailbox_welcome'] = 'Ajouter un nouveau compte courriel à votre domaine.'; -$PALANG['pCreate_mailbox_username_text_error1'] = 'L\'adresse courriel est invalide!'; -$PALANG['pCreate_mailbox_username_text_error3'] = 'Vous avez atteint le nombre maximum de compte courriel !'; -$PALANG['pCreate_mailbox_password_text'] = 'Mot de passe pour compte POP3/IMAP'; +$PALANG['pCreate_mailbox_username_text_error1'] = 'L\'adresse courriel est invalide !'; +$PALANG['pCreate_mailbox_username_text_error3'] = 'Vous avez atteint le nombre maximum de comptes courriel !'; +$PALANG['pCreate_mailbox_password_text'] = 'Mot de passe pour le compte POP3/IMAP'; $PALANG['pCreate_mailbox_name_text'] = 'Nom complet'; $PALANG['pCreate_mailbox_mail'] = 'Envoyer le message de bienvenue'; -$PALANG['pCreate_mailbox_result_error'] = 'Echec de la création du compte courriel %s!'; -$PALANG['pCreate_mailbox_result_success'] = 'Le compte courriel %s a été ajouté à la table des comptes!'; -$PALANG['pCreate_mailbox_result_succes_nosubfolders'] = 'Le compte courriel %s a été ajouté à la table, mais un ou plusieurs dossiers prédéfinis n\'ont pu être créés!'; +$PALANG['pCreate_mailbox_result_error'] = 'Échec de la création du compte courriel %s !'; +$PALANG['pCreate_mailbox_result_success'] = 'Le compte courriel %s a été ajouté à la table des comptes !'; +$PALANG['pCreate_mailbox_result_succes_nosubfolders'] = 'Le compte courriel %s a été ajouté à la table, mais un ou plusieurs dossiers prédéfinis n\'ont pu être créés !'; $PALANG['mailbox_updated'] = "Le compte courriel %s a été mis à jour."; -$PALANG['mailbox_update_failed'] = "Echec de la mise à jour du compte courriel %s!"; +$PALANG['mailbox_update_failed'] = "Échec de la mise à jour du compte courriel %s !"; $PALANG['pEdit_mailbox_welcome'] = 'Modifier un compte courriel.'; $PALANG['pEdit_mailbox_username'] = 'Nom d\'utilisateur'; -$PALANG['pEdit_mailbox_password_text_error'] = 'Le mot de passe entré ne correspond pas!'; +$PALANG['pEdit_mailbox_password_text_error'] = 'Le mot de passe entré ne correspond pas !'; $PALANG['pEdit_mailbox_quota'] = 'Limite'; -$PALANG['pEdit_mailbox_quota_text'] = 'MB'; +$PALANG['pEdit_mailbox_quota_text'] = 'Mo'; $PALANG['mb_max'] = 'Mo (max: %s)'; -$PALANG['pEdit_mailbox_quota_text_error'] = 'La limite fournie est trop haute!'; +$PALANG['pEdit_mailbox_quota_text_error'] = 'La limite fournie est trop élevée !'; $PALANG['pEdit_mailbox_domain_error'] = 'Ce domaine n\'est pas le votre: '; $PALANG['pEdit_mailbox_result_error'] = 'Impossible de modifier le compte courriel !'; @@ -167,32 +168,32 @@ $PALANG['pPassword_password_current'] = 'Mot de passe actuel'; $PALANG['pPassword_password_current_text_error'] = 'Vous n\'avez pas fournit le mot de passe actuel !'; $PALANG['pPassword_password'] = 'Nouveau mot de passe'; $PALANG['pPassword_password2'] = 'Nouveau mot de passe (confirmation)'; -$PALANG['pPassword_password_text_error'] = 'Le mot de passe fourni ne correspond pas ou est vide!'; +$PALANG['pPassword_password_text_error'] = 'Le mot de passe fourni ne correspond pas ou est vide !'; $PALANG['change_password'] = 'Changer le mot de passe'; -$PALANG['pPassword_result_error'] = 'Impossible de changer le mot de passe de %s!'; -$PALANG['pPassword_result_success'] = 'Le mot de passe de %s a été change!'; +$PALANG['pPassword_result_error'] = 'Impossible de changer le mot de passe de %s !'; +$PALANG['pPassword_result_success'] = 'Le mot de passe de %s a été changé !'; $PALANG['pEdit_vacation_set'] = 'Activer le répondeur'; $PALANG['pEdit_vacation_remove'] = 'Désactiver le répondeur'; -$PALANG['pVacation_result_error'] = 'Impossible de mettre à jour les réglages du répondeur de %s!'; -$PALANG['pVacation_result_removed'] = 'Le répondeur de %s a été désactivé!'; -$PALANG['pVacation_result_added'] = 'Le répondeur de %s a été activé!'; +$PALANG['pVacation_result_error'] = 'Impossible de mettre à jour les réglages du répondeur de %s !'; +$PALANG['pVacation_result_removed'] = 'Le répondeur de %s a été désactivé !'; +$PALANG['pVacation_result_added'] = 'Le répondeur de %s a été activé !'; $PALANG['pVacation_reply_type'] = 'Type de réponse'; $PALANG['pVacation_reply_delay_time'] = 'Intervalle'; $PALANG['pVacation_reply_delay_time_text'] = 'Durée en secondes'; -$PALANG['pVacation_until_before_today'] = 'The Date of [Active until] is set before Today'; # XXX -$PALANG['pVacation_until_before_from'] = 'The Date of [Active until] is set before [Active from]'; # XXX +$PALANG['pVacation_until_before_today'] = 'La date de [Actif jusqu\'au] est antèrieure à la date d\'aujourd\'hui'; +$PALANG['pVacation_until_before_from'] = 'La date de [Actif jusqu\'au] est antèrieure à [Actif à partir de]'; $PALANG['reply_once'] = 'Répondre une fois'; $PALANG['reply_every_mail'] = 'Répondre à chaque message'; -$PALANG['reply_once_per_day'] = 'Reply once a day'; # XXX +$PALANG['reply_once_per_day'] = 'Répondre une fois par jour'; $PALANG['reply_once_per_week'] = 'Répondre une fois par semaine'; -$PALANG['pViewlog_welcome'] = 'Visualiser les 10 dernières actions pour '; +$PALANG['pViewlog_welcome'] = 'Visualiser les %s dernières actions pour '; $PALANG['pViewlog_timestamp'] = 'Date/Heure'; $PALANG['pViewlog_action'] = 'Action'; $PALANG['pViewlog_data'] = 'Information'; -$PALANG['pViewlog_action_create_domain'] = 'créer domaine'; -$PALANG['pViewlog_action_delete_domain'] = 'supprimer domaine'; -$PALANG['pViewlog_action_edit_domain'] = 'modifier domaine'; +$PALANG['pViewlog_action_create_domain'] = 'créer le domaine'; +$PALANG['pViewlog_action_delete_domain'] = 'supprimer le domaine'; +$PALANG['pViewlog_action_edit_domain'] = 'modifier le domaine'; $PALANG['pViewlog_action_create_mailbox'] = 'créer un compte courriel'; $PALANG['pViewlog_action_delete_mailbox'] = 'supprimer un compte courriel'; $PALANG['pViewlog_action_edit_mailbox'] = 'éditer un compte courriel'; @@ -204,32 +205,32 @@ $PALANG['pViewlog_action_delete_alias'] = 'supprimer un alias'; $PALANG['pViewlog_action_delete_alias_domain'] = 'supprimer un alias de domaine'; $PALANG['pViewlog_action_edit_alias'] = 'éditer un alias'; $PALANG['pViewlog_action_edit_alias_state'] = 'activer un alias'; -$PALANG['pViewlog_action_edit_alias_domain_state'] = 'editer alias de domaine actif'; +$PALANG['pViewlog_action_edit_alias_domain_state'] = 'éditer alias de domaine actif'; $PALANG['pViewlog_action_edit_password'] = 'changer le mot de passe'; -$PALANG['pViewlog_action_create_admin'] = 'créer un admin'; -$PALANG['pViewlog_action_edit_admin'] = 'modifier un admin'; -$PALANG['pViewlog_action_delete_admin'] = 'delete admin'; # XXX +$PALANG['pViewlog_action_create_admin'] = 'créer un administrateur'; +$PALANG['pViewlog_action_edit_admin'] = 'modifier un administrateur'; +$PALANG['pViewlog_action_delete_admin'] = 'effacer un administrateur'; $PALANG['pViewlog_action_edit_vacation'] = 'modifier le répondeur'; -$PALANG['pViewlog_action_create_fetchmail'] = 'create fetchmail job'; # XXX -$PALANG['pViewlog_action_edit_fetchmail'] = 'edit fetchmail job'; # XXX -$PALANG['pViewlog_action_delete_fetchmail'] = 'delete fetchmail job'; # XXX +$PALANG['pViewlog_action_create_fetchmail'] = 'créer une tâche de récupération du courrier'; +$PALANG['pViewlog_action_edit_fetchmail'] = 'éditer la tâche de récupération du courrier'; +$PALANG['pViewlog_action_delete_fetchmail'] = 'effacer la tâche de récupération du courrier'; -$PALANG['pViewlog_result_error'] = 'Impossible de trouver le journal des événements!'; +$PALANG['pViewlog_result_error'] = 'Impossible de trouver le journal des événements !'; $PALANG['pSendmail_welcome'] = 'Envoyer un courriel.'; $PALANG['from'] = 'De'; $PALANG['pSendmail_to'] = 'À'; -$PALANG['pSendmail_to_text_error'] = 'À est vide ou ce n\'est pas une adresse courriel valide!'; +$PALANG['pSendmail_to_text_error'] = '"À" est vide ou ce n\'est pas une adresse courriel valide !'; $PALANG['subject'] = 'Sujet'; $PALANG['pSendmail_subject_text'] = 'Bienvenue'; $PALANG['pSendmail_body'] = 'Message'; $PALANG['pSendmail_button'] = 'Envoyer le message'; -$PALANG['pSendmail_result_error'] = 'Erreur lors de l\'envoit du message! (%s)'; # XXX text change - new: Unable to send email to %s! -$PALANG['pSendmail_result_success'] = 'Le message a été envoyé! (%s)'; # XXX text change - new: Email sent to %s. +$PALANG['pSendmail_result_error'] = 'Impossible d\'envoyer le courriel à %s !'; +$PALANG['pSendmail_result_success'] = 'Le message a été envoyé à %s.'; -$PALANG['pAdminMenu_list_admin'] = 'Liste Administrateurs'; -$PALANG['pAdminMenu_list_domain'] = 'Liste Domaines'; -$PALANG['pAdminMenu_list_virtual'] = 'Liste Virtuels'; +$PALANG['pAdminMenu_list_admin'] = 'Liste des Administrateurs'; +$PALANG['pAdminMenu_list_domain'] = 'Liste des Domaines'; +$PALANG['pAdminMenu_list_virtual'] = 'Liste des Virtuels'; $PALANG['pAdminMenu_backup'] = 'Sauvegarde'; $PALANG['pAdminMenu_create_domain_admins'] = 'Administrateurs de domaines'; $PALANG['pAdminMenu_create_admin'] = 'Nouvel administrateur'; @@ -245,54 +246,54 @@ $PALANG['last_modified'] = 'Dernière modification'; $PALANG['pAdminCreate_domain_welcome'] = 'Ajouter un nouveau domaine'; -$PALANG['pAdminCreate_domain_domain_text_error'] = 'Le domaine existe déjà!'; -$PALANG['domain_does_not_exist'] = 'Ce domaine n\'existe pas!'; -$PALANG['pAdminCreate_domain_domain_text_error2'] = 'Le domaine est non valide!'; +$PALANG['pAdminCreate_domain_domain_text_error'] = 'Le domaine existe déjà !'; +$PALANG['domain_does_not_exist'] = 'Ce domaine n\'existe pas !'; +$PALANG['pAdminCreate_domain_domain_text_error2'] = 'Le domaine n\'est pas valide !'; $PALANG['pAdminCreate_domain_defaultaliases'] = 'Ajouter les alias par défaut'; $PALANG['pAdminCreate_domain_button'] = 'Ajouter un domaine'; -$PALANG['pAdminCreate_domain_result_error'] = 'Impossible d\'ajouter le domaine %s!'; -$PALANG['pAdminCreate_domain_result_success'] = 'Le domaine %s a été ajouté!'; +$PALANG['pAdminCreate_domain_result_error'] = 'Impossible d\'ajouter le domaine %s !'; +$PALANG['pAdminCreate_domain_result_success'] = 'Le domaine %s a été ajouté !'; $PALANG['domain_updated'] = 'Le domaine %s a été mis à jour.'; -$PALANG['pAdminDelete_admin_error'] = 'Impossible de supprimer l\'admin!'; +$PALANG['pAdminDelete_admin_error'] = 'Impossible de supprimer l\'administrateur !'; -$PALANG['domain_postdel_failed'] = 'Le script postdeletion du domaine a échoué, consultez la log!'; -$PALANG['domain_postcreate_failed'] = 'Le script postcreate du domaine a échoué, consultez la log!'; -$PALANG['mailbox_postdel_failed'] = 'Le script postdeletion du compte courriel a échoué, consultez la log!'; -$PALANG['mailbox_postedit_failed'] = 'Le script postedit du compte courriel a échoué, consultez la log!'; -$PALANG['mailbox_postcreate_failed'] = 'Le script postcreate du compte courriel a échoué, consultez la log!'; -$PALANG['pAdminDelete_alias_domain_error'] = 'Impossible de supprimé cet alias de domaine!'; -$PALANG['domain_conflict_vacation_domain'] = 'You can\'t use the vacation domain as mail domain!'; # XXX +$PALANG['domain_postdel_failed'] = 'Le script "postdeletion" du domaine a échoué, consultez le journal !'; +$PALANG['domain_postcreate_failed'] = 'Le script "postcreate" du domaine a échoué, consultez le journal !'; +$PALANG['mailbox_postdel_failed'] = 'Le script "postdeletion" du compte courriel a échoué, consultez le journal !'; +$PALANG['mailbox_postedit_failed'] = 'Le script "postedit" du compte courriel a échoué, consultez le journal !'; +$PALANG['mailbox_postcreate_failed'] = 'Le script "postcreate" du compte courriel a échoué, consultez le journal !'; +$PALANG['pAdminDelete_alias_domain_error'] = 'Impossible de supprimer cet alias de domaine !'; +$PALANG['domain_conflict_vacation_domain'] = 'Vous ne pouvez pas utiliser le domaine vacant comme domaine !'; $PALANG['pAdminEdit_domain_welcome'] = 'Modifier un domaine'; $PALANG['pAdminEdit_domain_aliases_text'] = '-1 = désactivé | 0 = illimité'; $PALANG['pAdminEdit_domain_maxquota'] = 'Limite maximum'; -$PALANG['pAdminEdit_domain_maxquota_text'] = 'MB | -1 = désactivé | 0 = illimité'; +$PALANG['pAdminEdit_domain_maxquota_text'] = 'Mo | -1 = désactivé | 0 = illimité'; $PALANG['pAdminEdit_domain_quota'] = 'Quota du Domaine'; $PALANG['transport'] = 'Transport'; $PALANG['pAdminEdit_domain_transport_text'] = 'Definir le transport'; -$PALANG['pAdminEdit_domain_backupmx'] = 'Le serveur est un "backup MX"'; -$PALANG['pAdminEdit_domain_result_error'] = 'Echec de la mise à jour du domaine %s'; +$PALANG['pAdminEdit_domain_backupmx'] = 'Le serveur est un "Backup MX"'; +$PALANG['pAdminEdit_domain_result_error'] = 'Échec de la mise à jour du domaine %s'; $PALANG['pAdminCreate_admin_welcome'] = 'Ajouter un nouvel administrateur de domaine'; $PALANG['email_address'] = 'adresse courriel'; -$PALANG['pAdminCreate_admin_username_text_error1'] = 'Ce n\'est pas une adresse courriel administrateur valide!'; -$PALANG['admin_already_exists'] = 'Cet administrateur existe déjà!'; -$PALANG['admin_does_not_exist'] = 'L\'administrateur n\'existe pas!'; +$PALANG['pAdminCreate_admin_username_text_error1'] = 'Ce n\'est pas une adresse courriel administrateur valide !'; +$PALANG['admin_already_exists'] = 'Cet administrateur existe déjà !'; +$PALANG['admin_does_not_exist'] = 'L\'administrateur n\'existe pas !'; $PALANG['pAdminCreate_admin_button'] = 'Ajouter un administrateur'; $PALANG['pAdminCreate_admin_result_error'] = 'L\'ajout de l\administrateur %s a échoué'; -$PALANG['pAdminCreate_admin_result_success'] = 'L\'administrateur %s a été ajouté!'; +$PALANG['pAdminCreate_admin_result_success'] = 'L\'administrateur %s a été ajouté !'; $PALANG['pAdminEdit_admin_welcome'] = 'Modifier un domaine'; $PALANG['admin'] = 'Administrateur'; $PALANG['password_again'] = 'Mot de passe (confirmation)'; $PALANG['super_admin'] = 'Super administrateur'; -$PALANG['super_admin_desc'] = 'Les Super administrateurs ont accès à tous les domaines, ils peuvent gérer les domaines et les comptes d\administrateur.'; -$PALANG['pAdminEdit_admin_result_error'] = 'Impossible de modifier l\'administrateur %s!'; -$PALANG['pAdminEdit_admin_result_success'] = 'L\'administrateur %s a été ajouté!'; +$PALANG['super_admin_desc'] = 'Les Super administrateurs ont accès à tous les domaines, ils peuvent gérer les domaines et les comptes d\'administrateur.'; +$PALANG['pAdminEdit_admin_result_error'] = 'Impossible de modifier l\'administrateur %s !'; +$PALANG['pAdminEdit_admin_result_success'] = 'L\'administrateur %s a été ajouté !'; $PALANG['pUsersLogin_welcome'] = 'Entrer votre adresse courriel pour modifier votre mot de passe et vos transferts.'; -$PALANG['pUsersLogin_username_incorrect'] = 'L\'adresse courriel est invalide. Assurez-vous d\'avoir correctement saisie votre adresse courriel!'; -$PALANG['pUsersLogin_password_incorrect'] = 'Votre mot de passe est invalide!'; +$PALANG['pUsersLogin_username_incorrect'] = 'L\'adresse courriel est invalide. Assurez-vous d\'avoir correctement saisi votre adresse courriel !'; +$PALANG['pUsersLogin_password_incorrect'] = 'Votre mot de passe est invalide !'; $PALANG['pUsersMenu_vacation'] = 'Réponse Automatique'; $PALANG['pUsersMenu_edit_alias'] = 'Modifier votre transfert'; @@ -303,12 +304,12 @@ $PALANG['pUsersMain_edit_alias'] = 'Modifier vos transferts de courriel.'; $PALANG['pUsersMain_password'] = 'Changer votre mot de passe.'; $PALANG['pUsersVacation_welcome'] = 'Répondeur Automatique.'; -$PALANG['pUsersVacation_welcome_text'] = 'Votre repondeur automatique est déjà configuré! (%s)'; # XXX Text changed to: 'Auto response for %s is active!' +$PALANG['pUsersVacation_welcome_text'] = 'Le repondeur automatique pour %s est déjà configuré !'; $PALANG['pUsersVacation_subject_text'] = 'Notification d\'absence'; $PALANG['message'] = 'Message'; $PALANG['pUsersVacation_body_text'] = << 0) { $delimiter = preg_quote($CONF['recipient_delimiter'], "/"); $goto_single_rec_del = ""; - $tMailbox = array(); while ($row = db_array ($result['result'])) { if ($display_mailbox_aliases) { $goto_split = explode(",", $row['goto']); $row['goto_mailbox'] = 0; $row['goto_other'] = array(); - + foreach ($goto_split as $goto_single) { if (!empty($CONF['recipient_delimiter'])) { $goto_single_rec_del = preg_replace('/' .$delimiter. '[^' .$delimiter. '@]*@/', "@", $goto_single); diff --git a/sendmail.php b/sendmail.php index bb5e3e7c..c4b1a1db 100644 --- a/sendmail.php +++ b/sendmail.php @@ -51,6 +51,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") $tBody = stripslashes($tBody); # TODO: check for get_magic_quotes_gpc inside safepost/safeget } + $error = 0; $email_check = check_email ($fTo); if (empty ($fTo) or ($email_check != '')) { diff --git a/setup.php b/setup.php index e48a4662..7aaba195 100644 --- a/setup.php +++ b/setup.php @@ -1,16 +1,16 @@ Error: Depends on: PHP v5
\n"; + print "
  • Error: Depends on: PHP v5+
  • \n"; $error += 1; } elseif (version_compare(phpversion(), '5.2.3') < 0) { # smarty uses htmlentities() with 4 parameters, the 4th parameter was introduced in PHP 5.2.3 @@ -110,7 +114,7 @@ if ($f_get_magic_quotes_gpc == 1) } else { - print "
  • Warning: Magic Quotes: ON (internal workaround used)
  • \n"; + print "
  • Warning: Magic Quotes: ON (internal workaround used)
  • \n"; } } else @@ -146,26 +150,6 @@ else $error =+ 1; } -// -// Check if templates directory is writable -// - -if (!is_writeable($incpath.'/templates_c')) -{ - if(!is_dir($incpath . '/templates_c')) { - print "
  • Error: Smarty template compile directory templates_c not found.
    \n"; - echo "Please mkdir -p $incpath/templates_c and make it writeable by the web server\n"; - $error =+ 1; - } - else { - print "
  • Error: Smarty template compile directory templates_c is not writable.
    \n"; - print "Please make it writable.
    \n"; - print "If you are using SELinux or AppArmor, you might need to adjust their setup to allow write access.
    \n"; - $error =+ 1; - } -} else { - print "
  • Smarty template compile directory is writable - OK
    \n"; -} // // Check if there is support for at least 1 database @@ -174,10 +158,10 @@ if (($f_mysql_connect == 0) and ($f_mysqli_connect == 0) and ($f_pg_connect == 0 { print "
  • Error: There is no database support in your PHP setup
    \n"; print "To install MySQL 3.23 or 4.0 support on FreeBSD:
    \n"; - print "
    % cd /usr/ports/databases/php$phpversion-mysql/\n";
    +    print "
    % cd /usr/ports/databases/php{$phpversion}-mysql/\n";
         print "% make clean install\n";
         print " - or with portupgrade -\n";
    -    print "% portinstall php$phpversion-mysql
    \n"; + print "% portinstall php{$phpversion}-mysql
    \n"; if ($phpversion >= 5) { print "To install MySQL 4.1 support on FreeBSD:
    \n"; @@ -187,10 +171,10 @@ if (($f_mysql_connect == 0) and ($f_mysqli_connect == 0) and ($f_pg_connect == 0 print "% portinstall php5-mysqli\n"; } print "To install PostgreSQL support on FreeBSD:
    \n"; - print "
    % cd /usr/ports/databases/php$phpversion-pgsql/\n";
    +    print "
    % cd /usr/ports/databases/php{$phpversion}-pgsql/\n";
         print "% make clean install\n";
         print " - or with portupgrade -\n";
    -    print "% portinstall php$phpversion-pgsql
  • \n"; + print "% portinstall php{$phpversion}-pgsql\n"; $error =+ 1; } // @@ -249,7 +233,7 @@ if ($config_loaded) { print "Please edit the \$CONF['database_*'] parameters in config.inc.php.\n"; print "$error_text\n"; $error ++; - } + } } // @@ -386,7 +370,7 @@ else } } - } + } if ( ($setuppw == "" || $setuppw == "changeme" || safeget("lostpw") == 1 || $lostpw_error != 0) /* && $_SERVER['REQUEST_METHOD'] != "POST" */ ) { # show "create setup password" form @@ -397,15 +381,16 @@ else
    + - + - + @@ -429,24 +414,24 @@ else - - + + - - - + + + - - - + + + - - - + + + @@ -457,9 +442,10 @@ else Since version 2.3 there is no requirement to delete setup.php!
    \n"; - print "Check the config.inc.php file for any other settings that you might need to change!
    \n"; +?> + Since version 2.3 there is no requirement to delete setup.php!
    + Check the config.inc.php file for any other settings that you might need to change!
    + @@ -467,6 +453,13 @@ else {$errors[$key]}"; +} + function generate_setup_password_salt() { $salt = time() . '*' . $_SERVER['REMOTE_ADDR'] . '*' . mt_rand(0,60000); $salt = md5($salt); @@ -526,7 +519,7 @@ function create_admin($values) { if (!$handler->init($values['username'])) { return array(1, "", $handler->errormsg); - } + } if (!$handler->set($values)) { return array(1, "", $handler->errormsg); diff --git a/smarty.inc.php b/smarty.inc.php index a2c1632c..f6ff7ad0 100644 --- a/smarty.inc.php +++ b/smarty.inc.php @@ -20,6 +20,11 @@ class PFASmarty { if(is_dir($templates_c) && is_writeable($templates_c)) { $this->template->setCompileDir($templates_c); } + else { + $this->template->compile_check = false; + $this->template->caching = false; + $this->template->setCompileDir(sys_get_temp_dir()); + } $this->template->setConfigDir(dirname(__FILE__) . '/configs'); } diff --git a/templates/footer.tpl b/templates/footer.tpl index cde37dc7..56a84ca1 100644 --- a/templates/footer.tpl +++ b/templates/footer.tpl @@ -1,8 +1,8 @@

    Change setup password

    Setup password
    Setup password (again)

    Create superadmin account

    Setup password Lost password?
    - + {#tr_header#} diff --git a/upgrade.php b/upgrade.php index dd9a84a1..8695bd25 100644 --- a/upgrade.php +++ b/upgrade.php @@ -339,6 +339,14 @@ function _add_index($table, $indexname, $fieldlist) { } function upgrade_1_mysql() { + # + # creating the tables in this very old layout (pre 2.1) causes trouble if the MySQL charset is not latin1 (multibyte vs. index length) + # therefore: + + return; # <-- skip running this function at all. + + # (remove the above "return" if you really want to start with a pre-2.1 database layout) + // CREATE MYSQL DATABASE TABLES. $admin = table_by_key('admin'); $alias = table_by_key('alias'); @@ -438,6 +446,14 @@ function upgrade_1_mysql() { } function upgrade_2_mysql() { + # + # updating the tables in this very old layout (pre 2.1) causes trouble if the MySQL charset is not latin1 (multibyte vs. index length) + # therefore: + + return; # <-- skip running this function at all. + + # (remove the above "return" if you really want to update a pre-2.1 database) + # upgrade pre-2.1 database # from TABLE_BACKUP_MX.TXT $table_domain = table_by_key ('domain'); @@ -576,6 +592,14 @@ function upgrade_2_pgsql() { } function upgrade_3_mysql() { + # + # updating the tables in this very old layout (pre 2.1) causes trouble if the MySQL charset is not latin1 (multibyte vs. index length) + # therefore: + + return; # <-- skip running this function at all. + + # (remove the above "return" if you really want to update a pre-2.1 database) + # upgrade pre-2.1 database # from TABLE_CHANGES.TXT $table_admin = table_by_key ('admin'); @@ -907,7 +931,7 @@ function upgrade_318_mysql() { db_query_parsed( " CREATE TABLE {IF_NOT_EXISTS} $table_vacation_notification ( on_vacation varchar(255) {LATIN1} NOT NULL, - notified varchar(255) NOT NULL, + notified varchar(255) {LATIN1} NOT NULL, notified_at timestamp NOT NULL default CURRENT_TIMESTAMP, PRIMARY KEY on_vacation (`on_vacation`, `notified`), CONSTRAINT `vacation_notification_pkey` @@ -919,7 +943,7 @@ function upgrade_318_mysql() { # in case someone has manually created the table with utf8 fields before: $all_sql = explode("\n", trim(" - ALTER TABLE `$table_vacation_notification` CHANGE `notified` `notified` VARCHAR( 255 ) NOT NULL + ALTER TABLE `$table_vacation_notification` CHANGE `notified` `notified` VARCHAR( 255 ) {LATIN1} NOT NULL ALTER TABLE `$table_vacation_notification` DEFAULT CHARACTER SET utf8 ")); # Possible errors that can be ignored: @@ -1009,8 +1033,8 @@ function upgrade_438_mysql() { $table_alias_domain = table_by_key('alias_domain'); db_query_parsed(" CREATE TABLE IF NOT EXISTS $table_alias_domain ( - `alias_domain` varchar(255) NOT NULL default '', - `target_domain` varchar(255) NOT NULL default '', + `alias_domain` varchar(255) {LATIN1} NOT NULL default '', + `target_domain` varchar(255) {LATIN1} NOT NULL default '', `created` {DATETIME}, `modified` {DATETIME}, `active` tinyint(1) NOT NULL default '1', @@ -1633,6 +1657,21 @@ function upgrade_1835_mysql() { db_query_parsed("ALTER TABLE `$table` CHANGE `timestamp` `timestamp` {DATETIME}"); } +function upgrade_1836_mysql() { + $table_alias_domain = table_by_key ('alias_domain'); + $table_vacation_notification = table_by_key('vacation_notification'); + + $all_sql = explode("\n", trim(" + ALTER TABLE `$table_alias_domain` CHANGE `alias_domain` `alias_domain` VARCHAR(255) {LATIN1} NOT NULL default '' + ALTER TABLE `$table_alias_domain` CHANGE `target_domain` `target_domain` VARCHAR(255) {LATIN1} NOT NULL default '' + ALTER TABLE `$table_vacation_notification` CHANGE `notified` `notified` VARCHAR(255) {LATIN1} NOT NULL default '' + ")); + + foreach ($all_sql as $sql) { + $result = db_query_parsed($sql, TRUE); + } + +} # TODO MySQL: # - various varchar fields do not have a default value # https://sourceforge.net/projects/postfixadmin/forums/forum/676076/topic/3419725 diff --git a/vacation.php b/vacation.php index a4212d3c..0aaaf900 100644 --- a/vacation.php +++ b/vacation.php @@ -67,6 +67,8 @@ if($CONF['vacation'] == 'NO') { date_default_timezone_set(@date_default_timezone_get()); # Suppress date.timezone warnings +$error = 0; + $vh = new VacationHandler($fUsername); $choice_of_reply = Config::read('vacation_choice_of_reply'); diff --git a/variables.inc.php b/variables.inc.php deleted file mode 100644 index 9257a4f9..00000000 --- a/variables.inc.php +++ /dev/null @@ -1,71 +0,0 @@ - diff --git a/viewlog.php b/viewlog.php index fcdff5d6..287baa25 100644 --- a/viewlog.php +++ b/viewlog.php @@ -36,6 +36,9 @@ else { $list_domains = list_domains_for_admin ($SESSID_USERNAME); } +$fDomain = ''; +$error = 0; + if ($_SERVER['REQUEST_METHOD'] == "GET") { if ((is_array ($list_domains) and sizeof ($list_domains) > 0)) $fDomain = $list_domains[0]; @@ -57,9 +60,9 @@ $tLog = array(); if ($error != 1) { $table_log = table_by_key('log'); - $query = "SELECT timestamp,username,domain,action,data FROM $table_log WHERE domain='$fDomain' ORDER BY timestamp DESC LIMIT 10"; + $query = "SELECT timestamp,username,domain,action,data FROM $table_log WHERE domain='$fDomain' ORDER BY timestamp DESC LIMIT " . intval($CONF[page_size]); if (db_pgsql()) { - $query = "SELECT extract(epoch from timestamp) as timestamp,username,domain,action,data FROM $table_log WHERE domain='$fDomain' ORDER BY timestamp DESC LIMIT 10"; + $query = "SELECT extract(epoch from timestamp) as timestamp,username,domain,action,data FROM $table_log WHERE domain='$fDomain' ORDER BY timestamp DESC LIMIT " . intval($CONF[page_size]); } $result=db_query($query); if ($result['rows'] > 0)
    {$PALANG.pViewlog_welcome} {$fDomain}{$PALANG.pViewlog_welcome|replace:"%s":$CONF.page_size} {$fDomain}
    {$PALANG.pViewlog_timestamp}