postfixadmin-svn Mailing List for PostfixAdmin (Page 110)
Brought to you by:
christian_boltz,
gingerdog
You can subscribe to this list here.
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(13) |
Oct
(63) |
Nov
(79) |
Dec
(34) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2008 |
Jan
(15) |
Feb
(8) |
Mar
(8) |
Apr
(44) |
May
(18) |
Jun
(20) |
Jul
(35) |
Aug
(21) |
Sep
(8) |
Oct
(9) |
Nov
(21) |
Dec
(14) |
| 2009 |
Jan
(53) |
Feb
(13) |
Mar
(36) |
Apr
(40) |
May
(22) |
Jun
(10) |
Jul
(18) |
Aug
(18) |
Sep
(7) |
Oct
(26) |
Nov
(32) |
Dec
(13) |
| 2010 |
Jan
(6) |
Feb
(7) |
Mar
(12) |
Apr
(2) |
May
(12) |
Jun
(8) |
Jul
(9) |
Aug
(12) |
Sep
(12) |
Oct
(7) |
Nov
(9) |
Dec
(42) |
| 2011 |
Jan
(10) |
Feb
(35) |
Mar
(43) |
Apr
(39) |
May
(8) |
Jun
(8) |
Jul
(83) |
Aug
(20) |
Sep
(20) |
Oct
(63) |
Nov
(33) |
Dec
(20) |
| 2012 |
Jan
(28) |
Feb
(3) |
Mar
(1) |
Apr
(37) |
May
(16) |
Jun
(7) |
Jul
(3) |
Aug
|
Sep
|
Oct
(3) |
Nov
(1) |
Dec
(4) |
| 2013 |
Jan
(6) |
Feb
(16) |
Mar
(9) |
Apr
(11) |
May
(9) |
Jun
(30) |
Jul
(17) |
Aug
(6) |
Sep
(2) |
Oct
(30) |
Nov
(41) |
Dec
(26) |
| 2014 |
Jan
(16) |
Feb
(20) |
Mar
(5) |
Apr
(4) |
May
(14) |
Jun
(4) |
Jul
(1) |
Aug
|
Sep
(8) |
Oct
(18) |
Nov
(26) |
Dec
|
| 2015 |
Jan
(4) |
Feb
(9) |
Mar
(12) |
Apr
(26) |
May
(3) |
Jun
(3) |
Jul
(2) |
Aug
|
Sep
(15) |
Oct
(13) |
Nov
|
Dec
(1) |
| 2016 |
Jan
(1) |
Feb
(5) |
Mar
(4) |
Apr
(3) |
May
(19) |
Jun
|
Jul
|
Aug
(3) |
Sep
(16) |
Oct
(4) |
Nov
(5) |
Dec
(5) |
| 2017 |
Jan
(1) |
Feb
(8) |
Mar
|
Apr
(7) |
May
(3) |
Jun
(16) |
Jul
(13) |
Aug
(16) |
Sep
(6) |
Oct
(4) |
Nov
(10) |
Dec
(7) |
| 2018 |
Jan
(16) |
Feb
(17) |
Mar
(11) |
Apr
(13) |
May
(20) |
Jun
(3) |
Jul
(10) |
Aug
|
Sep
(3) |
Oct
(1) |
Nov
(6) |
Dec
(18) |
| 2019 |
Jan
(18) |
Feb
(31) |
Mar
(4) |
Apr
(4) |
May
(1) |
Jun
(8) |
Jul
(7) |
Aug
(10) |
Sep
(23) |
Oct
(6) |
Nov
(3) |
Dec
(5) |
| 2020 |
Jan
(10) |
Feb
(18) |
Mar
(34) |
Apr
(19) |
May
(6) |
Jun
(9) |
Jul
|
Aug
(10) |
Sep
(16) |
Oct
(6) |
Nov
(3) |
Dec
(11) |
| 2021 |
Jan
(118) |
Feb
(22) |
Mar
(13) |
Apr
(12) |
May
(48) |
Jun
(21) |
Jul
(17) |
Aug
(12) |
Sep
(19) |
Oct
(25) |
Nov
(16) |
Dec
(7) |
| 2022 |
Jan
(6) |
Feb
(7) |
Mar
(14) |
Apr
(4) |
May
|
Jun
(16) |
Jul
(18) |
Aug
(5) |
Sep
(12) |
Oct
(8) |
Nov
(10) |
Dec
(13) |
| 2023 |
Jan
|
Feb
(3) |
Mar
(2) |
Apr
(1) |
May
(2) |
Jun
(6) |
Jul
(3) |
Aug
(3) |
Sep
(3) |
Oct
(2) |
Nov
(7) |
Dec
(13) |
| 2024 |
Jan
(8) |
Feb
(6) |
Mar
(5) |
Apr
(10) |
May
(8) |
Jun
(6) |
Jul
(2) |
Aug
(1) |
Sep
(2) |
Oct
(4) |
Nov
(15) |
Dec
(10) |
| 2025 |
Jan
(3) |
Feb
(12) |
Mar
(3) |
Apr
(7) |
May
(18) |
Jun
(10) |
Jul
(10) |
Aug
(6) |
Sep
(16) |
Oct
(6) |
Nov
(1) |
Dec
|
|
From: <chr...@us...> - 2007-12-30 19:14:31
|
Revision: 282
http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=282&view=rev
Author: christian_boltz
Date: 2007-12-30 11:14:35 -0800 (Sun, 30 Dec 2007)
Log Message:
-----------
backup.php
- also backup vacation_notification table
Reported by Johan Hendriks (sylhouette) - thanks!
https://sourceforge.net/tracker/index.php?func=detail&aid=1860193&group_id=191583&atid=937964
Modified Paths:
--------------
trunk/backup.php
Modified: trunk/backup.php
===================================================================
--- trunk/backup.php 2007-12-30 18:49:18 UTC (rev 281)
+++ trunk/backup.php 2007-12-30 19:14:35 UTC (rev 282)
@@ -72,7 +72,8 @@
{
fwrite ($fh, $header);
- $tables = array('admin','alias','config','domain','domain_admins','log','mailbox','vacation');
+ $tables = array('admin','alias','config','domain','domain_admins','log','mailbox','vacation','vacation_notification');
+ # TODO: also backup fetchmail table
for ($i = 0 ; $i < sizeof ($tables) ; ++$i)
{
@@ -115,4 +116,5 @@
unlink ("$backup");
fpassthru ($download_backup);
}
+/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */
?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2007-12-30 18:49:43
|
Revision: 281
http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=281&view=rev
Author: christian_boltz
Date: 2007-12-30 10:49:18 -0800 (Sun, 30 Dec 2007)
Log Message:
-----------
templates/menu.php:
- added JS to enable dropdowns in IE
https://sourceforge.net/tracker/?func=detail&atid=937964&aid=1859556&group_id=191583
stylesheet.css:
- dupliated the menu :hover styles as .sfhover for IE
Modified Paths:
--------------
trunk/stylesheet.css
trunk/templates/menu.php
Modified: trunk/stylesheet.css
===================================================================
--- trunk/stylesheet.css 2007-12-30 01:32:33 UTC (rev 280)
+++ trunk/stylesheet.css 2007-12-30 18:49:18 UTC (rev 281)
@@ -102,7 +102,7 @@
border-top: 4px solid #aaaaaa;
}
-#menu li:hover {
+#menu li:hover, #menu li.sfhover {
background: #BFFF00;
}
@@ -113,7 +113,7 @@
border:2px solid white;
border-top:none;
}
-#menu li:hover ul {
+#menu li:hover ul, #menu li.sfhover ul {
left: auto;
}
Modified: trunk/templates/menu.php
===================================================================
--- trunk/templates/menu.php 2007-12-30 01:32:33 UTC (rev 280)
+++ trunk/templates/menu.php 2007-12-30 18:49:18 UTC (rev 281)
@@ -79,5 +79,25 @@
print "</div>";
}
+
+
+# IE can't handle :hover dropdowns correctly. It needs some JS instead.
+?>
+<script type='text/javascript'>
+sfHover = function() {
+ var sfEls = document.getElementById("menu").getElementsByTagName("LI");
+ for (var i=0; i<sfEls.length; i++) {
+ sfEls[i].onmouseover=function() {
+ this.className+=" sfhover";
+ }
+ sfEls[i].onmouseout=function() {
+ this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
+ }
+ }
+}
+if (window.attachEvent) window.attachEvent("onload", sfHover);
+</script>
+
+<?php
/* vim: set ft=php expandtab softtabstop=3 tabstop=3 shiftwidth=3: */
?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2007-12-30 01:32:30
|
Revision: 280
http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=280&view=rev
Author: christian_boltz
Date: 2007-12-29 17:32:33 -0800 (Sat, 29 Dec 2007)
Log Message:
-----------
Summary: Added language selector to login form
functions.inc.php:
- function check_language
- new optional parameter $use_post (needed by login.php)
- check for language cookie
- check for $_POST['lang']
- removed substr() call because it made pt-br translation unuseable
- new function language_selector
- returns a HTML dropdown language selector
- new function safecookie
- similar to safeget, but for cookies
templates/login.php, templates/users_login.php:
- display language selector dropdown
login.php, users/login.php:
- check for selected language
- set cookie if user selected non-default language
languages/language.php: (NEW FILE)
- list of supported languages
- language names taken from phpMyAdmin login form
common.php:
- include languages/language.php
Modified Paths:
--------------
trunk/common.php
trunk/functions.inc.php
trunk/login.php
trunk/templates/login.php
trunk/templates/users_login.php
trunk/users/login.php
Added Paths:
-----------
trunk/languages/language.php
Modified: trunk/common.php
===================================================================
--- trunk/common.php 2007-12-29 21:11:54 UTC (rev 279)
+++ trunk/common.php 2007-12-30 01:32:33 UTC (rev 280)
@@ -39,6 +39,7 @@
exit(0);
}
}
+require_once("$incpath/languages/language.php");
require_once("$incpath/functions.inc.php");
require_once("$incpath/languages/" . check_language () . ".lang");
Modified: trunk/functions.inc.php
===================================================================
--- trunk/functions.inc.php 2007-12-29 21:11:54 UTC (rev 279)
+++ trunk/functions.inc.php 2007-12-30 01:32:33 UTC (rev 280)
@@ -142,19 +142,29 @@
// check_language
// Action: checks what language the browser uses
// Call: check_language
+// Parameter: $use_post - set to 1 if $_POST should NOT be read
//
-function check_language ()
+function check_language ($use_post = 1)
{
global $CONF;
$lang = $CONF['default_language'];
$supported_languages = array ('bg', 'ca', 'cn', 'cs', 'da', 'de', 'en', 'es', 'et', 'eu', 'fi', 'fo', 'fr', 'hu', 'is', 'it', 'mk', 'nl', 'nn', 'pl', 'pt-br', 'ru', 'sl', 'sv', 'tr', 'tw');
+ # TODO: use global $supported_languages (from languages/languages.php) instead
+
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE']))
{
$lang_array = preg_split ('/(\s*,\s*)/', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
+ if (safecookie('lang')) {
+ array_unshift($lang_array, safecookie('lang')); # prefer language from cookie
+ }
+ if ( $use_post && safepost('lang')) {
+ array_unshift($lang_array, safepost('lang')); # but prefer $_POST['lang'] even more
+ }
+
for($i = 0; $i < count($lang_array); $i++)
{
$lang_next = $lang_array[$i];
- $lang_next = strtolower(substr(trim($lang_next), 0, 2));
+ $lang_next = strtolower(trim($lang_next));
if(in_array($lang_next, $supported_languages))
{
$lang = $lang_next;
@@ -165,8 +175,31 @@
return $lang;
}
+//
+// language_selector
+// Action: returns a language selector dropdown with the browser (or cookie) language preselected
+// Call: language_selector()
+//
+function language_selector()
+{
+ global $supported_languages; # from languages/languages.php
+
+ $current_lang = check_language();
+ $selector = '<select name="lang" xml:lang="en" dir="ltr">';
+ foreach($supported_languages as $lang => $lang_name) {
+ if ($lang == $current_lang) {
+ $selected = ' selected="selected"';
+ } else {
+ $selected = '';
+ }
+ $selector .= "<option value='$lang'$selected>$lang_name</option>";
+ }
+ $selector .= "</select>";
+ return $selector;
+}
+
//
// check_string
// Action: checks if a string is valid and returns TRUE if this is the case.
@@ -374,7 +407,20 @@
return $retval;
}
+/**
+ * safecookie
+ * @see safeget()
+ * @param String $param
+ * @param String $default (optional)
+ * @return String value from $_COOKIE[$param] or $default
+ */
+function safecookie ($param, $default="") {
+ $retval=$default;
+ if (isset($_COOKIE[$param])) $retval=$_COOKIE[$param];
+ return $retval;
+}
+
//
// get_domain_properties
// Action: Get all the properties of a domain.
Added: trunk/languages/language.php
===================================================================
--- trunk/languages/language.php (rev 0)
+++ trunk/languages/language.php 2007-12-30 01:32:33 UTC (rev 280)
@@ -0,0 +1,37 @@
+<?php if( !defined('POSTFIXADMIN') ) die( "This file cannot be used standalone." ); ?>
+<?php
+# List of supported languages
+$supported_languages = array(
+ 'bg' => 'Български - Bulgarian',
+ 'ca' => 'Català - Catalan',
+ 'cn' => '中文 - Chinese simplified (gb2312)',
+ 'tw' => '中文 - Chinese traditional',
+ 'cs' => 'Česky - Czech',
+ 'da' => 'Dansk - Danish',
+ 'de' => 'Deutsch - German',
+ 'en' => 'English',
+ 'es' => 'Español - Spanish',
+ 'et' => 'Eesti - Estonian',
+ 'eu' => 'Euskara - Basque',
+ 'fi' => 'Suomi - Finnish',
+ 'fo' => 'Faroese',
+ 'fr' => 'Français - French',
+ 'hr' => 'Hrvatski - Croatian',
+ 'hu' => 'Magyar - Hungarian',
+ 'is' => 'Icelandic',
+ 'it' => 'Italiano - Italian',
+ 'lt' => 'Lietuvių - Lithuanian',
+ 'mk' => 'Macedonian - Macedonian',
+ 'nl' => 'Nederlands - Dutch',
+ 'nn' => 'Norsk - Norwegian',
+ 'pl' => 'Polski - Polish',
+ 'pt-br' => 'Português - Brazilian portuguese',
+ 'ru' => 'Русский - Russian',
+ 'sk' => 'Slovenčina - Slovak',
+ 'sl' => 'Slovenščina - Slovenian',
+ 'sv' => 'Svenska - Swedish',
+ 'tr' => 'Türkçe - Turkish',
+);
+
+/* vim: set expandtab ft=php softtabstop=4 tabstop=4 shiftwidth=4: */
+?>
Modified: trunk/login.php
===================================================================
--- trunk/login.php 2007-12-29 21:11:54 UTC (rev 279)
+++ trunk/login.php 2007-12-30 01:32:33 UTC (rev 280)
@@ -25,6 +25,7 @@
*
* fUsername
* fPassword
+ * lang
*/
require_once('common.php');
@@ -54,7 +55,13 @@
$fPassword = '';
if (isset ($_POST['fUsername'])) $fUsername = escape_string ($_POST['fUsername']);
if (isset ($_POST['fPassword'])) $fPassword = escape_string ($_POST['fPassword']);
+ $lang = safepost('lang');
+ if ( $lang != check_language(0) ) { # only set cookie if language selection was changed
+ setcookie('lang', $lang, time() + 60*60*24*30); # language cookie, lifetime 30 days
+ # (language preference cookie is processed even if username and/or password are invalid)
+ }
+
$result = db_query ("SELECT password FROM $table_admin WHERE username='$fUsername' AND active='1'");
if ($result['rows'] == 1)
{
Modified: trunk/templates/login.php
===================================================================
--- trunk/templates/login.php 2007-12-29 21:11:54 UTC (rev 279)
+++ trunk/templates/login.php 2007-12-30 01:32:33 UTC (rev 280)
@@ -14,6 +14,11 @@
<td><input class="flat" type="password" name="fPassword" /></td>
</tr>
<tr>
+ <td colspan="2">
+ <?php echo language_selector(); ?>
+ </td>
+ </tr>
+ <tr>
<td colspan="2" class="hlp_center"><input class="button" type="submit" name="submit" value="<?php print $PALANG['pLogin_button']; ?>" /></td>
</tr>
<tr>
@@ -31,3 +36,4 @@
</script>
</div>
+<?php /* vim: set ft=php expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ ?>
Modified: trunk/templates/users_login.php
===================================================================
--- trunk/templates/users_login.php 2007-12-29 21:11:54 UTC (rev 279)
+++ trunk/templates/users_login.php 2007-12-30 01:32:33 UTC (rev 280)
@@ -14,6 +14,11 @@
<td><input class="flat" type="password" name="fPassword" /></td>
</tr>
<tr>
+ <td colspan="2">
+ <?php echo language_selector(); ?>
+ </td>
+ </tr>
+ <tr>
<td colspan="2" class="hlp_center"><input class="button" type="submit" name="submit" value="<?php print $PALANG['pUsersLogin_button']; ?>" /></td>
</tr>
<tr>
Modified: trunk/users/login.php
===================================================================
--- trunk/users/login.php 2007-12-29 21:11:54 UTC (rev 279)
+++ trunk/users/login.php 2007-12-30 01:32:33 UTC (rev 280)
@@ -25,6 +25,7 @@
*
* fUsername
* fPassword
+ * lang
*/
require_once("../common.php");
@@ -41,7 +42,13 @@
{
$fUsername = escape_string ($_POST['fUsername']);
$fPassword = escape_string ($_POST['fPassword']);
+ $lang = safepost('lang');
+ if ( $lang != check_language(0) ) { # only set cookie if language selection was changed
+ setcookie('lang', $lang, time() + 60*60*24*30); # language cookie, lifetime 30 days
+ # (language preference cookie is processed even if username and/or password are invalid)
+ }
+
$active = db_get_boolean(True);
$query = "SELECT password FROM $table_mailbox WHERE username='$fUsername' AND active=$active";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <Gin...@us...> - 2007-12-29 21:11:50
|
Revision: 279
http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=279&view=rev
Author: GingerDog
Date: 2007-12-29 13:11:54 -0800 (Sat, 29 Dec 2007)
Log Message:
-----------
new .deb release
Modified Paths:
--------------
trunk/debian/changelog
trunk/debian/files
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2007-12-29 14:51:58 UTC (rev 278)
+++ trunk/debian/changelog 2007-12-29 21:11:54 UTC (rev 279)
@@ -1,3 +1,11 @@
+postfixadmin (2.2.0-1rc2) unstable; urgency=low
+
+ * Improved CSS
+ * Improved upgrade procedure (should work for PGSQL) (see upgrade.php)
+ * Various bug fixes
+
+ -- David Goodwin <dav...@pa...> Sat, 29 Dec 2007 21:14:00 +0000
+
postfixadmin (2.2.0-1rc1) unstable; urgency=low
* Initial Release (via dpkg)
Modified: trunk/debian/files
===================================================================
--- trunk/debian/files 2007-12-29 14:51:58 UTC (rev 278)
+++ trunk/debian/files 2007-12-29 21:11:54 UTC (rev 279)
@@ -1 +1 @@
-postfixadmin_2.2.0-1rc1_all.deb web optional
+postfixadmin_2.2.0-1rc2_all.deb web optional
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <Gin...@us...> - 2007-12-29 14:51:54
|
Revision: 278
http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=278&view=rev
Author: GingerDog
Date: 2007-12-29 06:51:58 -0800 (Sat, 29 Dec 2007)
Log Message:
-----------
upgrade.php: fix pgsql isms - i..e check that fields exist before trying to remove them, likewise for tables; minor syntax fixes in upgrade etc; tested and works for me
Modified Paths:
--------------
trunk/upgrade.php
Modified: trunk/upgrade.php
===================================================================
--- trunk/upgrade.php 2007-12-29 13:51:19 UTC (rev 277)
+++ trunk/upgrade.php 2007-12-29 14:51:58 UTC (rev 278)
@@ -1,11 +1,53 @@
<?php
require_once('common.php');
+// vim ts=4:sw=4:et
# Note: run with upgrade.php?debug=1 to see all SQL error messages
+/**
+ * Use this to check whether an object (Table, index etc) exists within a
+ * PostgreSQL database.
+ * @param String the object name
+ * @return boolean true if it exists
+ */
+function _pgsql_object_exists($name) {
+ $sql = "select relname from pg_class where relname = '$name'";
+ $r = db_query($sql);
+ if($r['rows'] == 1) {
+ return true;
+ }
+ return false;
+}
+function _pgsql_field_exists($table, $field) {
+ $sql = '
+ SELECT
+ a.attname,
+ pg_catalog.format_type(a.atttypid, a.atttypmod) AS "Datatype"
+ FROM
+ pg_catalog.pg_attribute a
+ WHERE
+ a.attnum > 0
+ AND NOT a.attisdropped
+ AND a.attrelid = (
+ SELECT c.oid
+ FROM pg_catalog.pg_class c
+ LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
+ WHERE c.relname ~ ' . "'^($table)\$'
+ AND pg_catalog.pg_table_is_visible(c.oid)
+ )
+ AND a.attname = '$field' ";
+ echo $sql;
+ $r = db_query($sql);
+ $row = db_row($r['result']);
+ if($row) {
+ return true;
+ }
+ return false;
+}
+
if($CONF['database_type'] == 'pgsql') {
// check if table already exists, if so, don't recreate it
$r = db_query("SELECT relname FROM pg_class WHERE relname = 'config'");
@@ -236,8 +278,10 @@
$result = db_query_parsed("ALTER TABLE $table_domain ADD COLUMN quota int(10) NOT NULL default '0' AFTER maxquota", TRUE);
}
-function upgrade_4_pgsql() { # PgSQL only
-# changes between 2.1 and moving to sourceforge
+/**
+ * Changes between 2.1 and moving to sf.net
+ */
+function upgrade_4_pgsql() {
$table_domain = table_by_key('domain');
$table_admin = table_by_key('admin');
$table_alias = table_by_key('alias');
@@ -246,68 +290,89 @@
$table_mailbox = table_by_key('mailbox');
$table_vacation = table_by_key('vacation');
- $result = db_query_parsed("ALTER TABLE $table_domain ADD COLUMN quota int NOT NULL default '0'");
+ if(!_pgsql_field_exists($table_domain, 'quota')) {
+ $result = db_query_parsed("ALTER TABLE $table_domain ADD COLUMN quota int NOT NULL default '0'");
+ }
$result = db_query_parsed("ALTER TABLE $table_domain ALTER COLUMN domain DROP DEFAULT");
- $result = db_query_parsed("CREATE INDEX domain_domain_active ON domain(domain,active)");
-
- $result = db_query_parsed("ALTER TABLE $table_admin ALTER COLUMN domain DROP DEFAULT");
+ if(!_pgsql_object_exists('domain_domain_active')) {
+ $result = db_query_parsed("CREATE INDEX domain_domain_active ON domain(domain,active)");
+ }
+
+ $result = db_query_parsed("ALTER TABLE $table_domain_admins ALTER COLUMN domain DROP DEFAULT");
$result = db_query_parsed("ALTER TABLE $table_alias ALTER COLUMN address DROP DEFAULT");
$result = db_query_parsed("ALTER TABLE $table_alias ALTER COLUMN domain DROP DEFAULT");
- $result = db_query_parsed("CREATE INDEX alias_address_active ON alias(address,active)");
+ if(!_pgsql_object_exists('alias_address_active')) {
+ $result = db_query_parsed("CREATE INDEX alias_address_active ON alias(address,active)");
+ }
$result = db_query_parsed("ALTER TABLE $table_domain_admins ALTER COLUMN username DROP DEFAULT");
$result = db_query_parsed("ALTER TABLE $table_domain_admins ALTER COLUMN domain DROP DEFAULT");
- $result = db_query_parsed("BEGIN;
+ $result = db_query_parsed("
+ BEGIN;
ALTER TABLE $table_log RENAME COLUMN data TO data_old;
ALTER TABLE $table_log ADD COLUMN data text NOT NULL default '';
UPDATE $table_log SET data = CAST(data_old AS text);
ALTER TABLE $table_log DROP COLUMN data_old;
- COMMIT;");
+ COMMIT;");
- $result = db_query_parsed("ALTER TABLE $table_mailbox ALTER COLUMN username DROP DEFAULT");
- $result = db_query_parsed("ALTER TABLE $table_mailbox ALTER COLUMN domain DROP DEFAULT");
+ $result = db_query_parsed("ALTER TABLE $table_mailbox ALTER COLUMN username DROP DEFAULT");
+ $result = db_query_parsed("ALTER TABLE $table_mailbox ALTER COLUMN domain DROP DEFAULT");
- $result = db_query_parsed("BEGIN;
- ALTER TABLE $table_mailbox RENAME COLUMN domain TO domain_old;
- ALTER TABLE $table_mailbox ADD COLUMN domain TYPE varchar(255) REFERENCES domain (domain);
- UPDATE $table_mailbox SET domain = domain_old;
- ALTER TABLE $table_mailbox DROP COLUMN domain_old;
- CREATE INDEX mailbox_username_active ON mailbox(username,active);
- COMMIT;");
+ $result = db_query_parsed("
+ BEGIN;
+ ALTER TABLE $table_mailbox RENAME COLUMN domain TO domain_old;
+ ALTER TABLE $table_mailbox ADD COLUMN domain varchar(255) REFERENCES domain (domain);
+ UPDATE $table_mailbox SET domain = domain_old;
+ ALTER TABLE $table_mailbox DROP COLUMN domain_old;
+ COMMIT;"
+ );
+ if(!_pgsql_object_exists('mailbox_username_active')) {
+ db_query_parsed('CREATE INDEX mailbox_username_active ON mailbox(username,active)');
+ }
- $result = db_query_parsed("ALTER TABLE $table_vacation ALTER COLUMN body SET DEFAULT ''");
- $result = db_query_parsed("ALTER TABLE $table_vacation DROP COLUMN cache");
+ $result = db_query_parsed("ALTER TABLE $table_vacation ALTER COLUMN body SET DEFAULT ''");
+ if(_pgsql_field_exists($table_vacation, 'cache')) {
+ $result = db_query_parsed("ALTER TABLE $table_vacation DROP COLUMN cache");
+ }
- $result = db_query_parsed("ALTER TABLE $table_vacation RENAME COLUMN domain to domain_old");
- $result = db_query_parsed("ALTER TABLE $table_vacation ADD COLUMN domain TYPE character varying(255) REFERENCES domain ");
- $result = db_query_parsed("UPDATE $table_vacation SET domain = domain_old");
- $result = db_query_parsed("ALTER TABLE $table_vacation DROP COLUMN domain_old");
+ $result = db_query_parsed("
+ BEGIN;
+ ALTER TABLE $table_vacation RENAME COLUMN domain to domain_old;
+ ALTER TABLE $table_vacation ADD COLUMN domain varchar(255) REFERENCES domain;
+ UPDATE $table_vacation SET domain = domain_old;
+ ALTER TABLE $table_vacation DROP COLUMN domain_old;
+ COMMIT;
+ ");
- $result = db_query_parsed("CREATE INDEX vacation_email_active ON vacation(email,active)");
+ if(!_pgsql_object_exists('vacation_email_active')) {
+ $result = db_query_parsed("CREATE INDEX vacation_email_active ON vacation(email,active)");
+ }
- $result = db_query_parsed("
- CREATE TABLE vacation_notification (
- on_vacation character varying(255) NOT NULL REFERENCES vacation(email) ON DELETE CASCADE,
- notified character varying(255) NOT NULL,
- notified_at timestamp with time zone NOT NULL DEFAULT now(),
- CONSTRAINT vacation_notification_pkey primary key(on_vacation,notified)
- );");
+ if(!_pgsql_object_exists('vacation_notification')) {
+ $result = db_query_parsed("
+ CREATE TABLE vacation_notification (
+ on_vacation character varying(255) NOT NULL REFERENCES vacation(email) ON DELETE CASCADE,
+ notified character varying(255) NOT NULL,
+ notified_at timestamp with time zone NOT NULL DEFAULT now(),
+ CONSTRAINT vacation_notification_pkey primary key(on_vacation,notified)
+ );");
+ }
+}
-
+/**
+ * drop useless indicies (already available as primary key)
+ */
+function upgrade_79_mysql() { # MySQL only
+ $result = db_query_parsed(_drop_index('admin', 'username'), True);
+ $result = db_query_parsed(_drop_index('alias', 'address'), True);
+ $result = db_query_parsed(_drop_index('domain', 'domain'), True);
+ $result = db_query_parsed(_drop_index('mailbox', 'username'), True);
}
- function upgrade_79_mysql() { # MySQL only
-# drop useless indicies (already available as primary key)
- $result = db_query_parsed(_drop_index('admin', 'username'), True);
- $result = db_query_parsed(_drop_index('alias', 'address'), True);
- $result = db_query_parsed(_drop_index('domain', 'domain'), True);
- $result = db_query_parsed(_drop_index('mailbox', 'username'), True);
- }
-
function upgrade_81_mysql() { # MySQL only
$table_vacation = table_by_key ('vacation');
$table_vacation_notification = table_by_key('vacation_notification');
@@ -343,17 +408,19 @@
);
}
+/**
+ * Make logging translatable - i.e. create alias => create_alias
+ */
function upgrade_90() {
-# translatable logging
-# old format: "create alias"
-# new format: "create_alias"
$result = db_query_parsed("UPDATE " . table_by_key ('log') . " SET action = REPLACE(action,' ','_')", TRUE);
-# change edit_alias_state to edit_alias_active
+ # change edit_alias_state to edit_alias_active
$result = db_query_parsed("UPDATE " . table_by_key ('log') . " SET action = 'edit_alias_state' WHERE action = 'edit_alias_active'", TRUE);
}
-function upgrade_169_mysql() { # MySQL only
-# allow quota > 2 GB
+/**
+ * MySQL only allow quota > 2 GB
+ */
+function upgrade_169_mysql() {
$table_domain = table_by_key ('domain');
$table_mailbox = table_by_key ('mailbox');
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <Gin...@us...> - 2007-12-29 13:51:16
|
Revision: 277
http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=277&view=rev
Author: GingerDog
Date: 2007-12-29 05:51:19 -0800 (Sat, 29 Dec 2007)
Log Message:
-----------
upgrade.php: should work for postgresql now
Modified Paths:
--------------
trunk/upgrade.php
Modified: trunk/upgrade.php
===================================================================
--- trunk/upgrade.php 2007-12-28 21:45:33 UTC (rev 276)
+++ trunk/upgrade.php 2007-12-29 13:51:19 UTC (rev 277)
@@ -4,20 +4,33 @@
# Note: run with upgrade.php?debug=1 to see all SQL error messages
-# Not nice, but works:
-# We don't know if the config table exists, so we simply try to create it ;-)
-# Better solution (TODO): query the db to see if the 'config' table exists
-$sql = "
-CREATE TABLE {IF_NOT_EXISTS} " . table_by_key ('config') . "(
- `id` {AUTOINCREMENT} {PRIMARY},
- `name` VARCHAR(20) {LATIN1} NOT NULL DEFAULT '',
- `value` VARCHAR(20) {LATIN1} NOT NULL DEFAULT '',
- UNIQUE name ( `name` )
-)
-";
-db_query_parsed($sql, 0, " ENGINE = MYISAM COMMENT = 'PostfixAdmin settings'");
+if($CONF['database_type'] == 'pgsql') {
+ // check if table already exists, if so, don't recreate it
+ $r = db_query("SELECT relname FROM pg_class WHERE relname = 'config'");
+ if($r['rows'] == 0) {
+ $pgsql = "
+ CREATE TABLE config (
+ id SERIAL,
+ name VARCHAR(20) NOT NULL UNIQUE,
+ value VARCHAR(20) NOT NULL,
+ PRIMARY KEY(id)
+ )";
+ db_query_parsed($pgsql);
+ }
+}
+else {
+ $mysql = "
+ CREATE TABLE {IF_NOT_EXISTS} " . table_by_key ('config') . "(
+ `id` {AUTOINCREMENT} {PRIMARY},
+ `name` VARCHAR(20) {LATIN1} NOT NULL DEFAULT '',
+ `value` VARCHAR(20) {LATIN1} NOT NULL DEFAULT '',
+ UNIQUE name ( `name` )
+ )
+ ";
+ db_query_parsed($mysql, 0, " ENGINE = MYISAM COMMENT = 'PostfixAdmin settings'");
+}
$sql = "SELECT * FROM config WHERE name = 'version'";
@@ -32,6 +45,7 @@
} else {
$version = 0;
}
+
_do_upgrade($version);
@@ -40,7 +54,7 @@
$target_version = preg_replace('/[^0-9]/', '', '$Revision$');
if ($current_version >= $target_version) {
- # already up to date
+# already up to date
echo "up to date";
return true;
}
@@ -69,15 +83,17 @@
echo " done";
}
}
- # TODO: update version in config table after each change
- # TODO: this avoids problems in case the script hits the max_execution_time,
- # TODO: simply rerunning it will continue where it was stopped
+ // Update config table so we don't run the same query twice in the future.
+ $i = (int) $i;
+ $sql = "UPDATE config SET value = $i WHERE name = 'version'";
+ db_query($sql);
};
}
/**
* Replaces database specific parts in a query
* @param String sql query with placeholders
+ * @param int (optional) whether errors should be ignored (0=false)
* @param String (optional) MySQL specific code to attach, useful for COMMENT= on CREATE TABLE
* @return String sql query
*/
@@ -88,34 +104,34 @@
if ($CONF['database_type'] == 'mysql' || $CONF['database_type'] == 'mysqli' ) {
$replace = array(
- '{AUTOINCREMENT}' => 'int(11) not null auto_increment',
- '{PRIMARY}' => 'primary key',
- '{UNSIGNED}' => 'unsigned' ,
- '{FULLTEXT}' => 'FULLTEXT',
- '{BOOLEAN}' => 'tinyint(1) NOT NULL',
- '{UTF-8}' => '/*!40100 CHARACTER SET utf8 COLLATE utf8_unicode_ci */',
- '{LATIN1}' => '/*!40100 CHARACTER SET latin1 COLLATE latin1_swedish_ci */',
- '{IF_NOT_EXISTS}' => 'IF NOT EXISTS',
- '{RENAME_COLUMN}' => 'CHANGE COLUMN',
- );
+ '{AUTOINCREMENT}' => 'int(11) not null auto_increment',
+ '{PRIMARY}' => 'primary key',
+ '{UNSIGNED}' => 'unsigned' ,
+ '{FULLTEXT}' => 'FULLTEXT',
+ '{BOOLEAN}' => 'tinyint(1) NOT NULL',
+ '{UTF-8}' => '/*!40100 CHARACTER SET utf8 COLLATE utf8_unicode_ci */',
+ '{LATIN1}' => '/*!40100 CHARACTER SET latin1 COLLATE latin1_swedish_ci */',
+ '{IF_NOT_EXISTS}' => 'IF NOT EXISTS',
+ '{RENAME_COLUMN}' => 'CHANGE COLUMN',
+ );
$sql = "$sql $attach_mysql";
} elseif($CONF['database_type'] == 'pgsql') {
$replace = array(
- '{AUTOINCREMENT}' => 'SERIAL',
- '{PRIMARY}' => 'primary key',
- '{UNSIGNED}' => '',
- '{FULLTEXT}' => '',
- '{BOOLEAN}' => 'BOOLEAN NOT NULL',
- '{UTF-8}' => '', # TODO: UTF-8 is simply ignored.
- '{LATIN1}' => '', # TODO: same for latin1
- '{IF_NOT_EXISTS}' => '', # TODO: does this work with PgSQL? NO
- '{RENAME_COLUMN}' => 'ALTER COLUMN', # PgSQL : ALTER TABLE x RENAME x TO y
- 'int(1)' => 'int',
- 'int(10)' => 'int',
- 'int(11)' => 'int',
- 'int(4)' => 'int',
- );
+ '{AUTOINCREMENT}' => 'SERIAL',
+ '{PRIMARY}' => 'primary key',
+ '{UNSIGNED}' => '',
+ '{FULLTEXT}' => '',
+ '{BOOLEAN}' => 'BOOLEAN NOT NULL',
+ '{UTF-8}' => '', # TODO: UTF-8 is simply ignored.
+ '{LATIN1}' => '', # TODO: same for latin1
+ '{IF_NOT_EXISTS}' => '', # TODO: does this work with PgSQL? NO
+ '{RENAME_COLUMN}' => 'ALTER COLUMN', # PgSQL : ALTER TABLE x RENAME x TO y
+ 'int(1)' => 'int',
+ 'int(10)' => 'int',
+ 'int(11)' => 'int',
+ 'int(4)' => 'int',
+ );
} else {
echo "Sorry, unsupported database type " . $conf['database_type'];
@@ -149,20 +165,20 @@
}
function upgrade_1() {
- # inserting the version number is a good start ;-)
+# inserting the version number is a good start ;-)
db_insert(
- 'config',
- array(
- 'name' => 'version',
- 'value' => '1',
- )
- );
+ 'config',
+ array(
+ 'name' => 'version',
+ 'value' => '1',
+ )
+ );
echo "upgrade_1";
}
function upgrade_2_mysql() {
- # upgrade pre-2.1 database
- # from TABLE_BACKUP_MX.TXT
+# upgrade pre-2.1 database
+# from TABLE_BACKUP_MX.TXT
$table_domain = table_by_key ('domain');
$result = db_query_parsed("ALTER TABLE $table_domain ADD COLUMN transport VARCHAR(255) AFTER maxquota;", TRUE);
// don't think PGSQL supports 'AFTER transport'
@@ -173,12 +189,11 @@
$table_domain = table_by_key ('domain');
$result = db_query_parsed("ALTER TABLE $table_domain ADD COLUMN transport VARCHAR(255)", TRUE);
$result = db_query_parsed("ALTER TABLE $table_domain ADD COLUMN backupmx BOOLEAN DEFAULT false", TRUE);
-
}
function upgrade_3_mysql() {
- # upgrade pre-2.1 database
- # from TABLE_CHANGES.TXT
+# upgrade pre-2.1 database
+# from TABLE_CHANGES.TXT
$table_admin = table_by_key ('admin');
$table_alias = table_by_key ('alias');
$table_domain = table_by_key ('domain');
@@ -188,41 +203,41 @@
// these will not work on PostgreSQL; syntax is :
// ALTER TABLE foo RENAME f1 TO f2
$all_sql = split("\n", trim("
- ALTER TABLE $table_admin {RENAME_COLUMN} create_date created DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL;
- ALTER TABLE $table_admin {RENAME_COLUMN} change_date modified DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL;
- ALTER TABLE $table_alias {RENAME_COLUMN} create_date created DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL;
- ALTER TABLE $table_alias {RENAME_COLUMN} change_date modified DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL;
- ALTER TABLE $table_domain {RENAME_COLUMN} create_date created DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL;
- ALTER TABLE $table_domain {RENAME_COLUMN} change_date modified DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL;
- ALTER TABLE $table_domain ADD COLUMN aliases INT(10) DEFAULT '-1' NOT NULL AFTER description;
- ALTER TABLE $table_domain ADD COLUMN mailboxes INT(10) DEFAULT '-1' NOT NULL AFTER aliases;
- ALTER TABLE $table_domain ADD COLUMN maxquota INT(10) DEFAULT '-1' NOT NULL AFTER mailboxes;
- ALTER TABLE $table_domain ADD COLUMN transport VARCHAR(255) AFTER maxquota;
- ALTER TABLE $table_domain ADD COLUMN backupmx TINYINT(1) DEFAULT '0' NOT NULL AFTER transport;
- ALTER TABLE $table_mailbox {RENAME_COLUMN} create_date created DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL;
- ALTER TABLE $table_mailbox {RENAME_COLUMN} change_date modified DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL;
- ALTER TABLE $table_mailbox ADD COLUMN quota INT(10) DEFAULT '-1' NOT NULL AFTER maildir;
- ALTER TABLE $table_vacation ADD COLUMN domain VARCHAR(255) DEFAULT '' NOT NULL AFTER cache;
- ALTER TABLE $table_vacation ADD COLUMN created DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL AFTER domain;
- ALTER TABLE $table_vacation ADD COLUMN active TINYINT(1) DEFAULT '1' NOT NULL AFTER created;
- ALTER TABLE $table_vacation DROP PRIMARY KEY
- ALTER TABLE $table_vacation ADD PRIMARY KEY(email)
- UPDATE $table_vacation SET domain=SUBSTRING_INDEX(email, '@', -1) WHERE email=email;
- "));
+ ALTER TABLE $table_admin {RENAME_COLUMN} create_date created DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL;
+ ALTER TABLE $table_admin {RENAME_COLUMN} change_date modified DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL;
+ ALTER TABLE $table_alias {RENAME_COLUMN} create_date created DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL;
+ ALTER TABLE $table_alias {RENAME_COLUMN} change_date modified DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL;
+ ALTER TABLE $table_domain {RENAME_COLUMN} create_date created DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL;
+ ALTER TABLE $table_domain {RENAME_COLUMN} change_date modified DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL;
+ ALTER TABLE $table_domain ADD COLUMN aliases INT(10) DEFAULT '-1' NOT NULL AFTER description;
+ ALTER TABLE $table_domain ADD COLUMN mailboxes INT(10) DEFAULT '-1' NOT NULL AFTER aliases;
+ ALTER TABLE $table_domain ADD COLUMN maxquota INT(10) DEFAULT '-1' NOT NULL AFTER mailboxes;
+ ALTER TABLE $table_domain ADD COLUMN transport VARCHAR(255) AFTER maxquota;
+ ALTER TABLE $table_domain ADD COLUMN backupmx TINYINT(1) DEFAULT '0' NOT NULL AFTER transport;
+ ALTER TABLE $table_mailbox {RENAME_COLUMN} create_date created DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL;
+ ALTER TABLE $table_mailbox {RENAME_COLUMN} change_date modified DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL;
+ ALTER TABLE $table_mailbox ADD COLUMN quota INT(10) DEFAULT '-1' NOT NULL AFTER maildir;
+ ALTER TABLE $table_vacation ADD COLUMN domain VARCHAR(255) DEFAULT '' NOT NULL AFTER cache;
+ ALTER TABLE $table_vacation ADD COLUMN created DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL AFTER domain;
+ ALTER TABLE $table_vacation ADD COLUMN active TINYINT(1) DEFAULT '1' NOT NULL AFTER created;
+ ALTER TABLE $table_vacation DROP PRIMARY KEY
+ ALTER TABLE $table_vacation ADD PRIMARY KEY(email)
+ UPDATE $table_vacation SET domain=SUBSTRING_INDEX(email, '@', -1) WHERE email=email;
+ "));
- foreach ($all_sql as $sql) {
- $result = db_query_parsed($sql, TRUE);
- }
+ foreach ($all_sql as $sql) {
+ $result = db_query_parsed($sql, TRUE);
+ }
}
function upgrade_4_mysql() { # MySQL only
- # changes between 2.1 and moving to sourceforge
+# changes between 2.1 and moving to sourceforge
$table_domain = table_by_key ('domain');
$result = db_query_parsed("ALTER TABLE $table_domain ADD COLUMN quota int(10) NOT NULL default '0' AFTER maxquota", TRUE);
}
function upgrade_4_pgsql() { # PgSQL only
- # changes between 2.1 and moving to sourceforge
+# changes between 2.1 and moving to sourceforge
$table_domain = table_by_key('domain');
$table_admin = table_by_key('admin');
$table_alias = table_by_key('alias');
@@ -247,98 +262,98 @@
$result = db_query_parsed("BEGIN;
ALTER TABLE $table_log RENAME COLUMN data TO data_old;
- ALTER TABLE $table_log ADD COLUMN data TYPE text NOT NULL default '';
+ ALTER TABLE $table_log ADD COLUMN data text NOT NULL default '';
UPDATE $table_log SET data = CAST(data_old AS text);
ALTER TABLE $table_log DROP COLUMN data_old;
COMMIT;");
- $result = db_query_parsed("ALTER TABLE $table_mailbox ALTER COLUMN username DROP DEFAULT");
- $result = db_query_parsed("ALTER TABLE $table_mailbox ALTER COLUMN domain DROP DEFAULT");
+ $result = db_query_parsed("ALTER TABLE $table_mailbox ALTER COLUMN username DROP DEFAULT");
+ $result = db_query_parsed("ALTER TABLE $table_mailbox ALTER COLUMN domain DROP DEFAULT");
- $result = db_query_parsed("BEGIN;
- ALTER TABLE $table_mailbox RENAME COLUMN domain TO domain_old;
- ALTER TABLE $table_mailbox ADD COLUMN domain TYPE varchar(255) REFERENCES domain (domain);
- UPDATE $table_mailbox SET domain = domain_old;
- ALTER TABLE $table_mailbox DROP COLUMN domain_old;
- CREATE INDEX mailbox_username_active ON mailbox(username,active);
- COMMIT;");
+ $result = db_query_parsed("BEGIN;
+ ALTER TABLE $table_mailbox RENAME COLUMN domain TO domain_old;
+ ALTER TABLE $table_mailbox ADD COLUMN domain TYPE varchar(255) REFERENCES domain (domain);
+ UPDATE $table_mailbox SET domain = domain_old;
+ ALTER TABLE $table_mailbox DROP COLUMN domain_old;
+ CREATE INDEX mailbox_username_active ON mailbox(username,active);
+ COMMIT;");
- $result = db_query_parsed("ALTER TABLE $table_vacation ALTER COLUMN body SET DEFAULT = ''");
- $result = db_query_parsed("ALTER TABLE $table_vacation DROP COLUMN cache");
+ $result = db_query_parsed("ALTER TABLE $table_vacation ALTER COLUMN body SET DEFAULT ''");
+ $result = db_query_parsed("ALTER TABLE $table_vacation DROP COLUMN cache");
- $result = db_query_parsed("ALTER TABLE $table_vacation RENAME COLUMN domain to domain_old");
- $result = db_query_parsed("ALTER TABLE $table_vacation ADD COLUMN domain TYPE character varying(255) REFERENCES domain ");
- $result = db_query_parsed("UPDATE $table_vacation SET domain = domain_old");
- $result = db_query_parsed("ALTER TABLE $table_vacation DROP COLUMN domain_old");
+ $result = db_query_parsed("ALTER TABLE $table_vacation RENAME COLUMN domain to domain_old");
+ $result = db_query_parsed("ALTER TABLE $table_vacation ADD COLUMN domain TYPE character varying(255) REFERENCES domain ");
+ $result = db_query_parsed("UPDATE $table_vacation SET domain = domain_old");
+ $result = db_query_parsed("ALTER TABLE $table_vacation DROP COLUMN domain_old");
- $result = db_query_parsed("CREATE INDEX vacation_email_active ON vacation(email,active)");
+ $result = db_query_parsed("CREATE INDEX vacation_email_active ON vacation(email,active)");
- $result = db_query_parsed("
-CREATE TABLE vacation_notification (
- on_vacation character varying(255) NOT NULL REFERENCES vacation(email) ON DELETE CASCADE,
- notified character varying(255) NOT NULL,
- notified_at timestamp with time zone NOT NULL DEFAULT now(),
- CONSTRAINT vacation_notification_pkey primary key(on_vacation,notified)
-);");
+ $result = db_query_parsed("
+ CREATE TABLE vacation_notification (
+ on_vacation character varying(255) NOT NULL REFERENCES vacation(email) ON DELETE CASCADE,
+ notified character varying(255) NOT NULL,
+ notified_at timestamp with time zone NOT NULL DEFAULT now(),
+ CONSTRAINT vacation_notification_pkey primary key(on_vacation,notified)
+ );");
}
-function upgrade_79_mysql() { # MySQL only
- # drop useless indicies (already available as primary key)
- $result = db_query_parsed(_drop_index('admin', 'username'), True);
- $result = db_query_parsed(_drop_index('alias', 'address'), True);
- $result = db_query_parsed(_drop_index('domain', 'domain'), True);
- $result = db_query_parsed(_drop_index('mailbox', 'username'), True);
-}
+ function upgrade_79_mysql() { # MySQL only
+# drop useless indicies (already available as primary key)
+ $result = db_query_parsed(_drop_index('admin', 'username'), True);
+ $result = db_query_parsed(_drop_index('alias', 'address'), True);
+ $result = db_query_parsed(_drop_index('domain', 'domain'), True);
+ $result = db_query_parsed(_drop_index('mailbox', 'username'), True);
+ }
function upgrade_81_mysql() { # MySQL only
$table_vacation = table_by_key ('vacation');
$table_vacation_notification = table_by_key('vacation_notification');
$all_sql = split("\n", trim("
- ALTER TABLE `$table_vacation` CHANGE `email` `email` VARCHAR( 255 ) {LATIN1} NOT NULL
- ALTER TABLE `$table_vacation` CHANGE `subject` `subject` VARCHAR( 255 ) {UTF-8} NOT NULL
- ALTER TABLE `$table_vacation` CHANGE `body` `body` TEXT {UTF-8} NOT NULL
- ALTER TABLE `$table_vacation` CHANGE `cache` `cache` TEXT {LATIN1} NOT NULL
- ALTER TABLE `$table_vacation` CHANGE `domain` `domain` VARCHAR( 255 ) {LATIN1} NOT NULL
- ALTER TABLE `$table_vacation` CHANGE `active` `active` TINYINT( 1 ) NOT NULL DEFAULT '1'
- ALTER TABLE `$table_vacation` DEFAULT {LATIN1}
- ALTER TABLE `$table_vacation` ENGINE = INNODB
- "));
+ ALTER TABLE `$table_vacation` CHANGE `email` `email` VARCHAR( 255 ) {LATIN1} NOT NULL
+ ALTER TABLE `$table_vacation` CHANGE `subject` `subject` VARCHAR( 255 ) {UTF-8} NOT NULL
+ ALTER TABLE `$table_vacation` CHANGE `body` `body` TEXT {UTF-8} NOT NULL
+ ALTER TABLE `$table_vacation` CHANGE `cache` `cache` TEXT {LATIN1} NOT NULL
+ ALTER TABLE `$table_vacation` CHANGE `domain` `domain` VARCHAR( 255 ) {LATIN1} NOT NULL
+ ALTER TABLE `$table_vacation` CHANGE `active` `active` TINYINT( 1 ) NOT NULL DEFAULT '1'
+ ALTER TABLE `$table_vacation` DEFAULT {LATIN1}
+ ALTER TABLE `$table_vacation` ENGINE = INNODB
+ "));
foreach ($all_sql as $sql) {
$result = db_query_parsed($sql, TRUE);
}
db_query_parsed(
- " CREATE TABLE {IF_NOT_EXISTS} $table_vacation_notification (
- on_vacation varchar(255) NOT NULL,
- notified varchar(255) NOT NULL,
- notified_at timestamp NOT NULL default now(),
- CONSTRAINT vacation_notification_pkey PRIMARY KEY(on_vacation, notified),
- FOREIGN KEY (on_vacation) REFERENCES vacation(email) ON DELETE CASCADE
- )
- ",
- TRUE,
- " ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci TYPE=InnoDB
+ " CREATE TABLE {IF_NOT_EXISTS} $table_vacation_notification (
+ on_vacation varchar(255) NOT NULL,
+ notified varchar(255) NOT NULL,
+ notified_at timestamp NOT NULL default now(),
+ CONSTRAINT vacation_notification_pkey PRIMARY KEY(on_vacation, notified),
+ FOREIGN KEY (on_vacation) REFERENCES vacation(email) ON DELETE CASCADE
+ )
+ ",
+ TRUE,
+ " ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci TYPE=InnoDB
COMMENT='Postfix Admin - Virtual Vacation Notifications'
- "
- );
+ "
+ );
}
function upgrade_90() {
- # translatable logging
- # old format: "create alias"
- # new format: "create_alias"
+# translatable logging
+# old format: "create alias"
+# new format: "create_alias"
$result = db_query_parsed("UPDATE " . table_by_key ('log') . " SET action = REPLACE(action,' ','_')", TRUE);
- # change edit_alias_state to edit_alias_active
+# change edit_alias_state to edit_alias_active
$result = db_query_parsed("UPDATE " . table_by_key ('log') . " SET action = 'edit_alias_state' WHERE action = 'edit_alias_active'", TRUE);
}
function upgrade_169_mysql() { # MySQL only
- # allow quota > 2 GB
+# allow quota > 2 GB
$table_domain = table_by_key ('domain');
$table_mailbox = table_by_key ('mailbox');
@@ -349,20 +364,19 @@
/*
-TODO
+ TODO
Database changes that should be done:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
MySQL:
-* vacation:
- - DROP INDEX email
- - 'cache' field might be obsolete with vacation_notification - needs to be checked!
-* vacation_notification:
- - DEFAULT CHARSET and COLLATE should be changed
- - change all varchar fields to latin1 (email addresses don't contain utf8 characters)
+ * vacation:
+ - DROP INDEX email
+ - 'cache' field might be obsolete with vacation_notification - needs to be checked!
+ * vacation_notification:
+ - DEFAULT CHARSET and COLLATE should be changed
+ - change all varchar fields to latin1 (email addresses don't contain utf8 characters)
-*/
+ */
-/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2007-12-28 21:45:28
|
Revision: 276
http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=276&view=rev
Author: christian_boltz
Date: 2007-12-28 13:45:33 -0800 (Fri, 28 Dec 2007)
Log Message:
-----------
templates/users_vacation.php:
- whitespace changes to match vim: comment (ts=4)
Modified Paths:
--------------
trunk/templates/users_vacation.php
Modified: trunk/templates/users_vacation.php
===================================================================
--- trunk/templates/users_vacation.php 2007-12-28 21:42:09 UTC (rev 275)
+++ trunk/templates/users_vacation.php 2007-12-28 21:45:33 UTC (rev 276)
@@ -2,33 +2,33 @@
<div id="edit_form">
<form name="vacation" method="post">
<table>
- <tr>
- <td colspan="3"><h3><?php print $PALANG['pUsersVacation_welcome']; ?></h3></td>
- </tr>
- <tr>
- <td><?php print $PALANG['pUsersVacation_subject'] . ":"; ?></td>
- <td><input type="text" name="fSubject" value="<?php print htmlentities($tSubject, ENT_QUOTES, 'UTF-8'); ?>" /></td>
- <td> </td>
- </tr>
- <tr>
- <td><?php print $PALANG['pUsersVacation_body'] . ":"; ?></td>
- <td>
+ <tr>
+ <td colspan="3"><h3><?php print $PALANG['pUsersVacation_welcome']; ?></h3></td>
+ </tr>
+ <tr>
+ <td><?php print $PALANG['pUsersVacation_subject'] . ":"; ?></td>
+ <td><input type="text" name="fSubject" value="<?php print htmlentities($tSubject, ENT_QUOTES, 'UTF-8'); ?>" /></td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td><?php print $PALANG['pUsersVacation_body'] . ":"; ?></td>
+ <td>
<textarea rows="10" cols="80" name="fBody">
<?php print htmlentities($tBody, ENT_QUOTES, 'UTF-8'); ?>
</textarea>
- </td>
- <td> </td>
- </tr>
- <tr>
- <td colspan="3" class="hlp_center">
- <input class="button" type="submit" name="fAway" value="<?php print $PALANG['pUsersVacation_button_away']; ?>" />
- <input class="button" type="submit" name="fBack" value="<?php print $PALANG['pUsersVacation_button_back']; ?>" />
- <input class="button" type="submit" name="fCancel" value="<?php print $PALANG['exit']; ?>" />
- </td>
- </tr>
- <tr>
- <td colspan="3" class="standout"><?php print $tMessage; ?></td>
- </tr>
+ </td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td colspan="3" class="hlp_center">
+ <input class="button" type="submit" name="fAway" value="<?php print $PALANG['pUsersVacation_button_away']; ?>" />
+ <input class="button" type="submit" name="fBack" value="<?php print $PALANG['pUsersVacation_button_back']; ?>" />
+ <input class="button" type="submit" name="fCancel" value="<?php print $PALANG['exit']; ?>" />
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3" class="standout"><?php print $tMessage; ?></td>
+ </tr>
</table>
</form>
</div>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2007-12-28 21:42:06
|
Revision: 275
http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=275&view=rev
Author: christian_boltz
Date: 2007-12-28 13:42:09 -0800 (Fri, 28 Dec 2007)
Log Message:
-----------
users/password.php:
- fixed syntax error
https://sourceforge.net/tracker/index.php?func=detail&aid=1852533&group_id=191583&atid=937964
- use correct string for "password too short" message
(see r270 commit message)
en.lang:
- added usage comment on PALANG['pPasswordTooShort']
Modified Paths:
--------------
trunk/languages/en.lang
trunk/users/password.php
Modified: trunk/languages/en.lang
===================================================================
--- trunk/languages/en.lang 2007-12-28 21:27:11 UTC (rev 274)
+++ trunk/languages/en.lang 2007-12-28 21:42:09 UTC (rev 275)
@@ -359,7 +359,7 @@
$PALANG['pStatus_custom'] = 'Delivers to ';
$PALANG['pStatus_popimap'] = 'POP/IMAP ';
-$PALANG['pPasswordTooShort'] = "Password is too short - requires %s characters";
+$PALANG['pPasswordTooShort'] = "Password is too short - requires %s characters"; # usage: flash_error(sprintf($PALANG['pPasswordTooShort'], $CONF['min_password_length']));
$PALANG['pFetchmail_welcome'] = 'Fetch mail for:';
$PALANG['pFetchmail_new_entry'] = 'New entry';
Modified: trunk/users/password.php
===================================================================
--- trunk/users/password.php 2007-12-28 21:27:11 UTC (rev 274)
+++ trunk/users/password.php 2007-12-28 21:42:09 UTC (rev 275)
@@ -48,7 +48,7 @@
if(strlen($fPassword) < $CONF['min_password_length']) {
$error = 1;
- flash_error($PALANG['pPassword_password_too_short_error'];
+ flash_error(sprintf($PALANG['pPasswordTooShort'], $CONF['min_password_length']));
}
$username = $USERID_USERNAME;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2007-12-28 21:27:09
|
Revision: 274
http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=274&view=rev
Author: christian_boltz
Date: 2007-12-28 13:27:11 -0800 (Fri, 28 Dec 2007)
Log Message:
-----------
create-domain.php:
- partly undo last change (r273) - $fBackupmx is not used in the SQL query,
but in the template file
- keep usage of db_get_boolean() for $sqlBackupmx
Modified Paths:
--------------
trunk/create-domain.php
Modified: trunk/create-domain.php
===================================================================
--- trunk/create-domain.php 2007-12-28 21:15:04 UTC (rev 273)
+++ trunk/create-domain.php 2007-12-28 21:27:11 UTC (rev 274)
@@ -91,12 +91,12 @@
$fAliases = -1;
$fMailboxes = -1;
$fMaxquota = -1;
- $fBackupmx = db_get_boolean(true);
+ $fBackupmx = 1;
$sqlBackupmx = db_get_boolean(true);
}
else
{
- $fBackupmx = db_get_boolean(false);
+ $fBackupmx = 0;
$sqlBackupmx = db_get_boolean(false);
}
$sql_query = "INSERT INTO $table_domain (domain,description,aliases,mailboxes,maxquota,transport,backupmx,created,modified) VALUES ('$fDomain','$fDescription',$fAliases,$fMailboxes,$fMaxquota,'$fTransport',$sqlBackupmx,NOW(),NOW())";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2007-12-28 21:15:05
|
Revision: 273
http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=273&view=rev
Author: christian_boltz
Date: 2007-12-28 13:15:04 -0800 (Fri, 28 Dec 2007)
Log Message:
-----------
create-domain.php:
- make $fBackupmx pgsql-compatible (using db_get_boolean())
Thanks to Micheas Herman (micheas)
https://sourceforge.net/tracker/?func=detail&atid=937966&aid=1858922&group_id=191583
- also use db_get_boolean() for $sqlBackupmx - that's better than
checking for pgsql explicitely
Modified Paths:
--------------
trunk/create-domain.php
Modified: trunk/create-domain.php
===================================================================
--- trunk/create-domain.php 2007-12-17 07:03:54 UTC (rev 272)
+++ trunk/create-domain.php 2007-12-28 21:15:04 UTC (rev 273)
@@ -91,13 +91,13 @@
$fAliases = -1;
$fMailboxes = -1;
$fMaxquota = -1;
- $fBackupmx = 1;
- $sqlBackupmx = ('pgsql'==$CONF['database_type']) ? 'true' : 1;
+ $fBackupmx = db_get_boolean(true);
+ $sqlBackupmx = db_get_boolean(true);
}
else
{
- $fBackupmx = 0;
- $sqlBackupmx = ('pgsql'==$CONF['database_type']) ? 'false' : 0;
+ $fBackupmx = db_get_boolean(false);
+ $sqlBackupmx = db_get_boolean(false);
}
$sql_query = "INSERT INTO $table_domain (domain,description,aliases,mailboxes,maxquota,transport,backupmx,created,modified) VALUES ('$fDomain','$fDescription',$fAliases,$fMailboxes,$fMaxquota,'$fTransport',$sqlBackupmx,NOW(),NOW())";
$result = db_query($sql_query);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <Gin...@us...> - 2007-12-17 07:03:49
|
Revision: 272
http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=272&view=rev
Author: GingerDog
Date: 2007-12-16 23:03:54 -0800 (Sun, 16 Dec 2007)
Log Message:
-----------
edit-mailbox.php; indentation fix
Modified Paths:
--------------
trunk/edit-mailbox.php
Modified: trunk/edit-mailbox.php
===================================================================
--- trunk/edit-mailbox.php 2007-12-17 07:02:45 UTC (rev 271)
+++ trunk/edit-mailbox.php 2007-12-17 07:03:54 UTC (rev 272)
@@ -49,112 +49,110 @@
$pEdit_mailbox_name_text = $PALANG['pEdit_mailbox_name_text'];
$pEdit_mailbox_quota_text = $PALANG['pEdit_mailbox_quota_text'];
-$result = db_query("SELECT * FROM $table_mailbox WHERE username = '$fUsername' AND domain = '$fDomain'");
-if($result['rows'] != 1) {
- die("Invalid username chosen; user does not exist in mailbox table");
-}
if (!(check_owner ($SESSID_USERNAME, $fDomain) || authentication_has_role('global-admin')) )
{
- $error = 1;
- $tName = $fName;
- $tQuota = $fQuota;
- $tActive = $fActive;
- $tMessage = $PALANG['pEdit_mailbox_domain_error'] . "$fDomain</span>";
+ $error = 1;
+ $tName = $fName;
+ $tQuota = $fQuota;
+ $tActive = $fActive;
+ $tMessage = $PALANG['pEdit_mailbox_domain_error'] . "$fDomain</span>";
}
+$result = db_query("SELECT * FROM $table_mailbox WHERE username = '$fUsername' AND domain = '$fDomain'");
+if($result['rows'] != 1) {
+ die("Invalid username chosen; user does not exist in mailbox table");
+}
$user_details = db_array($result['result']);
if ($_SERVER['REQUEST_METHOD'] == "GET")
{
- if (check_owner($SESSID_USERNAME, $fDomain) || authentication_has_role('global-admin'))
- {
- $tName = $user_details['name'];
- $tQuota = divide_quota($user_details['quota']);
- $tActive = $user_details['active'];
- if ('pgsql'==$CONF['database_type']) {
- $tActive = ('t'==$user_details['active']) ? 1 : 0;
- }
+ if (check_owner($SESSID_USERNAME, $fDomain) || authentication_has_role('global-admin'))
+ {
+ $tName = $user_details['name'];
+ $tQuota = divide_quota($user_details['quota']);
+ $tActive = $user_details['active'];
+ if ('pgsql'==$CONF['database_type']) {
+ $tActive = ('t'==$user_details['active']) ? 1 : 0;
+ }
- $result = db_query ("SELECT * FROM $table_domain WHERE domain='$fDomain'");
- if ($result['rows'] == 1)
- {
- $row = db_array ($result['result']);
- $tMaxquota = $row['maxquota'];
- }
- }
+ $result = db_query ("SELECT * FROM $table_domain WHERE domain='$fDomain'");
+ if ($result['rows'] == 1)
+ {
+ $row = db_array ($result['result']);
+ $tMaxquota = $row['maxquota'];
+ }
+ }
}
if ($_SERVER['REQUEST_METHOD'] == "POST")
{
- if (isset ($_POST['fPassword'])) $fPassword = escape_string ($_POST['fPassword']);
- if (isset ($_POST['fPassword2'])) $fPassword2 = escape_string ($_POST['fPassword2']);
- if (isset ($_POST['fName'])) $fName = escape_string ($_POST['fName']);
- if (isset ($_POST['fQuota'])) $fQuota = intval ($_POST['fQuota']);
- if (isset ($_POST['fActive'])) $fActive = escape_string ($_POST['fActive']);
+ if (isset ($_POST['fPassword'])) $fPassword = escape_string ($_POST['fPassword']);
+ if (isset ($_POST['fPassword2'])) $fPassword2 = escape_string ($_POST['fPassword2']);
+ if (isset ($_POST['fName'])) $fName = escape_string ($_POST['fName']);
+ if (isset ($_POST['fQuota'])) $fQuota = intval ($_POST['fQuota']);
+ if (isset ($_POST['fActive'])) $fActive = escape_string ($_POST['fActive']);
+ if($fPassword != $user_details['password']){
+ if($fPassword == $fPassword2) {
+ if ($fPassword != "") {
+ $formvars['password'] = pacrypt($fPassword);
+ }
+ }
+ else {
+ flash_error($PALANG['pEdit_mailbox_password_text_error']);
+ $error = 1;
+ }
+ }
- if($fPassword != $user_details['password']){
- if($fPassword == $fPassword2) {
- if ($fPassword != "") {
- $formvars['password'] = pacrypt($fPassword);
- }
- }
- else {
- flash_error($PALANG['pEdit_mailbox_password_text_error']);
- $error = 1;
- }
- }
+ if ($CONF['quota'] == "YES")
+ {
+ if (!check_quota ($fQuota, $fDomain))
+ {
+ $error = 1;
+ $tName = $fName;
+ $tQuota = $fQuota;
+ $tActive = $fActive;
+ $pEdit_mailbox_quota_text = $PALANG['pEdit_mailbox_quota_text_error'];
+ }
+ }
+ if ($error != 1)
+ {
+ if (!empty ($fQuota))
+ {
+ $quota = multiply_quota ($fQuota);
+ }
+ else
+ {
+ $quota = 0;
+ }
- if ($CONF['quota'] == "YES")
- {
- if (!check_quota ($fQuota, $fDomain))
- {
- $error = 1;
- $tName = $fName;
- $tQuota = $fQuota;
- $tActive = $fActive;
- $pEdit_mailbox_quota_text = $PALANG['pEdit_mailbox_quota_text_error'];
- }
- }
- if ($error != 1)
- {
- if (!empty ($fQuota))
- {
- $quota = multiply_quota ($fQuota);
- }
- else
- {
- $quota = 0;
- }
+ if ($fActive == "on")
+ {
+ $sqlActive = db_get_boolean(True);
+ $fActive = 1;
+ }
+ else
+ {
+ $sqlActive = db_get_boolean(False);
+ $fActive = 0;
+ }
- if ($fActive == "on")
- {
- $sqlActive = db_get_boolean(True);
- $fActive = 1;
- }
- else
- {
- $sqlActive = db_get_boolean(False);
- $fActive = 0;
- }
+ $formvars['name'] = $fName;
+ $formvars['quota'] =$quota;
+ $formvars['active']=$sqlActive;
- $formvars['name'] = $fName;
- $formvars['quota'] =$quota;
- $formvars['active']=$sqlActive;
+ $result = db_update ('mailbox', "username='$fUsername' AND domain='$fDomain'", $formvars, array('modified'));
+ if ($result != 1) {
+ $tMessage = $PALANG['pEdit_mailbox_result_error'];
+ }
+ else {
+ db_log ($SESSID_USERNAME, $fDomain, 'edit_mailbox', $fUsername);
- $result = db_update ('mailbox', "username='$fUsername' AND domain='$fDomain'", $formvars, array('modified'));
-
- if ($result != 1) {
- $tMessage = $PALANG['pEdit_mailbox_result_error'];
- }
- else {
- db_log ($SESSID_USERNAME, $fDomain, 'edit_mailbox', $fUsername);
-
- header ("Location: list-virtual.php?domain=$fDomain");
- exit;
- }
- }
+// header ("Location: list-virtual.php?domain=$fDomain");
+ exit;
+ }
+ }
}
include ("templates/header.php");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <Gin...@us...> - 2007-12-17 07:02:41
|
Revision: 271
http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=271&view=rev
Author: GingerDog
Date: 2007-12-16 23:02:45 -0800 (Sun, 16 Dec 2007)
Log Message:
-----------
upgrade.php: implemented some of the postgresql functions; have not tested it yet though
Modified Paths:
--------------
trunk/upgrade.php
Modified: trunk/upgrade.php
===================================================================
--- trunk/upgrade.php 2007-12-17 07:01:50 UTC (rev 270)
+++ trunk/upgrade.php 2007-12-17 07:02:45 UTC (rev 271)
@@ -101,20 +101,20 @@
$sql = "$sql $attach_mysql";
} elseif($CONF['database_type'] == 'pgsql') {
- static $replace = array(
+ $replace = array(
'{AUTOINCREMENT}' => 'SERIAL',
'{PRIMARY}' => 'primary key',
'{UNSIGNED}' => '',
'{FULLTEXT}' => '',
'{BOOLEAN}' => 'BOOLEAN NOT NULL',
'{UTF-8}' => '', # TODO: UTF-8 is simply ignored.
- '{LATIN1}' => '', # TODO: same for latin1
- '{IF_NOT_EXISTS}' => 'IF NOT EXISTS', # TODO: does this work with PgSQL?
- '{RENAME_COLUMN}' => 'CHANGE COLUMN', # TODO: probably wrong
- 'int(1)' => 'int2',
- 'int(10)' => 'int4',
- 'int(11)' => 'int4',
- 'int(4)' => 'int4',
+ '{LATIN1}' => '', # TODO: same for latin1
+ '{IF_NOT_EXISTS}' => '', # TODO: does this work with PgSQL? NO
+ '{RENAME_COLUMN}' => 'ALTER COLUMN', # PgSQL : ALTER TABLE x RENAME x TO y
+ 'int(1)' => 'int',
+ 'int(10)' => 'int',
+ 'int(11)' => 'int',
+ 'int(4)' => 'int',
);
} else {
@@ -141,7 +141,7 @@
if ($CONF['database_type'] == 'mysql' || $CONF['database_type'] == 'mysqli' ) {
return "ALTER TABLE $table DROP INDEX $index";
} elseif($CONF['database_type'] == 'pgsql') {
- return "DROP INDEX $index"; # TODO: on which table?!
+ return "DROP INDEX $index"; # Index names are unique with a DB for PostgreSQL
} else {
echo "Sorry, unsupported database type " . $conf['database_type'];
exit;
@@ -160,15 +160,23 @@
echo "upgrade_1";
}
-function upgrade_2() {
+function upgrade_2_mysql() {
# upgrade pre-2.1 database
# from TABLE_BACKUP_MX.TXT
$table_domain = table_by_key ('domain');
$result = db_query_parsed("ALTER TABLE $table_domain ADD COLUMN transport VARCHAR(255) AFTER maxquota;", TRUE);
+ // don't think PGSQL supports 'AFTER transport'
$result = db_query_parsed("ALTER TABLE $table_domain ADD COLUMN backupmx {BOOLEAN} DEFAULT {BOOL_FALSE} AFTER transport;", TRUE);
}
-function upgrade_3() {
+function upgrade_2_pgsql() {
+ $table_domain = table_by_key ('domain');
+ $result = db_query_parsed("ALTER TABLE $table_domain ADD COLUMN transport VARCHAR(255)", TRUE);
+ $result = db_query_parsed("ALTER TABLE $table_domain ADD COLUMN backupmx BOOLEAN DEFAULT false", TRUE);
+
+}
+
+function upgrade_3_mysql() {
# upgrade pre-2.1 database
# from TABLE_CHANGES.TXT
$table_admin = table_by_key ('admin');
@@ -177,6 +185,8 @@
$table_mailbox = table_by_key ('mailbox');
$table_vacation = table_by_key ('vacation');
+ // these will not work on PostgreSQL; syntax is :
+ // ALTER TABLE foo RENAME f1 TO f2
$all_sql = split("\n", trim("
ALTER TABLE $table_admin {RENAME_COLUMN} create_date created DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL;
ALTER TABLE $table_admin {RENAME_COLUMN} change_date modified DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL;
@@ -213,76 +223,66 @@
function upgrade_4_pgsql() { # PgSQL only
# changes between 2.1 and moving to sourceforge
+ $table_domain = table_by_key('domain');
+ $table_admin = table_by_key('admin');
+ $table_alias = table_by_key('alias');
+ $table_domain_admins = table_by_key('domain_admins');
+ $table_log = table_by_key('log');
+ $table_mailbox = table_by_key('mailbox');
+ $table_vacation = table_by_key('vacation');
-/* TODO
+ $result = db_query_parsed("ALTER TABLE $table_domain ADD COLUMN quota int NOT NULL default '0'");
-Changes in DATABASE_PGSQL.TXT: (in diff format - "-" means removed, "+" means added)
+ $result = db_query_parsed("ALTER TABLE $table_domain ALTER COLUMN domain DROP DEFAULT");
+ $result = db_query_parsed("CREATE INDEX domain_domain_active ON domain(domain,active)");
-TABLE domain
-- domain character varying(255) NOT NULL default '',
-+ domain character varying(255) NOT NULL,
-+ quota integer NOT NULL default 0,
+ $result = db_query_parsed("ALTER TABLE $table_admin ALTER COLUMN domain DROP DEFAULT");
+ $result = db_query_parsed("ALTER TABLE $table_alias ALTER COLUMN address DROP DEFAULT");
+ $result = db_query_parsed("ALTER TABLE $table_alias ALTER COLUMN domain DROP DEFAULT");
+ $result = db_query_parsed("CREATE INDEX alias_address_active ON alias(address,active)");
-+CREATE INDEX domain_domain_active ON domain(domain,active);
+ $result = db_query_parsed("ALTER TABLE $table_domain_admins ALTER COLUMN username DROP DEFAULT");
+ $result = db_query_parsed("ALTER TABLE $table_domain_admins ALTER COLUMN domain DROP DEFAULT");
-TABLE "admin"
-- "username" character varying(255) NOT NULL default '',
-+ "username" character varying(255) NOT NULL,
+ $result = db_query_parsed("BEGIN;
+ ALTER TABLE $table_log RENAME COLUMN data TO data_old;
+ ALTER TABLE $table_log ADD COLUMN data TYPE text NOT NULL default '';
+ UPDATE $table_log SET data = CAST(data_old AS text);
+ ALTER TABLE $table_log DROP COLUMN data_old;
+ COMMIT;");
-
-TABLE alias
-- address character varying(255) NOT NULL default '',
-+ address character varying(255) NOT NULL,
-- domain character varying(255) NOT NULL default '',
-+ domain character varying(255) NOT NULL REFERENCES domain,
+ $result = db_query_parsed("ALTER TABLE $table_mailbox ALTER COLUMN username DROP DEFAULT");
+ $result = db_query_parsed("ALTER TABLE $table_mailbox ALTER COLUMN domain DROP DEFAULT");
-+CREATE INDEX alias_address_active ON alias(address,active);
-
-TABLE domain_admins
-- username character varying(255) NOT NULL default '',
-+ username character varying(255) NOT NULL,
-- domain character varying(255) NOT NULL default '',
-+ domain character varying(255) NOT NULL REFERENCES domain,
+ $result = db_query_parsed("BEGIN;
+ ALTER TABLE $table_mailbox RENAME COLUMN domain TO domain_old;
+ ALTER TABLE $table_mailbox ADD COLUMN domain TYPE varchar(255) REFERENCES domain (domain);
+ UPDATE $table_mailbox SET domain = domain_old;
+ ALTER TABLE $table_mailbox DROP COLUMN domain_old;
+ CREATE INDEX mailbox_username_active ON mailbox(username,active);
+ COMMIT;");
-TABLE log
-- data character varying(255) NOT NULL default ''
-+ data text NOT NULL default ''
-
-TABLE mailbox
-- username character varying(255) NOT NULL default '',
-+ username character varying(255) NOT NULL,
-- domain character varying(255) NOT NULL default '',
-+ domain character varying(255) NOT NULL REFERENCES domain,
-+CREATE INDEX mailbox_username_active ON mailbox(username,active);
-
-TABLE vacation
-- email character varying(255) NOT NULL default '',
-+ email character varying(255) PRIMARY KEY,
-- body text NOT NULL,
-+ body text NOT NULL DEFAULT '',
-- cache text NOT NULL,
-+ cache text NOT NULL DEFAULT '',
-- domain character varying(255) NOT NULL default '',
-+ "domain" character varying(255) NOT NULL REFERENCES "domain",
-- active boolean NOT NULL default true,
-+ active boolean DEFAULT true NOT NULL
-- Constraint "vacation_key" Primary Key ("email")
+ $result = db_query_parsed("ALTER TABLE $table_vacation ALTER COLUMN body SET DEFAULT = ''");
+ $result = db_query_parsed("ALTER TABLE $table_vacation DROP COLUMN cache");
--COMMENT ON TABLE vacation IS 'Postfix Admin - Virtual Vacation';
+ $result = db_query_parsed("ALTER TABLE $table_vacation RENAME COLUMN domain to domain_old");
+ $result = db_query_parsed("ALTER TABLE $table_vacation ADD COLUMN domain TYPE character varying(255) REFERENCES domain ");
+ $result = db_query_parsed("UPDATE $table_vacation SET domain = domain_old");
+ $result = db_query_parsed("ALTER TABLE $table_vacation DROP COLUMN domain_old");
-+CREATE INDEX vacation_email_active ON vacation(email,active);
+ $result = db_query_parsed("CREATE INDEX vacation_email_active ON vacation(email,active)");
-+CREATE TABLE vacation_notification (
-+ on_vacation character varying(255) NOT NULL REFERENCES vacation(email) ON DELETE CASCADE,
-+ notified character varying(255) NOT NULL,
-+ notified_at timestamp with time zone NOT NULL DEFAULT now(),
-+ CONSTRAINT vacation_notification_pkey primary key(on_vacation,notified)
-+);
+ $result = db_query_parsed("
+CREATE TABLE vacation_notification (
+ on_vacation character varying(255) NOT NULL REFERENCES vacation(email) ON DELETE CASCADE,
+ notified character varying(255) NOT NULL,
+ notified_at timestamp with time zone NOT NULL DEFAULT now(),
+ CONSTRAINT vacation_notification_pkey primary key(on_vacation,notified)
+);");
-*/
}
function upgrade_79_mysql() { # MySQL only
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <Gin...@us...> - 2007-12-17 07:01:48
|
Revision: 270
http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=270&view=rev
Author: GingerDog
Date: 2007-12-16 23:01:50 -0800 (Sun, 16 Dec 2007)
Log Message:
-----------
users/password.php: add password length checking (thought I had already committed this!) (cboltz: what is the right string to use in the error message?)
Modified Paths:
--------------
trunk/users/password.php
Modified: trunk/users/password.php
===================================================================
--- trunk/users/password.php 2007-12-16 00:05:50 UTC (rev 269)
+++ trunk/users/password.php 2007-12-17 07:01:50 UTC (rev 270)
@@ -46,13 +46,17 @@
$fPassword = escape_string ($_POST['fPassword']);
$fPassword2 = escape_string ($_POST['fPassword2']);
+ if(strlen($fPassword) < $CONF['min_password_length']) {
+ $error = 1;
+ flash_error($PALANG['pPassword_password_too_short_error'];
+ }
$username = $USERID_USERNAME;
$result = db_query ("SELECT * FROM $table_mailbox WHERE username='$username'");
if ($result['rows'] == 1)
{
$row = db_array ($result['result']);
- $checked_password = pacrypt ($fPassword_current, $row['password']);
+ $checked_password = pacrypt($fPassword_current, $row['password']);
$result = db_query ("SELECT * FROM $table_mailbox WHERE username='$username' AND password='$checked_password'");
if ($result['rows'] != 1)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2007-12-16 00:05:45
|
Revision: 269
http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=269&view=rev
Author: christian_boltz
Date: 2007-12-15 16:05:50 -0800 (Sat, 15 Dec 2007)
Log Message:
-----------
da.lang:
- translation update by jespermeyer - thanks!
https://sourceforge.net/tracker/?func=detail&atid=937966&aid=1851126&group_id=191583
Modified Paths:
--------------
trunk/languages/da.lang
Modified: trunk/languages/da.lang
===================================================================
--- trunk/languages/da.lang 2007-12-14 00:05:54 UTC (rev 268)
+++ trunk/languages/da.lang 2007-12-16 00:05:50 UTC (rev 269)
@@ -196,8 +196,8 @@
$PALANG['pSendmail_subject_text'] = 'Velkommen';
$PALANG['pSendmail_body'] = 'Meddelelse';
$PALANG['pSendmail_button'] = 'Send email';
-$PALANG['pSendmail_result_error'] = '<span class="error_msg">Kan ikke tilføje postboks!</span>'; # XXX text change - new: <span class="error_msg">Unable to send email!</span>
-$PALANG['pSendmail_result_success'] = 'Postboksen er tilføjet!'; # XXX text change - new: Email sent!
+$PALANG['pSendmail_result_error'] = '<span class="error_msg">Kan ikke sende email!</span>';
+$PALANG['pSendmail_result_success'] = 'Email sendt!';
$PALANG['pAdminMenu_list_admin'] = 'Administratorliste';
$PALANG['pAdminMenu_list_domain'] = 'Domæneliste';
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2007-12-14 00:05:50
|
Revision: 268
http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=268&view=rev
Author: christian_boltz
Date: 2007-12-13 16:05:54 -0800 (Thu, 13 Dec 2007)
Log Message:
-----------
setup.php:
- added check for multibyte string extension (mb_encode_mimeheader)
- added note that Apache version check failure can be ignored if another
webserver is used
Modified Paths:
--------------
trunk/setup.php
Modified: trunk/setup.php
===================================================================
--- trunk/setup.php 2007-12-13 23:22:14 UTC (rev 267)
+++ trunk/setup.php 2007-12-14 00:05:54 UTC (rev 268)
@@ -49,6 +49,7 @@
$f_pg_connect = function_exists ("pg_connect");
$f_session_start = function_exists ("session_start");
$f_preg_match = function_exists ("preg_match");
+$f_mb_encode_mimeheader = function_exists ("mb_encode_mimeheader");
$file_config = file_exists (realpath ("./config.inc.php"));
@@ -77,7 +78,7 @@
}
else
{
- print "<li><b>Unable to check for Apache version. (missing function: apache_get_version())</b></li>\n";
+ print "<li><b>Unable to check for Apache version. (missing function: apache_get_version())<br />(Ignore this warning if you use another webserver software.)</b></li>\n";
}
print "</ul>";
@@ -234,6 +235,20 @@
$error =+ 1;
}
+//
+// Multibyte functions
+//
+if ( $f_mb_encode_mimeheader == 1 )
+{
+ print "<li>Depends on: multibyte string - OK</li>\n";
+}
+else
+{
+ print "<li><b>Error: Depends on: multibyte string - NOT FOUND</b><br />\n";
+ print "To install multibyte string support, install php$phpversion-mbstring</li>\n";
+ $error =+ 1;
+}
+
print "</ul>";
if ($error != 0)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2007-12-13 23:22:16
|
Revision: 267
http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=267&view=rev
Author: christian_boltz
Date: 2007-12-13 15:22:14 -0800 (Thu, 13 Dec 2007)
Log Message:
-----------
broadcast-message.php:
- fix typo: encode_base64 -> base64_encode
https://sourceforge.net/forum/forum.php?thread_id=1891143&forum_id=676076
Modified Paths:
--------------
trunk/broadcast-message.php
Modified: trunk/broadcast-message.php
===================================================================
--- trunk/broadcast-message.php 2007-12-07 09:39:11 UTC (rev 266)
+++ trunk/broadcast-message.php 2007-12-13 23:22:14 UTC (rev 267)
@@ -54,7 +54,7 @@
{
$b_name = mb_encode_mimeheader( $_POST['name'], 'UTF-8', 'Q');
$b_subject = mb_encode_mimeheader( $_POST['subject'], 'UTF-8', 'Q');
- $b_message = encode_base64($_POST['message']);
+ $b_message = base64_encode($_POST['message']);
$i = 0;
while ($row = db_array ($result['result'])) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2007-12-07 09:39:06
|
Revision: 266
http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=266&view=rev
Author: christian_boltz
Date: 2007-12-07 01:39:11 -0800 (Fri, 07 Dec 2007)
Log Message:
-----------
templates/search.php:
- removed superfluous and buggy superadmin check. Fixes
https://sourceforge.net/tracker/?func=detail&atid=937964&aid=1844063&group_id=191583
Modified Paths:
--------------
trunk/templates/search.php
Modified: trunk/templates/search.php
===================================================================
--- trunk/templates/search.php 2007-12-06 22:38:36 UTC (rev 265)
+++ trunk/templates/search.php 2007-12-07 09:39:11 UTC (rev 266)
@@ -83,10 +83,7 @@
$active = ($tAlias[$i]['active'] == 1) ? $PALANG['YES'] : $PALANG['NO'];
print " <td><a href=\"edit-active.php?alias=" . urlencode ($tAlias[$i]['address']) . "&domain=" . $tAlias[$i]['domain'] . "&return=search.php?search=" . urlencode ($fSearch) . "\">" . $active . "</a></td>\n";
print " <td><a href=\"edit-alias.php?address=" . urlencode ($tAlias[$i]['address']) . "&domain=" . $tAlias[$i]['domain'] . "\">" . $PALANG['edit'] . "</a></td>\n";
- print " <td><a href=\"delete.php?";
- if (authentication_has_role('global-admin')) {
- print "table=alias&";
- }
+ print " <td><a href=\"delete.php?table=alias&";
print "delete=" . urlencode ($tAlias[$i]['address']) . "&domain=" . $tAlias[$i]['domain'] . "\"onclick=\"return confirm ('" . $PALANG['confirm'] . $PALANG['pOverview_get_aliases'] . ": ". $tAlias[$i]['address'] . "')\">" . $PALANG['del'] . "</a></td>\n";
}
else
@@ -176,10 +173,7 @@
}
print " <td><a href=\"edit-mailbox.php?username=" . urlencode ($tMailbox[$i]['username']) . "&domain=" . $tMailbox[$i]['domain'] . "\">" . $PALANG['edit'] . "</a></td>\n";
- print " <td><a href=\"delete.php?";
- if (authentication_has_role('global-admin')) {
- print "table=mailbox&";
- }
+ print " <td><a href=\"delete.php?table=mailbox&";
print "delete=" . urlencode ($tMailbox[$i]['username']) . "&domain=" . $tMailbox[$i]['domain'] . "\"onclick=\"return confirm ('" . $PALANG['confirm'] . $PALANG['pOverview_get_mailboxes'] . ": ". $tMailbox[$i]['username'] . "')\">" . $PALANG['del'] . "</a></td>\n";
print " </tr>\n";
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2007-12-06 22:38:38
|
Revision: 265
http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=265&view=rev
Author: christian_boltz
Date: 2007-12-06 14:38:36 -0800 (Thu, 06 Dec 2007)
Log Message:
-----------
*.lang:
- added re-translation comments for pSendmail_result_error and
pSendmail_result_success
de.lang:
- re-translated the two strings listed above
Modified Paths:
--------------
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/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/lt.lang
trunk/languages/mk.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
Modified: trunk/languages/bg.lang
===================================================================
--- trunk/languages/bg.lang 2007-12-06 22:37:07 UTC (rev 264)
+++ trunk/languages/bg.lang 2007-12-06 22:38:36 UTC (rev 265)
@@ -190,8 +190,8 @@
$PALANG['pSendmail_subject_text'] = 'Äîáðå äîøëè';
$PALANG['pSendmail_body'] = 'Òåêñò';
$PALANG['pSendmail_button'] = 'Èçïðàòè';
-$PALANG['pSendmail_result_error'] = '<span class="error_msg">Íå ìîãà äà ñúçäàì ïîùåíñêàòà êóòèÿ!</span>';
-$PALANG['pSendmail_result_success'] = 'Ïîùåíñêàòà êóòèÿ áå ñúçäàäåí óñïåøíî!';
+$PALANG['pSendmail_result_error'] = '<span class="error_msg">Íå ìîãà äà ñúçäàì ïîùåíñêàòà êóòèÿ!</span>'; # XXX text change - new: <span class="error_msg">Unable to send email!</span>
+$PALANG['pSendmail_result_success'] = 'Ïîùåíñêàòà êóòèÿ áå ñúçäàäåí óñïåøíî!'; # XXX text change - new: Email sent!
$PALANG['pAdminMenu_list_admin'] = 'Ñïèñúê ñ àäìèíèòå';
$PALANG['pAdminMenu_list_domain'] = 'Ñïèñúê ñ äîìåéíèòå';
Modified: trunk/languages/ca.lang
===================================================================
--- trunk/languages/ca.lang 2007-12-06 22:37:07 UTC (rev 264)
+++ trunk/languages/ca.lang 2007-12-06 22:38:36 UTC (rev 265)
@@ -189,8 +189,8 @@
$PALANG['pSendmail_subject_text'] = 'Benvingut';
$PALANG['pSendmail_body'] = 'Cos';
$PALANG['pSendmail_button'] = 'Enviar missatge';
-$PALANG['pSendmail_result_error'] = '<span class="error_msg">Imposible crear la bústia!</span>';
-$PALANG['pSendmail_result_success'] = 'La bústia ha estat creada!';
+$PALANG['pSendmail_result_error'] = '<span class="error_msg">Imposible crear la bústia!</span>'; # XXX text change - new: <span class="error_msg">Unable to send email!</span>
+$PALANG['pSendmail_result_success'] = 'La bústia ha estat creada!'; # XXX text change - new: Email sent!
$PALANG['pAdminMenu_list_admin'] = 'Llistat d\'administradors';
$PALANG['pAdminMenu_list_domain'] = 'Llistat de dominis';
Modified: trunk/languages/cn.lang
===================================================================
--- trunk/languages/cn.lang 2007-12-06 22:37:07 UTC (rev 264)
+++ trunk/languages/cn.lang 2007-12-06 22:38:36 UTC (rev 265)
@@ -190,8 +190,8 @@
$PALANG['pSendmail_subject_text'] = '欢迎';
$PALANG['pSendmail_body'] = '内容';
$PALANG['pSendmail_button'] = '发送';
-$PALANG['pSendmail_result_error'] = '<span class="error_msg">建立邮箱失败!</span>';
-$PALANG['pSendmail_result_success'] = '建立邮箱成功!';
+$PALANG['pSendmail_result_error'] = '<span class="error_msg">建立邮箱失败!</span>'; # XXX text change - new: <span class="error_msg">Unable to send email!</span>
+$PALANG['pSendmail_result_success'] = '建立邮箱成功!'; # XXX text change - new: Email sent!
$PALANG['pAdminMenu_list_admin'] = '管理员清单';
$PALANG['pAdminMenu_list_domain'] = '域名清单';
Modified: trunk/languages/cs.lang
===================================================================
--- trunk/languages/cs.lang 2007-12-06 22:37:07 UTC (rev 264)
+++ trunk/languages/cs.lang 2007-12-06 22:38:36 UTC (rev 265)
@@ -196,8 +196,8 @@
$PALANG['pSendmail_subject_text'] = 'Vítejte';
$PALANG['pSendmail_body'] = 'Obsah';
$PALANG['pSendmail_button'] = 'Poslat email';
-$PALANG['pSendmail_result_error'] = '<span class="error_msg">Nepodařilo se vytvořit schránku!</span>';
-$PALANG['pSendmail_result_success'] = 'Schránka byla vytvořena!';
+$PALANG['pSendmail_result_error'] = '<span class="error_msg">Nepodařilo se vytvořit schránku!</span>'; # XXX text change - new: <span class="error_msg">Unable to send email!</span>
+$PALANG['pSendmail_result_success'] = 'Schránka byla vytvořena!'; # XXX text change - new: Email sent!
$PALANG['pAdminMenu_list_admin'] = 'Administrátoři';
$PALANG['pAdminMenu_list_domain'] = 'Domény';
Modified: trunk/languages/da.lang
===================================================================
--- trunk/languages/da.lang 2007-12-06 22:37:07 UTC (rev 264)
+++ trunk/languages/da.lang 2007-12-06 22:38:36 UTC (rev 265)
@@ -196,8 +196,8 @@
$PALANG['pSendmail_subject_text'] = 'Velkommen';
$PALANG['pSendmail_body'] = 'Meddelelse';
$PALANG['pSendmail_button'] = 'Send email';
-$PALANG['pSendmail_result_error'] = '<span class="error_msg">Kan ikke tilføje postboks!</span>';
-$PALANG['pSendmail_result_success'] = 'Postboksen er tilføjet!';
+$PALANG['pSendmail_result_error'] = '<span class="error_msg">Kan ikke tilføje postboks!</span>'; # XXX text change - new: <span class="error_msg">Unable to send email!</span>
+$PALANG['pSendmail_result_success'] = 'Postboksen er tilføjet!'; # XXX text change - new: Email sent!
$PALANG['pAdminMenu_list_admin'] = 'Administratorliste';
$PALANG['pAdminMenu_list_domain'] = 'Domæneliste';
Modified: trunk/languages/de.lang
===================================================================
--- trunk/languages/de.lang 2007-12-06 22:37:07 UTC (rev 264)
+++ trunk/languages/de.lang 2007-12-06 22:38:36 UTC (rev 265)
@@ -195,8 +195,8 @@
$PALANG['pSendmail_subject_text'] = 'Willkommen';
$PALANG['pSendmail_body'] = 'Text';
$PALANG['pSendmail_button'] = 'Versende Nachricht';
-$PALANG['pSendmail_result_error'] = '<span class="error_msg">Kann Mailbox nicht anlegen!</span>';
-$PALANG['pSendmail_result_success'] = 'Mailbox wurde angelegt!';
+$PALANG['pSendmail_result_error'] = '<span class="error_msg">Mail konnte nicht gesendet werden!</span>';
+$PALANG['pSendmail_result_success'] = 'Mail gesendet!';
$PALANG['pAdminMenu_list_admin'] = 'Admin Liste';
$PALANG['pAdminMenu_list_domain'] = 'Domain Liste';
Modified: trunk/languages/es.lang
===================================================================
--- trunk/languages/es.lang 2007-12-06 22:37:07 UTC (rev 264)
+++ trunk/languages/es.lang 2007-12-06 22:38:36 UTC (rev 265)
@@ -190,8 +190,8 @@
$PALANG['pSendmail_subject_text'] = 'Bienvenido';
$PALANG['pSendmail_body'] = 'Cuerpo';
$PALANG['pSendmail_button'] = 'Enviar mensaje';
-$PALANG['pSendmail_result_error'] = '<span class="error_msg">¡Imposible crear el buzón!</span>';
-$PALANG['pSendmail_result_success'] = '¡El buzón ha sido creado!';
+$PALANG['pSendmail_result_error'] = '<span class="error_msg">¡Imposible crear el buzón!</span>'; # XXX text change - new: <span class="error_msg">Unable to send email!</span>
+$PALANG['pSendmail_result_success'] = '¡El buzón ha sido creado!'; # XXX text change - new: Email sent!
$PALANG['pAdminMenu_list_admin'] = 'Lista de administradores';
$PALANG['pAdminMenu_list_domain'] = 'Lista de dominios';
Modified: trunk/languages/et.lang
===================================================================
--- trunk/languages/et.lang 2007-12-06 22:37:07 UTC (rev 264)
+++ trunk/languages/et.lang 2007-12-06 22:38:36 UTC (rev 265)
@@ -190,8 +190,8 @@
$PALANG['pSendmail_subject_text'] = 'Tere tulemast';
$PALANG['pSendmail_body'] = 'Põhitekst';
$PALANG['pSendmail_button'] = 'Saada teade';
-$PALANG['pSendmail_result_error'] = '<span class="error_msg">Postkasti loomine ebaõnnestus!</span>';
-$PALANG['pSendmail_result_success'] = 'Postkast on loodud!';
+$PALANG['pSendmail_result_error'] = '<span class="error_msg">Postkasti loomine ebaõnnestus!</span>'; # XXX text change - new: <span class="error_msg">Unable to send email!</span>
+$PALANG['pSendmail_result_success'] = 'Postkast on loodud!'; # XXX text change - new: Email sent!
$PALANG['pAdminMenu_list_admin'] = 'Haldajad';
$PALANG['pAdminMenu_list_domain'] = 'Domeenid';
Modified: trunk/languages/eu.lang
===================================================================
--- trunk/languages/eu.lang 2007-12-06 22:37:07 UTC (rev 264)
+++ trunk/languages/eu.lang 2007-12-06 22:38:36 UTC (rev 265)
@@ -188,8 +188,8 @@
$PALANG['pSendmail_subject_text'] = 'Ongi etorri';
$PALANG['pSendmail_body'] = 'Gorputza';
$PALANG['pSendmail_button'] = 'Mezua bidali';
-$PALANG['pSendmail_result_error'] = '<span class="error_msg">Ezinezkoa postontzia sortzea!</span>';
-$PALANG['pSendmail_result_success'] = 'Postontzia sortuta!';
+$PALANG['pSendmail_result_error'] = '<span class="error_msg">Ezinezkoa postontzia sortzea!</span>'; # XXX text change - new: <span class="error_msg">Unable to send email!</span>
+$PALANG['pSendmail_result_success'] = 'Postontzia sortuta!'; # XXX text change - new: Email sent!
$PALANG['pAdminMenu_list_admin'] = 'Kudeatzaile zerrenda';
$PALANG['pAdminMenu_list_domain'] = 'Domeinu zerrenda';
Modified: trunk/languages/fi.lang
===================================================================
--- trunk/languages/fi.lang 2007-12-06 22:37:07 UTC (rev 264)
+++ trunk/languages/fi.lang 2007-12-06 22:38:36 UTC (rev 265)
@@ -192,8 +192,8 @@
$PALANG['pSendmail_subject_text'] = 'Tervetuloa';
$PALANG['pSendmail_body'] = 'Viesti';
$PALANG['pSendmail_button'] = 'Lähetä viesti';
-$PALANG['pSendmail_result_error'] = '<span class="error_msg">Postilaatikon luonti ei onnistunut!</span>';
-$PALANG['pSendmail_result_success'] = 'Postilaatikko on luotu!';
+$PALANG['pSendmail_result_error'] = '<span class="error_msg">Postilaatikon luonti ei onnistunut!</span>'; # XXX text change - new: <span class="error_msg">Unable to send email!</span>
+$PALANG['pSendmail_result_success'] = 'Postilaatikko on luotu!'; # XXX text change - new: Email sent!
$PALANG['pAdminMenu_list_admin'] = 'Admin Lista';
$PALANG['pAdminMenu_list_domain'] = 'Domain Lista';
Modified: trunk/languages/fo.lang
===================================================================
--- trunk/languages/fo.lang 2007-12-06 22:37:07 UTC (rev 264)
+++ trunk/languages/fo.lang 2007-12-06 22:38:36 UTC (rev 265)
@@ -190,8 +190,8 @@
$PALANG['pSendmail_subject_text'] = 'Vælkomin';
$PALANG['pSendmail_body'] = 'Boð';
$PALANG['pSendmail_button'] = 'Send boð';
-$PALANG['pSendmail_result_error'] = '<span class="error_msg">Fái ikki stovnað postkassa!</span>';
-$PALANG['pSendmail_result_success'] = 'Postkassin er stovnaður!';
+$PALANG['pSendmail_result_error'] = '<span class="error_msg">Fái ikki stovnað postkassa!</span>'; # XXX text change - new: <span class="error_msg">Unable to send email!</span>
+$PALANG['pSendmail_result_success'] = 'Postkassin er stovnaður!'; # XXX text change - new: Email sent!
$PALANG['pAdminMenu_list_admin'] = 'Umsitara listi';
$PALANG['pAdminMenu_list_domain'] = 'Navnaøkja listi';
Modified: trunk/languages/fr.lang
===================================================================
--- trunk/languages/fr.lang 2007-12-06 22:37:07 UTC (rev 264)
+++ trunk/languages/fr.lang 2007-12-06 22:38:36 UTC (rev 265)
@@ -191,8 +191,8 @@
$PALANG['pSendmail_subject_text'] = 'Bienvenue';
$PALANG['pSendmail_body'] = 'Message';
$PALANG['pSendmail_button'] = 'Envoyer le message';
-$PALANG['pSendmail_result_error'] = '<span class="error_msg">Erreur lors de l\'envoit du message!</span>';
-$PALANG['pSendmail_result_success'] = 'Le message a été envoyé!';
+$PALANG['pSendmail_result_error'] = '<span class="error_msg">Erreur lors de l\'envoit du message!</span>'; # XXX text change - new: <span class="error_msg">Unable to send email!</span>
+$PALANG['pSendmail_result_success'] = 'Le message a été envoyé!'; # XXX text change - new: Email sent!
$PALANG['pAdminMenu_list_admin'] = 'Liste Administrateurs';
$PALANG['pAdminMenu_list_domain'] = 'Liste Domaines';
Modified: trunk/languages/hr.lang
===================================================================
--- trunk/languages/hr.lang 2007-12-06 22:37:07 UTC (rev 264)
+++ trunk/languages/hr.lang 2007-12-06 22:38:36 UTC (rev 265)
@@ -189,8 +189,8 @@
$PALANG['pSendmail_subject_text'] = 'Dobrodoli!';
$PALANG['pSendmail_body'] = 'Tekst';
$PALANG['pSendmail_button'] = 'Poalji poruku';
-$PALANG['pSendmail_result_error'] = '<span class="error_msg">Potanski ormarić nije bilo moguče stvoriti!</span>';
-$PALANG['pSendmail_result_success'] = 'Potanski ormarić je uspjeno stvoren!';
+$PALANG['pSendmail_result_error'] = '<span class="error_msg">Potanski ormarić nije bilo moguče stvoriti!</span>'; # XXX text change - new: <span class="error_msg">Unable to send email!</span>
+$PALANG['pSendmail_result_success'] = 'Potanski ormarić je uspjeno stvoren!'; # XXX text change - new: Email sent!
$PALANG['pAdminMenu_list_admin'] = 'Lista administratora';
$PALANG['pAdminMenu_list_domain'] = 'Lista domena';
Modified: trunk/languages/hu.lang
===================================================================
--- trunk/languages/hu.lang 2007-12-06 22:37:07 UTC (rev 264)
+++ trunk/languages/hu.lang 2007-12-06 22:38:36 UTC (rev 265)
@@ -195,8 +195,8 @@
$PALANG['pSendmail_subject_text'] = 'Postafiókja sikeresen elkészült!';
$PALANG['pSendmail_body'] = 'Üzenet';
$PALANG['pSendmail_button'] = 'Üzenet küldése';
-$PALANG['pSendmail_result_error'] = '<span class="error_msg">Postafiók létrehozása sikertelen!</span>';
-$PALANG['pSendmail_result_success'] = 'A postafiók sikeresen elkészült!';
+$PALANG['pSendmail_result_error'] = '<span class="error_msg">Postafiók létrehozása sikertelen!</span>'; # XXX text change - new: <span class="error_msg">Unable to send email!</span>
+$PALANG['pSendmail_result_success'] = 'A postafiók sikeresen elkészült!'; # XXX text change - new: Email sent!
$PALANG['pAdminMenu_list_admin'] = 'Admin Lista';
$PALANG['pAdminMenu_list_domain'] = 'Domain Lista';
Modified: trunk/languages/is.lang
===================================================================
--- trunk/languages/is.lang 2007-12-06 22:37:07 UTC (rev 264)
+++ trunk/languages/is.lang 2007-12-06 22:38:36 UTC (rev 265)
@@ -189,8 +189,8 @@
$PALANG['pSendmail_subject_text'] = 'Velkomin';
$PALANG['pSendmail_body'] = 'Meginmál';
$PALANG['pSendmail_button'] = 'Senda skilaboð';
-$PALANG['pSendmail_result_error'] = '<span class="error_msg">Get ekki búið til nýtt pósthólf!</span>';
-$PALANG['pSendmail_result_success'] = 'Pósthólfið hefur verið stofnað!';
+$PALANG['pSendmail_result_error'] = '<span class="error_msg">Get ekki búið til nýtt pósthólf!</span>'; # XXX text change - new: <span class="error_msg">Unable to send email!</span>
+$PALANG['pSendmail_result_success'] = 'Pósthólfið hefur verið stofnað!'; # XXX text change - new: Email sent!
$PALANG['pAdminMenu_list_admin'] = 'Kerfisstjóralisti';
$PALANG['pAdminMenu_list_domain'] = 'Lénalisti';
Modified: trunk/languages/it.lang
===================================================================
--- trunk/languages/it.lang 2007-12-06 22:37:07 UTC (rev 264)
+++ trunk/languages/it.lang 2007-12-06 22:38:36 UTC (rev 265)
@@ -191,8 +191,8 @@
$PALANG['pSendmail_subject_text'] = 'Benvenuto';
$PALANG['pSendmail_body'] = 'Corpo';
$PALANG['pSendmail_button'] = 'Spedisci messaggio';
-$PALANG['pSendmail_result_error'] = '<span class="error_msg">Impossibile creare la casella di posta!</span>';
-$PALANG['pSendmail_result_success'] = 'La casella di posta è stata creata!';
+$PALANG['pSendmail_result_error'] = '<span class="error_msg">Impossibile creare la casella di posta!</span>'; # XXX text change - new: <span class="error_msg">Unable to send email!</span>
+$PALANG['pSendmail_result_success'] = 'La casella di posta è stata creata!'; # XXX text change - new: Email sent!
$PALANG['pAdminMenu_list_admin'] = 'Lista degli amministratori';
$PALANG['pAdminMenu_list_domain'] = 'Lista dei domini';
Modified: trunk/languages/lt.lang
===================================================================
--- trunk/languages/lt.lang 2007-12-06 22:37:07 UTC (rev 264)
+++ trunk/languages/lt.lang 2007-12-06 22:38:36 UTC (rev 265)
@@ -189,8 +189,8 @@
$PALANG['pSendmail_subject_text'] = 'Sveiki';
$PALANG['pSendmail_body'] = 'Žinutė';
$PALANG['pSendmail_button'] = 'Siųsti';
-$PALANG['pSendmail_result_error'] = '<span class="error_msg">Pašto dėžutės sukurti nepavyko!</span>';
-$PALANG['pSendmail_result_success'] = 'Pašto dėžutė sukurta!';
+$PALANG['pSendmail_result_error'] = '<span class="error_msg">Pašto dėžutės sukurti nepavyko!</span>'; # XXX text change - new: <span class="error_msg">Unable to send email!</span>
+$PALANG['pSendmail_result_success'] = 'Pašto dėžutė sukurta!'; # XXX text change - new: Email sent!
$PALANG['pAdminMenu_list_admin'] = 'Administratoriai';
$PALANG['pAdminMenu_list_domain'] = 'Sritys';
Modified: trunk/languages/mk.lang
===================================================================
--- trunk/languages/mk.lang 2007-12-06 22:37:07 UTC (rev 264)
+++ trunk/languages/mk.lang 2007-12-06 22:38:36 UTC (rev 265)
@@ -190,8 +190,8 @@
$PALANG['pSendmail_subject_text'] = 'Добро дојдовте';
$PALANG['pSendmail_body'] = 'Содржина';
$PALANG['pSendmail_button'] = 'Прати порака';
-$PALANG['pSendmail_result_error'] = '<span class="error_msg">Не можам да го креирам сандачето!</span>';
-$PALANG['pSendmail_result_success'] = 'Сандачето е креирано!';
+$PALANG['pSendmail_result_error'] = '<span class="error_msg">Не можам да го креирам сандачето!</span>'; # XXX text change - new: <span class="error_msg">Unable to send email!</span>
+$PALANG['pSendmail_result_success'] = 'Сандачето е креирано!'; # XXX text change - new: Email sent!
$PALANG['pAdminMenu_list_admin'] = 'Листа на администратори';
$PALANG['pAdminMenu_list_domain'] = 'Листа на домени';
Modified: trunk/languages/nl.lang
===================================================================
--- trunk/languages/nl.lang 2007-12-06 22:37:07 UTC (rev 264)
+++ trunk/languages/nl.lang 2007-12-06 22:38:36 UTC (rev 265)
@@ -191,8 +191,8 @@
$PALANG['pSendmail_subject_text'] = 'Welkom';
$PALANG['pSendmail_body'] = 'Inhoud';
$PALANG['pSendmail_button'] = 'Verstuur bericht';
-$PALANG['pSendmail_result_error'] = '<span class="error_msg">Mislukt om mailbox te maken!</span>';
-$PALANG['pSendmail_result_success'] = 'De mailbox is aangemaakt.';
+$PALANG['pSendmail_result_error'] = '<span class="error_msg">Mislukt om mailbox te maken!</span>'; # XXX text change - new: <span class="error_msg">Unable to send email!</span>
+$PALANG['pSendmail_result_success'] = 'De mailbox is aangemaakt.'; # XXX text change - new: Email sent!
$PALANG['pAdminMenu_list_admin'] = 'Beheerders overzicht';
$PALANG['pAdminMenu_list_domain'] = 'Domein overzicht';
Modified: trunk/languages/nn.lang
===================================================================
--- trunk/languages/nn.lang 2007-12-06 22:37:07 UTC (rev 264)
+++ trunk/languages/nn.lang 2007-12-06 22:38:36 UTC (rev 265)
@@ -188,8 +188,8 @@
$PALANG['pSendmail_subject_text'] = 'Velkommen';
$PALANG['pSendmail_body'] = 'Melding';
$PALANG['pSendmail_button'] = 'Send beskjed';
-$PALANG['pSendmail_result_error'] = '<span class="error_msg">Klarte ikke å opprette e-postkontoen!</span>';
-$PALANG['pSendmail_result_success'] = 'E-postkontoen er opprettet!';
+$PALANG['pSendmail_result_error'] = '<span class="error_msg">Klarte ikke å opprette e-postkontoen!</span>'; # XXX text change - new: <span class="error_msg">Unable to send email!</span>
+$PALANG['pSendmail_result_success'] = 'E-postkontoen er opprettet!'; # XXX text change - new: Email sent!
$PALANG['pAdminMenu_list_admin'] = 'Administrator-liste';
$PALANG['pAdminMenu_list_domain'] = 'Domene-liste';
Modified: trunk/languages/pl.lang
===================================================================
--- trunk/languages/pl.lang 2007-12-06 22:37:07 UTC (rev 264)
+++ trunk/languages/pl.lang 2007-12-06 22:38:36 UTC (rev 265)
@@ -191,8 +191,8 @@
$PALANG['pSendmail_subject_text'] = 'Witamy';
$PALANG['pSendmail_body'] = 'Tekst';
$PALANG['pSendmail_button'] = 'Wyślij wiadomość';
-$PALANG['pSendmail_result_error'] = '<span class="error_msg">Nie można utworzyć konta!</span>';
-$PALANG['pSendmail_result_success'] = 'Konto zostało utworzone!';
+$PALANG['pSendmail_result_error'] = '<span class="error_msg">Nie można utworzyć konta!</span>'; # XXX text change - new: <span class="error_msg">Unable to send email!</span>
+$PALANG['pSendmail_result_success'] = 'Konto zostało utworzone!'; # XXX text change - new: Email sent!
$PALANG['pAdminMenu_list_admin'] = 'Lista administratorów';
$PALANG['pAdminMenu_list_domain'] = 'Lista domen';
Modified: trunk/languages/pt-br.lang
===================================================================
--- trunk/languages/pt-br.lang 2007-12-06 22:37:07 UTC (rev 264)
+++ trunk/languages/pt-br.lang 2007-12-06 22:38:36 UTC (rev 265)
@@ -190,8 +190,8 @@
$PALANG['pSendmail_subject_text'] = 'Bem-vindo';
$PALANG['pSendmail_body'] = 'Mensagem';
$PALANG['pSendmail_button'] = 'Enviar um e-mail';
-$PALANG['pSendmail_result_error'] = '<span class="error_msg">Erro no envio da mensagem!</span>';
-$PALANG['pSendmail_result_success'] = 'A mensagem foi enviada!';
+$PALANG['pSendmail_result_error'] = '<span class="error_msg">Erro no envio da mensagem!</span>'; # XXX text change - new: <span class="error_msg">Unable to send email!</span>
+$PALANG['pSendmail_result_success'] = 'A mensagem foi enviada!'; # XXX text change - new: Email sent!
$PALANG['pAdminMenu_list_admin'] = 'Lista de administradores';
$PALANG['pAdminMenu_list_domain'] = 'Lista de domínios';
Modified: trunk/languages/ru.lang
===================================================================
--- trunk/languages/ru.lang 2007-12-06 22:37:07 UTC (rev 264)
+++ trunk/languages/ru.lang 2007-12-06 22:38:36 UTC (rev 265)
@@ -197,8 +197,8 @@
$PALANG['pSendmail_subject_text'] = 'Добро пожаловать!';
$PALANG['pSendmail_body'] = 'Текст';
$PALANG['pSendmail_button'] = 'Послать сообщение';
-$PALANG['pSendmail_result_error'] = '<span class="error_msg">Невозможно создать почтовый ящик!</span>';
-$PALANG['pSendmail_result_success'] = 'Почтовый ящик был создан!';
+$PALANG['pSendmail_result_error'] = '<span class="error_msg">Невозможно создать почтовый ящик!</span>'; # XXX text change - new: <span class="error_msg">Unable to send email!</span>
+$PALANG['pSendmail_result_success'] = 'Почтовый ящик был создан!'; # XXX text change - new: Email sent!
$PALANG['pAdminMenu_list_admin'] = 'Список админов';
$PALANG['pAdminMenu_list_domain'] = 'Список доменов';
Modified: trunk/languages/sk.lang
===================================================================
--- trunk/languages/sk.lang 2007-12-06 22:37:07 UTC (rev 264)
+++ trunk/languages/sk.lang 2007-12-06 22:38:36 UTC (rev 265)
@@ -190,8 +190,8 @@
$PALANG['pSendmail_subject_text'] = 'Vítajte';
$PALANG['pSendmail_body'] = 'Obsah';
$PALANG['pSendmail_button'] = 'Poslať email';
-$PALANG['pSendmail_result_error'] = '<span class="error_msg">Nepodarilo sa vytvoriť schránku!</span>';
-$PALANG['pSendmail_result_success'] = 'Schránka bola vytvorená!';
+$PALANG['pSendmail_result_error'] = '<span class="error_msg">Nepodarilo sa vytvoriť schránku!</span>'; # XXX text change - new: <span class="error_msg">Unable to send email!</span>
+$PALANG['pSendmail_result_success'] = 'Schránka bola vytvorená!'; # XXX text change - new: Email sent!
$PALANG['pAdminMenu_list_admin'] = 'Administrátory';
$PALANG['pAdminMenu_list_domain'] = 'Domény';
Modified: trunk/languages/sl.lang
===================================================================
--- trunk/languages/sl.lang 2007-12-06 22:37:07 UTC (rev 264)
+++ trunk/languages/sl.lang 2007-12-06 22:38:36 UTC (rev 265)
@@ -190,8 +190,8 @@
$PALANG['pSendmail_subject_text'] = 'Pozdravljeni!';
$PALANG['pSendmail_body'] = 'Besedilo';
$PALANG['pSendmail_button'] = 'Pošlji sporočilo';
-$PALANG['pSendmail_result_error'] = '<span class="error_msg">Predala ni bilo mogoče ustvariti!</span>';
-$PALANG['pSendmail_result_success'] = 'Predal je bil uspešno ustvarjen!';
+$PALANG['pSendmail_result_error'] = '<span class="error_msg">Predala ni bilo mogoče ustvariti!</span>'; # XXX text change - new: <span class="error_msg">Unable to send email!</span>
+$PALANG['pSendmail_result_success'] = 'Predal je bil uspešno ustvarjen!'; # XXX text change - new: Email sent!
$PALANG['pAdminMenu_list_admin'] = 'Seznam administratorjev';
$PALANG['pAdminMenu_list_domain'] = 'Seznam domen';
Modified: trunk/languages/sv.lang
===================================================================
--- trunk/languages/sv.lang 2007-12-06 22:37:07 UTC (rev 264)
+++ trunk/languages/sv.lang 2007-12-06 22:38:36 UTC (rev 265)
@@ -192,8 +192,8 @@
$PALANG['pSendmail_subject_text'] = 'Välkommen';
$PALANG['pSendmail_body'] = 'Meddelande';
$PALANG['pSendmail_button'] = 'Skicka';
-$PALANG['pSendmail_result_error'] = '<span class="error_msg">Mailet kunde inte skickas!</span>';
-$PALANG['pSendmail_result_success'] = 'Mailet har skickats!';
+$PALANG['pSendmail_result_error'] = '<span class="error_msg">Mailet kunde inte skickas!</span>'; # XXX text change - new: <span class="error_msg">Unable to send email!</span>
+$PALANG['pSendmail_result_success'] = 'Mailet har skickats!'; # XXX text change - new: Email sent!
$PALANG['pAdminMenu_list_admin'] = 'Administratörer';
$PALANG['pAdminMenu_list_domain'] = 'Domäner';
Modified: trunk/languages/tr.lang
===================================================================
--- trunk/languages/tr.lang 2007-12-06 22:37:07 UTC (rev 264)
+++ trunk/languages/tr.lang 2007-12-06 22:38:36 UTC (rev 265)
@@ -190,8 +190,8 @@
$PALANG['pSendmail_subject_text'] = 'Hoþ geldiniz';
$PALANG['pSendmail_body'] = 'Metin';
$PALANG['pSendmail_button'] = 'Mesaj Gönder';
-$PALANG['pSendmail_result_error'] = '<span class="error_msg">Posta kutusu yaratýlamadý!</span>';
-$PALANG['pSendmail_result_success'] = 'Posta kutusu yaratýldý!';
+$PALANG['pSendmail_result_error'] = '<span class="error_msg">Posta kutusu yaratýlamadý!</span>'; # XXX text change - new: <span class="error_msg">Unable to send email!</span>
+$PALANG['pSendmail_result_success'] = 'Posta kutusu yaratýldý!'; # XXX text change - new: Email sent!
$PALANG['pAdminMenu_list_admin'] = 'Yönetici Listesi';
$PALANG['pAdminMenu_list_domain'] = 'Domain Listesi';
Modified: trunk/languages/tw.lang
===================================================================
--- trunk/languages/tw.lang 2007-12-06 22:37:07 UTC (rev 264)
+++ trunk/languages/tw.lang 2007-12-06 22:38:36 UTC (rev 265)
@@ -190,8 +190,8 @@
$PALANG['pSendmail_subject_text'] = 'Åwªï¨Ï¥Î§Ú̪º¶l¥ó¨t²Î!';
$PALANG['pSendmail_body'] = '¤º®e';
$PALANG['pSendmail_button'] = 'µo°e';
-$PALANG['pSendmail_result_error'] = '<span class="error_msg">«Ø¥ß«H½c¥¢±Ñ! </span>';
-$PALANG['pSendmail_result_success'] = '«Ø¥ß«H½c¦¨¥\! ';
+$PALANG['pSendmail_result_error'] = '<span class="error_msg">«Ø¥ß«H½c¥¢±Ñ! </span>'; # XXX text change - new: <span class="error_msg">Unable to send email!</span>
+$PALANG['pSendmail_result_success'] = '«Ø¥ß«H½c¦¨¥\! '; # XXX text change - new: Email sent!
$PALANG['pAdminMenu_list_admin'] = 'ºÞ²zû²M³æ';
$PALANG['pAdminMenu_list_domain'] = 'ºô°ì¦WºÙ²M³æ';
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2007-12-06 22:37:04
|
Revision: 264
http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=264&view=rev
Author: christian_boltz
Date: 2007-12-06 14:37:07 -0800 (Thu, 06 Dec 2007)
Log Message:
-----------
language-update.sh:
- new parameter --addcomment - adds a comment to all *.lang files except en.lang
Useful if a text has changed and needs to be re-translated.
Modified Paths:
--------------
trunk/languages/language-update.sh
Modified: trunk/languages/language-update.sh
===================================================================
--- trunk/languages/language-update.sh 2007-12-06 22:21:29 UTC (rev 263)
+++ trunk/languages/language-update.sh 2007-12-06 22:37:07 UTC (rev 264)
@@ -95,6 +95,33 @@
} # end rename_string()
+function addcomment() {
+ for file in $filelist ; do
+ test "$file" = "en.lang" && { echo "*** skipping en.lang ***"; continue ; } >&2
+
+ line="$(grep "PALANG\['$text'\]" "$file")" || {
+ echo "*** $file does not contain \$PALANG['$text'] ***" >&2
+ continue
+ }
+
+ newline="$line # XXX $comment"
+
+ # create patch
+ echo "
+--- $file.old
++++ $file
+@@ -1,1 +1,1 @@
+-$line
++$newline
+ " > "$file.patch"
+
+ test $patch = 0 && cat $file.patch
+ test $patch = 1 && patch $file < $file.patch
+ done
+} # end add_comment
+
+
+
function cleanup() {
# check for duplicated strings
for file in $filelist ; do
@@ -171,6 +198,13 @@
Rename $PALANG['"'"'old_string'"'"'] to $PALANG['"'"'new_string'"'"']
+'"$0"' --addcomment string comment [--patch] [--nocleanup] [foo.lang [bar.lang [...] ] ]
+
+ Add a comment to $PALANG['"'"'string'"'"']
+
+ Useful if a string needs to be translated again.
+
+
'"$0"' --stats
Print translation statistics to postfixadmin-languages.txt
@@ -197,6 +231,9 @@
nocleanup=0 # don't delete tempfiles
rename=0 # rename a string
stats=0 # create translation statistics
+addcomment=0 # add translation comment
+text=''
+comment=''
rename_old=''
renane_new=''
filelist=''
@@ -224,6 +261,14 @@
echo "$rename_new" | grep '^[a-z_-]*\.lang$' && rename_new='' # error out on *.lang - probably a filename
test -z "$rename_new" && { echo '--rename needs two parameters' >&2 ; exit 1 ; }
;;
+ --addcomment)
+ addcomment=1
+ shift ; text="$1"
+ shift ; comment="$1"
+ echo "$text" | grep '^[a-z_-]*\.lang$' && comment='' # error out on *.lang - probably a filename
+ echo "$comment" | grep '^[a-z_-]*\.lang$' && comment='' # error out on *.lang - probably a filename
+ test -z "$comment" && { echo '--addcomment needs two parameters' >&2 ; exit 1 ; }
+ ;;
--stats)
stats=1
;;
@@ -243,6 +288,7 @@
test "$filelist" = "" && filelist="`ls -1 *.lang`"
+test "$addcomment" = 1 && { addcomment ; cleanup ; exit 0 ; }
test "$rename" = 1 && { rename_string ; cleanup ; exit 0 ; }
test "$stats" = 1 && { statistics ; exit 0 ; }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2007-12-06 22:21:28
|
Revision: 263
http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=263&view=rev
Author: christian_boltz
Date: 2007-12-06 14:21:29 -0800 (Thu, 06 Dec 2007)
Log Message:
-----------
- removed duplicate, unused string $PALANG['pPassword_too_short_error'] again.
Please use the existing string pPasswordTooShort
Modified Paths:
--------------
trunk/languages/en.lang
Modified: trunk/languages/en.lang
===================================================================
--- trunk/languages/en.lang 2007-12-06 21:54:20 UTC (rev 262)
+++ trunk/languages/en.lang 2007-12-06 22:21:29 UTC (rev 263)
@@ -160,7 +160,6 @@
$PALANG['pPassword_button'] = 'Change Password';
$PALANG['pPassword_result_error'] = '<span class="error_msg">Unable to change your password!</span>';
$PALANG['pPassword_result_success'] = 'Your password has been changed!';
-$PALANG['pPassword_too_short_error'] = "Password must be longer than {$CONF['min_password_length']} characters";
$PALANG['pEdit_vacation_set'] = 'Change / Set away message';
$PALANG['pEdit_vacation_remove'] = 'Remove away message';
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <Gin...@us...> - 2007-12-06 21:54:15
|
Revision: 262
http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=262&view=rev
Author: GingerDog
Date: 2007-12-06 13:54:20 -0800 (Thu, 06 Dec 2007)
Log Message:
-----------
languages/en.lang: fix string for successful mail sending
Modified Paths:
--------------
trunk/languages/en.lang
Modified: trunk/languages/en.lang
===================================================================
--- trunk/languages/en.lang 2007-12-06 21:49:45 UTC (rev 261)
+++ trunk/languages/en.lang 2007-12-06 21:54:20 UTC (rev 262)
@@ -197,8 +197,8 @@
$PALANG['pSendmail_subject_text'] = 'Welcome';
$PALANG['pSendmail_body'] = 'Body';
$PALANG['pSendmail_button'] = 'Send Message';
-$PALANG['pSendmail_result_error'] = '<span class="error_msg">Unable to create mailbox!</span>';
-$PALANG['pSendmail_result_success'] = 'The mailbox has been created!';
+$PALANG['pSendmail_result_error'] = '<span class="error_msg">Unable to send email!</span>';
+$PALANG['pSendmail_result_success'] = 'Email sent!';
$PALANG['pAdminMenu_list_admin'] = 'Admin List';
$PALANG['pAdminMenu_list_domain'] = 'Domain List';
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <Gin...@us...> - 2007-12-06 21:49:43
|
Revision: 261
http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=261&view=rev
Author: GingerDog
Date: 2007-12-06 13:49:45 -0800 (Thu, 06 Dec 2007)
Log Message:
-----------
en.lang: add error message if password is too short
Modified Paths:
--------------
trunk/languages/en.lang
Modified: trunk/languages/en.lang
===================================================================
--- trunk/languages/en.lang 2007-12-06 21:42:06 UTC (rev 260)
+++ trunk/languages/en.lang 2007-12-06 21:49:45 UTC (rev 261)
@@ -160,6 +160,7 @@
$PALANG['pPassword_button'] = 'Change Password';
$PALANG['pPassword_result_error'] = '<span class="error_msg">Unable to change your password!</span>';
$PALANG['pPassword_result_success'] = 'Your password has been changed!';
+$PALANG['pPassword_too_short_error'] = "Password must be longer than {$CONF['min_password_length']} characters";
$PALANG['pEdit_vacation_set'] = 'Change / Set away message';
$PALANG['pEdit_vacation_remove'] = 'Remove away message';
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <Gin...@us...> - 2007-12-06 21:42:07
|
Revision: 260
http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=260&view=rev
Author: GingerDog
Date: 2007-12-06 13:42:06 -0800 (Thu, 06 Dec 2007)
Log Message:
-----------
templates/footer.php: change target for version check (does not exist yet)
Modified Paths:
--------------
trunk/templates/footer.php
Modified: trunk/templates/footer.php
===================================================================
--- trunk/templates/footer.php 2007-12-06 21:40:43 UTC (rev 259)
+++ trunk/templates/footer.php 2007-12-06 21:42:06 UTC (rev 260)
@@ -8,7 +8,7 @@
}
?>
|
-<a target="_blank" href="http://postfixadmin.com/?version=<?php print $version; ?>"><?php print $PALANG['check_update']; ?></a>
+<a target="_blank" href="http://postfixadmin.sf.net/update-check.php?version=<?php print $version; ?>"><?php print $PALANG['check_update']; ?></a>
<?php
if (($CONF['show_footer_text'] == "YES") and ($CONF['footer_link']))
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <Gin...@us...> - 2007-12-06 21:40:39
|
Revision: 259
http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=259&view=rev
Author: GingerDog
Date: 2007-12-06 13:40:43 -0800 (Thu, 06 Dec 2007)
Log Message:
-----------
search.php: reindent; and merge patch from amsys - see http://sourceforge.net/tracker/index.php?func=detail&aid=1845743&group_id=191583&atid=937966
Modified Paths:
--------------
trunk/search.php
Modified: trunk/search.php
===================================================================
--- trunk/search.php 2007-12-06 13:03:36 UTC (rev 258)
+++ trunk/search.php 2007-12-06 21:40:43 UTC (rev 259)
@@ -57,68 +57,77 @@
if (isset ($_POST['fDomain'])) $fDomain = escape_string ($_POST['fDomain']);
}
- if (empty ($fSearch) /* && !empty ($fGo) */)
- {
- header("Location: list-virtual.php?domain=" . $fDomain ) && exit;
- }
+if (empty ($fSearch) /* && !empty ($fGo) */)
+{
+ header("Location: list-virtual.php?domain=" . $fDomain ) && exit;
+}
- if ($CONF['alias_control_admin'] == "YES")
- {
- $query = "SELECT $table_alias.address,$table_alias.goto,$table_alias.modified,$table_alias.domain,$table_alias.active FROM $table_alias WHERE $table_alias.address LIKE '%$fSearch%' OR $table_alias.goto LIKE '%$fSearch%' ORDER BY $table_alias.address";
- }
- else
- {
- $query = "SELECT $table_alias.address,$table_alias.goto,$table_alias.modified,$table_alias.domain,$table_alias.active FROM $table_alias LEFT JOIN $table_mailbox ON $table_alias.address=$table_mailbox.username WHERE $table_alias.address LIKE '%$fSearch%' AND $table_mailbox.maildir IS NULL ORDER BY $table_alias.address";
- }
+if ($CONF['alias_control_admin'] == "YES")
+{
+ $query = "SELECT $table_alias.address AS address, $table_alias.goto AS goto,
+ $table_alias.modified AS modified, $table_alias.domain AS domain, $table_alias.active AS active
+ FROM $table_alias
+ WHERE address LIKE '%$fSearch%' OR goto LIKE '%$fSearch%' ORDER BY address";
+}
+else
+{
+ // find all aliases which don't have a matching entry in table_mailbox
+ $query = "SELECT $table_alias.address AS address, $table_alias.goto AS goto,
+ $table_alias.modified AS modified, $table_alias.domain AS domain, $table_alias.active AS active
+ FROM $table_alias LEFT JOIN $table_mailbox ON $table_alias.address=$table_mailbox.username
+ WHERE address LIKE '%$fSearch%' AND $table_mailbox.maildir IS NULL ORDER BY $table_alias.address";
- $result = db_query ($query);
- if ($result['rows'] > 0)
+}
+
+$result = db_query ($query);
+if ($result['rows'] > 0)
+{
+ while ($row = db_array ($result['result']))
{
- while ($row = db_array ($result['result']))
+ if (check_owner ($SESSID_USERNAME, $row['domain']) || authentication_has_role('global-admin'))
{
- if (check_owner ($SESSID_USERNAME, $row['domain']) || authentication_has_role('global-admin'))
+ if ('pgsql'==$CONF['database_type'])
{
- if ('pgsql'==$CONF['database_type'])
- {
- $row['modified']=gmstrftime('%c %Z',$row['modified']);
- $row['active']=('t'==$row['active']) ? 1 : 0;
- }
- $tAlias[] = $row;
- }
+ $row['modified']=gmstrftime('%c %Z',$row['modified']);
+ $row['active']=('t'==$row['active']) ? 1 : 0;
+ }
+ $tAlias[] = $row;
}
}
+}
- if ($CONF['vacation_control_admin'] == 'YES' && $CONF['vacation'] == 'YES')
- {
- $query = ("SELECT $table_mailbox.*, $table_vacation.active AS v_active FROM $table_mailbox LEFT JOIN $table_vacation ON $table_mailbox.username=$table_vacation.email WHERE $table_mailbox.username LIKE '%$fSearch%' OR $table_mailbox.name LIKE '%$fSearch%' ORDER BY $table_mailbox.username");
- }
- else
- {
- $query = "SELECT * FROM $table_mailbox WHERE username LIKE '%$fSearch%' OR name LIKE '%$fSearch%' ORDER BY username";
- }
+if ($CONF['vacation_control_admin'] == 'YES' && $CONF['vacation'] == 'YES')
+{
+ $query = ("SELECT $table_mailbox.*, $table_vacation.active AS v_active FROM $table_mailbox LEFT JOIN $table_vacation ON $table_mailbox.username=$table_vacation.email WHERE $table_mailbox.username LIKE '%$fSearch%' OR $table_mailbox.name LIKE '%$fSearch%' ORDER BY $table_mailbox.username");
+}
+else
+{
+ $query = "SELECT * FROM $table_mailbox WHERE username LIKE '%$fSearch%' OR name LIKE '%$fSearch%' ORDER BY username";
+}
- $result = db_query ($query);
- if ($result['rows'] > 0)
+$result = db_query ($query);
+if ($result['rows'] > 0)
+{
+ while ($row = db_array ($result['result']))
{
- while ($row = db_array ($result['result']))
+ if (check_owner ($SESSID_USERNAME, $row['domain']) || authentication_has_role('global-admin'))
{
- if (check_owner ($SESSID_USERNAME, $row['domain']) || authentication_has_role('global-admin'))
+ if ('pgsql'==$CONF['database_type'])
{
- if ('pgsql'==$CONF['database_type'])
- {
- $row['created']=gmstrftime('%c %Z',strtotime($row['created']));
- $row['modified']=gmstrftime('%c %Z',strtotime($row['modified']));
- $row['active']=('t'==$row['active']) ? 1 : 0;
- }
- $tMailbox[] = $row;
- }
+ $row['created']=gmstrftime('%c %Z',strtotime($row['created']));
+ $row['modified']=gmstrftime('%c %Z',strtotime($row['modified']));
+ $row['active']=('t'==$row['active']) ? 1 : 0;
+ }
+ $tMailbox[] = $row;
}
}
+}
include ("templates/header.php");
include ("templates/menu.php");
include ("templates/search.php");
include ("templates/footer.php");
+// vim:ts=4:sw=4:et
?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2007-12-06 13:03:34
|
Revision: 258
http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=258&view=rev
Author: christian_boltz
Date: 2007-12-06 05:03:36 -0800 (Thu, 06 Dec 2007)
Log Message:
-----------
setup.php:
- added missing define('POSTFIXADMIN', 1);
https://sourceforge.net/forum/message.php?msg_id=4660403
Modified Paths:
--------------
trunk/setup.php
Modified: trunk/setup.php
===================================================================
--- trunk/setup.php 2007-12-02 21:21:27 UTC (rev 257)
+++ trunk/setup.php 2007-12-06 13:03:36 UTC (rev 258)
@@ -23,6 +23,8 @@
* Form POST \ GET Variables: -none-
*/
+define('POSTFIXADMIN', 1); # checked in included files
+
require_once("languages/en.lang");
require_once("functions.inc.php");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|