* linux need not check session_save_path.

This commit is contained in:
zhujinyong
2012-12-02 01:51:33 +00:00
parent 5c60b09b12
commit a8f8823f17
2 changed files with 17 additions and 7 deletions

View File

@@ -133,10 +133,14 @@ class installModel extends model
*/
public function getSessionSavePath()
{
$result['path'] = session_save_path();
$result['exists'] = is_dir($result['path']);
$result['writable'] = is_writable($result['path']);
return $result;
if(preg_match('/WIN/i', PHP_OS))
{
$result['path'] = session_save_path();
$result['exists'] = is_dir($result['path']);
$result['writable'] = is_writable($result['path']);
return $result;
}
return array('path' => '/tmp', 'exists' => true, 'writable' => true);
}
/**
@@ -147,8 +151,12 @@ class installModel extends model
*/
public function checkSessionSavePath()
{
$sessionSavePath = session_save_path();
return $result = (is_dir($sessionSavePath) and is_writable($sessionSavePath)) ? 'ok' : 'fail';
if(preg_match('/WIN/i', PHP_OS))
{
$sessionSavePath = session_save_path();
return $result = (is_dir($sessionSavePath) and is_writable($sessionSavePath)) ? 'ok' : 'fail';
}
return 'ok';
}
/**

View File

@@ -74,6 +74,7 @@
?>
</td>
</tr>
<?php if(preg_match('/WIN/i', PHP_OS)):?>
<tr>
<th><?php echo $lang->install->session;?></th>
<td>
@@ -97,10 +98,11 @@
?>
</td>
</tr>
<?php endif;?>
<tr>
<td colspan='4'>
<?php
if($phpResult == 'ok' and $pdoResult == 'ok' and $pdoMySQLResult == 'ok' and $tmpRootResult == 'ok' and $dataRootResult == 'ok')
if($phpResult == 'ok' and $pdoResult == 'ok' and $pdoMySQLResult == 'ok' and $tmpRootResult == 'ok' and $dataRootResult == 'ok' and $sessionResult == 'ok')
{
echo html::a($this->createLink('install', 'step2'), $lang->install->next);
}