Changeset 2708027
- Timestamp:
- 04/11/2022 12:18:58 PM (4 years ago)
- Location:
- newsletter-sms-smsapi
- Files:
-
- 56 edited
- 1 copied
-
tags/2.0.2 (copied) (copied from newsletter-sms-smsapi/trunk)
-
tags/2.0.2/classes/SmsapiPsrClient.php (modified) (3 diffs)
-
tags/2.0.2/classes/SmsapiUtils.php (modified) (2 diffs)
-
tags/2.0.2/readme.txt (modified) (2 diffs)
-
tags/2.0.2/smsapi.php (modified) (1 diff)
-
tags/2.0.2/vendor/composer/ClassLoader.php (modified) (1 diff)
-
tags/2.0.2/vendor/composer/LICENSE (modified) (2 diffs)
-
tags/2.0.2/vendor/composer/installed.json (modified) (3 diffs)
-
tags/2.0.2/vendor/smsapi/php-client/.gitignore (modified) (1 diff)
-
tags/2.0.2/vendor/smsapi/php-client/CHANGELOG.md (modified) (1 diff)
-
tags/2.0.2/vendor/smsapi/php-client/Makefile (modified) (1 diff)
-
tags/2.0.2/vendor/smsapi/php-client/README.md (modified) (3 diffs)
-
tags/2.0.2/vendor/smsapi/php-client/composer.json (modified) (1 diff)
-
tags/2.0.2/vendor/smsapi/php-client/docker-compose.yml (modified) (1 diff)
-
tags/2.0.2/vendor/smsapi/php-client/phpunit.dist.xml (modified) (1 diff)
-
tags/2.0.2/vendor/smsapi/php-client/src/Curl/HttpClient.php (modified) (1 diff)
-
tags/2.0.2/vendor/smsapi/php-client/src/Curl/SmsapiHttpClient.php (modified) (3 diffs)
-
tags/2.0.2/vendor/smsapi/php-client/src/Infrastructure/HttpClient/Decorator/BaseUriDecorator.php (modified) (1 diff)
-
tags/2.0.2/vendor/smsapi/php-client/src/Infrastructure/HttpClient/Decorator/LoggerDecorator.php (modified) (1 diff)
-
tags/2.0.2/vendor/smsapi/php-client/src/Infrastructure/RequestAssembler/RequestAssembler.php (modified) (1 diff)
-
tags/2.0.2/vendor/smsapi/php-client/src/SmsapiClient.php (modified) (1 diff)
-
tags/2.0.2/vendor/smsapi/php-client/tests-resources/config/config.dist.yml (modified) (1 diff)
-
tags/2.0.2/vendor/smsapi/php-client/tests-resources/config/config.yml.example (modified) (1 diff)
-
tags/2.0.2/vendor/smsapi/php-client/tests/SmsapiClientIntegrationTestCase.php (modified) (1 diff)
-
tags/2.0.2/views/admin/gateway/index.php (modified) (3 diffs)
-
tags/2.0.2/views/admin/settings/general.php (modified) (2 diffs)
-
tags/2.0.2/views/admin/settings/login.php (modified) (1 diff)
-
tags/2.0.2/views/admin/settings/notifications.php (modified) (1 diff)
-
tags/2.0.2/views/admin/subscribers/form.php (modified) (6 diffs)
-
trunk/classes/SmsapiPsrClient.php (modified) (3 diffs)
-
trunk/classes/SmsapiUtils.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/smsapi.php (modified) (1 diff)
-
trunk/vendor/composer/ClassLoader.php (modified) (1 diff)
-
trunk/vendor/composer/LICENSE (modified) (2 diffs)
-
trunk/vendor/composer/installed.json (modified) (3 diffs)
-
trunk/vendor/smsapi/php-client/.gitignore (modified) (1 diff)
-
trunk/vendor/smsapi/php-client/CHANGELOG.md (modified) (1 diff)
-
trunk/vendor/smsapi/php-client/Makefile (modified) (1 diff)
-
trunk/vendor/smsapi/php-client/README.md (modified) (3 diffs)
-
trunk/vendor/smsapi/php-client/composer.json (modified) (1 diff)
-
trunk/vendor/smsapi/php-client/docker-compose.yml (modified) (1 diff)
-
trunk/vendor/smsapi/php-client/phpunit.dist.xml (modified) (1 diff)
-
trunk/vendor/smsapi/php-client/src/Curl/HttpClient.php (modified) (1 diff)
-
trunk/vendor/smsapi/php-client/src/Curl/SmsapiHttpClient.php (modified) (3 diffs)
-
trunk/vendor/smsapi/php-client/src/Infrastructure/HttpClient/Decorator/BaseUriDecorator.php (modified) (1 diff)
-
trunk/vendor/smsapi/php-client/src/Infrastructure/HttpClient/Decorator/LoggerDecorator.php (modified) (1 diff)
-
trunk/vendor/smsapi/php-client/src/Infrastructure/RequestAssembler/RequestAssembler.php (modified) (1 diff)
-
trunk/vendor/smsapi/php-client/src/SmsapiClient.php (modified) (1 diff)
-
trunk/vendor/smsapi/php-client/tests-resources/config/config.dist.yml (modified) (1 diff)
-
trunk/vendor/smsapi/php-client/tests-resources/config/config.yml.example (modified) (1 diff)
-
trunk/vendor/smsapi/php-client/tests/SmsapiClientIntegrationTestCase.php (modified) (1 diff)
-
trunk/views/admin/gateway/index.php (modified) (3 diffs)
-
trunk/views/admin/settings/general.php (modified) (2 diffs)
-
trunk/views/admin/settings/login.php (modified) (1 diff)
-
trunk/views/admin/settings/notifications.php (modified) (1 diff)
-
trunk/views/admin/subscribers/form.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
newsletter-sms-smsapi/tags/2.0.2/classes/SmsapiPsrClient.php
r2513083 r2708027 6 6 use Psr\Http\Message\ResponseInterface; 7 7 8 require_once SMSAPI_PLUGIN_PATH . '/classes/RequestFailedException.php'; 9 8 10 class SmsapiPsrClient implements ClientInterface 9 11 { 10 11 12 public function sendRequest(RequestInterface $request): ResponseInterface 12 13 { … … 93 94 } 94 95 96 $this->checkErrors($response); 97 95 98 $responseCode = wp_remote_retrieve_response_code($response); 96 99 $responseHeaders = wp_remote_retrieve_headers($response); … … 99 102 return new Response($responseCode, $responseHeaders->getAll(), $responseBody); 100 103 } 104 105 private function checkErrors($response) 106 { 107 if (is_wp_error($response)) { 108 /** 109 * @var WP_Error $response 110 */ 111 throw new RequestFailedException($response->get_error_message()); 112 } 113 } 101 114 } -
newsletter-sms-smsapi/tags/2.0.2/classes/SmsapiUtils.php
r2512085 r2708027 2 2 3 3 use Smsapi\Client\Feature\Contacts\Data\Contact; 4 use Smsapi\Client\Service\SmsapiComService; 4 5 use Smsapi\Client\SmsapiHttpClient; 5 6 … … 45 46 } 46 47 47 private static function getService($token) 48 private static function getService($token): SmsapiComService 48 49 { 49 50 $client = new SmsapiHttpClient( -
newsletter-sms-smsapi/tags/2.0.2/readme.txt
r2619465 r2708027 4 4 Requires at least: 4.2.3 5 5 Tested up to: 5.8.1 6 Stable tag: 2.0. 16 Stable tag: 2.0.2 7 7 Requires PHP: 7.0 8 8 License: GPLv2 or later … … 54 54 == Changelog == 55 55 56 = 2.0.2 = 57 * Add request error handling 58 * Update vendor smsapi-php-client library 59 56 60 = 2.0.1 = 57 61 * Fix security issues -
newsletter-sms-smsapi/tags/2.0.2/smsapi.php
r2619465 r2708027 3 3 * Plugin Name: Newsletter SMS - SMSAPI 4 4 * Description: Plugin which allows you to create Newsletter which will collect clients phone numbers and allow you to send SMS messages to them. Database is synchronized with SMSAPI account so messages can be sent from SMSAPI panel as well. 5 * Version: 2.0. 15 * Version: 2.0.2 6 6 * Author: SMSAPI 7 7 * Author URI: http://smsapi.com/ -
newsletter-sms-smsapi/tags/2.0.2/vendor/composer/ClassLoader.php
r2512085 r2708027 61 61 { 62 62 if (!empty($this->prefixesPsr0)) { 63 return call_user_func_array('array_merge', array_values($this->prefixesPsr0));63 return call_user_func_array('array_merge', $this->prefixesPsr0); 64 64 } 65 65 -
newsletter-sms-smsapi/tags/2.0.2/vendor/composer/LICENSE
r2512085 r2708027 1 2 1 Copyright (c) Nils Adermann, Jordi Boggiano 3 2 … … 19 18 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 19 THE SOFTWARE. 21 -
newsletter-sms-smsapi/tags/2.0.2/vendor/composer/installed.json
r2512085 r2708027 323 323 { 324 324 "name": "smsapi/php-client", 325 "version": "v3.0. 2",326 "version_normalized": "3.0. 2.0",325 "version": "v3.0.6", 326 "version_normalized": "3.0.6.0", 327 327 "source": { 328 328 "type": "git", 329 329 "url": "https://github.com/smsapi/smsapi-php-client.git", 330 "reference": " dd5955b4cc497bc6b4f3315b82fb96d766233602"331 }, 332 "dist": { 333 "type": "zip", 334 "url": "https://api.github.com/repos/smsapi/smsapi-php-client/zipball/ dd5955b4cc497bc6b4f3315b82fb96d766233602",335 "reference": " dd5955b4cc497bc6b4f3315b82fb96d766233602",330 "reference": "499af0b02cb8e07aa4774d85cc295a66141b69a4" 331 }, 332 "dist": { 333 "type": "zip", 334 "url": "https://api.github.com/repos/smsapi/smsapi-php-client/zipball/499af0b02cb8e07aa4774d85cc295a66141b69a4", 335 "reference": "499af0b02cb8e07aa4774d85cc295a66141b69a4", 336 336 "shasum": "" 337 337 }, … … 342 342 "psr/http-factory": "^1", 343 343 "psr/http-message": "^1", 344 "psr/log": "^1 "344 "psr/log": "^1 || ^2 || ^3" 345 345 }, 346 346 "require-dev": { … … 358 358 "guzzlehttp/psr7": "To use Curl HttpClient and HTTP message factories" 359 359 }, 360 "time": "202 1-01-29T12:46:06+00:00",360 "time": "2022-03-28T09:58:20+00:00", 361 361 "type": "library", 362 362 "installation-source": "dist", -
newsletter-sms-smsapi/tags/2.0.2/vendor/smsapi/php-client/.gitignore
r2512085 r2708027 4 4 /phpunit.xml 5 5 /composer.phar 6 .phpunit.result.cache -
newsletter-sms-smsapi/tags/2.0.2/vendor/smsapi/php-client/CHANGELOG.md
r2512085 r2708027 3 3 4 4 The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). 5 6 ## [3.0.6] - 2022-03-28 7 ### Fixed 8 - HTTP headers parsing, PSR-7 compliant 9 10 ## [3.0.5] - 2022-03-23 11 ### Fixed 12 - HTTP headers parsing, `HttpClient` issue 13 14 ## [3.0.4] - 2022-01-17 15 ### Added 16 - `psr/log` v2, v3 support 17 18 ## [3.0.3] - 2021-07-21 19 ### Fixed 20 - Guzzle PSR7 incompatible URI paths, `The path of a URI with an authority must start with a slash "/" or be empty` 5 21 6 22 ## [3.0.2] - 2021-01-29 -
newsletter-sms-smsapi/tags/2.0.2/vendor/smsapi/php-client/Makefile
r2512085 r2708027 2 2 3 3 help: 4 @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' 4 @grep -hE '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) \ 5 | sort \ 6 | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' 7 8 9 include Makefile.php8 10 5 11 6 12 .DEFAULT_GOAL := help -
newsletter-sms-smsapi/tags/2.0.2/vendor/smsapi/php-client/README.md
r2512085 r2708027 119 119 ``` 120 120 121 ## How to use a service with custom URI?121 ### How to use *SMSAPI.SE* or *SMSAPI.BG* services? 122 122 123 123 ```php … … 136 136 137 137 $apiToken = '0000000000000000000000000000000000000000'; 138 $uri = 'http ://example.com';138 $uri = 'https://smsapi.io/'; 139 139 140 140 $service = $client->smsapiComServiceWithUri($apiToken, $uri); … … 269 269 ``` 270 270 271 ## Test package 272 1. Download package: `composer create-project smsapi/php-client` 273 2. Execute tests: `./vendor/bin/phpunit --configuration phpunit.dist.xml` 271 ## How to test package 272 273 Copy `phpunit.dist.xml` to `phpunit.xml`. You may adjust it to your needs then. 274 275 Copy `tests-resources/config/config.dist.yml` to `tests-resources/config/config.yml`. Fill in SMSAPI service connection data. 276 277 ### How to run unit tests 278 279 Unit tests are included into package build process and run against its current version on every commit (see `.travis.yml`). 280 You can run those tests locally with ease using provided Docker configuration, simply run: 281 282 ```shell 283 make test-suite SUITE="unit" 284 ``` 285 286 ### How to run integration tests 287 288 Note that integration test works within an account you have configured in `tests-resources/config/config.yml`. 289 Although those test have been written to self-cleanup on exit, in case of failure some trash data may stay. 290 Use it with caution. 291 292 ```shell 293 make test-suite SUITE="integration" 294 ``` 295 296 ### How to run feature tests 297 298 Feature test groups are defined in `phpunit.dist.xml`. To run tests execute: 299 300 ```shell 301 make test-suite SUITE="feature-contacts" 302 ``` 303 304 ### How to run tests against PHP8 305 306 To run any of mentioned above against PHP8 use make targets with `php8` suffix. See `Makefile.php8`. 274 307 275 308 ## Docs & Infos 276 309 * [SMSAPI.COM API documentation](https://www.smsapi.com/docs) 277 310 * [SMSAPI.PL API documentation](https://www.smsapi.pl/docs) 311 * [SMSAPI.SE API documentation](https://www.smsapi.se/docs) 312 * [SMSAPI.BG API documentation](https://www.smsapi.bg/docs) 313 * [SMSAPI.COM web page](https://smsapi.com) 314 * [SMSAPI.PL web page](https://smsapi.pl) 315 * [SMSAPI.SE web page](https://smsapi.se) 316 * [SMSAPI.BG web page](https://smsapi.bg) 278 317 * [Repository on GitHub](https://github.com/smsapi/smsapi-php-client) 279 318 * [Package on Packagist](https://packagist.org/packages/smsapi/php-client) 280 * [SMSAPI.COM web page](https://smsapi.com)281 * [SMSAPI.PL web page](https://smsapi.pl) -
newsletter-sms-smsapi/tags/2.0.2/vendor/smsapi/php-client/composer.json
r2512085 r2708027 19 19 "php": "^7 || ^8.0", 20 20 "ext-json": "*", 21 "psr/log": "^1 ",21 "psr/log": "^1 || ^2 || ^3", 22 22 "psr/http-message": "^1", 23 23 "psr/http-client": "^1", -
newsletter-sms-smsapi/tags/2.0.2/vendor/smsapi/php-client/docker-compose.yml
r2512085 r2708027 8 8 network_mode: host 9 9 10 php8: 11 build: 12 context: . 13 dockerfile: Dockerfile.php8 14 volumes: 15 - .:/app 16 network_mode: host -
newsletter-sms-smsapi/tags/2.0.2/vendor/smsapi/php-client/phpunit.dist.xml
r2512085 r2708027 68 68 </testsuite> 69 69 </testsuites> 70 71 <php> 72 <ini name="error_reporting" value="E_ALL"/> 73 <ini name="display_errors" value="1"/> 74 </php> 75 70 76 </phpunit> -
newsletter-sms-smsapi/tags/2.0.2/vendor/smsapi/php-client/src/Curl/HttpClient.php
r2512085 r2708027 89 89 $headerSize = curl_getinfo($httpClient, CURLINFO_HEADER_SIZE); 90 90 $headerString = substr($response, 0, $headerSize); 91 $headers = array_filter(explode("\n", $headerString), 'trim');91 $headers = HttpHeadersParser::parse($headerString); 92 92 93 93 $body = substr($response, $headerSize); -
newsletter-sms-smsapi/tags/2.0.2/vendor/smsapi/php-client/src/Curl/SmsapiHttpClient.php
r2512085 r2708027 5 5 namespace Smsapi\Client\Curl; 6 6 7 use Psr\Log\LoggerAwareTrait; 7 8 use Psr\Log\LoggerInterface; 8 9 use Smsapi\Client\Curl\Discovery\CurlDiscovery; … … 17 18 class SmsapiHttpClient implements SmsapiClient 18 19 { 20 use LoggerAwareTrait; 21 19 22 private $httpClient; 20 23 … … 31 34 } 32 35 33 public function setLogger(LoggerInterface $logger)34 {35 $this->httpClient->setLogger($logger);36 }37 38 36 public function smsapiPlService(string $apiToken): SmsapiPlService 39 37 { 40 return $this->httpClient ->smsapiPlService($apiToken);38 return $this->httpClient()->smsapiPlService($apiToken); 41 39 } 42 40 43 41 public function smsapiPlServiceWithUri(string $apiToken, string $uri): SmsapiPlService 44 42 { 45 return $this->httpClient ->smsapiPlServiceWithUri($apiToken, $uri);43 return $this->httpClient()->smsapiPlServiceWithUri($apiToken, $uri); 46 44 } 47 45 48 46 public function smsapiComService(string $apiToken): SmsapiComService 49 47 { 50 return $this->httpClient ->smsapiComService($apiToken);48 return $this->httpClient()->smsapiComService($apiToken); 51 49 } 52 50 53 51 public function smsapiComServiceWithUri(string $apiToken, string $uri): SmsapiComService 54 52 { 55 return $this->httpClient->smsapiComServiceWithUri($apiToken, $uri); 53 return $this->httpClient()->smsapiComServiceWithUri($apiToken, $uri); 54 } 55 56 private function httpClient(): \Smsapi\Client\SmsapiHttpClient 57 { 58 if ($this->logger instanceof LoggerInterface) { 59 $this->httpClient->setLogger($this->logger); 60 } 61 62 return $this->httpClient; 56 63 } 57 64 } -
newsletter-sms-smsapi/tags/2.0.2/vendor/smsapi/php-client/src/Infrastructure/HttpClient/Decorator/BaseUriDecorator.php
r2512085 r2708027 38 38 $scheme = $baseUriParts['scheme'] ?? ''; 39 39 $host = $baseUriParts['host'] ?? ''; 40 $path = $baseUriParts['path'] ?? ''; 40 $basePath = $baseUriParts['path'] ?? ''; 41 $basePath = rtrim($basePath, '/'); 41 42 43 $uri = $uri->withPath($basePath . '/' . $uri->getPath()); 44 $uri = $uri->withHost($host); 42 45 $uri = $uri->withScheme($scheme); 43 $uri = $uri->withHost($host);44 $uri = $uri->withPath($path . $uri->getPath());45 46 46 47 return $request->withUri($uri); -
newsletter-sms-smsapi/tags/2.0.2/vendor/smsapi/php-client/src/Infrastructure/HttpClient/Decorator/LoggerDecorator.php
r2512085 r2708027 27 27 { 28 28 $this->logger->info('Request', [ 29 'request' => $request, 29 30 'method' => $request->getMethod(), 30 31 'uri' => $request->getUri(), 32 'headers' => $request->getHeaders(), 33 'body' => $request->getBody()->getContents(), 31 34 ]); 32 35 33 36 $response = $this->client->sendRequest($request); 34 37 35 $this->logger->info('Response', ['response' => $response]); 38 $this->logger->info('Response', [ 39 'response' => $response, 40 'headers' => $response->getHeaders(), 41 'body' => $response->getBody()->getContents(), 42 ]); 36 43 37 44 return $response; -
newsletter-sms-smsapi/tags/2.0.2/vendor/smsapi/php-client/src/Infrastructure/RequestAssembler/RequestAssembler.php
r2512085 r2708027 34 34 $request = $request->withHeader($header, $value); 35 35 } 36 36 37 $request = $request->withBody($this->streamFactory->createStream($requestDTO->getBody())); 37 38 -
newsletter-sms-smsapi/tags/2.0.2/vendor/smsapi/php-client/src/SmsapiClient.php
r2512085 r2708027 13 13 interface SmsapiClient extends LoggerAwareInterface 14 14 { 15 const VERSION = '3.0. 2';15 const VERSION = '3.0.6'; 16 16 17 17 public function smsapiPlService(string $apiToken): SmsapiPlService; -
newsletter-sms-smsapi/tags/2.0.2/vendor/smsapi/php-client/tests-resources/config/config.dist.yml
r2512085 r2708027 1 1 Service name: SMSAPI.PL 2 2 API URI: https://api.smsapi.pl 3 logger: false 3 API token: 0000000000000000000000000000000000000000 -
newsletter-sms-smsapi/tags/2.0.2/vendor/smsapi/php-client/tests-resources/config/config.yml.example
r2512085 r2708027 2 2 API token: 40-characters length string generated in SMSAPI Panel 3 3 API URI: "https://api.smsapi.pl", "https://api.smsapi.com", "https://api2.smsapi.pl" or "https://api2.smsapi.com" 4 logger: true -
newsletter-sms-smsapi/tags/2.0.2/vendor/smsapi/php-client/tests/SmsapiClientIntegrationTestCase.php
r2512085 r2708027 34 34 $smsapiHttpClient = new SmsapiHttpClient(); 35 35 36 if (Config::get('logger')) {37 $smsapiHttpClient->setLogger(new TestLogger());38 }39 40 36 $serviceName = Config::get('Service name'); 41 37 if ($serviceName === ServiceName::SMSAPI_PL) { -
newsletter-sms-smsapi/tags/2.0.2/views/admin/gateway/index.php
r2619465 r2708027 20 20 21 21 <?php if (smsapi_array_safe_get($errors, 'sendername')): ?> 22 <div class="text-danger"><?php echo smsapi_array_safe_get($errors, 'sendername'); ?></div>22 <div class="text-danger"><?php echo esc_attr(smsapi_array_safe_get($errors, 'sendername')); ?></div> 23 23 <?php endif; ?> 24 24 </td> … … 35 35 36 36 <?php if (smsapi_array_safe_get($errors, 'recipients_type')): ?> 37 <div class="text-danger"><?php echo smsapi_array_safe_get($errors, 'recipients_type'); ?></div>37 <div class="text-danger"><?php echo esc_attr(smsapi_array_safe_get($errors, 'recipients_type')); ?></div> 38 38 <?php endif; ?> 39 39 … … 54 54 55 55 <?php if (smsapi_array_safe_get($errors, 'message')): ?> 56 <div class="text-danger"><?php echo smsapi_array_safe_get($errors, 'message'); ?></div>56 <div class="text-danger"><?php echo esc_attr(smsapi_array_safe_get($errors, 'message')); ?></div> 57 57 <?php endif; ?> 58 58 </td> -
newsletter-sms-smsapi/tags/2.0.2/views/admin/settings/general.php
r2619465 r2708027 42 42 43 43 <?php if (smsapi_array_safe_get($errors, 'phonebook_group')): ?> 44 <p class="text-danger"><?php echo smsapi_array_safe_get($errors, 'phonebook_group'); ?></p>44 <p class="text-danger"><?php echo esc_attr(smsapi_array_safe_get($errors, 'phonebook_group')); ?></p> 45 45 <?php endif; ?> 46 46 … … 76 76 77 77 <?php if (smsapi_array_safe_get($errors, 'api_sendername')): ?> 78 <p class="text-danger"><?php echo smsapi_array_safe_get($errors, 'api_sendername'); ?></p>78 <p class="text-danger"><?php echo esc_attr(smsapi_array_safe_get($errors, 'api_sendername')); ?></p> 79 79 <?php endif; ?> 80 80 -
newsletter-sms-smsapi/tags/2.0.2/views/admin/settings/login.php
r2617806 r2708027 9 9 <input type="text" class="regular-text" name="api_token" id="api_token" autocomplete="off" 10 10 maxlength="50" 11 value="<?php echo smsapi_array_safe_get($config, 'api_token', ''); ?>"/>11 value="<?php echo esc_attr(smsapi_array_safe_get($config, 'api_token', '')); ?>"/> 12 12 13 13 <p class="description"><?php _e('Enter token information', 'newsletter-sms-smsapi'); ?></p> 14 14 15 15 <?php if (smsapi_array_safe_get($errors, 'api_token')): ?> 16 <span class="text-danger"><?php echo smsapi_array_safe_get($errors, 'api_token'); ?></span>16 <span class="text-danger"><?php echo esc_attr(smsapi_array_safe_get($errors, 'api_token')); ?></span> 17 17 <?php endif; ?> 18 18 </td> -
newsletter-sms-smsapi/tags/2.0.2/views/admin/settings/notifications.php
r2617806 r2708027 16 16 17 17 <div> 18 <textarea name="subscription_notification_content" id="subscription-notification-content"><?php echo smsapi_array_safe_get($config, 'subscription_notification_content', ''); ?></textarea> 18 <textarea name="subscription_notification_content" id="subscription-notification-content"> 19 <?php echo esc_textarea(smsapi_array_safe_get($config, 'subscription_notification_content', '')); ?> 20 </textarea> 19 21 20 22 <p class="description"><?php _e('Message content', 'newsletter-sms-smsapi'); ?></p> -
newsletter-sms-smsapi/tags/2.0.2/views/admin/subscribers/form.php
r2619465 r2708027 18 18 <input class="smsapi-input" type="text" name="phonenumber" id="smsapi-input-phonenumber" 19 19 value="<?php echo esc_attr($subscriber->phoneNumber); ?>" /> 20 <span class="smsapi-input-error"><?php echo smsapi_array_safe_get($errors, 'phonenumber'); ?></span> 20 <span class="smsapi-input-error"> 21 <?php echo esc_attr(smsapi_array_safe_get($errors, 'phonenumber')); ?> 22 </span> 21 23 </td> 22 24 </tr> … … 31 33 value="<?php echo esc_attr($subscriber->firstName); ?>" /> 32 34 33 <span class="smsapi-input-error"><?php echo smsapi_array_safe_get($errors, 'firstname'); ?></span>35 <span class="smsapi-input-error"><?php echo esc_attr(smsapi_array_safe_get($errors, 'firstname')); ?></span> 34 36 </td> 35 37 </tr> … … 44 46 value="<?php echo esc_attr($subscriber->lastName); ?>" /> 45 47 46 <span class="smsapi-input-error"><?php echo smsapi_array_safe_get($errors, 'lastname'); ?></span>48 <span class="smsapi-input-error"><?php echo esc_attr(smsapi_array_safe_get($errors, 'lastname')); ?></span> 47 49 </td> 48 50 </tr> … … 57 59 value="<?php echo esc_attr($subscriber->email); ?>" /> 58 60 59 <span class="smsapi-input-error"><?php echo smsapi_array_safe_get($errors, 'email'); ?></span>61 <span class="smsapi-input-error"><?php echo esc_attr(smsapi_array_safe_get($errors, 'email')); ?></span> 60 62 </td> 61 63 </tr> … … 70 72 value="<?php echo esc_attr($subscriber->city); ?>" /> 71 73 72 <span class="smsapi-input-error"><?php echo smsapi_array_safe_get($errors, 'city'); ?></span>74 <span class="smsapi-input-error"><?php echo esc_attr(smsapi_array_safe_get($errors, 'city')); ?></span> 73 75 </td> 74 76 </tr> … … 83 85 value="<?php echo !empty($subscriber->birthdayDate) ? date('Y-m-d', strtotime($subscriber->birthdayDate)) : ''; ?>" /> 84 86 85 <span class="smsapi-input-error"><?php echo smsapi_array_safe_get($errors, 'birthdate'); ?></span> 87 <span class="smsapi-input-error"> 88 <?php echo esc_attr(smsapi_array_safe_get($errors, 'birthdate')); ?> 89 </span> 86 90 87 91 <p class="description"><?php _e('Date in year-month-day format, ex: 1971-01-01', 'newsletter-sms-smsapi'); ?></p> -
newsletter-sms-smsapi/trunk/classes/SmsapiPsrClient.php
r2513083 r2708027 6 6 use Psr\Http\Message\ResponseInterface; 7 7 8 require_once SMSAPI_PLUGIN_PATH . '/classes/RequestFailedException.php'; 9 8 10 class SmsapiPsrClient implements ClientInterface 9 11 { 10 11 12 public function sendRequest(RequestInterface $request): ResponseInterface 12 13 { … … 93 94 } 94 95 96 $this->checkErrors($response); 97 95 98 $responseCode = wp_remote_retrieve_response_code($response); 96 99 $responseHeaders = wp_remote_retrieve_headers($response); … … 99 102 return new Response($responseCode, $responseHeaders->getAll(), $responseBody); 100 103 } 104 105 private function checkErrors($response) 106 { 107 if (is_wp_error($response)) { 108 /** 109 * @var WP_Error $response 110 */ 111 throw new RequestFailedException($response->get_error_message()); 112 } 113 } 101 114 } -
newsletter-sms-smsapi/trunk/classes/SmsapiUtils.php
r2512085 r2708027 2 2 3 3 use Smsapi\Client\Feature\Contacts\Data\Contact; 4 use Smsapi\Client\Service\SmsapiComService; 4 5 use Smsapi\Client\SmsapiHttpClient; 5 6 … … 45 46 } 46 47 47 private static function getService($token) 48 private static function getService($token): SmsapiComService 48 49 { 49 50 $client = new SmsapiHttpClient( -
newsletter-sms-smsapi/trunk/readme.txt
r2619465 r2708027 4 4 Requires at least: 4.2.3 5 5 Tested up to: 5.8.1 6 Stable tag: 2.0. 16 Stable tag: 2.0.2 7 7 Requires PHP: 7.0 8 8 License: GPLv2 or later … … 54 54 == Changelog == 55 55 56 = 2.0.2 = 57 * Add request error handling 58 * Update vendor smsapi-php-client library 59 56 60 = 2.0.1 = 57 61 * Fix security issues -
newsletter-sms-smsapi/trunk/smsapi.php
r2619465 r2708027 3 3 * Plugin Name: Newsletter SMS - SMSAPI 4 4 * Description: Plugin which allows you to create Newsletter which will collect clients phone numbers and allow you to send SMS messages to them. Database is synchronized with SMSAPI account so messages can be sent from SMSAPI panel as well. 5 * Version: 2.0. 15 * Version: 2.0.2 6 6 * Author: SMSAPI 7 7 * Author URI: http://smsapi.com/ -
newsletter-sms-smsapi/trunk/vendor/composer/ClassLoader.php
r2512085 r2708027 61 61 { 62 62 if (!empty($this->prefixesPsr0)) { 63 return call_user_func_array('array_merge', array_values($this->prefixesPsr0));63 return call_user_func_array('array_merge', $this->prefixesPsr0); 64 64 } 65 65 -
newsletter-sms-smsapi/trunk/vendor/composer/LICENSE
r2512085 r2708027 1 2 1 Copyright (c) Nils Adermann, Jordi Boggiano 3 2 … … 19 18 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 19 THE SOFTWARE. 21 -
newsletter-sms-smsapi/trunk/vendor/composer/installed.json
r2512085 r2708027 323 323 { 324 324 "name": "smsapi/php-client", 325 "version": "v3.0. 2",326 "version_normalized": "3.0. 2.0",325 "version": "v3.0.6", 326 "version_normalized": "3.0.6.0", 327 327 "source": { 328 328 "type": "git", 329 329 "url": "https://github.com/smsapi/smsapi-php-client.git", 330 "reference": " dd5955b4cc497bc6b4f3315b82fb96d766233602"331 }, 332 "dist": { 333 "type": "zip", 334 "url": "https://api.github.com/repos/smsapi/smsapi-php-client/zipball/ dd5955b4cc497bc6b4f3315b82fb96d766233602",335 "reference": " dd5955b4cc497bc6b4f3315b82fb96d766233602",330 "reference": "499af0b02cb8e07aa4774d85cc295a66141b69a4" 331 }, 332 "dist": { 333 "type": "zip", 334 "url": "https://api.github.com/repos/smsapi/smsapi-php-client/zipball/499af0b02cb8e07aa4774d85cc295a66141b69a4", 335 "reference": "499af0b02cb8e07aa4774d85cc295a66141b69a4", 336 336 "shasum": "" 337 337 }, … … 342 342 "psr/http-factory": "^1", 343 343 "psr/http-message": "^1", 344 "psr/log": "^1 "344 "psr/log": "^1 || ^2 || ^3" 345 345 }, 346 346 "require-dev": { … … 358 358 "guzzlehttp/psr7": "To use Curl HttpClient and HTTP message factories" 359 359 }, 360 "time": "202 1-01-29T12:46:06+00:00",360 "time": "2022-03-28T09:58:20+00:00", 361 361 "type": "library", 362 362 "installation-source": "dist", -
newsletter-sms-smsapi/trunk/vendor/smsapi/php-client/.gitignore
r2512085 r2708027 4 4 /phpunit.xml 5 5 /composer.phar 6 .phpunit.result.cache -
newsletter-sms-smsapi/trunk/vendor/smsapi/php-client/CHANGELOG.md
r2512085 r2708027 3 3 4 4 The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). 5 6 ## [3.0.6] - 2022-03-28 7 ### Fixed 8 - HTTP headers parsing, PSR-7 compliant 9 10 ## [3.0.5] - 2022-03-23 11 ### Fixed 12 - HTTP headers parsing, `HttpClient` issue 13 14 ## [3.0.4] - 2022-01-17 15 ### Added 16 - `psr/log` v2, v3 support 17 18 ## [3.0.3] - 2021-07-21 19 ### Fixed 20 - Guzzle PSR7 incompatible URI paths, `The path of a URI with an authority must start with a slash "/" or be empty` 5 21 6 22 ## [3.0.2] - 2021-01-29 -
newsletter-sms-smsapi/trunk/vendor/smsapi/php-client/Makefile
r2512085 r2708027 2 2 3 3 help: 4 @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' 4 @grep -hE '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) \ 5 | sort \ 6 | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' 7 8 9 include Makefile.php8 10 5 11 6 12 .DEFAULT_GOAL := help -
newsletter-sms-smsapi/trunk/vendor/smsapi/php-client/README.md
r2512085 r2708027 119 119 ``` 120 120 121 ## How to use a service with custom URI?121 ### How to use *SMSAPI.SE* or *SMSAPI.BG* services? 122 122 123 123 ```php … … 136 136 137 137 $apiToken = '0000000000000000000000000000000000000000'; 138 $uri = 'http ://example.com';138 $uri = 'https://smsapi.io/'; 139 139 140 140 $service = $client->smsapiComServiceWithUri($apiToken, $uri); … … 269 269 ``` 270 270 271 ## Test package 272 1. Download package: `composer create-project smsapi/php-client` 273 2. Execute tests: `./vendor/bin/phpunit --configuration phpunit.dist.xml` 271 ## How to test package 272 273 Copy `phpunit.dist.xml` to `phpunit.xml`. You may adjust it to your needs then. 274 275 Copy `tests-resources/config/config.dist.yml` to `tests-resources/config/config.yml`. Fill in SMSAPI service connection data. 276 277 ### How to run unit tests 278 279 Unit tests are included into package build process and run against its current version on every commit (see `.travis.yml`). 280 You can run those tests locally with ease using provided Docker configuration, simply run: 281 282 ```shell 283 make test-suite SUITE="unit" 284 ``` 285 286 ### How to run integration tests 287 288 Note that integration test works within an account you have configured in `tests-resources/config/config.yml`. 289 Although those test have been written to self-cleanup on exit, in case of failure some trash data may stay. 290 Use it with caution. 291 292 ```shell 293 make test-suite SUITE="integration" 294 ``` 295 296 ### How to run feature tests 297 298 Feature test groups are defined in `phpunit.dist.xml`. To run tests execute: 299 300 ```shell 301 make test-suite SUITE="feature-contacts" 302 ``` 303 304 ### How to run tests against PHP8 305 306 To run any of mentioned above against PHP8 use make targets with `php8` suffix. See `Makefile.php8`. 274 307 275 308 ## Docs & Infos 276 309 * [SMSAPI.COM API documentation](https://www.smsapi.com/docs) 277 310 * [SMSAPI.PL API documentation](https://www.smsapi.pl/docs) 311 * [SMSAPI.SE API documentation](https://www.smsapi.se/docs) 312 * [SMSAPI.BG API documentation](https://www.smsapi.bg/docs) 313 * [SMSAPI.COM web page](https://smsapi.com) 314 * [SMSAPI.PL web page](https://smsapi.pl) 315 * [SMSAPI.SE web page](https://smsapi.se) 316 * [SMSAPI.BG web page](https://smsapi.bg) 278 317 * [Repository on GitHub](https://github.com/smsapi/smsapi-php-client) 279 318 * [Package on Packagist](https://packagist.org/packages/smsapi/php-client) 280 * [SMSAPI.COM web page](https://smsapi.com)281 * [SMSAPI.PL web page](https://smsapi.pl) -
newsletter-sms-smsapi/trunk/vendor/smsapi/php-client/composer.json
r2512085 r2708027 19 19 "php": "^7 || ^8.0", 20 20 "ext-json": "*", 21 "psr/log": "^1 ",21 "psr/log": "^1 || ^2 || ^3", 22 22 "psr/http-message": "^1", 23 23 "psr/http-client": "^1", -
newsletter-sms-smsapi/trunk/vendor/smsapi/php-client/docker-compose.yml
r2512085 r2708027 8 8 network_mode: host 9 9 10 php8: 11 build: 12 context: . 13 dockerfile: Dockerfile.php8 14 volumes: 15 - .:/app 16 network_mode: host -
newsletter-sms-smsapi/trunk/vendor/smsapi/php-client/phpunit.dist.xml
r2512085 r2708027 68 68 </testsuite> 69 69 </testsuites> 70 71 <php> 72 <ini name="error_reporting" value="E_ALL"/> 73 <ini name="display_errors" value="1"/> 74 </php> 75 70 76 </phpunit> -
newsletter-sms-smsapi/trunk/vendor/smsapi/php-client/src/Curl/HttpClient.php
r2512085 r2708027 89 89 $headerSize = curl_getinfo($httpClient, CURLINFO_HEADER_SIZE); 90 90 $headerString = substr($response, 0, $headerSize); 91 $headers = array_filter(explode("\n", $headerString), 'trim');91 $headers = HttpHeadersParser::parse($headerString); 92 92 93 93 $body = substr($response, $headerSize); -
newsletter-sms-smsapi/trunk/vendor/smsapi/php-client/src/Curl/SmsapiHttpClient.php
r2512085 r2708027 5 5 namespace Smsapi\Client\Curl; 6 6 7 use Psr\Log\LoggerAwareTrait; 7 8 use Psr\Log\LoggerInterface; 8 9 use Smsapi\Client\Curl\Discovery\CurlDiscovery; … … 17 18 class SmsapiHttpClient implements SmsapiClient 18 19 { 20 use LoggerAwareTrait; 21 19 22 private $httpClient; 20 23 … … 31 34 } 32 35 33 public function setLogger(LoggerInterface $logger)34 {35 $this->httpClient->setLogger($logger);36 }37 38 36 public function smsapiPlService(string $apiToken): SmsapiPlService 39 37 { 40 return $this->httpClient ->smsapiPlService($apiToken);38 return $this->httpClient()->smsapiPlService($apiToken); 41 39 } 42 40 43 41 public function smsapiPlServiceWithUri(string $apiToken, string $uri): SmsapiPlService 44 42 { 45 return $this->httpClient ->smsapiPlServiceWithUri($apiToken, $uri);43 return $this->httpClient()->smsapiPlServiceWithUri($apiToken, $uri); 46 44 } 47 45 48 46 public function smsapiComService(string $apiToken): SmsapiComService 49 47 { 50 return $this->httpClient ->smsapiComService($apiToken);48 return $this->httpClient()->smsapiComService($apiToken); 51 49 } 52 50 53 51 public function smsapiComServiceWithUri(string $apiToken, string $uri): SmsapiComService 54 52 { 55 return $this->httpClient->smsapiComServiceWithUri($apiToken, $uri); 53 return $this->httpClient()->smsapiComServiceWithUri($apiToken, $uri); 54 } 55 56 private function httpClient(): \Smsapi\Client\SmsapiHttpClient 57 { 58 if ($this->logger instanceof LoggerInterface) { 59 $this->httpClient->setLogger($this->logger); 60 } 61 62 return $this->httpClient; 56 63 } 57 64 } -
newsletter-sms-smsapi/trunk/vendor/smsapi/php-client/src/Infrastructure/HttpClient/Decorator/BaseUriDecorator.php
r2512085 r2708027 38 38 $scheme = $baseUriParts['scheme'] ?? ''; 39 39 $host = $baseUriParts['host'] ?? ''; 40 $path = $baseUriParts['path'] ?? ''; 40 $basePath = $baseUriParts['path'] ?? ''; 41 $basePath = rtrim($basePath, '/'); 41 42 43 $uri = $uri->withPath($basePath . '/' . $uri->getPath()); 44 $uri = $uri->withHost($host); 42 45 $uri = $uri->withScheme($scheme); 43 $uri = $uri->withHost($host);44 $uri = $uri->withPath($path . $uri->getPath());45 46 46 47 return $request->withUri($uri); -
newsletter-sms-smsapi/trunk/vendor/smsapi/php-client/src/Infrastructure/HttpClient/Decorator/LoggerDecorator.php
r2512085 r2708027 27 27 { 28 28 $this->logger->info('Request', [ 29 'request' => $request, 29 30 'method' => $request->getMethod(), 30 31 'uri' => $request->getUri(), 32 'headers' => $request->getHeaders(), 33 'body' => $request->getBody()->getContents(), 31 34 ]); 32 35 33 36 $response = $this->client->sendRequest($request); 34 37 35 $this->logger->info('Response', ['response' => $response]); 38 $this->logger->info('Response', [ 39 'response' => $response, 40 'headers' => $response->getHeaders(), 41 'body' => $response->getBody()->getContents(), 42 ]); 36 43 37 44 return $response; -
newsletter-sms-smsapi/trunk/vendor/smsapi/php-client/src/Infrastructure/RequestAssembler/RequestAssembler.php
r2512085 r2708027 34 34 $request = $request->withHeader($header, $value); 35 35 } 36 36 37 $request = $request->withBody($this->streamFactory->createStream($requestDTO->getBody())); 37 38 -
newsletter-sms-smsapi/trunk/vendor/smsapi/php-client/src/SmsapiClient.php
r2512085 r2708027 13 13 interface SmsapiClient extends LoggerAwareInterface 14 14 { 15 const VERSION = '3.0. 2';15 const VERSION = '3.0.6'; 16 16 17 17 public function smsapiPlService(string $apiToken): SmsapiPlService; -
newsletter-sms-smsapi/trunk/vendor/smsapi/php-client/tests-resources/config/config.dist.yml
r2512085 r2708027 1 1 Service name: SMSAPI.PL 2 2 API URI: https://api.smsapi.pl 3 logger: false 3 API token: 0000000000000000000000000000000000000000 -
newsletter-sms-smsapi/trunk/vendor/smsapi/php-client/tests-resources/config/config.yml.example
r2512085 r2708027 2 2 API token: 40-characters length string generated in SMSAPI Panel 3 3 API URI: "https://api.smsapi.pl", "https://api.smsapi.com", "https://api2.smsapi.pl" or "https://api2.smsapi.com" 4 logger: true -
newsletter-sms-smsapi/trunk/vendor/smsapi/php-client/tests/SmsapiClientIntegrationTestCase.php
r2512085 r2708027 34 34 $smsapiHttpClient = new SmsapiHttpClient(); 35 35 36 if (Config::get('logger')) {37 $smsapiHttpClient->setLogger(new TestLogger());38 }39 40 36 $serviceName = Config::get('Service name'); 41 37 if ($serviceName === ServiceName::SMSAPI_PL) { -
newsletter-sms-smsapi/trunk/views/admin/gateway/index.php
r2619465 r2708027 20 20 21 21 <?php if (smsapi_array_safe_get($errors, 'sendername')): ?> 22 <div class="text-danger"><?php echo smsapi_array_safe_get($errors, 'sendername'); ?></div>22 <div class="text-danger"><?php echo esc_attr(smsapi_array_safe_get($errors, 'sendername')); ?></div> 23 23 <?php endif; ?> 24 24 </td> … … 35 35 36 36 <?php if (smsapi_array_safe_get($errors, 'recipients_type')): ?> 37 <div class="text-danger"><?php echo smsapi_array_safe_get($errors, 'recipients_type'); ?></div>37 <div class="text-danger"><?php echo esc_attr(smsapi_array_safe_get($errors, 'recipients_type')); ?></div> 38 38 <?php endif; ?> 39 39 … … 54 54 55 55 <?php if (smsapi_array_safe_get($errors, 'message')): ?> 56 <div class="text-danger"><?php echo smsapi_array_safe_get($errors, 'message'); ?></div>56 <div class="text-danger"><?php echo esc_attr(smsapi_array_safe_get($errors, 'message')); ?></div> 57 57 <?php endif; ?> 58 58 </td> -
newsletter-sms-smsapi/trunk/views/admin/settings/general.php
r2619465 r2708027 42 42 43 43 <?php if (smsapi_array_safe_get($errors, 'phonebook_group')): ?> 44 <p class="text-danger"><?php echo smsapi_array_safe_get($errors, 'phonebook_group'); ?></p>44 <p class="text-danger"><?php echo esc_attr(smsapi_array_safe_get($errors, 'phonebook_group')); ?></p> 45 45 <?php endif; ?> 46 46 … … 76 76 77 77 <?php if (smsapi_array_safe_get($errors, 'api_sendername')): ?> 78 <p class="text-danger"><?php echo smsapi_array_safe_get($errors, 'api_sendername'); ?></p>78 <p class="text-danger"><?php echo esc_attr(smsapi_array_safe_get($errors, 'api_sendername')); ?></p> 79 79 <?php endif; ?> 80 80 -
newsletter-sms-smsapi/trunk/views/admin/settings/login.php
r2617806 r2708027 9 9 <input type="text" class="regular-text" name="api_token" id="api_token" autocomplete="off" 10 10 maxlength="50" 11 value="<?php echo smsapi_array_safe_get($config, 'api_token', ''); ?>"/>11 value="<?php echo esc_attr(smsapi_array_safe_get($config, 'api_token', '')); ?>"/> 12 12 13 13 <p class="description"><?php _e('Enter token information', 'newsletter-sms-smsapi'); ?></p> 14 14 15 15 <?php if (smsapi_array_safe_get($errors, 'api_token')): ?> 16 <span class="text-danger"><?php echo smsapi_array_safe_get($errors, 'api_token'); ?></span>16 <span class="text-danger"><?php echo esc_attr(smsapi_array_safe_get($errors, 'api_token')); ?></span> 17 17 <?php endif; ?> 18 18 </td> -
newsletter-sms-smsapi/trunk/views/admin/settings/notifications.php
r2617806 r2708027 16 16 17 17 <div> 18 <textarea name="subscription_notification_content" id="subscription-notification-content"><?php echo smsapi_array_safe_get($config, 'subscription_notification_content', ''); ?></textarea> 18 <textarea name="subscription_notification_content" id="subscription-notification-content"> 19 <?php echo esc_textarea(smsapi_array_safe_get($config, 'subscription_notification_content', '')); ?> 20 </textarea> 19 21 20 22 <p class="description"><?php _e('Message content', 'newsletter-sms-smsapi'); ?></p> -
newsletter-sms-smsapi/trunk/views/admin/subscribers/form.php
r2619465 r2708027 18 18 <input class="smsapi-input" type="text" name="phonenumber" id="smsapi-input-phonenumber" 19 19 value="<?php echo esc_attr($subscriber->phoneNumber); ?>" /> 20 <span class="smsapi-input-error"><?php echo smsapi_array_safe_get($errors, 'phonenumber'); ?></span> 20 <span class="smsapi-input-error"> 21 <?php echo esc_attr(smsapi_array_safe_get($errors, 'phonenumber')); ?> 22 </span> 21 23 </td> 22 24 </tr> … … 31 33 value="<?php echo esc_attr($subscriber->firstName); ?>" /> 32 34 33 <span class="smsapi-input-error"><?php echo smsapi_array_safe_get($errors, 'firstname'); ?></span>35 <span class="smsapi-input-error"><?php echo esc_attr(smsapi_array_safe_get($errors, 'firstname')); ?></span> 34 36 </td> 35 37 </tr> … … 44 46 value="<?php echo esc_attr($subscriber->lastName); ?>" /> 45 47 46 <span class="smsapi-input-error"><?php echo smsapi_array_safe_get($errors, 'lastname'); ?></span>48 <span class="smsapi-input-error"><?php echo esc_attr(smsapi_array_safe_get($errors, 'lastname')); ?></span> 47 49 </td> 48 50 </tr> … … 57 59 value="<?php echo esc_attr($subscriber->email); ?>" /> 58 60 59 <span class="smsapi-input-error"><?php echo smsapi_array_safe_get($errors, 'email'); ?></span>61 <span class="smsapi-input-error"><?php echo esc_attr(smsapi_array_safe_get($errors, 'email')); ?></span> 60 62 </td> 61 63 </tr> … … 70 72 value="<?php echo esc_attr($subscriber->city); ?>" /> 71 73 72 <span class="smsapi-input-error"><?php echo smsapi_array_safe_get($errors, 'city'); ?></span>74 <span class="smsapi-input-error"><?php echo esc_attr(smsapi_array_safe_get($errors, 'city')); ?></span> 73 75 </td> 74 76 </tr> … … 83 85 value="<?php echo !empty($subscriber->birthdayDate) ? date('Y-m-d', strtotime($subscriber->birthdayDate)) : ''; ?>" /> 84 86 85 <span class="smsapi-input-error"><?php echo smsapi_array_safe_get($errors, 'birthdate'); ?></span> 87 <span class="smsapi-input-error"> 88 <?php echo esc_attr(smsapi_array_safe_get($errors, 'birthdate')); ?> 89 </span> 86 90 87 91 <p class="description"><?php _e('Date in year-month-day format, ex: 1971-01-01', 'newsletter-sms-smsapi'); ?></p>
Note: See TracChangeset
for help on using the changeset viewer.