Changeset 1724944
- Timestamp:
- 09/05/2017 01:25:01 PM (8 years ago)
- Location:
- purge-varnish
- Files:
-
- 6 edited
-
tags/1.0.6/class_purge_varnish.php (modified) (3 diffs)
-
tags/1.0.6/includes/terminal.php (modified) (1 diff)
-
tags/1.0.6/readme.txt (modified) (1 diff)
-
trunk/class_purge_varnish.php (modified) (3 diffs)
-
trunk/includes/terminal.php (modified) (1 diff)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
purge-varnish/tags/1.0.6/class_purge_varnish.php
r1705528 r1724944 241 241 $varnish_control_terminal = !empty($varnish_control_terminal) ? $varnish_control_terminal : ''; 242 242 $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']); 244 244 $varnish_bantype = $post['varnish_bantype']; 245 245 246 246 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.'); 248 248 } 249 249 250 250 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.'); 256 256 } 257 257 … … 262 262 263 263 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'); 265 265 } 266 266 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'); 268 268 } 269 269 } … … 271 271 272 272 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 276 276 $msg = ''; 277 277 if (isset($message['error']) && count($message['error'])) { 278 278 $msg .= '<ul>'; 279 279 foreach ($message['error'] as $value) { 280 $msg .= '<li style="color:# 8B0000;">' . $value . '</li>';280 $msg .= '<li style="color:#FF0000;">' . $value . '</li>'; 281 281 } 282 282 $msg .= '</ul>'; -
purge-varnish/tags/1.0.6/includes/terminal.php
r1705528 r1724944 137 137 <?php 138 138 } 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 } 140 140 ?> 141 141 </li> -
purge-varnish/tags/1.0.6/readme.txt
r1705528 r1724944 110 110 = 1.0.6 = 111 111 112 113 Fix: 114 1. Plugin shows white screen after setup. 115 1. Multiple Varnish terminals connect message is wrong. 116 112 117 Implement Trigger to purge post on comment approved/unapproved 113 118 Fix: Wrong number of arguments 114 119 Update respected screens. 120 115 121 116 122 = 1.0.5 = -
purge-varnish/trunk/class_purge_varnish.php
r1705528 r1724944 241 241 $varnish_control_terminal = !empty($varnish_control_terminal) ? $varnish_control_terminal : ''; 242 242 $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']); 244 244 $varnish_bantype = $post['varnish_bantype']; 245 245 246 246 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.'); 248 248 } 249 249 250 250 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.'); 256 256 } 257 257 … … 262 262 263 263 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'); 265 265 } 266 266 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'); 268 268 } 269 269 } … … 271 271 272 272 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 276 276 $msg = ''; 277 277 if (isset($message['error']) && count($message['error'])) { 278 278 $msg .= '<ul>'; 279 279 foreach ($message['error'] as $value) { 280 $msg .= '<li style="color:# 8B0000;">' . $value . '</li>';280 $msg .= '<li style="color:#FF0000;">' . $value . '</li>'; 281 281 } 282 282 $msg .= '</ul>'; -
purge-varnish/trunk/includes/terminal.php
r1705528 r1724944 137 137 <?php 138 138 } 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 } 140 140 ?> 141 141 </li> -
purge-varnish/trunk/readme.txt
r1705528 r1724944 110 110 = 1.0.6 = 111 111 112 113 Fix: 114 1. Plugin shows white screen after setup. 115 1. Multiple Varnish terminals connect message is wrong. 116 112 117 Implement Trigger to purge post on comment approved/unapproved 113 118 Fix: Wrong number of arguments 114 119 Update respected screens. 120 115 121 116 122 = 1.0.5 =
Note: See TracChangeset
for help on using the changeset viewer.