Commit 2ab0b286 authored by Robert Lyon's avatar Robert Lyon

Bug 1827966: HTML export folder index pages not generated

Problem with trying to use expression as variable

behatnotneeded

Change-Id: I58409ab8373b9db8af9bc1a2b682995e3722f140
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent d094f841
......@@ -201,11 +201,11 @@ class HtmlExportFile extends HtmlExportArtefactPlugin {
*/
private function prepare_artefacts_for_smarty($parent, $folders) {
$data = array();
$equality = ($folders) ? '==' : '!=';
$parent = (is_null($parent)) ? 'null': intval($parent);
$parent = (is_null($parent)) ? null : intval($parent);
$this_owner = $this->owner;
$artefacts = array_filter($this->artefactdata, function($a) use ($parent, $equality, $this_owner) {
if ($a->get("parent") == $parent && $a->get("artefacttype") . $equality . "folder" && $a->get("owner") == $this_owner) { return true; };
$artefacts = array_filter($this->artefactdata, function($a) use ($parent, $folders, $this_owner) {
if (($folders && $a->get("parent") == $parent && $a->get("artefacttype") == "folder" && $a->get("owner") == $this_owner) ||
(!$folders && $a->get("parent") == $parent && $a->get("artefacttype") != "folder" && $a->get("owner") == $this_owner)) { return true; };
});
foreach ($artefacts as $artefact) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment