diff options
Diffstat (limited to 'plugins/Actions/DataTable/Filter/Actions.php')
-rw-r--r-- | plugins/Actions/DataTable/Filter/Actions.php | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/plugins/Actions/DataTable/Filter/Actions.php b/plugins/Actions/DataTable/Filter/Actions.php index c45716a98b..1295cae57e 100644 --- a/plugins/Actions/DataTable/Filter/Actions.php +++ b/plugins/Actions/DataTable/Filter/Actions.php @@ -54,29 +54,31 @@ class Actions extends BaseFilter } foreach ($dataTable->getRows() as $row) { - $url = $row->getMetadata('url'); - $pageTitlePath = $row->getMetadata('page_title_path'); - $folderUrlStart = $row->getMetadata('folder_url_start'); - $label = $row->getColumn('label'); - if ($url) { - $row->setMetadata('segmentValue', urldecode($url)); - } else if ($folderUrlStart) { - $row->setMetadata('segment', 'pageUrl=^' . urlencode(urlencode($folderUrlStart))); - } else if ($pageTitlePath) { - if ($row->getIdSubDataTable()) { - $row->setMetadata('segment', 'pageTitle=^' . urlencode(urlencode(trim(urldecode($pageTitlePath))))); - } else { - $row->setMetadata('segmentValue', trim(urldecode($pageTitlePath))); - } - } else if ($isPageTitleType && !in_array($label, [DataTable::LABEL_SUMMARY_ROW])) { - // for older data w/o page_title_path metadata - if ($row->getIdSubDataTable()) { - $row->setMetadata('segment', 'pageTitle=^' . urlencode(urlencode(trim(urldecode($label))))); - } else { - $row->setMetadata('segmentValue', trim(urldecode($label))); + if (!$row->isSummaryRow()) { + $url = $row->getMetadata('url'); + $pageTitlePath = $row->getMetadata('page_title_path'); + $folderUrlStart = $row->getMetadata('folder_url_start'); + $label = $row->getColumn('label'); + if ($url) { + $row->setMetadata('segmentValue', urldecode($url)); + } else if ($folderUrlStart) { + $row->setMetadata('segment', 'pageUrl=^' . urlencode(urlencode($folderUrlStart))); + } else if ($pageTitlePath) { + if ($row->getIdSubDataTable()) { + $row->setMetadata('segment', 'pageTitle=^' . urlencode(urlencode(trim(urldecode($pageTitlePath))))); + } else { + $row->setMetadata('segmentValue', trim(urldecode($pageTitlePath))); + } + } else if ($isPageTitleType && !in_array($label, [DataTable::LABEL_SUMMARY_ROW])) { + // for older data w/o page_title_path metadata + if ($row->getIdSubDataTable()) { + $row->setMetadata('segment', 'pageTitle=^' . urlencode(urlencode(trim(urldecode($label))))); + } else { + $row->setMetadata('segmentValue', trim(urldecode($label))); + } + } else if ($this->actionType == Action::TYPE_PAGE_URL && $urlPrefix) { // folder for older data w/ no folder URL metadata + $row->setMetadata('segment', 'pageUrl=^' . urlencode(urlencode($urlPrefix . '/' . $label))); } - } else if ($this->actionType == Action::TYPE_PAGE_URL && $urlPrefix) { // folder for older data w/ no folder URL metadata - $row->setMetadata('segment', 'pageUrl=^' . urlencode(urlencode($urlPrefix . '/' . $label))); } // remove the default action name 'index' in the end of flattened urls and prepend $actionDelimiter |