mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
formatting, fixed PHP notices
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@50829 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
04854f30d0
commit
e33eb26243
@ -79,14 +79,14 @@ class ReportAdmin extends LeftAndMain {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected function showWithEditForm( $params, $editForm ) {
|
protected function showWithEditForm( $params, $editForm ) {
|
||||||
if($params['ID']) {
|
if(isset($params['ID'])) {
|
||||||
Session::set('currentPage', $params['ID']);
|
Session::set('currentPage', $params['ID']);
|
||||||
}
|
}
|
||||||
if($params['OtherID']) {
|
if(isset($params['OtherID'])) {
|
||||||
Session::set('currentOtherID', $params['OtherID']);
|
Session::set('currentOtherID', $params['OtherID']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($_REQUEST['ajax']) {
|
if(Director::is_ajax()) {
|
||||||
SSViewer::setOption('rewriteHashlinks', false);
|
SSViewer::setOption('rewriteHashlinks', false);
|
||||||
$result = $this->customise( array( 'EditForm' => $editForm ) )->renderWith($this->getTemplatesWithSuffix("_right"));
|
$result = $this->customise( array( 'EditForm' => $editForm ) )->renderWith($this->getTemplatesWithSuffix("_right"));
|
||||||
return $this->getLastFormIn($result);
|
return $this->getLastFormIn($result);
|
||||||
@ -120,12 +120,9 @@ class ReportAdmin extends LeftAndMain {
|
|||||||
public function getReportEditForm($id){
|
public function getReportEditForm($id){
|
||||||
if(is_numeric($id))
|
if(is_numeric($id))
|
||||||
$page = DataObject::get_by_id("SiteTree", $id);
|
$page = DataObject::get_by_id("SiteTree", $id);
|
||||||
if($page) $reportClass = "Report_".$page->ClassName;
|
$reportClass = (isset($page)) ? "Report_".$page->ClassName : $id;
|
||||||
|
|
||||||
if(!$reportClass)
|
$obj = new $reportClass();
|
||||||
$reportClass = $id;
|
|
||||||
|
|
||||||
$obj = new $reportClass();
|
|
||||||
$fields = $obj->getCMSFields();
|
$fields = $obj->getCMSFields();
|
||||||
|
|
||||||
$fields->push($idField = new HiddenField("ID"));
|
$fields->push($idField = new HiddenField("ID"));
|
||||||
|
Loading…
Reference in New Issue
Block a user