Hallo Tim
Danke für die Hooks-Tipps.
Das heisst ich kann über "$this->Input->post", das "FORM_SUBMIT" überprüfen? Oder wie genau?
So sieht die Überprüfung momentan aus:
PHP-Code:
class uploadCallback extends Frontend
{
public function logoUpload($arrItemData)
{
if($arrItemData['FORM_SUBMIT'] == 'tl_catalog_items')
{
//Mein Code
return $arrPost;
}
}
}
Mit dem "processFormData" würde es ja so aussehen.
PHP-Code:
class uploadCallback extends Frontend
{
public function logoUpload($arrPost, $arrForm, $arrFiles)
{
if($arrPost['FORM_SUBMIT'] == 'auto_form_11')
{
if(file_exists($arrFiles['logo']['tmp_name']))
{
$src = $arrFiles['logo']['tmp_name'];
$type = strchr($src, '.');
$path = substr($src, 0, strrpos($src, '/') );
$name = str_replace($type, '', $arrFiles['logo']['name'] );
$newName = 'logo-' . $name;
$newFile = $path . '/' . $newName . $type;
if($renamed)
{
$this->import('Input');
$this->Input->setPost('newFile', $newFile);
}
}
return $arrPost;
}
}
}
Danke für die Hilfe!
@schman
Danke für den Link, kannte ich schon.
Lesezeichen