mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
Merge pull request #32 from dhensby/pulls/3.4/fix-hardcoded-admin-url
FIX No longer hardcoding admin links
This commit is contained in:
commit
9c124f1d53
@ -144,10 +144,10 @@ class SS_Report extends ViewableData {
|
|||||||
|
|
||||||
public function getLink($action = null) {
|
public function getLink($action = null) {
|
||||||
return Controller::join_links(
|
return Controller::join_links(
|
||||||
'admin/reports/',
|
Config::inst()->get('AdminRootController', 'url_base'),
|
||||||
"$this->class",
|
Config::inst()->get('ReportAdmin', 'url_segment'),
|
||||||
'/', // trailing slash needed if $action is null!
|
get_class($this),
|
||||||
"$action"
|
$action
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
*/
|
*/
|
||||||
class ReportTest extends SapphireTest {
|
class ReportTest extends SapphireTest {
|
||||||
|
|
||||||
|
protected $usesDatabase = true;
|
||||||
|
|
||||||
public function testGetReports() {
|
public function testGetReports() {
|
||||||
$reports = SS_Report::get_reports();
|
$reports = SS_Report::get_reports();
|
||||||
$this->assertNotNull($reports, "Reports returned");
|
$this->assertNotNull($reports, "Reports returned");
|
||||||
|
Loading…
Reference in New Issue
Block a user