MINOR: updated isAjax() calls to 3.0 compatible api

This commit is contained in:
Will Rossiter 2012-06-02 09:34:35 +12:00
parent 0adf17d363
commit 6d1c5f2b30
2 changed files with 3 additions and 10 deletions

View File

@ -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');
}
/**

View File

@ -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");
}
}