Changeset 2566:9bf417837888 for admin/install/wizard.php
- Timestamp:
- 11/17/13 20:25:53 (12 years ago)
- Branch:
- 2.6
- Children:
- 2567:6c11245cbf04, 2568:61c67a7d17fa
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/install/wizard.php
r1949 r2566 72 72 throw new Exception('<p>' . __($e->getMessage()) . '</p>'); 73 73 } 74 74 75 75 # Checks system capabilites 76 76 require dirname(__FILE__).'/check.php'; … … 79 79 throw new Exception('<p>'.__('Dotclear cannot be installed.').'</p><ul><li>'.implode('</li><li>',$_e).'</li></ul>'); 80 80 } 81 81 82 82 # Check if dotclear is already installed 83 83 $schema = dbSchema::init($con); … … 85 85 throw new Exception(__('Dotclear is already installed.')); 86 86 } 87 87 88 88 # Does config.php.in exist? 89 89 $config_in = dirname(__FILE__).'/../../inc/config.php.in'; … … 91 91 throw new Exception(sprintf(__('File %s does not exist.'),$config_in)); 92 92 } 93 93 94 94 # Can we write config.php 95 95 if (!is_writable(dirname(DC_RC_PATH))) { 96 96 throw new Exception(sprintf(__('Cannot write %s file.'),DC_RC_PATH)); 97 97 } 98 98 99 99 # Creates config.php file 100 100 $full_conf = file_get_contents($config_in); 101 101 102 102 writeConfigValue('DC_DBDRIVER',$DBDRIVER,$full_conf); 103 103 writeConfigValue('DC_DBHOST',$DBHOST,$full_conf); … … 106 106 writeConfigValue('DC_DBNAME',$DBNAME,$full_conf); 107 107 writeConfigValue('DC_DBPREFIX',$DBPREFIX,$full_conf); 108 108 109 109 $admin_url = preg_replace('%install/wizard.php$%','',$_SERVER['REQUEST_URI']); 110 110 writeConfigValue('DC_ADMIN_URL',http::getHost().$admin_url,$full_conf); 111 111 writeConfigValue('DC_ADMIN_MAILFROM','dotclear@'.$_SERVER['HTTP_HOST'],$full_conf); 112 112 writeConfigValue('DC_MASTER_KEY',md5(uniqid()),$full_conf); 113 113 114 114 $fp = @fopen(DC_RC_PATH,'wb'); 115 115 if ($fp === false) { … … 119 119 fclose($fp); 120 120 chmod(DC_RC_PATH, 0666); 121 121 122 122 $con->close(); 123 123 http::redirect('index.php?wiz=1'); … … 148 148 <meta name="GOOGLEBOT" content="NOSNIPPET" /> 149 149 <title><?php echo __('Dotclear installation wizard'); ?></title> 150 <link rel="stylesheet" href="../style/install.css" type="text/css" media="screen" /> 150 <link rel="stylesheet" href="../style/install.css" type="text/css" media="screen" /> 151 151 </head> 152 152
Note: See TracChangeset
for help on using the changeset viewer.