* Optimize convert2Pinyin, and cache executions for bug browse.
This commit is contained in:
+11
-2
@@ -164,8 +164,17 @@ class bug extends control
|
||||
if($this->app->getViewType() == 'mhtml' || $this->app->getViewType() == 'xhtml') $recPerPage = 10;
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
|
||||
/* Get executios. */
|
||||
$executions = $this->loadModel('execution')->getPairs($this->projectID, 'all', 'empty|withdelete|hideMultiple');
|
||||
/* Get executions. */
|
||||
$cacheKey = "bugBrowse{$this->projectID}";
|
||||
if($this->config->cache->enable && $this->cache->has($cacheKey))
|
||||
{
|
||||
$executions = $this->cache->get($cacheKey);
|
||||
}
|
||||
else
|
||||
{
|
||||
$executions = $this->loadModel('execution')->getPairs($this->projectID, 'all', 'empty|withdelete|hideMultiple');
|
||||
if($this->config->cache->enable) $this->cache->set($cacheKey, $executions);
|
||||
}
|
||||
|
||||
/* Get product id list. */
|
||||
$productIDList = $productID ? $productID : array_keys($this->products);
|
||||
|
||||
@@ -2869,11 +2869,14 @@ EOF;
|
||||
$itemsPinYin = explode(trim($sign), $convertedPinYin);
|
||||
foreach($notConvertedItems as $item)
|
||||
{
|
||||
$itemPinYin = array_shift($itemsPinYin);
|
||||
$key = key($itemsPinYin);
|
||||
$itemPinYin = $itemsPinYin[$key];
|
||||
unset($itemsPinYin[$key]);
|
||||
|
||||
$wordsPinYin = explode("\t", trim($itemPinYin));
|
||||
|
||||
$abbr = '';
|
||||
foreach($wordsPinYin as $i => $wordPinyin)
|
||||
foreach($wordsPinYin as $wordPinyin)
|
||||
{
|
||||
if($wordPinyin)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user