Plugin Directory

Changeset 1724944


Ignore:
Timestamp:
09/05/2017 01:25:01 PM (8 years ago)
Author:
devavi
Message:

fix issues, Multiple Varnish terminals connect message is wrong, Plugin shows white screen after setup

Location:
purge-varnish
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • purge-varnish/tags/1.0.6/class_purge_varnish.php

    r1705528 r1724944  
    241241        $varnish_control_terminal = !empty($varnish_control_terminal) ? $varnish_control_terminal : '';
    242242        $varnish_control_key = trim($post['varnish_control_key']);
    243         $varnish_socket_timeout = (int) $post['varnish_socket_timeout'];
     243        $varnish_socket_timeout = trim($post['varnish_socket_timeout']);
    244244        $varnish_bantype = $post['varnish_bantype'];
    245245
    246246        if (empty($varnish_control_terminal) === true) {
    247             $message['error']['terminal_empty'] = esc_html_e('Varnish Control Terminal can\'t be empty.');
     247            $message['error']['terminal_empty'] = esc_html('Varnish Control Terminal can\'t be empty.');
    248248        }
    249249
    250250        if (empty($varnish_control_key) === true) {
    251             $message['error']['key_empty'] = 'Varnish Control Key can\'t be empty.';
    252         }
    253 
    254         if (empty(trim($post['varnish_socket_timeout'])) === true) {
    255             $message['error']['terminal_timeout'] = esc_html_e('Varnish connection timeout can\'t be empty.');
     251            $message['error']['key_empty'] = esc_html('Varnish Control Key can\'t be empty.');
     252        }
     253
     254        if (empty($post['varnish_socket_timeout']) === true) {
     255            $message['error']['terminal_timeout'] = esc_html('Varnish connection timeout can\'t be empty.');
    256256        }
    257257
     
    262262
    263263                if (isset($server) && (filter_var($server, FILTER_VALIDATE_IP) === false)) {
    264                     $message['error']['terminal_' . $server] = $server . ' ' . esc_html_e('is not a valid IP address');
     264                    $message['error']['terminal_' . $server] = $server . ' ' . esc_html('is not a valid IP address');
    265265                }
    266266                if (empty($port) || (int) $port <= 0) {
    267                     $message['error']['terminal_' . $port] = esc_html_e('You need to enter the valid Port Number with IP address');
     267                    $message['error']['terminal_' . $port] = esc_html('You need to enter the valid Port Number with IP address');
    268268                }
    269269            }
     
    271271
    272272        if (!is_numeric($varnish_socket_timeout) || $varnish_socket_timeout <= 0) {
    273             $message['error']['varnish_socket_timeout'] = esc_html_e('Varnish connection timeout must be a positive number.');
    274         }
    275 
     273            $message['error']['varnish_socket_timeout'] = esc_html('Varnish connection timeout must be a positive number.');
     274        }
     275       
    276276        $msg = '';
    277277        if (isset($message['error']) && count($message['error'])) {
    278278            $msg .= '<ul>';
    279279            foreach ($message['error'] as $value) {
    280                 $msg .= '<li style="color:#8B0000;">' . $value . '</li>';
     280                $msg .= '<li style="color:#FF0000;">' . $value . '</li>';
    281281            }
    282282            $msg .= '</ul>';
  • purge-varnish/tags/1.0.6/includes/terminal.php

    r1705528 r1724944  
    137137                                                                <?php
    138138                                                            } else {
    139                                                                 ?><img src="<?php print plugins_url('../images/error.png', __FILE__); ?>" align="middle" alt="<?php print $error_msg; ?>" title="<?php print $error_msg; ?>"> The Varnish control terminal is not responding at <?php print $varnish_control_terminal; ?><?php }
     139                                                                ?><img src="<?php print plugins_url('../images/error.png', __FILE__); ?>" align="middle" alt="<?php print $error_msg; ?>" title="<?php print $error_msg; ?>"> The Varnish control terminal is not responding at <?php print $terminal; ?><?php }
    140140                                                            ?>
    141141                                                        </li>
  • purge-varnish/tags/1.0.6/readme.txt

    r1705528 r1724944  
    110110= 1.0.6 =
    111111
     112
     113Fix:
     1141.  Plugin shows white screen after setup.
     1151.  Multiple Varnish terminals connect message is wrong.
     116
    112117Implement Trigger to purge post on comment approved/unapproved
    113118Fix: Wrong number of arguments
    114119Update respected screens.
     120
    115121
    116122= 1.0.5 =
  • purge-varnish/trunk/class_purge_varnish.php

    r1705528 r1724944  
    241241        $varnish_control_terminal = !empty($varnish_control_terminal) ? $varnish_control_terminal : '';
    242242        $varnish_control_key = trim($post['varnish_control_key']);
    243         $varnish_socket_timeout = (int) $post['varnish_socket_timeout'];
     243        $varnish_socket_timeout = trim($post['varnish_socket_timeout']);
    244244        $varnish_bantype = $post['varnish_bantype'];
    245245
    246246        if (empty($varnish_control_terminal) === true) {
    247             $message['error']['terminal_empty'] = esc_html_e('Varnish Control Terminal can\'t be empty.');
     247            $message['error']['terminal_empty'] = esc_html('Varnish Control Terminal can\'t be empty.');
    248248        }
    249249
    250250        if (empty($varnish_control_key) === true) {
    251             $message['error']['key_empty'] = 'Varnish Control Key can\'t be empty.';
    252         }
    253 
    254         if (empty(trim($post['varnish_socket_timeout'])) === true) {
    255             $message['error']['terminal_timeout'] = esc_html_e('Varnish connection timeout can\'t be empty.');
     251            $message['error']['key_empty'] = esc_html('Varnish Control Key can\'t be empty.');
     252        }
     253
     254        if (empty($post['varnish_socket_timeout']) === true) {
     255            $message['error']['terminal_timeout'] = esc_html('Varnish connection timeout can\'t be empty.');
    256256        }
    257257
     
    262262
    263263                if (isset($server) && (filter_var($server, FILTER_VALIDATE_IP) === false)) {
    264                     $message['error']['terminal_' . $server] = $server . ' ' . esc_html_e('is not a valid IP address');
     264                    $message['error']['terminal_' . $server] = $server . ' ' . esc_html('is not a valid IP address');
    265265                }
    266266                if (empty($port) || (int) $port <= 0) {
    267                     $message['error']['terminal_' . $port] = esc_html_e('You need to enter the valid Port Number with IP address');
     267                    $message['error']['terminal_' . $port] = esc_html('You need to enter the valid Port Number with IP address');
    268268                }
    269269            }
     
    271271
    272272        if (!is_numeric($varnish_socket_timeout) || $varnish_socket_timeout <= 0) {
    273             $message['error']['varnish_socket_timeout'] = esc_html_e('Varnish connection timeout must be a positive number.');
    274         }
    275 
     273            $message['error']['varnish_socket_timeout'] = esc_html('Varnish connection timeout must be a positive number.');
     274        }
     275       
    276276        $msg = '';
    277277        if (isset($message['error']) && count($message['error'])) {
    278278            $msg .= '<ul>';
    279279            foreach ($message['error'] as $value) {
    280                 $msg .= '<li style="color:#8B0000;">' . $value . '</li>';
     280                $msg .= '<li style="color:#FF0000;">' . $value . '</li>';
    281281            }
    282282            $msg .= '</ul>';
  • purge-varnish/trunk/includes/terminal.php

    r1705528 r1724944  
    137137                                                                <?php
    138138                                                            } else {
    139                                                                 ?><img src="<?php print plugins_url('../images/error.png', __FILE__); ?>" align="middle" alt="<?php print $error_msg; ?>" title="<?php print $error_msg; ?>"> The Varnish control terminal is not responding at <?php print $varnish_control_terminal; ?><?php }
     139                                                                ?><img src="<?php print plugins_url('../images/error.png', __FILE__); ?>" align="middle" alt="<?php print $error_msg; ?>" title="<?php print $error_msg; ?>"> The Varnish control terminal is not responding at <?php print $terminal; ?><?php }
    140140                                                            ?>
    141141                                                        </li>
  • purge-varnish/trunk/readme.txt

    r1705528 r1724944  
    110110= 1.0.6 =
    111111
     112
     113Fix:
     1141.  Plugin shows white screen after setup.
     1151.  Multiple Varnish terminals connect message is wrong.
     116
    112117Implement Trigger to purge post on comment approved/unapproved
    113118Fix: Wrong number of arguments
    114119Update respected screens.
     120
    115121
    116122= 1.0.5 =
Note: See TracChangeset for help on using the changeset viewer.