From 2f259742f5384a7227e1d715aec61350cbdaa087 Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Thu, 16 Dec 2010 00:30:21 +0000 Subject: [PATCH] upgrade.php: - replaced deprecated split() with explode() - added SVN $Id header git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@894 a1433add-5e2c-0410-b055-b7f2511e0802 --- upgrade.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/upgrade.php b/upgrade.php index a5f745c5..939d7c23 100644 --- a/upgrade.php +++ b/upgrade.php @@ -4,6 +4,7 @@ if(!defined('POSTFIXADMIN')) { } /* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */ +# @version $Id$ # Note: run with upgrade.php?debug=1 to see all SQL error messages @@ -762,7 +763,7 @@ 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(" + $all_sql = explode("\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 @@ -824,7 +825,7 @@ function upgrade_318_mysql() { "); # in case someone has manually created the table with utf8 fields before: - $all_sql = split("\n", trim(" + $all_sql = explode("\n", trim(" ALTER TABLE `$table_vacation_notification` CHANGE `notified` `notified` VARCHAR( 255 ) NOT NULL ALTER TABLE `$table_vacation_notification` DEFAULT CHARACTER SET utf8 ")); @@ -957,7 +958,7 @@ function upgrade_373_mysql() { # MySQL only $table_domain = table_by_key ('domain'); $table_mailbox = table_by_key('mailbox'); - $all_sql = split("\n", trim(" + $all_sql = explode("\n", trim(" ALTER TABLE `$table_domain` CHANGE `description` `description` VARCHAR( 255 ) {UTF-8} NOT NULL ALTER TABLE `$table_mailbox` CHANGE `name` `name` VARCHAR( 255 ) {UTF-8} NOT NULL ")); @@ -995,7 +996,7 @@ function upgrade_473_mysql() { $table_log = table_by_key('log'); # tables were created without explicit charset before :-( - $all_sql = split("\n", trim(" + $all_sql = explode("\n", trim(" ALTER TABLE `$table_admin` CHANGE `username` `username` VARCHAR( 255 ) {LATIN1} NOT NULL ALTER TABLE `$table_admin` CHANGE `password` `password` VARCHAR( 255 ) {LATIN1} NOT NULL ALTER TABLE `$table_admin` DEFAULT {LATIN1}