SF.net SVN: postfixadmin:[422] trunk
Brought to you by:
christian_boltz,
gingerdog
From: <chr...@us...> - 2008-07-27 21:28:49
|
Revision: 422 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=422&view=rev Author: christian_boltz Date: 2008-07-27 21:28:55 +0000 (Sun, 27 Jul 2008) Log Message: ----------- create-alias-domain.php: - filter available alias and target domains (and print an error message if none is available) - print success message via flash_info, not inside the form and do a redirect afterwards. We would have to update the list of domains available for aliasing otherwise. - added vim: settings templates/create-alias-domain.php: - hide form if no domains are available for aliasing - move logic of skipping non-available domains to /create-alias-domain.php - added vim: settings templates/list-virtual.php: - show "create alias domain" link (only) if it makes sence (not perfect yet, but better than before) - don't create empty <div> etc. if domain has no mailboxes - intentionally skipped most whitespace fixes (added a comment instead), they would make the patch unreadable languages/*: - additional error message for alias domains: 'All domains are already aliased.' Modified Paths: -------------- trunk/create-alias-domain.php trunk/languages/bg.lang trunk/languages/ca.lang trunk/languages/cn.lang trunk/languages/cs.lang trunk/languages/da.lang trunk/languages/de.lang trunk/languages/en.lang trunk/languages/es.lang trunk/languages/et.lang trunk/languages/eu.lang trunk/languages/fi.lang trunk/languages/fo.lang trunk/languages/fr.lang trunk/languages/hr.lang trunk/languages/hu.lang trunk/languages/is.lang trunk/languages/it.lang trunk/languages/ja.lang trunk/languages/lt.lang trunk/languages/mk.lang trunk/languages/nb.lang trunk/languages/nl.lang trunk/languages/nn.lang trunk/languages/pl.lang trunk/languages/pt-br.lang trunk/languages/ru.lang trunk/languages/sk.lang trunk/languages/sl.lang trunk/languages/sv.lang trunk/languages/tr.lang trunk/languages/tw.lang trunk/templates/create-alias-domain.php trunk/templates/list-virtual.php Modified: trunk/create-alias-domain.php =================================================================== --- trunk/create-alias-domain.php 2008-07-27 19:25:51 UTC (rev 421) +++ trunk/create-alias-domain.php 2008-07-27 21:28:55 UTC (rev 422) @@ -58,13 +58,31 @@ } } +# filter available alias domains +$alias_domains = array(); +foreach ($list_domains as $dom) { + if (isset($list_aliases[$dom]) || in_array($dom,$list_aliases)) continue; + $alias_domains[] = $dom; +} +if (count($alias_domains) == 0) { + $error = 1; + $tMessage = $PALANG['pCreate_alias_domain_error4']; +} + +# filter available target domains +foreach ($list_domains as $dom) { + if (isset($list_aliases[$dom])) continue; + $target_domains[] = $dom; +} + + if (isset ($_REQUEST['alias_domain'])) { $fAliasDomain = escape_string ($_REQUEST['alias_domain']); $fAliasDomain = strtolower ($fAliasDomain); } if (isset ($_REQUEST['target_domain'])) { $fTargetDomain = escape_string ($_REQUEST['target_domain']); - $fTargetDomain = strtolower ($fTargetDomain); + $fTargetDomain = strtolower ($fTargetDomain); } if (isset ($_REQUEST['active'])) { $fActive = (bool)$_REQUEST['active']; @@ -103,7 +121,10 @@ else { db_log ($SESSID_USERNAME, $fAliasDomain, 'create_alias_domain', "$fAliasDomain -> $fTargetDomain"); - $tMessage = $PALANG['pCreate_alias_domain_success']; + flash_info($PALANG['pCreate_alias_domain_success']); + # we would have to update the list of domains available for aliasing. Doing a redirect is easier. + header("Location: " . $CONF['postfix_admin_url'] . "/create-alias-domain.php"); + exit; } } @@ -114,4 +135,5 @@ include ("templates/menu.php"); include ("templates/create-alias-domain.php"); include ("templates/footer.php"); +/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ ?> Modified: trunk/languages/bg.lang =================================================================== --- trunk/languages/bg.lang 2008-07-27 19:25:51 UTC (rev 421) +++ trunk/languages/bg.lang 2008-07-27 21:28:55 UTC (rev 422) @@ -101,6 +101,7 @@ $PALANG['pCreate_alias_domain_error1'] = 'Не ви е позволено да използвате избраната конфигурация.'; $PALANG['pCreate_alias_domain_error2'] = 'Избраната конфигурация е невалидна. Изберете друга!'; $PALANG['pCreate_alias_domain_error3'] = 'Възникна грешка при добавяне в базата.'; +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Създай нов alias за вашия домейн.'; Modified: trunk/languages/ca.lang =================================================================== --- trunk/languages/ca.lang 2008-07-27 19:25:51 UTC (rev 421) +++ trunk/languages/ca.lang 2008-07-27 21:28:55 UTC (rev 422) @@ -99,6 +99,7 @@ $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Crear un nou àlies pel domini.'; Modified: trunk/languages/cn.lang =================================================================== --- trunk/languages/cn.lang 2008-07-27 19:25:51 UTC (rev 421) +++ trunk/languages/cn.lang 2008-07-27 21:28:55 UTC (rev 422) @@ -100,6 +100,7 @@ $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = '在你的域中新建一个别名.'; Modified: trunk/languages/cs.lang =================================================================== --- trunk/languages/cs.lang 2008-07-27 19:25:51 UTC (rev 421) +++ trunk/languages/cs.lang 2008-07-27 21:28:55 UTC (rev 422) @@ -105,6 +105,7 @@ $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Vytvořit nové přesměrování ve Vaší doméně.'; Modified: trunk/languages/da.lang =================================================================== --- trunk/languages/da.lang 2008-07-27 19:25:51 UTC (rev 421) +++ trunk/languages/da.lang 2008-07-27 21:28:55 UTC (rev 422) @@ -103,6 +103,7 @@ $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Tilføj nyt alias til dit domæne.'; Modified: trunk/languages/de.lang =================================================================== --- trunk/languages/de.lang 2008-07-27 19:25:51 UTC (rev 421) +++ trunk/languages/de.lang 2008-07-27 21:28:55 UTC (rev 422) @@ -102,6 +102,7 @@ $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Neuen Alias für Ihre Domain anlegen'; Modified: trunk/languages/en.lang =================================================================== --- trunk/languages/en.lang 2008-07-27 19:25:51 UTC (rev 421) +++ trunk/languages/en.lang 2008-07-27 21:28:55 UTC (rev 422) @@ -104,6 +104,7 @@ $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; $PALANG['pCreate_alias_welcome'] = 'Create a new alias for your domain.'; Modified: trunk/languages/es.lang =================================================================== --- trunk/languages/es.lang 2008-07-27 19:25:51 UTC (rev 421) +++ trunk/languages/es.lang 2008-07-27 21:28:55 UTC (rev 422) @@ -99,6 +99,7 @@ $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Crear un nuevo alias para el dominio.'; Modified: trunk/languages/et.lang =================================================================== --- trunk/languages/et.lang 2008-07-27 19:25:51 UTC (rev 421) +++ trunk/languages/et.lang 2008-07-27 21:28:55 UTC (rev 422) @@ -100,6 +100,7 @@ $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Loo uus alias domeenis.'; Modified: trunk/languages/eu.lang =================================================================== --- trunk/languages/eu.lang 2008-07-27 19:25:51 UTC (rev 421) +++ trunk/languages/eu.lang 2008-07-27 21:28:55 UTC (rev 422) @@ -99,6 +99,7 @@ $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Domeinuarentzat alias berri bat sortu.'; $PALANG['pCreate_alias_address'] = 'Aliasa'; Modified: trunk/languages/fi.lang =================================================================== --- trunk/languages/fi.lang 2008-07-27 19:25:51 UTC (rev 421) +++ trunk/languages/fi.lang 2008-07-27 21:28:55 UTC (rev 422) @@ -103,6 +103,7 @@ $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Luo uusi alias.'; Modified: trunk/languages/fo.lang =================================================================== --- trunk/languages/fo.lang 2008-07-27 19:25:51 UTC (rev 421) +++ trunk/languages/fo.lang 2008-07-27 21:28:55 UTC (rev 422) @@ -100,6 +100,7 @@ $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Stovna eitt nýtt dulnevni á tínum navnaøki.'; Modified: trunk/languages/fr.lang =================================================================== --- trunk/languages/fr.lang 2008-07-27 19:25:51 UTC (rev 421) +++ trunk/languages/fr.lang 2008-07-27 21:28:55 UTC (rev 422) @@ -102,6 +102,7 @@ $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Créer un nouvel alias pour votre domaine.'; $PALANG['pCreate_alias_address'] = 'Alias'; Modified: trunk/languages/hr.lang =================================================================== --- trunk/languages/hr.lang 2008-07-27 19:25:51 UTC (rev 421) +++ trunk/languages/hr.lang 2008-07-27 21:28:55 UTC (rev 422) @@ -99,6 +99,7 @@ $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Stvori novi alias za domenu.'; Modified: trunk/languages/hu.lang =================================================================== --- trunk/languages/hu.lang 2008-07-27 19:25:51 UTC (rev 421) +++ trunk/languages/hu.lang 2008-07-27 21:28:55 UTC (rev 422) @@ -102,6 +102,7 @@ $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Új alias készítése az adott domainhez'; Modified: trunk/languages/is.lang =================================================================== --- trunk/languages/is.lang 2008-07-27 19:25:51 UTC (rev 421) +++ trunk/languages/is.lang 2008-07-27 21:28:55 UTC (rev 422) @@ -100,6 +100,7 @@ $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Útbúa nýjan alias fyrir þitt lén.'; $PALANG['pCreate_alias_address'] = 'Alias'; Modified: trunk/languages/it.lang =================================================================== --- trunk/languages/it.lang 2008-07-27 19:25:51 UTC (rev 421) +++ trunk/languages/it.lang 2008-07-27 21:28:55 UTC (rev 422) @@ -101,6 +101,7 @@ $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Crea un nuovo alias per il tuo dominio.'; Modified: trunk/languages/ja.lang =================================================================== --- trunk/languages/ja.lang 2008-07-27 19:25:51 UTC (rev 421) +++ trunk/languages/ja.lang 2008-07-27 21:28:55 UTC (rev 422) @@ -102,6 +102,7 @@ $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = '新しい転送先の作成'; Modified: trunk/languages/lt.lang =================================================================== --- trunk/languages/lt.lang 2008-07-27 19:25:51 UTC (rev 421) +++ trunk/languages/lt.lang 2008-07-27 21:28:55 UTC (rev 422) @@ -99,6 +99,7 @@ $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Naujas sinonimas.'; Modified: trunk/languages/mk.lang =================================================================== --- trunk/languages/mk.lang 2008-07-27 19:25:51 UTC (rev 421) +++ trunk/languages/mk.lang 2008-07-27 21:28:55 UTC (rev 422) @@ -100,6 +100,7 @@ $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Креирање на нов алијас за вашиот домен.'; Modified: trunk/languages/nb.lang =================================================================== --- trunk/languages/nb.lang 2008-07-27 19:25:51 UTC (rev 421) +++ trunk/languages/nb.lang 2008-07-27 21:28:55 UTC (rev 422) @@ -102,6 +102,7 @@ $PALANG['pCreate_alias_domain_error1'] = 'Du har ikke tillatelse til å opprette den valgte konfigurasjonen.'; $PALANG['pCreate_alias_domain_error2'] = 'Den valgte konfigurasjonen er ugyldig, vennligst endre den!'; $PALANG['pCreate_alias_domain_error3'] = 'Det mislyktes å lagre informasjonen i databasen.'; +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'Domenealiaset har blitt lagt inn i tabellen over aliasdomener!'; $PALANG['pCreate_alias_welcome'] = 'Opprett et nytt alias.'; Modified: trunk/languages/nl.lang =================================================================== --- trunk/languages/nl.lang 2008-07-27 19:25:51 UTC (rev 421) +++ trunk/languages/nl.lang 2008-07-27 21:28:55 UTC (rev 422) @@ -101,6 +101,7 @@ $PALANG['pCreate_alias_domain_error1'] = 'U heeft niet genoeg rechten om de huidige configuratie te maken.'; $PALANG['pCreate_alias_domain_error2'] = 'De huidige configuratie is ongeldig, slecteer een andere!'; $PALANG['pCreate_alias_domain_error3'] = 'Fout bij vullen database.'; +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'De domein alias is toegevoegd aan de alias domein tabel!'; $PALANG['pCreate_alias_welcome'] = 'Maak een nieuw alias aan voor uw domein.'; Modified: trunk/languages/nn.lang =================================================================== --- trunk/languages/nn.lang 2008-07-27 19:25:51 UTC (rev 421) +++ trunk/languages/nn.lang 2008-07-27 21:28:55 UTC (rev 422) @@ -100,6 +100,7 @@ $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Opprett et nytt alias.'; Modified: trunk/languages/pl.lang =================================================================== --- trunk/languages/pl.lang 2008-07-27 19:25:51 UTC (rev 421) +++ trunk/languages/pl.lang 2008-07-27 21:28:55 UTC (rev 422) @@ -102,6 +102,7 @@ $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Utwórz nowy alias dla Twojej domeny.'; Modified: trunk/languages/pt-br.lang =================================================================== --- trunk/languages/pt-br.lang 2008-07-27 19:25:51 UTC (rev 421) +++ trunk/languages/pt-br.lang 2008-07-27 21:28:55 UTC (rev 422) @@ -100,6 +100,7 @@ $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Criar um novo alias para este domínio'; Modified: trunk/languages/ru.lang =================================================================== --- trunk/languages/ru.lang 2008-07-27 19:25:51 UTC (rev 421) +++ trunk/languages/ru.lang 2008-07-27 21:28:55 UTC (rev 422) @@ -104,6 +104,7 @@ $PALANG['pCreate_alias_domain_error1'] = 'Вам не разрешено создавать выбранную конфигурацию.'; $PALANG['pCreate_alias_domain_error2'] = 'Выбранная конфигурация некорректна, пожалуйста, выберите другую!'; $PALANG['pCreate_alias_domain_error3'] = 'Не удалось добавить запись в базу данных.'; +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'Домен-алиас добавлен в таблицу доменов-алиасов!'; $PALANG['pCreate_alias_welcome'] = 'Создание нового алиаса в вашем домене.'; Modified: trunk/languages/sk.lang =================================================================== --- trunk/languages/sk.lang 2008-07-27 19:25:51 UTC (rev 421) +++ trunk/languages/sk.lang 2008-07-27 21:28:55 UTC (rev 422) @@ -100,6 +100,7 @@ $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Vytvoriť nový alias vo vašej doméne.'; Modified: trunk/languages/sl.lang =================================================================== --- trunk/languages/sl.lang 2008-07-27 19:25:51 UTC (rev 421) +++ trunk/languages/sl.lang 2008-07-27 21:28:55 UTC (rev 422) @@ -100,6 +100,7 @@ $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Ustvari nov alias za določeno domeno.'; Modified: trunk/languages/sv.lang =================================================================== --- trunk/languages/sv.lang 2008-07-27 19:25:51 UTC (rev 421) +++ trunk/languages/sv.lang 2008-07-27 21:28:55 UTC (rev 422) @@ -102,6 +102,7 @@ $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Skapa nytt alias för din domän.'; Modified: trunk/languages/tr.lang =================================================================== --- trunk/languages/tr.lang 2008-07-27 19:25:51 UTC (rev 421) +++ trunk/languages/tr.lang 2008-07-27 21:28:55 UTC (rev 422) @@ -100,6 +100,7 @@ $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Domaininiz için yeni bir alias yaratýn.'; Modified: trunk/languages/tw.lang =================================================================== --- trunk/languages/tw.lang 2008-07-27 19:25:51 UTC (rev 421) +++ trunk/languages/tw.lang 2008-07-27 21:28:55 UTC (rev 422) @@ -100,6 +100,7 @@ $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = '在你的網域中新建一個別名.'; Modified: trunk/templates/create-alias-domain.php =================================================================== --- trunk/templates/create-alias-domain.php 2008-07-27 19:25:51 UTC (rev 421) +++ trunk/templates/create-alias-domain.php 2008-07-27 21:28:55 UTC (rev 422) @@ -5,14 +5,18 @@ <tr> <td colspan="3"><h3><?php print $PALANG['pCreate_alias_domain_welcome']; ?></h3></td> </tr> + +<?php +if (count($alias_domains) > 0) { +?> + <tr> <td><?php print $PALANG['pCreate_alias_domain_alias'] . ":"; ?></td> <td> <select class="flat" name="alias_domain"> <?php - foreach ($list_domains as $dom) + foreach ($alias_domains as $dom) { - if (isset($list_aliases[$dom]) || in_array($dom,$list_aliases)) continue; print "<option value=\"$dom\"".(($fAliasDomain == $dom) ? ' selected' : '').">$dom</option>\n"; } ?> @@ -24,9 +28,8 @@ <td> <select class="flat" name="target_domain"> <?php - foreach ($list_domains as $dom) + foreach ($target_domains as $dom) { - if (isset($list_aliases[$dom])) continue; print "<option value=\"$dom\"".(($fTargetDomain == $dom) ? ' selected' : '').">$dom</option>\n"; } ?> @@ -38,12 +41,22 @@ <td><input class="flat" type="checkbox" name="active" value="1"<?php if ($fActive) { print ' checked'; } ?> /></td> <td> </td> </tr> +<?php +} +?> <tr> <td colspan="3" class="standout"><?php if ($error) { print '<span class="error_msg">'; } print $tMessage; if ($error) { print '</span>'; } ?></td> </tr> +<?php +if (count($alias_domains) > 0) { +?> <tr> <td colspan="3" class="hlp_center"><input class="button" type="submit" name="submit" value="<?php print $PALANG['pCreate_alias_domain_button']; ?>" /></td> </tr> +<?php +} +?> </table> </form> </div> +<?php /* vim: set ft=php expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ ?> Modified: trunk/templates/list-virtual.php =================================================================== --- trunk/templates/list-virtual.php 2008-07-27 19:25:51 UTC (rev 421) +++ trunk/templates/list-virtual.php 2008-07-27 21:28:55 UTC (rev 422) @@ -72,7 +72,9 @@ print "</td></tr></table></div>\n"; -if (boolconf('alias_domain') && ((sizeof ($tAliasDomains) > 0) || is_array ($tTargetDomain))) +if (boolconf('alias_domain')) { +# XXX: the following block misses one intention level +if ((sizeof ($tAliasDomains) > 0) || (is_array ($tTargetDomain) )) { print "<table id=\"alias_domain_table\">\n"; print " <tr>\n"; @@ -116,8 +118,11 @@ } print "</table>\n"; +} +# XXX: the above block misses one intention level if (!is_array($tTargetDomain)) { + # TODO: don't print create link if no domains are left for aliasing print "<p><a href=\"create-alias-domain.php?target_domain=$fDomain\">" . $PALANG['pMenu_create_alias_domain'] . "</a>\n"; } } @@ -215,6 +220,7 @@ print "<p><a href=\"create-alias.php?domain=$fDomain\">" . $PALANG['pMenu_create_alias'] . "</a>\n"; } +if (sizeof ($tMailbox) > 0) { print "<div id=\"nav_bar\"><a name=\"MidArrow\"></a>\n<table width=730><colgroup span=\"1\"> <col width=\"550\"></col></colgroup> <tr><td align=left >"; if ( $limit['mbox_pgindex_count'] ) print "<b>".$PALANG['pOverview_mailbox_title']."</b>  "; ($tDisplay_back_show == 1) ? $highlight_at = $tDisplay_back / $CONF['page_size'] + 1 : $highlight_at = 0; @@ -231,22 +237,20 @@ } print "</td><td valign=middle align=right>"; -if ($tDisplay_back_show == 1) -{ - print "<a href=\"$file?domain=$fDomain&limit=$tDisplay_back#MidArrow\"><img border=\"0\" src=\"images/arrow-l.png\" title=\"" . $PALANG['pOverview_left_arrow'] . "\" alt=\"" . $PALANG['pOverview_left_arrow'] . "\" /></a>\n"; -} -if ($tDisplay_up_show == 1) -{ - print "<a href=\"$file?domain=$fDomain&limit=0#MidArrow\"><img border=\"0\" src=\"images/arrow-u.png\" title=\"" . $PALANG['pOverview_up_arrow'] . "\" alt=\"" . $PALANG['pOverview_up_arrow'] . "\" /></a>\n"; -} -if ($tDisplay_next_show == 1) -{ - print "<a href=\"$file?domain=$fDomain&limit=$tDisplay_next#MidArrow\"><img border=\"0\" src=\"images/arrow-r.png\" title=\"" . $PALANG['pOverview_right_arrow'] . "\" alt=\"" . $PALANG['pOverview_right_arrow'] . "\" /></a>\n"; -} -print "</td></tr></table></div>\n"; + if ($tDisplay_back_show == 1) + { + print "<a href=\"$file?domain=$fDomain&limit=$tDisplay_back#MidArrow\"><img border=\"0\" src=\"images/arrow-l.png\" title=\"" . $PALANG['pOverview_left_arrow'] . "\" alt=\"" . $PALANG['pOverview_left_arrow'] . "\" /></a>\n"; + } + if ($tDisplay_up_show == 1) + { + print "<a href=\"$file?domain=$fDomain&limit=0#MidArrow\"><img border=\"0\" src=\"images/arrow-u.png\" title=\"" . $PALANG['pOverview_up_arrow'] . "\" alt=\"" . $PALANG['pOverview_up_arrow'] . "\" /></a>\n"; + } + if ($tDisplay_next_show == 1) + { + print "<a href=\"$file?domain=$fDomain&limit=$tDisplay_next#MidArrow\"><img border=\"0\" src=\"images/arrow-r.png\" title=\"" . $PALANG['pOverview_right_arrow'] . "\" alt=\"" . $PALANG['pOverview_right_arrow'] . "\" /></a>\n"; + } + print "</td></tr></table></div>\n"; -if (sizeof ($tMailbox) > 0) -{ $colspan=8; if ($CONF['vacation_control_admin'] == 'YES') $colspan=$colspan+1; if ($CONF['alias_control_admin'] == 'YES') $colspan=$colspan+1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |