extension/ezjscore/classes/ajaxuploader/ezprelationlistajaxuploader.php
public function canUpload()
    {
        $access = eZUser::instance()->hasAccessTo( 'content', 'create' );
        if ( $access['accessWord'] === 'no' )
        {
            return false;
        }
        $ini = eZINI::instance( 'upload.ini' );
        $uploadableClassList = $ini->variable( 'CreateSettings', 'MimeClassMap' );
        $uploadableClassList[] = $ini->variable( 'CreateSettings', 'DefaultClass' );
        $classContent = $this->attribute->attribute( 'class_content' );

        $intersect = array_intersect( $classContent['class_constraint_list'], $uploadableClassList );
        if ( !empty( $classContent['class_constraint_list'] ) && empty( $intersect ) )
        {
            return false;
        }
        return true;
    }
public function canUpload()
    {
        $access = eZUser::instance()->hasAccessTo( 'content', 'create' );
        if ( $access['accessWord'] === 'no' )
        {
            return false;
        }
        $ini = eZINI::instance( 'upload.ini' );
        $uploadableClassList = $ini->variable( 'CreateSettings', 'MimeClassMap' );
        $uploadableClassList[] = $ini->variable( 'CreateSettings', 'DefaultClass' );
        $classContent = $this->attribute->attribute( 'class_content' );

        $intersect = array_intersect( $classContent['class_constraint_list'], $uploadableClassList );
        if ( !empty( $classContent['class_constraint_list'] ) && empty( $intersect ) )
        {
            return false;
        }
        return true;
    }
public function canUpload ( ) { $ access = eZUser :: instance ( ) -> hasAccessTo ( 'content' , 'create' ) ; if ( $ access [ 'accessWord' ] === 'no' ) { return false ; } $ ini = eZINI :: instance ( 'upload.ini' ) ; $ uploadableClassList = $ ini -> variable ( 'CreateSettings' , 'MimeClassMap' ) ; $ uploadableClassList [ ] = $ ini -> variable ( 'CreateSettings' , 'DefaultClass' ) ; $ classContent = $ this -> attribute -> attribute ( 'class_content' ) ; $ intersect = array_intersect ( $ classContent [ 'class_constraint_list' ] , $ uploadableClassList ) ; if ( ! empty ( $ classContent [ 'class_constraint_list' ] ) && empty ( $ intersect ) ) { return false ; } return true ; }
Checks if a file can be uploaded

@return boolean
Checks if a file can be uploaded