From 5971d3f98cc4303538abe6ee8e2113c4ee37149d Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Thu, 31 Dec 2020 17:22:30 +0800 Subject: [PATCH] * Finish task #8892. --- module/product/lang/de.php | 1 - module/product/lang/en.php | 1 - module/product/lang/fr.php | 1 - module/product/lang/vi.php | 1 - module/product/lang/zh-cn.php | 1 - module/product/model.php | 20 +++++--------------- 6 files changed, 5 insertions(+), 20 deletions(-) diff --git a/module/product/lang/de.php b/module/product/lang/de.php index dd1276ac83..bfa8e3a64b 100644 --- a/module/product/lang/de.php +++ b/module/product/lang/de.php @@ -147,7 +147,6 @@ $lang->product->checkedSummary = " %total% geprüft, %e $lang->product->noModule = '
Kein Modul
Jetzt verwalten
'; $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; diff --git a/module/product/lang/en.php b/module/product/lang/en.php index 8bbc87d114..79e8216bed 100644 --- a/module/product/lang/en.php +++ b/module/product/lang/en.php @@ -147,7 +147,6 @@ $lang->product->checkedSummary = "%total% %storyCommon% selecte $lang->product->noModule = '
You have no modules.
Manage Now
'; $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; diff --git a/module/product/lang/fr.php b/module/product/lang/fr.php index 6bfc1d7ffa..fbb395dbca 100644 --- a/module/product/lang/fr.php +++ b/module/product/lang/fr.php @@ -147,7 +147,6 @@ $lang->product->checkedSummary = "%total% %storyCommon% sélect $lang->product->noModule = "
Vous n'avez aucun modules.
Gérer Maintenant
"; $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; diff --git a/module/product/lang/vi.php b/module/product/lang/vi.php index 685ba571d0..fc20ce295a 100644 --- a/module/product/lang/vi.php +++ b/module/product/lang/vi.php @@ -147,7 +147,6 @@ $lang->product->checkedSummary = "%total% stories selected, Esi $lang->product->noModule = '
Chưa có Module.
Quản lý ngay
'; $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; diff --git a/module/product/lang/zh-cn.php b/module/product/lang/zh-cn.php index 335600f536..362c05fb44 100644 --- a/module/product/lang/zh-cn.php +++ b/module/product/lang/zh-cn.php @@ -147,7 +147,6 @@ $lang->product->checkedSummary = "选中 %total% 个%storyCommo $lang->product->noModule = "
您现在还没有模块信息
请维护{$lang->productCommon}模块
"; $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; diff --git a/module/product/model.php b/module/product/model.php index 69be5ed6ed..0ec783bc04 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -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) {