Changeset 20462
- Timestamp:
- Jan 30, 2013, 12:12:22 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/include/c13y_internal.class.php
r19703 r20462 43 43 $check_list = array(); 44 44 45 $check_list[] = array('type' => 'PHP', 'current' => phpversion(), 'required' => REQUIRED_PHP_VERSION); 46 47 $db_version = pwg_get_db_version(); 48 $check_list[] = array('type' => $conf['dblayer'], 49 'current' => $db_version, 50 'required' => constant('REQUIRED_'.str_replace('-', '_', strtoupper($conf['dblayer'])).'_VERSION') 51 ); 45 $check_list[] = array( 46 'type' => 'PHP', 47 'current' => phpversion(), 48 'required' => REQUIRED_PHP_VERSION, 49 ); 50 51 $check_list[] = array( 52 'type' => 'MySQL', 53 'current' => pwg_get_db_version(), 54 'required' => REQUIRED_MYSQL_VERSION, 55 ); 52 56 53 57 foreach ($check_list as $elem) -
trunk/admin/intro.php
r19703 r20462 198 198 'OS' => PHP_OS, 199 199 'PHP_VERSION' => phpversion(), 200 'DB_ENGINE' => $conf['dblayer'],200 'DB_ENGINE' => 'MySQL', 201 201 'DB_VERSION' => $db_version, 202 202 'DB_ELEMENTS' => l10n_dec('%d photo', '%d photos', $nb_elements), -
trunk/i.php
r19703 r20462 403 403 try 404 404 { 405 $pwg_db_link =pwg_db_connect($conf['db_host'], $conf['db_user'],406 405 pwg_db_connect($conf['db_host'], $conf['db_user'], 406 $conf['db_password'], $conf['db_base']); 407 407 } 408 408 catch (Exception $e) … … 512 512 $page['rotation_angle'] = 0; 513 513 } 514 pwg_db_close( $pwg_db_link);514 pwg_db_close(); 515 515 516 516 if (!try_switch_source($params, $src_mtime) && $params->type==IMG_CUSTOM) -
trunk/include/dblayer/functions_mysql.inc.php
r19703 r20462 41 41 throw new Exception("Can't connect to server"); 42 42 } 43 if (mysql_select_db($database, $link)) 44 { 45 return $link; 46 } 47 else 43 if (!mysql_select_db($database, $link)) 48 44 { 49 45 throw new Exception('Connection to server succeed, but it was impossible to connect to database'); … … 139 135 } 140 136 141 function pwg_db_changes( $result)137 function pwg_db_changes() 142 138 { 143 139 return mysql_affected_rows(); … … 174 170 } 175 171 176 function pwg_db_insert_id( $table=null, $column='id')172 function pwg_db_insert_id() 177 173 { 178 174 return mysql_insert_id(); 179 175 } 180 176 181 function pwg_db_close( $link=null)182 { 183 return mysql_close( $link);177 function pwg_db_close() 178 { 179 return mysql_close(); 184 180 } 185 181 -
trunk/install.php
r19703 r20462 129 129 $dbpasswd = (!empty($_POST['dbpasswd'])) ? $_POST['dbpasswd'] : ''; 130 130 $dbname = (!empty($_POST['dbname'])) ? $_POST['dbname'] : ''; 131 $dblayer = 'mysql';131 $dblayer = extension_loaded('mysqli') ? 'mysqli' : 'mysql'; 132 132 133 133 $admin_name = (!empty($_POST['admin_name'])) ? $_POST['admin_name'] : '';
Note: See TracChangeset
for help on using the changeset viewer.