Issue Bug Closed

#24032The content object type EDITPANEL is missing, causing pi_getEditPanel to break.

Björn Pedersen 11/12/10, 15:22 updated 03/29/11, 23:42

Description

pi_getEditPanel return a blank string, as EDITPANEL is not available as cObj anymore.

the pibase function can be rewritten as:
function pi_getEditPanel($row=’‘,$tablename=’‘,$label=’‘,$conf=Array()) {
$panel=’‘;
if (!$row || !$tablename) {
$row = $this->internal[‘currentRow’];
$tablename = $this->internal[‘currentTable’];
}

if ($GLOBALS[‘TSFE’]->beUserLogin)    {
// Create local cObj if not set:
if (!is_object($this->pi_EPtemp_cObj)) {
$this->pi_EPtemp_cObj = t3lib_div::makeInstance(‘tslib_cObj’);
$this->pi_EPtemp_cObj->setParent($this->cObj->data,$this->cObj->currentRecord);
}
        // Initialize the cObj object with current row
$this->pi_EPtemp_cObj->start($row,$tablename);
$this->pi_EPtemp_cObj->data=$this->internal;
// Setting TypoScript values in the $conf array. See documentation in TSref for the EDITPANEL cObject.
if (empty($conf[‘allow’])){
$conf[‘allow’] = ‘edit,new,delete,move,hide’;
}
$panel = $this->pi_EPtemp_cObj->editPanel(‘’,$conf);
}
if ($panel)    {
if ($label) {
return ‘<!— BEGIN: EDIT PANEL —><table border=“0” cellpadding=“0” cellspacing=“0” width=“100%”><tr><td valign=“top”>’.$label.’</td><td valign=“top” align=“right”>’.$panel.’</td></tr></table><!— END: EDIT PANEL —>’;
} else return ‘<!— BEGIN: EDIT PANEL —>’.$panel.’<!— END: EDIT PANEL —>’;
} else return $label;
}
(issue imported from #M16364)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.