Changeset 5220
- Timestamp:
- Mar 21, 2010, 6:20:56 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/include/functions_install.inc.php
r5196 r5220 90 90 { 91 91 $engines[$engine_name]['label'] = $engine['engine']; 92 $engines[$engine_name]['available'] = 'disabled';92 $engines[$engine_name]['available'] = false; 93 93 94 94 if (isset($engine['function_available']) … … 105 105 } 106 106 107 if (count($engines)>1)108 {109 $engines[$GLOBALS['conf']['dbengine_select_default']]['selected'] = true;110 }111 112 107 if ($engines['sqlite']['available'] && $engines['pdo-sqlite']['available']) 113 108 { -
trunk/admin/themes/default/template/install.tpl
r5219 r5220 113 113 {foreach from=$F_DB_ENGINES key=k item=v} 114 114 <option value="{$k}" 115 {if $k==$F_DB_LAYER or $v.selected} selected="selected"{/if}116 {if $v.available!=1} disabled="disabled"{/if}115 {if $k==$F_DB_LAYER and $v.available} selected="selected"{/if} 116 {if !$v.available} disabled="disabled"{/if} 117 117 >{$v.label}</option> 118 118 {/foreach} -
trunk/include/config_default.inc.php
r5215 r5220 537 537 // choices : sqlite, mysql, pgsql, pdo-sqlite 538 538 // see include/dblayer/dblayers.inc.php 539 $conf['dbengine_select_default'] = ' sqlite';539 $conf['dbengine_select_default'] = 'mysql'; 540 540 541 541 // pass_convert : function to crypt or hash the clear user password to store -
trunk/install.php
r5215 r5220 99 99 define('DEFAULT_PREFIX_TABLE', 'piwigo_'); 100 100 101 if (isset($_POST['install'])) 102 { 103 $prefixeTable = $_POST['prefix']; 104 } 105 else 106 { 107 $prefixeTable = DEFAULT_PREFIX_TABLE; 108 } 109 110 include(PHPWG_ROOT_PATH . 'include/config_default.inc.php'); 111 @include(PHPWG_ROOT_PATH. 'local/config/config.inc.php'); 112 101 113 // Obtain various vars 102 114 $dbhost = (!empty($_POST['dbhost'])) ? $_POST['dbhost'] : 'localhost'; … … 104 116 $dbpasswd = (!empty($_POST['dbpasswd'])) ? $_POST['dbpasswd'] : ''; 105 117 $dbname = (!empty($_POST['dbname'])) ? $_POST['dbname'] : ''; 106 $dblayer = (!empty($_POST['dblayer'])) ? $_POST['dblayer'] : 'mysql'; 107 108 if (isset($_POST['install'])) 109 { 110 $table_prefix = $_POST['prefix']; 111 } 112 else 113 { 114 $table_prefix = DEFAULT_PREFIX_TABLE; 115 } 118 $dblayer = (!empty($_POST['dblayer'])) ? $_POST['dblayer'] : $conf['dbengine_select_default']; 116 119 117 120 $admin_name = (!empty($_POST['admin_name'])) ? $_POST['admin_name'] : ''; … … 157 160 } 158 161 159 $prefixeTable = $table_prefix;160 include(PHPWG_ROOT_PATH . 'include/config_default.inc.php');161 @include(PHPWG_ROOT_PATH. 'local/config/config.inc.php');162 162 include(PHPWG_ROOT_PATH .'include/dblayer/functions_'.$dblayer.'.inc.php'); 163 163 include(PHPWG_ROOT_PATH . 'include/constants.php'); … … 290 290 $conf[\'db_host\'] = \''.$dbhost.'\'; 291 291 292 $prefixeTable = \''.$ table_prefix.'\';292 $prefixeTable = \''.$prefixeTable.'\'; 293 293 294 294 define(\'PHPWG_INSTALLED\', true); … … 317 317 PHPWG_ROOT_PATH.'install/piwigo_structure-'.$dblayer.'.sql', 318 318 DEFAULT_PREFIX_TABLE, 319 $ table_prefix319 $prefixeTable 320 320 ); 321 321 // We fill the tables with basic informations … … 323 323 PHPWG_ROOT_PATH.'install/config.sql', 324 324 DEFAULT_PREFIX_TABLE, 325 $ table_prefix325 $prefixeTable 326 326 ); 327 327 328 328 $query = ' 329 INSERT INTO '.$ table_prefix.'config (param,value,comment)329 INSERT INTO '.$prefixeTable.'config (param,value,comment) 330 330 VALUES (\'secret_key\',\'md5('.pwg_db_cast_to_text(DB_RANDOM_FUNCTION.'()').')\', 331 331 \'a secret key specific to the gallery for internal use\');'; … … 437 437 'F_DB_USER' => $dbuser, 438 438 'F_DB_NAME' => $dbname, 439 'F_DB_PREFIX' => $ table_prefix,439 'F_DB_PREFIX' => $prefixeTable, 440 440 'F_ADMIN' => $admin_name, 441 441 'F_ADMIN_EMAIL' => $admin_mail,
Note: See TracChangeset
for help on using the changeset viewer.