* Finish task #8892.

This commit is contained in:
tianshujie98
2020-12-31 17:22:30 +08:00
parent af1dc88f0f
commit 5971d3f98c
6 changed files with 5 additions and 20 deletions
-1
View File
@@ -147,7 +147,6 @@ $lang->product->checkedSummary = " <strong>%total%</strong> geprüft, <strong>%e
$lang->product->noModule = '<div>Kein Modul</div><div>Jetzt verwalten</div>';
$lang->product->noProduct = 'Kein Produkt. ';
$lang->product->noMatched = '"%s" kann nicht gefunden werden.' . $lang->productCommon;
$lang->product->DuplicateOrder = "{$lang->productCommon}: The %s sort is duplicated with other {$lang->productCommon} sorts and will not be updated.";
$lang->product->featureBar['browse']['allstory'] = $lang->product->allStory;
$lang->product->featureBar['browse']['unclosed'] = $lang->product->unclosed;
-1
View File
@@ -147,7 +147,6 @@ $lang->product->checkedSummary = "<strong>%total%</strong> %storyCommon% selecte
$lang->product->noModule = '<div>You have no modules. </div><div>Manage Now</div>';
$lang->product->noProduct = "No {$lang->productCommon} yet. ";
$lang->product->noMatched = '"%s" cannot be found.' . $lang->productCommon;
$lang->product->DuplicateOrder = "{$lang->productCommon}: The %s sort is duplicated with other {$lang->productCommon} sorts and will not be updated.";
$lang->product->featureBar['browse']['allstory'] = $lang->product->allStory;
$lang->product->featureBar['browse']['unclosed'] = $lang->product->unclosed;
-1
View File
@@ -147,7 +147,6 @@ $lang->product->checkedSummary = "<strong>%total%</strong> %storyCommon% sélect
$lang->product->noModule = "<div>Vous n'avez aucun modules. </div><div>Gérer Maintenant</div>";
$lang->product->noProduct = "No {$lang->productCommon} à ce jour. ";
$lang->product->noMatched = '"%s" cannot be found.' . $lang->productCommon;
$lang->product->DuplicateOrder = "{$lang->productCommon}: The %s sort is duplicated with other {$lang->productCommon} sorts and will not be updated.";
$lang->product->featureBar['browse']['allstory'] = $lang->product->allStory;
$lang->product->featureBar['browse']['unclosed'] = $lang->product->unclosed;
-1
View File
@@ -147,7 +147,6 @@ $lang->product->checkedSummary = "<strong>%total%</strong> stories selected, Esi
$lang->product->noModule = '<div>Chưa có Module. </div><div>Quản lý ngay</div>';
$lang->product->noProduct = "Không có {$lang->productCommon} nào.";
$lang->product->noMatched = '"%s" không thể tìm thấy ' . $lang->productCommon;
$lang->product->DuplicateOrder = "{$lang->productCommon}: The %s sort is duplicated with other {$lang->productCommon} sorts and will not be updated.";
$lang->product->featureBar['browse']['allstory'] = $lang->product->allStory;
$lang->product->featureBar['browse']['unclosed'] = $lang->product->unclosed;
-1
View File
@@ -147,7 +147,6 @@ $lang->product->checkedSummary = "选中 <strong>%total%</strong> 个%storyCommo
$lang->product->noModule = "<div>您现在还没有模块信息</div><div>请维护{$lang->productCommon}模块</div>";
$lang->product->noProduct = "暂时没有{$lang->productCommon}。";
$lang->product->noMatched = '找不到包含"%s"的' . $lang->productCommon;
$lang->product->DuplicateOrder = "{$lang->productCommon} :%s排序与其他{$lang->productCommon}排序重复,将不会被更新。";
$lang->product->featureBar['browse']['allstory'] = $lang->product->allStory;
$lang->product->featureBar['browse']['unclosed'] = $lang->product->unclosed;
+5 -15
View File
@@ -608,13 +608,11 @@ class productModel extends model
*/
public function batchUpdate()
{
$products = array();
$allChanges = array();
$data = fixer::input('post')->get();
$oldProducts = $this->getByIdList($this->post->productIDList);
$nameList = array();
$message = '';
$productOrders = $this->dao->select("`id`,`order`")->from(TABLE_PRODUCT)->fetchPairs();
$products = array();
$allChanges = array();
$data = fixer::input('post')->get();
$oldProducts = $this->getByIdList($this->post->productIDList);
$nameList = array();
foreach($data->productIDList as $productID)
{
$productName = $data->names[$productID];
@@ -634,16 +632,8 @@ class productModel extends model
/* Check unique name for edited products. */
if(isset($nameList[$productName])) dao::$errors['name'][] = 'product#' . $productID . sprintf($this->lang->error->unique, $this->lang->product->name, $productName);
$nameList[$productName] = $productName;
/* Check unique order for edited products. */
foreach($productOrders as $id => $productOrder)
{
if($id == $productID) continue;
if($productOrder == $data->orders[$productID]) $message .= sprintf($this->lang->product->DuplicateOrder, $productID);
}
}
if(dao::isError()) die(js::error(dao::getError()));
if($message) echo js::alert($message);
foreach($products as $productID => $product)
{