diff --git a/code/reports/PagesDueForReviewReport.php b/code/reports/PagesDueForReviewReport.php
index 2c132b9..c4241ff 100644
--- a/code/reports/PagesDueForReviewReport.php
+++ b/code/reports/PagesDueForReviewReport.php
@@ -43,12 +43,15 @@ class PagesDueForReviewReport extends SS_Report {
*/
public function columns() {
- $linkBase = singleton('CMSPageEditController')->Link('show') . '/';
+ $linkBase = singleton('CMSPageEditController')->Link('show');
+ $linkPath = parse_url($linkBase, PHP_URL_PATH);
+ $linkQuery = parse_url($linkBase, PHP_URL_QUERY);
+
$fields = array(
'Title' => array(
'title' => 'Page name',
- 'formatting' => '$value'
+ 'formatting' => sprintf('$value', $linkPath, $linkQuery)
),
'NextReviewDate' => array(
'title' => 'Review Date',
@@ -85,13 +88,19 @@ class PagesDueForReviewReport extends SS_Report {
),
'ContentReviewType' => array(
'title' => 'Settings are',
- 'formatting' => function($value, $item) use($linkBase) {
+ 'formatting' => function($value, $item) use($linkPath, $linkQuery) {
if($item->ContentReviewType == 'Inherit') {
$options = $item->getOptions();
if($options && $options instanceof SiteConfig) {
return 'Inherited from Settings';
} elseif($options) {
- return 'Inherited from '.$options->Title.'';
+ return sprintf(
+ 'Inherited from %s',
+ $linkPath,
+ $options->ID,
+ $linkQuery,
+ $options->Title
+ );
}
}
return $value;
diff --git a/code/reports/PagesWithoutReviewScheduleReport.php b/code/reports/PagesWithoutReviewScheduleReport.php
index c9381ca..88c101f 100644
--- a/code/reports/PagesWithoutReviewScheduleReport.php
+++ b/code/reports/PagesWithoutReviewScheduleReport.php
@@ -31,11 +31,14 @@ class PagesWithoutReviewScheduleReport extends SS_Report {
* @return array
*/
public function columns() {
- $linkBase = singleton('CMSPageEditController')->Link('show') . '/';
+ $linkBase = singleton('CMSPageEditController')->Link('show');
+ $linkPath = parse_url($linkBase, PHP_URL_PATH);
+ $linkQuery = parse_url($linkBase, PHP_URL_QUERY);
+
$fields = array(
'Title' => array(
'title' => 'Page name',
- 'formatting' => '$value'
+ 'formatting' => sprintf('$value', $linkPath, $linkQuery)
),
'NextReviewDate' => array(
'title' => 'Review Date',
@@ -59,13 +62,19 @@ class PagesWithoutReviewScheduleReport extends SS_Report {
),
'ContentReviewType' => array(
'title' => 'Settings are',
- 'formatting' => function($value, $item) use($linkBase) {
+ 'formatting' => function($value, $item) use($linkPath, $linkQuery) {
if($item->ContentReviewType == 'Inherit') {
$options = $item->getOptions();
if($options && $options instanceof SiteConfig) {
return 'Inherited from Settings';
} elseif($options) {
- return 'Inherited from '.$options->Title.'';
+ return sprintf(
+ 'Inherited from %s',
+ $linkPath,
+ $options->ID,
+ $linkQuery,
+ $options->Title
+ );
}
}
return $value;