Merge branch 'master' of https://git.zcorp.cc/easycorp/zentaopms
This commit is contained in:
@@ -413,11 +413,11 @@ class product extends control
|
||||
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$data = form::data($this->config->product->form->edit);
|
||||
$data = $this->productZen->prepareEditExtras($data, $this->post->acl, $this->post->uid);
|
||||
$data = form::data($this->config->product->form->edit);
|
||||
$product = $this->productZen->prepareEditExtras($data);
|
||||
|
||||
$changes = $this->product->update($productID, $data, $this->post->uid);
|
||||
if(dao::isError()) return $this->productZen->sendDaoError();
|
||||
$changes = $this->product->update($productID, $product, $this->post->uid);
|
||||
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
if($action == 'undelete') $this->loadModel('action')->undelete((int)$extra);
|
||||
$response = $this->productZen->responseAfterEdit($productID, $programID, $changes);
|
||||
|
||||
@@ -428,20 +428,17 @@ class productZen extends product
|
||||
* 处理白名单和富文本内容。
|
||||
* Prepare data for edit.
|
||||
*
|
||||
* @param object $data
|
||||
* @param string $acl
|
||||
* @param string $uid
|
||||
* @param form $data
|
||||
* @access protected
|
||||
* @return object
|
||||
*/
|
||||
protected function prepareEditExtras(object $data, string $acl, string $uid): object
|
||||
protected function prepareEditExtras(form $data): object
|
||||
{
|
||||
$product = fixer::input('post')->setIF($acl == 'open', 'whitelist', '')
|
||||
$product = fixer::input('post')->setIF($data->rawdata->acl == 'open', 'whitelist', '')
|
||||
->stripTags($this->config->product->editor->edit['id'], $this->config->allowedTags)
|
||||
->remove('uid,changeProjects,contactListMenu')
|
||||
->get();
|
||||
|
||||
return $this->loadModel('file')->processImgURL($product, $this->config->product->editor->edit['id'], $uid);
|
||||
return $this->loadModel('file')->processImgURL($product, $this->config->product->editor->edit['id'], zget($data->rawdata, 'uid', ''));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+6
-34
@@ -156,12 +156,10 @@ fields:
|
||||
format: ""
|
||||
- field: openedDate
|
||||
note: "创建日期"
|
||||
from: common.date.v1.yaml
|
||||
use: dateA
|
||||
prefix: ""
|
||||
range: "(M)-(w)"
|
||||
type: timestamp
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
format: "YY/MM/DD"
|
||||
- field: assignedTo
|
||||
note: "指派给"
|
||||
fields:
|
||||
@@ -175,12 +173,10 @@ fields:
|
||||
format: ""
|
||||
- field: assignedDate
|
||||
note: "指派日期"
|
||||
from: common.date.v1.yaml
|
||||
use: dateA
|
||||
prefix: ""
|
||||
range: "(M)-(w)"
|
||||
type: timestamp
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
format: "YY/MM/DD"
|
||||
- field: lastEditedBy
|
||||
note: "最后修改者"
|
||||
from: common.user.v1.yaml
|
||||
@@ -189,14 +185,6 @@ fields:
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: lastEditedDate
|
||||
note: "最后修改日期"
|
||||
from: common.date.v1.yaml
|
||||
use: dateA
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: reviewedBy
|
||||
note: "评审者"
|
||||
fields:
|
||||
@@ -207,14 +195,6 @@ fields:
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
format: ""
|
||||
- field: reviewedDate
|
||||
note: "评审日期"
|
||||
from: common.date.v1.yaml
|
||||
use: dateA
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: closedBy
|
||||
note: "关闭者"
|
||||
fields:
|
||||
@@ -226,14 +206,6 @@ fields:
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: closedDate
|
||||
note: "关闭日期"
|
||||
from: common.date.v1.yaml
|
||||
use: dateA
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: closedReason
|
||||
note: "关闭原因"
|
||||
range: done,subdivided,duplicate,postponed,willnotdo,cancel,bydesign
|
||||
|
||||
+1
-1
@@ -125,7 +125,7 @@ function zdRun($isDev = false)
|
||||
$zdRoot = dirname(dirname(__FILE__)) . '/data/';
|
||||
if($isDev === true)
|
||||
{
|
||||
if(isset($config->db->devDbName)) $dao->exec("use {$config->db->devDbName};");
|
||||
if(isset($config->db->devDbName)) $dao->exec("set global sql_mode = ''; set global max_allowed_packet = 1000000000; set global net_buffer_length = 10000000; use {$config->db->devDbName};");
|
||||
$zdRoot = dirname(dirname(__FILE__)) . "/devdata/";
|
||||
}
|
||||
|
||||
|
||||
+11
-4
@@ -833,8 +833,15 @@ function getPageTemplate(info)
|
||||
|
||||
lines.unshift(
|
||||
'<?php',
|
||||
'declare(strict_types=1);',
|
||||
'/**',
|
||||
` * The ${info.methodName} view of ${info.moduleName} of ZenTaoPMS.`,
|
||||
` * The ${info.methodName} view file of ${info.moduleName} module of ZenTaoPMS.`,
|
||||
' *',
|
||||
' * @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)',
|
||||
' * @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)',
|
||||
' * @author yourname<yourname@easycorp.ltd>',
|
||||
` * @package ${info.moduleName}`,
|
||||
' * @link http://www.zentao.net',
|
||||
' */',
|
||||
'',
|
||||
'/*',
|
||||
@@ -844,12 +851,12 @@ function getPageTemplate(info)
|
||||
'',
|
||||
` + Familiar with the use of these widgets in zin: ${widgets.join(', ')}.`,
|
||||
variables.length ? ` + Check the following variables which used in widgets: ${variables.map(x => `$${x}`).join(', ')}.` : null,
|
||||
featureBar.items && featureBar.items.length ? ` + Check the ${featureBar.items.length.length} items difinition in featureBar widget.` : null,
|
||||
toolbar && toolbar.length ? ` + Check the ${toolbar.length} items difinition in toolbar widget.` : null,
|
||||
featureBar.items && featureBar.items.length ? ` + Check the ${featureBar.items.length} items definition in featureBar widget.` : null,
|
||||
toolbar && toolbar.length ? ` + Check the ${toolbar.length} items definition in toolbar widget.` : null,
|
||||
` + Check the origin code in module/${info.moduleName}/view/${info.methodName}.html.php, and ensure that all features have been implemented.`,
|
||||
` + Check the origin js code in module/${info.moduleName}/js/common.js and module/${info.moduleName}/js/${info.methodName}.js`,
|
||||
` + Check the origin css code in module/${info.moduleName}/css/common.css and module/${info.moduleName}/css/${info.methodName}.css`,
|
||||
' + Remove the comments which starts with "zin:"',
|
||||
' + Remove the comments which start with "zin:"',
|
||||
' + Test according to the new design draft and the original implementation',
|
||||
' */',
|
||||
'',
|
||||
|
||||
Reference in New Issue
Block a user