mirror of
https://github.com/silverstripe/silverstripe-comments
synced 2024-10-22 11:05:49 +02:00
MINOR: updated isAjax() calls to 3.0 compatible api
This commit is contained in:
parent
0adf17d363
commit
6d1c5f2b30
@ -61,11 +61,11 @@ class CommentingController extends Controller {
|
||||
if($comment && $comment->canDelete()) {
|
||||
$comment->delete();
|
||||
|
||||
return ($this->isAjax()) ? true : $this->redirectBack();
|
||||
return ($this->request->isAjax()) ? true : $this->redirectBack();
|
||||
}
|
||||
}
|
||||
|
||||
return ($this->isAjax()) ? false : $this->httpError('404');
|
||||
return ($this->request->isAjax()) ? false : $this->httpError('404');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -27,13 +27,6 @@ class CommentAdminTest extends FunctionalTest {
|
||||
}
|
||||
|
||||
function testdeletemarked(){
|
||||
$comm = $this->objFromFixture('Comment', 'firstComA');
|
||||
$id = $comm->ID;
|
||||
$this->logInWithPermission('CMS_ACCESS_CommentAdmin');
|
||||
$result = $this->get("admin/comments/EditForm/field/Comments/item/$id/delete");
|
||||
|
||||
$checkComm = DataObject::get_by_id('Comment',$id);
|
||||
|
||||
$this->assertFalse($checkComm);
|
||||
$this->markTestIncomplete("TODO");
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user