<commit_before><?php
class Vps_Form_Field_File extends Vps_Form_Field_SimpleAbstract
{
    private $_fields;

    public static function getSettings()
    {
        $ret = parent::getSettings();
        return $ret;
    }

    public function __construct($fieldname = null, $fieldLabel = null)
    {
        parent::__construct($fieldname, $fieldLabel);
        $this->setAllowBlank(true); //standardwert für getAllowBlank
        $this->setAllowOnlyImages(false);
        $this->setMaxResolution(false);
        $this->setXtype('swfuploadfield');
        $maxSize = ini_get('upload_max_filesize');
        if (strtolower(substr($maxSize, -1))=='k') {
            $maxSize = substr($maxSize, 0, -1)*1024;
        } else if (strtolower(substr($maxSize, -1))=='m') {
            $maxSize = substr($maxSize, 0, -1)*1024*1024;
        } else if (strtolower(substr($maxSize, -1))=='g') {
            $maxSize = substr($maxSize, 0, -1)*1024*1024*1024;
        }
        $this->setFileSizeLimit($maxSize.' B');
    }

    public function getMetaData($model)
    {
        $ret = parent::getMetaData($model);
        unset($ret['ruleKey']);
        return $ret;
    }

    public function load($row, $postData = array())
    {
        if ($this->getSave() === false || $this->getInternalSave() === false) {
            return array();<commit_msg>separate fehlermeldung fuer bildupload im frontend<commit_after><?php
class Vps_Form_Field_File extends Vps_Form_Field_SimpleAbstract
{
    private $_fields;

    public static function getSettings()
    {
        $ret = parent::getSettings();
        return $ret;
    }

    public function __construct($fieldname = null, $fieldLabel = null)
    {
        parent::__construct($fieldname, $fieldLabel);
        $this->setAllowBlank(true); //standardwert für getAllowBlank
        $this->setAllowOnlyImages(false);
        $this->setMaxResolution(false);
        $this->setXtype('swfuploadfield');
        $maxSize = ini_get('upload_max_filesize');
        if (strtolower(substr($maxSize, -1))=='k') {
            $maxSize = substr($maxSize, 0, -1)*1024;
        } else if (strtolower(substr($maxSize, -1))=='m') {
            $maxSize = substr($maxSize, 0, -1)*1024*1024;
        } else if (strtolower(substr($maxSize, -1))=='g') {
            $maxSize = substr($maxSize, 0, -1)*1024*1024*1024;
        }
        $this->setFileSizeLimit($maxSize.' B');
    }

    protected function _validateNotAllowBlank($data, $name)
    {
        $ret = array();
        $v = new Vps_Validate_NotEmpty();
        $v->setMessage(Vps_Validate_NotEmpty::IS_EMPTY, trlVps("Please choose a file"));
        if (!$v->isValid($data)) {
            $ret[] = $name.": ".implode("<br />\n", $v->getMessages());
        }
        return $ret;
    }

    public function getMetaData($model)
    {
        $ret = parent::getMetaData($model);
        unset($ret['ruleKey']);
        return $ret;
    }

    public function load($row, $postData = array())
    {
        if ($this->getSave() === false || $this->getInternalSave() === false) {
            return array();
{'fraction_non_alphanumeric': 0.16303994803507632, 'fraction_numerical': 0.02143553101656382, 'mean_word_length': 2.7288135593220337, 'pattern_counts': {'":': 1, '<': 6, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4787177', 'n_tokens_mistral': 1010, 'n_tokens_neox': 964, 'n_words': 181}