Merge pull request #32 from dhensby/pulls/3.4/fix-hardcoded-admin-url

FIX No longer hardcoding admin links
This commit is contained in:
Will Rossiter 2016-06-10 08:40:05 +12:00 committed by GitHub
commit 9c124f1d53
2 changed files with 6 additions and 4 deletions

View File

@ -144,10 +144,10 @@ class SS_Report extends ViewableData {
public function getLink($action = null) {
return Controller::join_links(
'admin/reports/',
"$this->class",
'/', // trailing slash needed if $action is null!
"$action"
Config::inst()->get('AdminRootController', 'url_base'),
Config::inst()->get('ReportAdmin', 'url_segment'),
get_class($this),
$action
);
}

View File

@ -6,6 +6,8 @@
*/
class ReportTest extends SapphireTest {
protected $usesDatabase = true;
public function testGetReports() {
$reports = SS_Report::get_reports();
$this->assertNotNull($reports, "Reports returned");