Changeset 1711
- Timestamp:
- 08/30/08 12:49:26 (3 months ago)
- Location:
- branches/3.4
- Files:
-
- 8 modified
-
install.php (modified) (5 diffs)
-
lib/init.php (modified) (1 diff)
-
lib/install.php (modified) (3 diffs)
-
templates/footer.inc.php (modified) (1 diff)
-
templates/show_install.inc.php (modified) (3 diffs)
-
templates/show_install_account.inc.php (modified) (2 diffs)
-
templates/show_install_config.inc.php (modified) (4 diffs)
-
templates/show_install_lang.inc.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/3.4/install.php
r1634 r1711 62 62 if ($_SERVER['HTTPS'] == 'on') { $http_type = "https://"; } 63 63 else { $http_type = "http://"; } 64 $php_self = $http_type . $_SERVER['HTTP_HOST'] . "/" . preg_replace("/^\/(.+\.php)\/?.*/","$1",$_SERVER['PHP_SELF']); 64 define('WEB_PATH',$http_type . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . '/' . basename($_SERVER['PHP_SELF'])); 65 define('WEB_ROOT',$http_type . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF'])); 65 66 66 67 /* Catch the Current Action */ … … 76 77 $charset = $_REQUEST['charset']; 77 78 78 header ("Location: " . $php_self. "?action=show_create_config&local_db=$database&local_host=$hostname&htmllang=$htmllang&charset=$charset");79 header ("Location: " . WEB_PATH . "?action=show_create_config&local_db=$database&local_host=$hostname&htmllang=$htmllang&charset=$charset"); 79 80 80 81 break; … … 132 133 } 133 134 134 if ($_SERVER['HTTPS'] == 'on') { $http_type = "https://"; } 135 else { $http_type = "http://"; } 136 137 $web_path = $http_type . $_SERVER['HTTP_HOST'] . $results['web_path']; 138 139 header ("Location: " . $web_path . "/login.php"); 135 header ("Location: " . WEB_ROOT . "/login.php"); 140 136 break; 141 137 case 'show_create_account': … … 145 141 /* Make sure we've got a valid config file */ 146 142 if (!check_config_values($results)) { 143 Error::add('general',_('Error: Config file not found or Unreadable')); 147 144 require_once Config::get('prefix') . '/templates/show_install_config.inc.php'; 148 145 break; … … 212 209 /* Do some basic tests here... most common error, no mysql */ 213 210 if (!function_exists('mysql_query')) { 214 header ("Location: test.php");211 header ("Location: " . WEB_PATH . "/test.php"); 215 212 } 216 213 $htmllang = "en_US"; -
branches/3.4/lib/init.php
r1645 r1711 82 82 83 83 /** This is the version.... fluf nothing more... **/ 84 $results['version'] = '3.4. 2';84 $results['version'] = '3.4.3-RC1'; 85 85 $results['int_config_version'] = '7'; 86 86 -
branches/3.4/lib/install.php
r1537 r1711 107 107 } 108 108 109 110 109 $data['database_username'] = $username; 111 110 $data['database_password'] = $password; … … 113 112 $data['database_name'] = $database; 114 113 115 if (!strlen($data['database_password'])) {116 Error::add('general','Error: Password required for Database creation');117 return false;118 }119 120 114 Config::set_by_array($data,'1'); 121 115 … … 133 127 $db_selected = @mysql_select_db($database, $dbh); 134 128 135 if ($db_selected && !$_POST['overwrite_db']) { 129 if ($db_selected && $_POST['existing_db']) { 130 // Rien a faire, we've got the db just blow through 131 } 132 elseif ($db_selected && !$_POST['overwrite_db']) { 136 133 Error::add('general','Error: Database Already exists and Overwrite not checked'); 137 134 return false; -
branches/3.4/templates/footer.inc.php
r1687 r1711 21 21 */ 22 22 ?> 23 <div style="clear:both;"></div> 24 <?php echo Config::get('sample_rate'); ?> 25 </div> <!-- end id="content"--> 26 <!-- I really hate IE 27 </td></tr></table> --> 23 <div style="clear:both;"></div> <!-- Clear things out --> 24 </div><!-- end id="content"--> 28 25 </div> <!-- end id="maincontainer"--> 29 26 <div id="footer"> -
branches/3.4/templates/show_install.inc.php
r1304 r1711 2 2 /* 3 3 4 Copyright (c) 2001 - 2007Ampache.org4 Copyright (c) Ampache.org 5 5 All rights reserved. 6 6 … … 60 60 <br /> 61 61 <span class="header2"><?php echo _('Insert Ampache Database'); ?></span> 62 <form method="post" action="<?php echo $http_type . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']. "?action=create_db&htmllang=$htmllang&charset=$charset"; ?>" enctype="multipart/form-data" >62 <form method="post" action="<?php echo WEB_PATH . "?action=create_db&htmllang=$htmllang&charset=$charset"; ?>" enctype="multipart/form-data" > 63 63 <table> 64 64 <tr> … … 95 95 </tr> 96 96 <tr> 97 <td class="align"><?php echo _('Use Existing Database'); ?></td> 98 <td><input type="checkbox" name="existing_db" value="1" /></td> 99 </tr> 100 <tr> 97 101 <td> </td> 98 102 <td><input type="submit" value="<?php echo _("Insert Database"); ?>" /></td> -
branches/3.4/templates/show_install_account.inc.php
r1436 r1711 2 2 /* 3 3 4 Copyright (c) 2001 - 2007Ampache.org4 Copyright (c) Ampache.org 5 5 All rights reserved. 6 6 … … 55 55 <br /> 56 56 <span class="header2"><?php echo _('Create Admin Account'); ?></span> 57 <form method="post" action="<?php echo $GLOBALS['php_self']. "?action=create_account"; ?>" enctype="multipart/form-data" >57 <form method="post" action="<?php echo WEB_PATH . "?action=create_account"; ?>" enctype="multipart/form-data" > 58 58 <table> 59 59 <tr> -
branches/3.4/templates/show_install_config.inc.php
r1495 r1711 2 2 /* 3 3 4 Copyright (c) 2001 - 2007Ampache.org4 Copyright (c) Ampache.org 5 5 All rights reserved. 6 6 … … 55 55 <br /> 56 56 <span class="header2"><?php echo _('Generate Config File'); ?></span> 57 <form method="post" action="<?php echo $_SERVER['PHP_SELF']. "?action=create_config"; ?>" enctype="multipart/form-data" >57 <form method="post" action="<?php echo WEB_PATH . "?action=create_config"; ?>" enctype="multipart/form-data" > 58 58 <table> 59 59 <tr> 60 60 <td class="align"><?php echo _('Web Path'); ?></td> 61 <td class="align"><input type="text" name="web_path" value="<?php echo $web_path; ?>" /></td>61 <td class="align"><input type="text" name="web_path" value="<?php echo dirname($_SERVER['PHP_SELF']); ?>" /></td> 62 62 </tr> 63 63 <tr> … … 123 123 <td> </td> 124 124 <td> 125 <?php $check_url = $GLOBALS['php_self']. "?action=show_create_config&htmllang=$htmllang&charset=$charset&local_db=" . $_REQUEST['local_db'] . "&local_host=" . $_REQUEST['local_host']; ?>125 <?php $check_url = WEB_PATH . "?action=show_create_config&htmllang=$htmllang&charset=$charset&local_db=" . $_REQUEST['local_db'] . "&local_host=" . $_REQUEST['local_host']; ?> 126 126 <a href="<?php echo $check_url; ?>">[<?php echo _('Check for Config'); ?>]</a> 127 127 </td> … … 129 129 </table> 130 130 <br /> 131 <form method="post" action="<?php echo $GLOBALS['php_self']. "?action=show_create_account&htmllang=$htmllang&charset=$charset"; ?>" enctype="multipart/form-data">131 <form method="post" action="<?php echo WEB_PATH . "?action=show_create_account&htmllang=$htmllang&charset=$charset"; ?>" enctype="multipart/form-data"> 132 132 <input type="submit" value="<?php echo _('Continue to Step 3'); ?>" /> 133 133 </form> -
branches/3.4/templates/show_install_lang.inc.php
r942 r1711 2 2 /* 3 3 4 Copyright (c) 2001 - 2007Ampache.org4 Copyright (c) Ampache.org 5 5 All rights reserved. 6 6 … … 53 53 <?php Error::display('general'); ?> 54 54 </p> 55 <form method="post" action="<?php echo $http_type . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']. "?action=init"; ?>" enctype="multipart/form-data" >55 <form method="post" action="<?php echo WEB_PATH . "?action=init"; ?>" enctype="multipart/form-data" > 56 56 57 57 <?php
