* [bug #56017, done, 1h] support for displaying nested execution libs in sidebar.
This commit is contained in:
+11
-6
@@ -1808,7 +1808,8 @@ class docModel extends model
|
||||
{
|
||||
$lib->docs = isset($docCounts[$lib->id]) ? $docCounts[$lib->id] : 0;
|
||||
if($lib->type != 'execution') continue;
|
||||
$executionLibs[$lib->execution] = $lib;
|
||||
if(!isset($executionLibs[$lib->execution])) $executionLibs[$lib->execution] = array();
|
||||
$executionLibs[$lib->execution][] = $lib;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1816,10 +1817,13 @@ class docModel extends model
|
||||
{
|
||||
$executionPairs = $this->dao->select('id,name')->from(TABLE_EXECUTION)->where('id')->in(array_keys($executionLibs))->fetchPairs();
|
||||
|
||||
foreach($executionLibs as &$lib)
|
||||
foreach($executionLibs as $executionID => &$libList)
|
||||
{
|
||||
$lib->originName = $lib->name;
|
||||
$lib->name = $executionPairs[$lib->execution] . '/' . $lib->name;
|
||||
foreach($libList as &$lib)
|
||||
{
|
||||
$lib->originName = $lib->name;
|
||||
$lib->name = $executionPairs[$executionID] . '/' . $lib->name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1853,8 +1857,9 @@ class docModel extends model
|
||||
foreach($libs as &$lib)
|
||||
{
|
||||
if($lib->type != 'execution') continue;
|
||||
$lib->originName = $lib->name;
|
||||
$lib->name = $executionPairs[$lib->execution];
|
||||
$lib->originName = $lib->name;
|
||||
$lib->executionName = $executionPairs[$lib->execution];
|
||||
$lib->name = $lib->executionName;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user