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:
Ingo Schommer 2008-03-11 00:39:15 +00:00
parent 04854f30d0
commit e33eb26243

View File

@ -79,14 +79,14 @@ class ReportAdmin extends LeftAndMain {
}
protected function showWithEditForm( $params, $editForm ) {
if($params['ID']) {
if(isset($params['ID'])) {
Session::set('currentPage', $params['ID']);
}
if($params['OtherID']) {
if(isset($params['OtherID'])) {
Session::set('currentOtherID', $params['OtherID']);
}
if($_REQUEST['ajax']) {
if(Director::is_ajax()) {
SSViewer::setOption('rewriteHashlinks', false);
$result = $this->customise( array( 'EditForm' => $editForm ) )->renderWith($this->getTemplatesWithSuffix("_right"));
return $this->getLastFormIn($result);
@ -120,10 +120,7 @@ class ReportAdmin extends LeftAndMain {
public function getReportEditForm($id){
if(is_numeric($id))
$page = DataObject::get_by_id("SiteTree", $id);
if($page) $reportClass = "Report_".$page->ClassName;
if(!$reportClass)
$reportClass = $id;
$reportClass = (isset($page)) ? "Report_".$page->ClassName : $id;
$obj = new $reportClass();
$fields = $obj->getCMSFields();