Merge branch 'master' of https://github.com/easysoft/zentaopms
This commit is contained in:
@@ -165,7 +165,7 @@ $config->bug->search['params']['lastEditedDate']= array('operator' => '=',
|
||||
$config->bug->search['params']['deadline'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date');
|
||||
|
||||
$config->bug->datatable = new stdclass();
|
||||
$config->bug->datatable->defaultField = array('id', 'pri', 'title', 'severity', 'status', 'openedBy', 'openedDate', 'assignedTo', 'resolvedBy', 'resolution', 'actions');
|
||||
$config->bug->datatable->defaultField = array('id', 'pri', 'title', 'severity', 'status', 'openedBy', 'openedDate', 'assignedTo', 'resolution', 'actions');
|
||||
|
||||
$config->bug->datatable->fieldList['id']['title'] = 'idAB';
|
||||
$config->bug->datatable->fieldList['id']['fixed'] = 'left';
|
||||
@@ -284,12 +284,12 @@ $config->bug->datatable->fieldList['deadline']['required'] = 'no';
|
||||
|
||||
$config->bug->datatable->fieldList['resolvedBy']['title'] = 'resolvedByAB';
|
||||
$config->bug->datatable->fieldList['resolvedBy']['fixed'] = 'no';
|
||||
$config->bug->datatable->fieldList['resolvedBy']['width'] = '80';
|
||||
$config->bug->datatable->fieldList['resolvedBy']['width'] = '70';
|
||||
$config->bug->datatable->fieldList['resolvedBy']['required'] = 'no';
|
||||
|
||||
$config->bug->datatable->fieldList['resolution']['title'] = 'resolutionAB';
|
||||
$config->bug->datatable->fieldList['resolution']['fixed'] = 'no';
|
||||
$config->bug->datatable->fieldList['resolution']['width'] = '80';
|
||||
$config->bug->datatable->fieldList['resolution']['width'] = '70';
|
||||
$config->bug->datatable->fieldList['resolution']['required'] = 'no';
|
||||
|
||||
$config->bug->datatable->fieldList['resolvedDate']['title'] = 'resolvedDateAB';
|
||||
|
||||
@@ -1224,14 +1224,14 @@ class docModel extends model
|
||||
*/
|
||||
public function statLibCounts($idList)
|
||||
{
|
||||
$moduleCounts = $this->dao->select("root, count(id) as moduleCount")->from(TABLE_MODULE)
|
||||
$moduleCounts = $this->dao->select("`root`, count(id) as moduleCount")->from(TABLE_MODULE)
|
||||
->where('type')->eq('doc')
|
||||
->andWhere('root')->in($idList)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->groupBy('root')
|
||||
->fetchPairs();
|
||||
|
||||
$docs = $this->dao->select("id,lib,acl,users,groups")->from(TABLE_DOC)
|
||||
$docs = $this->dao->select("`id`,`lib`,`acl`,`users`,`groups`")->from(TABLE_DOC)
|
||||
->where('lib')->in($idList)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->andWhere('module')->eq(0)
|
||||
|
||||
@@ -138,9 +138,15 @@ class file extends control
|
||||
$file = $this->file->getById($fileID);
|
||||
|
||||
/* Judge the mode, down or open. */
|
||||
$mode = 'down';
|
||||
$mode = 'down';
|
||||
$fileTypes = 'txt|jpg|jpeg|gif|png|bmp|xml|html';
|
||||
if(stripos($fileTypes, $file->extension) !== false && $mouse == 'left') $mode = 'open';
|
||||
if($file->extension == 'txt')
|
||||
{
|
||||
$extension = end(explode('.', $file->title));
|
||||
if($extension != 'txt') $mode = 'down';
|
||||
$file->extension = $extension;
|
||||
}
|
||||
|
||||
if(file_exists($file->realPath))
|
||||
{
|
||||
|
||||
+63
-63
@@ -19,7 +19,7 @@ class fileModel extends model
|
||||
|
||||
/**
|
||||
* Construct function.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -33,9 +33,9 @@ class fileModel extends model
|
||||
|
||||
/**
|
||||
* Get files of an object.
|
||||
*
|
||||
* @param string $objectType
|
||||
* @param string $objectID
|
||||
*
|
||||
* @param string $objectType
|
||||
* @param string $objectID
|
||||
* @param string $extra
|
||||
* @access public
|
||||
* @return array
|
||||
@@ -60,8 +60,8 @@ class fileModel extends model
|
||||
|
||||
/**
|
||||
* Get info of a file.
|
||||
*
|
||||
* @param int $fileID
|
||||
*
|
||||
* @param int $fileID
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
@@ -77,10 +77,10 @@ class fileModel extends model
|
||||
|
||||
/**
|
||||
* Save upload.
|
||||
*
|
||||
* @param string $objectType
|
||||
* @param string $objectID
|
||||
* @param string $extra
|
||||
*
|
||||
* @param string $objectType
|
||||
* @param string $objectID
|
||||
* @param string $extra
|
||||
* @param string $filesName
|
||||
* @param string $labelsName
|
||||
* @access public
|
||||
@@ -113,7 +113,7 @@ class fileModel extends model
|
||||
|
||||
/**
|
||||
* Get counts of uploaded files.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
@@ -124,8 +124,8 @@ class fileModel extends model
|
||||
|
||||
/**
|
||||
* Get info of uploaded files.
|
||||
*
|
||||
* @param string $htmlTagName
|
||||
*
|
||||
* @param string $htmlTagName
|
||||
* @param string $labelsName
|
||||
* @access public
|
||||
* @return array
|
||||
@@ -152,7 +152,7 @@ class fileModel extends model
|
||||
$title = isset($_POST[$labelsName][$id]) ? $_POST[$labelsName][$id] : '';
|
||||
$file['extension'] = $this->getExtension($filename);
|
||||
$file['pathname'] = $this->setPathName($id, $file['extension']);
|
||||
$file['title'] = (!empty($title) and $title != $filename) ? htmlspecialchars($title) : str_replace('.' . $file['extension'], '', $filename);
|
||||
$file['title'] = (!empty($title) and $title != $filename) ? htmlspecialchars($title) : $filename;
|
||||
$file['title'] = $purifier->purify($file['title']);
|
||||
$file['size'] = $size[$id];
|
||||
$file['tmpname'] = $tmp_name[$id];
|
||||
@@ -167,7 +167,7 @@ class fileModel extends model
|
||||
$title = isset($_POST[$labelsName][0]) ? $_POST[$labelsName][0] : '';
|
||||
$file['extension'] = $this->getExtension($name);
|
||||
$file['pathname'] = $this->setPathName(0, $file['extension']);
|
||||
$file['title'] = (!empty($title) and $title != $name) ? htmlspecialchars($title) : substr($name, 0, strpos($name, $file['extension']) - 1);
|
||||
$file['title'] = (!empty($title) and $title != $name) ? htmlspecialchars($title) : $name;
|
||||
$file['title'] = $purifier->purify($file['title']);
|
||||
$file['size'] = $size;
|
||||
$file['tmpname'] = $tmp_name;
|
||||
@@ -287,8 +287,8 @@ class fileModel extends model
|
||||
|
||||
/**
|
||||
* Get extension of a file.
|
||||
*
|
||||
* @param string $filename
|
||||
*
|
||||
* @param string $filename
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
@@ -303,8 +303,8 @@ class fileModel extends model
|
||||
|
||||
/**
|
||||
* Get save name.
|
||||
*
|
||||
* @param string $pathName
|
||||
*
|
||||
* @param string $pathName
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
@@ -316,8 +316,8 @@ class fileModel extends model
|
||||
|
||||
/**
|
||||
* Get real path name.
|
||||
*
|
||||
* @param string $pathName
|
||||
*
|
||||
* @param string $pathName
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
@@ -331,8 +331,8 @@ class fileModel extends model
|
||||
|
||||
/**
|
||||
* Get export tpl.
|
||||
*
|
||||
* @param string $module
|
||||
*
|
||||
* @param string $module
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
@@ -349,8 +349,8 @@ class fileModel extends model
|
||||
|
||||
/**
|
||||
* Save export template.
|
||||
*
|
||||
* @param string $module
|
||||
*
|
||||
* @param string $module
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
@@ -369,9 +369,9 @@ class fileModel extends model
|
||||
|
||||
/**
|
||||
* Set path name of the uploaded file to be saved.
|
||||
*
|
||||
* @param int $fileID
|
||||
* @param string $extension
|
||||
*
|
||||
* @param int $fileID
|
||||
* @param string $extension
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
@@ -384,7 +384,7 @@ class fileModel extends model
|
||||
|
||||
/**
|
||||
* Set save path.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -398,10 +398,10 @@ class fileModel extends model
|
||||
}
|
||||
$this->savePath = dirname($savePath) . '/';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set the web path of upload files.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -412,9 +412,9 @@ class fileModel extends model
|
||||
|
||||
/**
|
||||
* Insert the set image size code.
|
||||
*
|
||||
* @param string $content
|
||||
* @param int $maxSize
|
||||
*
|
||||
* @param string $content
|
||||
* @param int $maxSize
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
@@ -463,9 +463,9 @@ class fileModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Paste image in kindeditor at firefox and chrome.
|
||||
*
|
||||
* @param string $data
|
||||
* Paste image in kindeditor at firefox and chrome.
|
||||
*
|
||||
* @param string $data
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
@@ -503,8 +503,8 @@ class fileModel extends model
|
||||
|
||||
/**
|
||||
* Parse CSV.
|
||||
*
|
||||
* @param string $fileName
|
||||
*
|
||||
* @param string $fileName
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
@@ -606,8 +606,8 @@ class fileModel extends model
|
||||
|
||||
/**
|
||||
* Remove interference for parse csv.
|
||||
*
|
||||
* @param array $matchs
|
||||
*
|
||||
* @param array $matchs
|
||||
* @access private
|
||||
* @return string
|
||||
*/
|
||||
@@ -619,9 +619,9 @@ class fileModel extends model
|
||||
|
||||
/**
|
||||
* Process editor.
|
||||
*
|
||||
* @param object $data
|
||||
* @param string $editorList
|
||||
*
|
||||
* @param object $data
|
||||
* @param string $editorList
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
@@ -662,9 +662,9 @@ class fileModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Compress image
|
||||
*
|
||||
* @param array $file
|
||||
* Compress image
|
||||
*
|
||||
* @param array $file
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
@@ -699,15 +699,15 @@ class fileModel extends model
|
||||
* Webpage: de77.com
|
||||
* Version: 07.02.2010
|
||||
* Source : https://github.com/acustodioo/pic/blob/master/imagecreatefrombmp.function.php
|
||||
*
|
||||
* @param string $filename
|
||||
*
|
||||
* @param string $filename
|
||||
* @access public
|
||||
* @return resource
|
||||
*/
|
||||
public function imagecreatefrombmp($filename) {
|
||||
$f = fopen($filename, "rb");
|
||||
|
||||
//read header
|
||||
//read header
|
||||
$header = fread($f, 54);
|
||||
$header = unpack('c2identifier/Vfile_size/Vreserved/Vbitmap_data/Vheader_size/'.
|
||||
'Vwidth/Vheight/vplanes/vbits_per_pixel/Vcompression/Vdata_size/'.
|
||||
@@ -740,9 +740,9 @@ class fileModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Dwordize for imagecreatefrombmp
|
||||
*
|
||||
* @param streing $str
|
||||
* Dwordize for imagecreatefrombmp
|
||||
*
|
||||
* @param streing $str
|
||||
* @access private
|
||||
* @return int
|
||||
*/
|
||||
@@ -756,10 +756,10 @@ class fileModel extends model
|
||||
|
||||
/**
|
||||
* Update objectID.
|
||||
*
|
||||
* @param int $uid
|
||||
* @param int $objectID
|
||||
* @param string $objectType
|
||||
*
|
||||
* @param int $uid
|
||||
* @param int $objectID
|
||||
* @param string $objectType
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
@@ -779,10 +779,10 @@ class fileModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Revert real src.
|
||||
*
|
||||
* @param object $data
|
||||
* @param string $fields
|
||||
* Revert real src.
|
||||
*
|
||||
* @param object $data
|
||||
* @param string $fields
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
@@ -800,8 +800,8 @@ class fileModel extends model
|
||||
|
||||
/**
|
||||
* Auto delete useless image.
|
||||
*
|
||||
* @param int $uid
|
||||
*
|
||||
* @param int $uid
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
|
||||
@@ -47,7 +47,7 @@ $sessionString .= session_name() . '=' . session_id();
|
||||
{
|
||||
$uploadDate = $lang->file->uploadDate . substr($file->addedDate, 0, 10);
|
||||
$fileTitle = "<li title='{$uploadDate}'><i class='icon icon-file-text'></i> " . $file->title;
|
||||
if(strpos($file->title, ".{$file->extension}") === false) $fileTitle .= ".{$file->extension}";
|
||||
if(strpos($file->title, ".{$file->extension}") === false && $file->extension != 'txt') $fileTitle .= ".{$file->extension}";
|
||||
$imageWidth = 0;
|
||||
if(stripos('jpg|jpeg|gif|png|bmp', $file->extension) !== false)
|
||||
{
|
||||
|
||||
@@ -395,7 +395,6 @@ class testtask extends control
|
||||
$runs = $this->testtask->getRuns($taskID, 0, $groupBy);
|
||||
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'testcase', false);
|
||||
$runs = $this->testcase->appendData($runs, 'run');
|
||||
|
||||
$groupCases = array();
|
||||
$groupByList = array();
|
||||
foreach($runs as $run)
|
||||
@@ -411,6 +410,17 @@ class testtask extends control
|
||||
}
|
||||
}
|
||||
|
||||
if($groupBy == 'story' && $task->build)
|
||||
{
|
||||
$buildStoryIDs = $this->dao->select('stories')->from(TABLE_BUILD)->where('id')->eq($task->build)->fetch('stories');
|
||||
$buildStories = $this->dao->select('id,title')->from(TABLE_STORY)->where('id')->in($buildStoryIDs)->andWhere('id')->notin(array_keys($groupCases))->fetchAll('id');
|
||||
foreach($buildStories as $buildStory)
|
||||
{
|
||||
$groupCases[$buildStory->id][] = $buildStory;
|
||||
$groupByList[$buildStory->id] = $buildStory->title;
|
||||
}
|
||||
}
|
||||
|
||||
$this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->testtask->cases;
|
||||
$this->view->position[] = html::a($this->createLink('testtask', 'browse', "productID=$productID"), $this->products[$productID]);
|
||||
$this->view->position[] = $this->lang->testtask->common;
|
||||
|
||||
@@ -55,6 +55,13 @@
|
||||
<?php echo html::a('###', "<i class='icon-caret-down'></i> $groupName", '', "class='text-primary'");?>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
<?php
|
||||
if(!isset($run->case))
|
||||
{
|
||||
echo "<td colspan='13'></td>";
|
||||
continue;
|
||||
}
|
||||
?>
|
||||
<td class='c-id-sm'><?php echo sprintf('%03d', $run->case);?></td>
|
||||
<td><span class='label-pri <?php echo 'label-pri-' . $run->pri;?>' title='<?php echo zget($lang->testcase->priList, $run->pri, $run->pri);?>'><?php echo zget($lang->testcase->priList, $run->pri, $run->pri);?></span></td>
|
||||
<td class='text-left'><?php if(!common::printLink('testcase', 'view', "case=$run->case", $run->title)) echo $run->title;?></td>
|
||||
|
||||
Reference in New Issue
Block a user