Plugin Directory

Changeset 2008380


Ignore:
Timestamp:
01/08/2019 11:59:46 AM (7 years ago)
Author:
bseddon
Message:

Removed lines 41-49 from new-submission.php as they are redundant and the use of constants on line 42 causes a warning message to be written to the log file.

Location:
vat-moss/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • vat-moss/trunk/includes/admin/new-submission.php

    r1513665 r2008380  
    3939    }
    4040
    41     $state = get_post_status( $submission_id );
    42     if ( ( $state === STATE_SUBMITTED || $state === STATE_ACKNOWLEDGED ) && ! $read_only )
    43     {
    44         // @codingStandardsIgnoreStart
    45         echo "<div class='error'><p>" . __('This action is not valid on a submission that is complete or acknowledged.', 'vat_moss' ) . "</p></div>";
    46         // @codingStandardsIgnoreEnd
    47         show_submissions();
    48         return;
    49     }
     41    // $state = get_post_status( $submission_id );
     42    // if ( ( $state === STATE_SUBMITTED || $state === STATE_ACKNOWLEDGED ) && ! $read_only )
     43    // {
     44    // // @codingStandardsIgnoreStart
     45    // echo "<div class='error'><p>" . __('This action is not valid on a submission that is complete or acknowledged.', 'vat_moss' ) . "</p></div>";
     46    // // @codingStandardsIgnoreEnd
     47    // show_submissions();
     48    // return;
     49    // }
    5050
    5151    advert( 'wordpress-vat-moss-reporting', VAT_MOSS_VERSION, function() use( $from_year, $from_month, $to_year, $to_month, $submission_id, $read_only ) {
  • vat-moss/trunk/includes/class-html-elements.php

    r1917780 r2008380  
    6565     */
    6666    public function quarter_dropdown( $name = 'quarter', $selected = 0 ) {
    67    
     67
    6868        $current_quarter = floor((date('m') - 1) / 3) + 1;
    6969        $Q = __('Q', 'vat_moss');
     
    153153        }
    154154
    155         $output = '<select name="' . esc_attr( $args[ 'name' ] ) . '" id="' . esc_attr( sanitize_key( str_replace( '-', '_', $args[ 'id' ] ) ) ) . '" class="edd-select ' . esc_attr( $args[ 'class'] ) . '"' . $multiple . '>';
    156 
    157         if ( ! empty( $args[ 'options' ] ) ) {
    158             if ( $args[ 'show_option_all' ] ) {
    159                 if( $args['multiple'] ) {
     155        $output = '<select name="' . esc_attr( $args[ 'name' ] ) . '" id="' . esc_attr( sanitize_key( str_replace( '-', '_', $args[ 'id' ] ) ) ) . '" class="vat-moss-select ' . esc_attr( $args[ 'class'] ) . '"' . $multiple . '>';
     156
     157        if ( ! empty( $args[ 'options' ] ) )
     158        {
     159            if ( $args[ 'show_option_all' ] )
     160            {
     161                if( $args['multiple'] )
     162                {
    160163                    $selected = selected( true, in_array( 0, $args['selected'] ), false );
    161                 } else {
     164                }
     165                else
     166                {
    162167                    $selected = selected( $args['selected'], 0, false );
    163168                }
     
    165170            }
    166171
    167             if ( $args[ 'show_option_none' ] ) {
    168                 if( $args['multiple'] ) {
     172            if ( $args[ 'show_option_none' ] )
     173            {
     174                if( $args['multiple'] )
     175                {
    169176                    $selected = selected( true, in_array( -1, $args['selected'] ), false );
    170                 } else {
     177                }
     178                else
     179                {
    171180                    $selected = selected( $args['selected'], -1, false );
    172181                }
     
    174183            }
    175184
    176             foreach( $args[ 'options' ] as $key => $option ) {
    177 
    178                 if( $args['multiple'] && is_array( $args['selected'] ) ) {
     185            foreach( $args[ 'options' ] as $key => $option )
     186            {
     187                if( $args['multiple'] && is_array( $args['selected'] ) )
     188                {
    179189                    $selected = selected( true, in_array( $key, $args['selected'] ), false );
    180                 } else {
     190                }
     191                else
     192                {
    181193                    $selected = selected( $args['selected'], $key, false );
    182194                }
  • vat-moss/trunk/readme.txt

    r1917780 r2008380  
    66Requires at least: 3.9.2
    77Tested up to: 4.9.7
    8 Stable Tag: 1.0.28
     8Stable Tag: 1.0.29
    99License: GNU Version 2 or Any Later Version
    1010
     
    193193
    194194When used on the 31st of the month only months with 31 days are included in the period selection month dropdowns
     195
     196= 1.0.29
     197
     198Removed lines 41-49 from new-submission.php as they are redundant and the use of constants on line 42 causes a warning message to be written to the log file.
    195199
    196200== Upgrade Notice ==
  • vat-moss/trunk/vat-moss.php

    r1917780 r2008380  
    55Plugin URI: http://www.wproute.com/downloads/vat-moss/
    66Description: Management and submission of VAT sales to EU consumers.
    7 Version: 1.0.28
     7Version: 1.0.29
    88Tested up to: 4.9.7
    99Author: Lyquidity Solutions
     
    431431
    432432        if ( ! defined( 'VAT_MOSS_VERSION' ) )
    433             define( 'VAT_MOSS_VERSION',                         '1.0.28' );
     433            define( 'VAT_MOSS_VERSION',                         '1.0.29' );
    434434
    435435        if ( ! defined( 'VAT_MOSS_WORDPRESS_COMPATIBILITY' ) )
Note: See TracChangeset for help on using the changeset viewer.