mirror of
https://github.com/typecho/typecho.git
synced 2025-04-21 02:01:52 +02:00
parent
a214977c83
commit
93bcd46d55
10
install.php
10
install.php
@ -536,6 +536,16 @@ Typecho_Cookie::set('__typecho_lang', $lang);
|
||||
}
|
||||
|
||||
if($success) {
|
||||
// 重置原有数据库状态
|
||||
if (isset($installDb)) {
|
||||
try {
|
||||
$installDb->query($installDb->update('table.options')
|
||||
->rows(array('value' => 0))->where('name = ?', 'installed'));
|
||||
} catch (Exception $e) {
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
|
||||
Typecho_Cookie::set('__typecho_config', base64_encode(serialize(array_merge(array(
|
||||
'prefix' => _r('dbPrefix'),
|
||||
'userName' => _r('userName'),
|
||||
|
@ -127,6 +127,6 @@ class Typecho_Date
|
||||
*/
|
||||
public static function time()
|
||||
{
|
||||
return self::$serverTimeStamp ? self::$serverTimeStamp : (self::$serverTimeStamp = time() - idate('Z'));
|
||||
return self::$serverTimeStamp ? self::$serverTimeStamp : (self::$serverTimeStamp = time());
|
||||
}
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ class Typecho_Db_Adapter_Mysqli implements Typecho_Db_Adapter
|
||||
*/
|
||||
public static function isAvailable()
|
||||
{
|
||||
return extension_loaded('mysqli');
|
||||
return class_exists('MySQLi');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -39,7 +39,7 @@ abstract class Typecho_Db_Adapter_Pdo implements Typecho_Db_Adapter
|
||||
*/
|
||||
public static function isAvailable()
|
||||
{
|
||||
return extension_loaded('pdo');
|
||||
return class_exists('PDO');
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user