Changeset 676
- Timestamp:
- 06/25/07 01:31:21 (18 months ago)
- Location:
- trunk
- Files:
-
- 7 modified
-
CHANGELOG (modified) (1 diff)
-
engine/setup/vhcs2ispcp.pl (modified) (6 diffs)
-
engine/setup/vhcs2ispcp.sql (modified) (2 diffs)
-
gui/include/i18n.php (modified) (3 diffs)
-
gui/include/ispcp-config.php (modified) (1 diff)
-
gui/include/ispcp-lib.php (modified) (4 diffs)
-
gui/include/sql.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/CHANGELOG
r674 r676 15 15 * Fixed #425: WARNING: KEY or IV has invalid length 16 16 - SETUP: 17 * Fixed #428: ERROR: External command '/usr/bin/mysql --host=localhost --user=root --pass= < /tmp/db.sql 1>/tmp/db.sql.stdout 2>/tmp/db.sql.stderr' returned '1' 17 * Fixed #428: ERROR: External command '/usr/bin/mysql --host=localhost --user=root --pass= < /tmp/db.sql 1>/tmp/db.sql.stdout 2>/tmp/db.sql.stderr' returned '1' 18 * Fixed #430: Error in sql query of vhcs2ispcp.sql 19 - GUI: 20 * Fixed #419: Error 500: segfault 18 21 19 22 2007-06-21 Benedikt Heintel -
trunk/engine/setup/vhcs2ispcp.pl
r670 r676 2 2 3 3 # VHCS 2.4.7.1 to ispCP Omega migration script 4 # Copyright (c) 2007 by Raphael Geissert <atomo64@gmail.com> 5 # 4 # Copyright (c) 2007 by Raphael Geissert <atomo64@gmail.com> (original author) 5 # Copyright (c) 2007 by isp Control Panel 6 # http://isp-control.net 6 7 # 7 8 # License: … … 106 107 sys_command("$main::cfg{'CMD_FTPD'} restart"); 107 108 sleep(2); 108 sys_command("$main::cfg{'CMD_AUTHD'} restart"); 109 sys_command("$main::cfg{'CMD_AUTHD'} restart"); 109 110 110 111 return 0; … … 193 194 return 0; 194 195 } 195 196 my $rs = undef;197 196 198 197 my $welcome_message = <<MSG; … … 229 228 require $main::cfg{'ROOT_DIR'} . '/ispcp-db-keys.pl'; 230 229 231 # This time weconnect to the database232 get_conf();230 # Let's connect to the database 231 setup_main_vars(); 233 232 234 233 print STDOUT "\nVHCS2's services will now be stopped:\n"; 235 234 236 $rs =stop_services("/tmp/vhcs2-backup-all.lock");235 stop_services("/tmp/vhcs2-backup-all.lock"); 237 236 238 237 print STDOUT "\nVHCS2's database will now be converted:\n"; … … 245 244 $main::cfg_file = '/etc/ispcp/ispcp.conf'; 246 245 247 # Load new config and connect to the database as the new user246 # Load new config 248 247 get_conf(); 249 248 249 require $main::cfg{'ROOT_DIR'} . '/ispcp-db-keys.pl'; 250 251 # Now we connect 252 setup_main_vars(); 253 250 254 install_language(); 251 255 252 256 if($main::cfg{'DATABASE_NAME'} ne 'ispcp') { 253 257 254 print STDOUT "\nIMPORTANT: you have installed ispCP in a non-default d irectory";258 print STDOUT "\nIMPORTANT: you have installed ispCP in a non-default database"; 255 259 print STDOUT "\n\tThe migration script has converted your old VHCS database"; 256 260 print STDOUT "\n\tin the new database called 'ispcp'; please rename this database"; 257 print STDOUT "\n\twith the one you choose at i nstall time: $main::cfg{'DATABASE_NAME'}\n";261 print STDOUT "\n\twith the one you choose at ispCP install time: $main::cfg{'DATABASE_NAME'}\n"; 258 262 259 263 } else { 260 264 261 print STDOUT "\n ispCP's requests manager will now be executed...";265 print STDOUT "\nRunning ispCP's requests manager..."; 262 266 263 267 sys_command("$main::db{'ROOT_DIR'}/engine/ispcp-rqst-mngr"); … … 267 271 } 268 272 269 print STDOUT "\n ispCP's services will now be started:\n";273 print STDOUT "\nStarting ispCP's services:\n"; 270 274 271 275 start_services(); -
trunk/engine/setup/vhcs2ispcp.sql
r668 r676 19 19 ALTER TABLE `htaccess_groups` ADD `status` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL ; 20 20 21 ALTER TABLE `htaccess_users` ADD `status` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci iNULL ; 21 ALTER TABLE `htaccess_users` ADD `status` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL ; 22 23 ALTER TABLE `login` ADD `ipaddr` VARCHAR( 15 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL ; 24 ALTER TABLE `login` ADD `user_name` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL ; 25 ALTER TABLE `login` ADD `login_count` TINYINT( 1 ) NULL; 26 27 -- Drop existing languages (they are outdated anyways) 22 28 23 29 DROP TABLE IF EXISTS `lang_English`; … … 32 38 DROP TABLE IF EXISTS `lang_Spanish`; 33 39 DROP TABLE IF EXISTS `lang_French`; 34 35 ALTER TABLE `login` ADD `ipaddr` VARCHAR( 15 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL ;36 ALTER TABLE `login` ADD `user_name` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL ;37 ALTER TABLE `login` ADD `login_count` TINYINT( 1 ) NULL;38 40 39 41 -- Add Primary and possibly an index to login table! -
trunk/gui/include/i18n.php
r660 r676 31 31 **/ 32 32 function tr($msgid, $as_is = false) { 33 global $sql, $ default_lang, $cfg;34 static $cache ;33 global $sql, $cfg; 34 static $cache = array(); 35 35 36 36 $lang = (isset($_SESSION['user_def_lang'])) ? $_SESSION['user_def_lang'] : $cfg['USER_INITIAL_LANG']; … … 43 43 44 44 if ($sql) { 45 if (!$as_is ) {45 if (!$as_is && 'encoding' != $msgid) { 46 46 $encoding = tr('encoding'); 47 47 } … … 64 64 65 65 // Replace values 66 if (func_num_args() > 2) {66 if (func_num_args() > 1) { 67 67 $argv = func_get_args(); 68 68 unset($argv[0]); //msgid 69 unset($argv[1]); //as_is 69 70 if (is_bool($argv[1])) { 71 unset($argv[1]); //as_is 72 } 70 73 $msgstr = vsprintf($msgstr, $argv); 71 74 } -
trunk/gui/include/ispcp-config.php
r664 r676 37 37 function parseFile(){ 38 38 /* open file ... parse it and put it in $cfg_values */ 39 @ @$fd = fopen($this->config_file,'r');39 @$fd = fopen($this->config_file,'r'); 40 40 if ($fd == FALSE) { 41 41 /* ooops error */ -
trunk/gui/include/ispcp-lib.php
r665 r676 19 19 **/ 20 20 21 define( INCLUDEPATH, realpath(dirname(__FILE__)));22 23 session_name( "ISPCP");21 define('INCLUDEPATH', realpath(dirname(__FILE__))); 22 23 session_name('ispCP'); 24 24 25 25 if (!isset($_SESSION)) … … 60 60 $cfg['LOGIN_TEMPLATE_PATH'] = $cfg['ROOT_TEMPLATE_PATH'].$cfg['USER_INITIAL_THEME']; 61 61 62 $cfg['ADMIN_TEMPLATE_PATH'] = "../".$cfg['ROOT_TEMPLATE_PATH'].$cfg['USER_INITIAL_THEME'].'/admin';63 64 $cfg['RESELLER_TEMPLATE_PATH'] = "../".$cfg['ROOT_TEMPLATE_PATH'].$cfg['USER_INITIAL_THEME'].'/reseller';65 66 $cfg['CLIENT_TEMPLATE_PATH'] = "../".$cfg['ROOT_TEMPLATE_PATH'].$cfg['USER_INITIAL_THEME'].'/client';67 68 $cfg['IPS_LOGO_PATH'] = "../themes/user_logos";69 70 $cfg['PURCHASE_TEMPLATE_PATH'] = "../".$cfg['ROOT_TEMPLATE_PATH'].$cfg['USER_INITIAL_THEME'].'/orderpanel';62 $cfg['ADMIN_TEMPLATE_PATH'] = '../'.$cfg['ROOT_TEMPLATE_PATH'].$cfg['USER_INITIAL_THEME'].'/admin'; 63 64 $cfg['RESELLER_TEMPLATE_PATH'] = '../'.$cfg['ROOT_TEMPLATE_PATH'].$cfg['USER_INITIAL_THEME'].'/reseller'; 65 66 $cfg['CLIENT_TEMPLATE_PATH'] = '../'.$cfg['ROOT_TEMPLATE_PATH'].$cfg['USER_INITIAL_THEME'].'/client'; 67 68 $cfg['IPS_LOGO_PATH'] = '../themes/user_logos'; 69 70 $cfg['PURCHASE_TEMPLATE_PATH'] = '../'.$cfg['ROOT_TEMPLATE_PATH'].$cfg['USER_INITIAL_THEME'].'/orderpanel'; 71 71 72 72 $cfg['DOMAIN_ROWS_PER_PAGE'] = 10; … … 164 164 165 165 // The virtual host file from Apache which contains our virtual host entries 166 $cfg['SERVER_VHOST_FILE'] = "/etc/apache2/sites-available/ispcp.conf";166 $cfg['SERVER_VHOST_FILE'] = '/etc/apache2/sites-available/ispcp.conf'; 167 167 168 168 require_once(INCLUDEPATH.'/spGzip.php'); … … 222 222 if(!$res = exec_query($sql, $query, array())) { 223 223 system_message(tr('Could not get config from database')); 224 die();225 224 } 226 225 else { -
trunk/gui/include/sql.php
r662 r676 18 18 * 19 19 **/ 20 $include_path = realpath(dirname(__FILE__));21 20 22 require ( $include_path.'/adodb/adodb.inc.php');21 require (INCLUDEPATH.'/adodb/adodb.inc.php'); 23 22 24 //require ( $include_path.'/adodb/tohtml.inc.php');23 //require (INCLUDEPATH.'/adodb/tohtml.inc.php'); 25 24 26 require ( $include_path.'/adodb/adodb-pager.inc.php');25 require (INCLUDEPATH.'/adodb/adodb-pager.inc.php'); 27 26 28 27 $cfg['DB_TYPE'] = $cfg['DATABASE_TYPE']; … … 35 34 36 35 $cfg['DB_NAME'] = $cfg['DATABASE_NAME']; 37 38 36 39 37 if ($cfg['DB_TYPE'] === 'pgsql') {
