DroidHost
Well-known member
I do want to Extend Attachment model to alter a function ... Constraints ....
so did this :
but it seems not working ...
I do this to Test the function ,,,
I do change this line
'size' => $options->attachmentMaxFileSize * 1024,
to
'size' => $options->attachmentMaxFileSize * 0,
in the original[Core] file not that of my addon ...
It should not be able to upload ,,,
but I could ,,,,
what is wrong ?
so did this :
PHP:
class Demo_Model Extends XFCP_Demo_Model {
public function getAttachmentConstraints()
{
$params = parent::getAttachmentConstraints();
return array(
'extensions' => preg_split('/\s+/', trim($options->attachmentExtensions)),
'size' => $options->attachmentMaxFileSize * 1024,
'width' => $options->attachmentMaxDimensions['width'],
'height' => $options->attachmentMaxDimensions['height'],
'count' => $options->attachmentMaxPerMessage
);
}
}
but it seems not working ...
I do this to Test the function ,,,
I do change this line
'size' => $options->attachmentMaxFileSize * 1024,
to
'size' => $options->attachmentMaxFileSize * 0,
in the original[Core] file not that of my addon ...
It should not be able to upload ,,,
but I could ,,,,
what is wrong ?