* Finish task #3202.

This commit is contained in:
pengjiangxiu
2017-09-14 14:37:32 +08:00
parent 844ee7452f
commit 26010c3167
7 changed files with 189 additions and 8 deletions
+5 -5
View File
@@ -13,7 +13,7 @@ class doc extends control
{
/**
* Construct function, load user, tree, action auto.
*
*
* @access public
* @return void
*/
@@ -223,7 +223,7 @@ class doc extends control
}
die(js::locate($this->createLink($this->moduleName, 'browse', "libID=$libID"), 'parent.parent'));
}
$lib = $this->doc->getLibByID($libID);
if(!empty($lib->product)) $this->view->product = $this->dao->select('id,name')->from(TABLE_PRODUCT)->where('id')->eq($lib->product)->fetch();
if(!empty($lib->project)) $this->view->project = $this->dao->select('id,name')->from(TABLE_PROJECT)->where('id')->eq($lib->project)->fetch();
@@ -259,7 +259,7 @@ class doc extends control
die(js::locate($this->createLink('doc', 'browse'), 'parent'));
}
}
/**
* Create a doc.
*
@@ -382,8 +382,8 @@ class doc extends control
/**
* View a doc.
*
* @param int $docID
*
* @param int $docID
* @access public
* @return void
*/
+7
View File
@@ -70,6 +70,13 @@ class install extends control
$this->view->pdoResult = $this->install->checkPDO();
$this->view->pdoMySQLResult = $this->install->checkPDOMySQL();
$this->view->jsonResult = $this->install->checkJSON();
$this->view->opensslResult = $this->install->checkOpenssl();
$this->view->mbstringResult = $this->install->checkMbstring();
$this->view->zlibResult = $this->install->checkZlib();
$this->view->curlResult = $this->install->checkCurl();
$this->view->filterResult = $this->install->checkFilter();
$this->view->gdResult = $this->install->checkGD();
$this->view->iconvResult = $this->install->checkIconv();
$this->view->tmpRootInfo = $this->install->getTmpRoot();
$this->view->tmpRootResult = $this->install->checkTmpRoot();
$this->view->dataRootInfo = $this->install->getDataRoot();
+14
View File
@@ -62,6 +62,20 @@ $lang->install->pdoMySQL = 'PDO_MySQL';
$lang->install->pdoMySQLFail = 'Edit PHP ini file to load PDO_MySQL extsion.';
$lang->install->json = 'JSON Extension';
$lang->install->jsonFail = 'Edit the php.ini file to load JSON extension.';
$lang->install->openssl = 'OPENSSL Extension';
$lang->install->opensslFail = 'Edit the php.ini file to load openssl extension.';
$lang->install->mbstring = 'MBSTRING Extension';
$lang->install->mbstringFail = 'Edit the php.ini file to load mbstring extension.';
$lang->install->zlib = 'ZLIB Extension';
$lang->install->zlibFail = 'Edit the php.ini file to load zlib extension.';
$lang->install->curl = 'CURL Extension';
$lang->install->curlFail = 'Edit the php.ini file to load curl extension.';
$lang->install->filter = 'FILTER Extension';
$lang->install->filterFail = 'Edit the php.ini file to load filter extension.';
$lang->install->gd = 'GD Extension';
$lang->install->gdFail = 'Edit the php.ini file to load gd extension.';
$lang->install->iconv = 'ICONV Extension';
$lang->install->iconvFail = 'Edit the php.ini file to load iconv extension.';
$lang->install->tmpRoot = 'Temp File Directory';
$lang->install->dataRoot = 'Uploaded File Directory';
$lang->install->session = 'Session Save Path';
+14
View File
@@ -62,6 +62,20 @@ $lang->install->pdoMySQL = 'PDO_MySQL扩展';
$lang->install->pdoMySQLFail = '修改PHP配置文件,加载pdo_mysql扩展。';
$lang->install->json = 'JSON扩展';
$lang->install->jsonFail = '修改PHP配置文件,加载JSON扩展。';
$lang->install->openssl = 'OPENSSL扩展';
$lang->install->opensslFail = '修改PHP配置文件,加载OPENSSL扩展。';
$lang->install->mbstring = 'MBSTRING扩展';
$lang->install->mbstringFail = '修改PHP配置文件,加载MBSTRING扩展。';
$lang->install->zlib = 'ZLIB扩展';
$lang->install->zlibFail = '修改PHP配置文件,加载ZLIB扩展。';
$lang->install->curl = 'CURL扩展';
$lang->install->curlFail = '修改PHP配置文件,加载CURL扩展。';
$lang->install->filter = 'FILTER扩展';
$lang->install->filterFail = '修改PHP配置文件,加载FILTER扩展。';
$lang->install->gd = 'GD扩展';
$lang->install->gdFail = '修改PHP配置文件,加载GD扩展。';
$lang->install->iconv = 'ICONV扩展';
$lang->install->iconvFail = '修改PHP配置文件,加载ICONV扩展。';
$lang->install->tmpRoot = '临时文件目录';
$lang->install->dataRoot = '上传文件目录';
$lang->install->session = 'Session存储目录';
+14
View File
@@ -62,6 +62,20 @@ $lang->install->pdoMySQL = 'PDO_MySQL擴展';
$lang->install->pdoMySQLFail = '修改PHP配置檔案,加載pdo_mysql擴展。';
$lang->install->json = 'JSON擴展';
$lang->install->jsonFail = '修改PHP配置檔案,加載JSON擴展。';
$lang->install->openssl = 'OPENSSL擴展';
$lang->install->opensslFail = '修改PHP配置檔案,加載OPENSSL擴展。';
$lang->install->mbstring = 'MBSTRING擴展';
$lang->install->mbstringFail = '修改PHP配置檔案,加載MBSTRING擴展。';
$lang->install->zlib = 'ZLIB擴展';
$lang->install->zlibFail = '修改PHP配置檔案,加載ZLIB擴展。';
$lang->install->curl = 'CURL擴展';
$lang->install->curlFail = '修改PHP配置檔案,加載CURL擴展。';
$lang->install->filter = 'FILTER擴展';
$lang->install->filterFail = '修改PHP配置檔案,加載FILTER擴展。';
$lang->install->gd = 'GD擴展';
$lang->install->gdFail = '修改PHP配置檔案,加載GD擴展。';
$lang->install->iconv = 'ICONV擴展';
$lang->install->iconvFail = '修改PHP配置檔案,加載ICONV擴展。';
$lang->install->tmpRoot = '臨時檔案目錄';
$lang->install->dataRoot = '上傳檔案目錄';
$lang->install->session = 'Session存儲目錄';
+78 -1
View File
@@ -90,7 +90,7 @@ class installModel extends model
/**
* Check json extension.
*
*
* @access public
* @return string ok|fail
*/
@@ -99,6 +99,83 @@ class installModel extends model
return $result = extension_loaded('json') ? 'ok' : 'fail';
}
/**
* Check openssl extension.
*
* @access public
* @return string ok|fail
*/
public function checkOpenssl()
{
return $result = extension_loaded('openssl') ? 'ok' : 'fail';
}
/**
* Check mbstring extension.
*
* @access public
* @return string ok|fail
*/
public function checkMbstring()
{
return $result = extension_loaded('mbstring') ? 'ok' : 'fail';
}
/**
* Check zlib extension.
*
* @access public
* @return string ok|fail
*/
public function checkZlib()
{
return $result = extension_loaded('zlib') ? 'ok' : 'fail';
}
/**
* Check curl extension.
*
* @access public
* @return string ok|fail
*/
public function checkCurl()
{
return $result = extension_loaded('curl') ? 'ok' : 'fail';
}
/**
* Check filter extension.
*
* @access public
* @return string ok|fail
*/
public function checkFilter()
{
return $result = extension_loaded('filter') ? 'ok' : 'fail';
}
/**
* Check gd extension.
*
* @access public
* @return string ok|fail
*/
public function checkGD()
{
return $result = extension_loaded('gd') ? 'ok' : 'fail';
}
/**
* Check iconv extension.
*
* @access public
* @return string ok|fail
*/
public function checkIconv()
{
return $result = extension_loaded('iconv') ? 'ok' : 'fail';
}
/**
* Get tempRoot info.
*
+57 -2
View File
@@ -47,6 +47,48 @@
<td class='<?php echo $jsonResult;?>'><?php echo $lang->install->$jsonResult;?></td>
<td class='text-left f-12px'><?php if($jsonResult == 'fail') echo $lang->install->jsonFail;?></td>
</tr>
<tr>
<th><?php echo $lang->install->openssl;?></th>
<td><?php $opensslResult == 'ok' ? printf($lang->install->loaded) : printf($lang->install->unloaded);?></td>
<td class='<?php echo $opensslResult;?>'><?php echo $lang->install->$opensslResult;?></td>
<td class='text-left f-12px'><?php if($opensslResult == 'fail') echo $lang->install->opensslFail;?></td>
</tr>
<tr>
<th><?php echo $lang->install->mbstring;?></th>
<td><?php $mbstringResult == 'ok' ? printf($lang->install->loaded) : printf($lang->install->unloaded);?></td>
<td class='<?php echo $mbstringResult;?>'><?php echo $lang->install->$mbstringResult;?></td>
<td class='text-left f-12px'><?php if($mbstringResult == 'fail') echo $lang->install->mbstringFail;?></td>
</tr>
<tr>
<th><?php echo $lang->install->zlib;?></th>
<td><?php $zlibResult == 'ok' ? printf($lang->install->loaded) : printf($lang->install->unloaded);?></td>
<td class='<?php echo $zlibResult;?>'><?php echo $lang->install->$zlibResult;?></td>
<td class='text-left f-12px'><?php if($zlibResult == 'fail') echo $lang->install->zlibFail;?></td>
</tr>
<tr>
<th><?php echo $lang->install->curl;?></th>
<td><?php $curlResult == 'ok' ? printf($lang->install->loaded) : printf($lang->install->unloaded);?></td>
<td class='<?php echo $curlResult;?>'><?php echo $lang->install->$curlResult;?></td>
<td class='text-left f-12px'><?php if($curlResult == 'fail') echo $lang->install->curlFail;?></td>
</tr>
<tr>
<th><?php echo $lang->install->filter;?></th>
<td><?php $filterResult == 'ok' ? printf($lang->install->loaded) : printf($lang->install->unloaded);?></td>
<td class='<?php echo $filterResult;?>'><?php echo $lang->install->$filterResult;?></td>
<td class='text-left f-12px'><?php if($filterResult == 'fail') echo $lang->install->filterFail;?></td>
</tr>
<tr>
<th><?php echo $lang->install->gd;?></th>
<td><?php $gdResult == 'ok' ? printf($lang->install->loaded) : printf($lang->install->unloaded);?></td>
<td class='<?php echo $gdResult;?>'><?php echo $lang->install->$gdResult;?></td>
<td class='text-left f-12px'><?php if($gdResult == 'fail') echo $lang->install->gdFail;?></td>
</tr>
<tr>
<th><?php echo $lang->install->iconv;?></th>
<td><?php $iconvResult == 'ok' ? printf($lang->install->loaded) : printf($lang->install->unloaded);?></td>
<td class='<?php echo $iconvResult;?>'><?php echo $lang->install->$iconvResult;?></td>
<td class='text-left f-12px'><?php if($iconvResult == 'fail') echo $lang->install->iconvFail;?></td>
</tr>
<tr>
<th><?php echo $lang->install->tmpRoot;?></th>
<td>
@@ -110,7 +152,20 @@
</div>
<div class='modal-footer'>
<?php
if($phpResult == 'ok' and $pdoResult == 'ok' and $pdoMySQLResult == 'ok' and $tmpRootResult == 'ok' and $dataRootResult == 'ok' and $sessionResult == 'ok')
if($phpResult == 'ok' and
$pdoResult == 'ok' and
$pdoMySQLResult == 'ok' and
$tmpRootResult == 'ok' and
$dataRootResult == 'ok' and
$sessionResult == 'ok' and
$jsonResult == 'ok' and
$opensslResult == 'ok' and
$mbstringResult == 'ok' and
$zlibResult == 'ok' and
$curlResult == 'ok' and
$filterResult == 'ok' and
$gdResult == 'ok' and
$iconvResult == 'ok')
{
echo html::a($this->createLink('install', 'step2'), $lang->install->next, '', "class='btn btn-primary'");
}
@@ -122,7 +177,7 @@
echo '<div class="panel panel-sm text-left"><div class="panel-heading strong">' . $lang->install->phpINI . '</div><div class="panel-body">' . nl2br($this->install->getIniInfo()) . '</div></div>';
}
}
?>
?>
</div>
</div>
</div>