Ticket #133: 133.diff
| File 133.diff, 4.3 kB (added by skippy, 11 months ago) |
|---|
-
system/classes/installhandler.php
203 203 if (! $pdo_extension_ok) { 204 204 $requirements_met= false; 205 205 } 206 /* Check for PDO drivers */ 207 $pdo_drivers= array_combine( PDO::getAvailableDrivers(), PDO::getAvailableDrivers() ); 208 if ( isset( $pdo_drivers['sqlite2'] ) ) { 209 // we don't currently support SQLite2, so exclude it 210 unset( $pdo_drivers['sqlite2'] ); 211 } 212 $pdo_drivers_ok= count( $pdo_drivers ); 213 $this->theme->assign( 'pdo_drivers_ok', $pdo_drivers_ok ); 214 $this->theme->assign( 'pdo_drivers', $pdo_drivers ); 215 if ( ! $pdo_drivers_ok ) { 216 $requirements_met= false; 217 } 206 218 return $requirements_met; 207 219 } 208 220 -
system/installer/script.js
15 15 16 16 function setDatabaseType() 17 17 { 18 switch($('#d atabasetype').val()) {18 switch($('#db_type').val()) { 19 19 case 'mysql': 20 20 $('.forsqlite').hide(); 21 21 $('.formysql').show(); … … 30 30 31 31 function checkDBCredentials() 32 32 { 33 if ( ( $('#d atabasetype').val() == 'mysql' ) && ( $('#databasehost').val() != '' ) && ( $('#databaseuser').val() != '' ) && ( $('#databasename').val() != '' ) ) {33 if ( ( $('#db_type').val() == 'mysql' ) && ( $('#databasehost').val() != '' ) && ( $('#databaseuser').val() != '' ) && ( $('#databasename').val() != '' ) ) { 34 34 $.ajax({ 35 35 type: 'POST', 36 36 url: 'ajax/check_mysql_credentials', … … 69 69 error: handleAjaxError, 70 70 }); 71 71 } 72 else if ( ( $('#d atabasetype').val() == 'sqlite' ) && ( $('#databasefile').val() != '' ) ) {72 else if ( ( $('#db_type').val() == 'sqlite' ) && ( $('#databasefile').val() != '' ) ) { 73 73 $.ajax({ 74 74 type: 'POST', 75 75 url: 'ajax/check_sqlite_credentials', … … 196 196 setDatabaseType(); 197 197 checkDBCredentials(); 198 198 checkSiteConfigurationCredentials(); 199 $('#d atabasetype').change(setDatabaseType);199 $('#db_type').change(setDatabaseType); 200 200 $('#databasesetup input').keyup(function(){queueTimer(checkDBCredentials)}); 201 201 $('#siteconfiguration input').keyup(function(){queueTimer(checkSiteConfigurationCredentials)}); 202 202 $('#databaseuser').focus() -
system/installer/requirements.php
73 73 <?php if (! $pdo_extension_ok) {?> 74 74 <h2>PDO extension needed...</h2> 75 75 <p class="instructions"> 76 <em>habari</em> requires that the PDO PHP extension be installed.76 <em>habari</em> requires that the <a href="http://www.php.net/pdo">PDO PHP extension</a> be installed. Please contact your hosting provider to enable PDO. 77 77 </p> 78 <strong>@todo Installing PDO instructions</strong>79 78 <?php }?> 79 <?php if ( ! $pdo_drivers_ok ) { ?> 80 <h2>No PDO drivers enabled</h2> 81 <p class="instructions"><em>habari</em> requires that at least one <a href="http://www.php.net/pdo">PDO driver</a> be installed. Please ask your hosting provider to enable one of the PDO drivers supported by Habari.</p> 82 <? } ?> 80 83 </div> 81 84 </div> 82 85 </body> -
system/installer/db_setup.php
29 29 <div class="options"> 30 30 31 31 <div class="inputfield"> 32 <label for="databasetype">Database Type <strong>*</strong></label> 33 <select id="databasetype" name="db_type" onchange="setDatabaseType(this)"> 34 <option value="mysql" <?php echo $db_type=='mysql' ? 'selected' : ''; ?>>MySQL</option> 35 <option value="sqlite" <?php echo $db_type=='sqlite' ? 'selected' : ''; ?>>SQLite</option> 36 </select> 32 <label for="db_type">Database Type <strong>*</strong></label> 33 <?php echo Utils::html_select( 'db_type', $pdo_drivers, $db_type ); ?> 37 34 <div class="help"> 38 35 <strong>Database Type</strong> specifies the type of database to which 39 36 Habari will connect. Changing this setting may affect the other fields
