Fork me on GitHub

Résultats CPD

Le document suivant contient les résultats de l'inspection CPD CPD 6.13.0.

Duplicatas

Fichier Ligne
fr/paris/lutece/plugins/campagnebp/web/MyInfosXPage.java 678
fr/paris/lutece/plugins/campagnebp/web/MyInfosXPage.java 1063
                populate( myAccountForm, request );

                if ( isEnableCaptcha( ) )
                {

                    if ( !_captchaService.validate( request ) )
                    {
                        bCapchaVerified = false;
                        addError( MESSAGE_CAPTCHA_NOT_VALIDATED, getLocale( request ) );
                    }
                }

                // !SecurityTokenService.getInstance().validate(request,
                // MyInfosXPage.TOKEN_DO_SAVE_MY_INFOS)

                // Check constraints
                bError = !bCapchaVerified || !validateBean( form, getLocale( request ) );

                if ( !CampagnesService.getInstance( ).isDuring( Constants.VOTE ) && StringUtils.isBlank( form.getNickname( ) ) )
                {
                    bError = true;
                    addError( MESSAGE_ERROR_NICKNAME_MISSING, getLocale( request ) );
                }

                if ( !bError && !MyInfosService.setAdressValid( form ) )
                {
                    bError = true;
                    addError( MESSAGE_ERROR_ADRESS_GEOLOC_FORMAT, getLocale( request ) );
                }

                if ( !bError && ( form.getNickname( ) != null
                        && ( MyInfosService.loadUserNickname( user.getName( ) ) != null
                                && !form.getNickname( ).equals( MyInfosService.loadUserNickname( user.getName( ) ) )
                                || MyInfosService.loadUserNickname( user.getName( ) ) == null )
                        && MyInfosService.isNicknameAlreadyExist( form.getNickname( ) ) ) )
                {
                    bError = true;
                    addError( MESSAGE_ERROR_NICKNAME_ALREADY_EXIST, getLocale( request ) );
                }

                if ( !bError )
                {

                    if ( MyInfosService.mustSendAccountValidationMail( user.getName( ), form ) )
                    {
                        // Add message if a mail have been send to the user
                        if ( MyInfosService.sendAccountValidationMail( request, getLocale( request ), user.getName( ) ) )
                        {
                            addInfo( INFO_VALIDATION_MAIL_SEND, getLocale( request ) );

                        }
                        else
                        {
                            bError = true;
                            addError( ERROR_DURING_VALIDATION_MAIL_SEND, getLocale( request ) );

                        }

                    }
Fichier Ligne
fr/paris/lutece/plugins/campagnebp/business/CampagneThemeDAO.java 98
fr/paris/lutece/plugins/campagnebp/business/CampagneThemeDAO.java 181
        campagneTheme.setId( newPrimaryKey( plugin ) );

        daoUtil.setInt( nCpt++, campagneTheme.getId( ) );
        daoUtil.setString( nCpt++, campagneTheme.getCodeCampagne( ) );
        daoUtil.setString( nCpt++, campagneTheme.getCode( ) );
        daoUtil.setString( nCpt++, campagneTheme.getTitle( ) );
        daoUtil.setString( nCpt++, campagneTheme.getDescription( ) );
        daoUtil.setBoolean( nCpt++, campagneTheme.getActive( ) );
        File image = campagneTheme.getImage( );
        if ( image != null )
        {
            daoUtil.setInt( nCpt++, image.getIdFile( ) );
        }
        else
        {
            daoUtil.setIntNull( nCpt++ );
        }

        daoUtil.executeUpdate( );