* fix bugs.
This commit is contained in:
@@ -1573,7 +1573,11 @@ class bugModel extends model
|
||||
*/
|
||||
public function reportCondition()
|
||||
{
|
||||
if(!$this->session->bugOnlyCondition) return 'id in (' . preg_replace('/SELECT .* FROM/', 'SELECT t1.id FROM', $this->session->bugQueryCondition) . ')';
|
||||
return $this->session->bugQueryCondition;
|
||||
if(isset($_SESSION['bugQueryCondition']))
|
||||
{
|
||||
if(!$this->session->bugOnlyCondition) return 'id in (' . preg_replace('/SELECT .* FROM/', 'SELECT t1.id FROM', $this->session->bugQueryCondition) . ')';
|
||||
return $this->session->bugQueryCondition;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -299,6 +299,7 @@ $lang->editor = new stdclass();
|
||||
$lang->mail = new stdclass();
|
||||
$lang->cron = new stdclass();
|
||||
$lang->dev = new stdclass();
|
||||
$lang->search = new stdclass();
|
||||
|
||||
$lang->convert->menu = $lang->admin->menu;
|
||||
$lang->upgrade->menu = $lang->admin->menu;
|
||||
|
||||
@@ -299,6 +299,7 @@ $lang->editor = new stdclass();
|
||||
$lang->mail = new stdclass();
|
||||
$lang->cron = new stdclass();
|
||||
$lang->dev = new stdclass();
|
||||
$lang->search = new stdclass();
|
||||
|
||||
$lang->convert->menu = $lang->admin->menu;
|
||||
$lang->upgrade->menu = $lang->admin->menu;
|
||||
|
||||
@@ -299,6 +299,7 @@ $lang->editor = new stdclass();
|
||||
$lang->mail = new stdclass();
|
||||
$lang->cron = new stdclass();
|
||||
$lang->dev = new stdclass();
|
||||
$lang->search = new stdclass();
|
||||
|
||||
$lang->convert->menu = $lang->admin->menu;
|
||||
$lang->upgrade->menu = $lang->admin->menu;
|
||||
|
||||
@@ -69,6 +69,7 @@ class company extends control
|
||||
$this->config->company->browse->search['actionURL'] = $this->createLink('company', 'browse', "param=myQueryID&type=bysearch");
|
||||
$this->config->company->browse->search['queryID'] = $queryID;
|
||||
$this->config->company->browse->search['params']['dept']['values'] = array('' => '') + $this->dept->getOptionMenu();
|
||||
$this->loadModel('search')->setSearchParams($this->config->company->browse->search);
|
||||
|
||||
if($type == 'bydept')
|
||||
{
|
||||
|
||||
@@ -285,7 +285,6 @@ class mailModel extends model
|
||||
$this->setBody($this->convertCharset($body));
|
||||
$this->setErrorLang();
|
||||
$this->mta->send();
|
||||
if($this->config->mail->mta == 'smtp') $this->mta->smtpClose();
|
||||
}
|
||||
catch (phpmailerException $e)
|
||||
{
|
||||
@@ -295,6 +294,7 @@ class mailModel extends model
|
||||
{
|
||||
$this->errors[] = trim(strip_tags($e->getMessage()));
|
||||
}
|
||||
if($this->config->mail->mta == 'smtp') $this->mta->smtpClose();
|
||||
|
||||
/* save errors. */
|
||||
if($this->isError()) $this->app->saveError('E_MAIL', join(' ', $this->errors), __FILE__, __LINE__, true);
|
||||
|
||||
@@ -126,6 +126,7 @@ class project extends control
|
||||
{
|
||||
$this->loadModel('tree');
|
||||
$this->loadModel('search');
|
||||
$this->loadModel('task');
|
||||
|
||||
/* Set browseType, productID, moduleID and queryID. */
|
||||
$browseType = strtolower($status);
|
||||
@@ -162,11 +163,11 @@ class project extends control
|
||||
if($status == 'byProduct')
|
||||
{
|
||||
$modules = $this->tree->getProjectModule($projectID, $productID);
|
||||
$tasks = $this->loadModel('task')->getTasksByModule($projectID, $modules, $sort, $pager);
|
||||
$tasks = $this->task->getTasksByModule($projectID, $modules, $sort, $pager);
|
||||
}
|
||||
elseif($status == 'byModule')
|
||||
{
|
||||
$tasks = $this->loadModel('task')->getTasksByModule($projectID, $this->tree->getAllChildID($moduleID), $sort, $pager);
|
||||
$tasks = $this->task->getTasksByModule($projectID, $this->tree->getAllChildID($moduleID), $sort, $pager);
|
||||
}
|
||||
elseif($browseType != "bysearch")
|
||||
{
|
||||
@@ -177,7 +178,7 @@ class project extends control
|
||||
unset($qureyStatus['closed']);
|
||||
$qureyStatus = array_keys($qureyStatus);
|
||||
}
|
||||
$tasks = $this->loadModel('task')->getProjectTasks($projectID, $qureyStatus, $sort, $pager);
|
||||
$tasks = $this->task->getProjectTasks($projectID, $qureyStatus, $sort, $pager);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -29,7 +29,7 @@ class search extends control
|
||||
$searchFields = empty($searchFields) ? json_decode($this->session->searchParams['searchFields'], true) : $searchFields;
|
||||
$fieldParams = empty($fieldParams) ? json_decode($this->session->searchParams['fieldParams'], true) : $fieldParams;
|
||||
$actionURL = empty($actionURL) ? $this->session->searchParams['actionURL'] : $actionURL;
|
||||
$style = $this->session->searchParams['style'];
|
||||
$style = isset($_SESSION['searchParams']['style']) ? $this->session->searchParams['style'] : '';
|
||||
$this->search->initSession($module, $searchFields, $fieldParams);
|
||||
|
||||
$this->view->module = $module;
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
* @version $Id: zh-cn.php 4129 2013-01-18 01:58:14Z wwccss $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
$lang->search = new stdclass();
|
||||
$lang->search->common = '搜索';
|
||||
$lang->search->reset = '重置';
|
||||
$lang->search->more = '更多';
|
||||
|
||||
@@ -341,7 +341,7 @@ foreach($fieldParams as $fieldName => $param)
|
||||
echo '</td>';
|
||||
|
||||
/* Print field. */
|
||||
echo "<td class='w-90px'>" . html::select("field$fieldNO", $searchFields, $formSession["field$fieldNO"], "onchange='setField(this, $fieldNO, {$module}param)' class='form-control'") . '</td>';
|
||||
echo "<td class='w-90px'>" . html::select("field$fieldNO", $searchFields, $formSession["field$fieldNO"], "onchange='setField(this, $fieldNO, {$module}params)' class='form-control'") . '</td>';
|
||||
|
||||
/* Print operator. */
|
||||
echo "<td class='w-70px'>" . html::select("operator$fieldNO", $lang->search->operators, $formSession["operator$fieldNO"], "class='form-control'") . '</td>';
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
<form method='post'>
|
||||
<?php echo html::checkBox('charts', $lang->story->report->charts, $checkedCharts, '', 'block');?>
|
||||
<div class='btn-group'>
|
||||
<?php echo html::selectButton(); ?>
|
||||
<?php echo html::submitButton($lang->story->report->create);?>
|
||||
<?php echo html::selectButton('', 'btn-sm');?>
|
||||
<?php echo html::submitButton($lang->story->report->create, '', 'btn-sm btn-primary');?>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -1405,8 +1405,12 @@ class taskModel extends model
|
||||
*/
|
||||
public function reportCondition()
|
||||
{
|
||||
if(!$this->session->taskOnlyCondition) return 'id in (' . preg_replace('/SELECT .* FROM/', 'SELECT t1.id FROM', $this->session->taskQueryCondition) . ')';
|
||||
return $this->session->taskQueryCondition;
|
||||
if(isset($_SESSION['taskQueryCondition']))
|
||||
{
|
||||
if(!$this->session->taskOnlyCondition) return 'id in (' . preg_replace('/SELECT .* FROM/', 'SELECT t1.id FROM', $this->session->taskQueryCondition) . ')';
|
||||
return $this->session->taskQueryCondition;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
<form method='post'>
|
||||
<?php echo html::checkBox('charts', $lang->task->report->charts, $checkedCharts, '', 'block')?>
|
||||
<div class='btn-group'>
|
||||
<?php echo html::selectButton(); ?>
|
||||
<?php echo html::submitButton($lang->task->report->create);?>
|
||||
<?php echo html::selectButton('', 'btn-sm'); ?>
|
||||
<?php echo html::submitButton($lang->task->report->create, "", 'btn-sm btn-primary');?>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -316,7 +316,7 @@ class testtaskModel extends model
|
||||
*
|
||||
* */
|
||||
$postData = fixer::input('post')->get();
|
||||
$caseResult = $postData->result ? $postData->result : 'pass';
|
||||
$caseResult = isset($postData->result) ? $postData->result : 'pass';
|
||||
if($postData->steps)
|
||||
{
|
||||
foreach($postData->steps as $stepID => $stepResult)
|
||||
|
||||
@@ -111,8 +111,8 @@ class upgrade extends control
|
||||
}
|
||||
$this->display();
|
||||
|
||||
unlink($this->app->getAppRoot() . 'www/install.php');
|
||||
unlink($this->app->getAppRoot() . 'www/upgrade.php');
|
||||
@unlink($this->app->getAppRoot() . 'www/install.php');
|
||||
@unlink($this->app->getAppRoot() . 'www/upgrade.php');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user