Skip to content

Commit

Permalink
Version Bump to 4.1.14
Browse files Browse the repository at this point in the history
Minor fixes
  • Loading branch information
Alessandro Grazioli authored and Alessandro Grazioli committed Jan 16, 2018
1 parent 736408f commit 686ceda
Show file tree
Hide file tree
Showing 27 changed files with 1,891 additions and 2,303 deletions.
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
Changelog
=========

#### 4.1.14 - January 8, 2018

**Fixes**

- Validate method was incorrectly checking required array fields.

**Improvements**

- Wrap some missing strings in translate calls. Thanks [morlor](https://github.com/morloi).
- Make it clear that redirecting after successful form submissions will not show the "subscribed" message.



#### 4.1.13 - December 28, 2017

**Fixes**

- Array to string conversion in default form messages.

**Additions**

- Allow marking Gravity Forms sign-up checkbox as a required field.


#### 4.1.12 - December 11, 2017

**Fixes**
Expand Down
7 changes: 6 additions & 1 deletion assets/js/forms-admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -1072,7 +1072,7 @@ var FormWatcher = function FormWatcher(m, editor, settings, fields, events, help
// query fields in form with [required] attribute
var requiredFieldElements = editor.query('[required]');
Array.prototype.forEach.call(requiredFieldElements, function (el) {
var name = el.name.toUpperCase();
var name = el.name;

// bail if name attr starts with underscore
if (name[0] === '_') {
Expand All @@ -1082,6 +1082,11 @@ var FormWatcher = function FormWatcher(m, editor, settings, fields, events, help
// replace array brackets with dot style notation
name = name.replace(/\[(\w+)\]/g, '.$1');

// uppercase everything before the .
var pos = name.indexOf('.');
pos = pos > 0 ? pos : name.length;
name = name.substr(0, pos).toUpperCase() + name.substr(pos);

// only add field if it's not already in it
if (requiredFields.indexOf(name) === -1) {
requiredFields.push(name);
Expand Down
2 changes: 1 addition & 1 deletion assets/js/forms-admin.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/forms-admin.min.js.map

Large diffs are not rendered by default.

276 changes: 138 additions & 138 deletions includes/api/wrapper.php
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
// API Wrapper v1.22(20170209)
// API Wrapper v1.23(20180116)
//
// Compatible with PHP4+ with HASH Cryptography extension (PHP >5.1.2)
// or the MHASH Cryptography extension.
Expand Down Expand Up @@ -56,29 +56,29 @@
if (!function_exists('service_version')) {

// Constants
define('ENS_ERROR_WRONG_PARAMETER_COUNT', -32602);
define('ENS_ERROR_UNKNOWN', -99);
define('ENS_ERROR_INVALID_API_KEY', 11);
define('ENS_ERROR_TOKEN_EXPIRED', 12);
define('ENS_ERROR_TOKEN_PREVIOUSLY_USED', 13);
define('ENS_ERROR_UNSUPPORTED', 101);
define('ENS_ERROR_PERMISSION_DENIED', 102);
define('ENS_ERROR_INVALID_ARGUMENT', 103);
define('ENS_ERROR_NEWSLETTER_NOT_EXISTS', 201);
define('ENS_ERROR_NEWSLETTER_NOT_VALID', 202);
define('ENS_ERROR_NEWSLETTER_NOT_SENT', 203);
define('ENS_ERROR_NEWSLETTER_CANT_SEND', 204);
define('ENS_ERROR_NEWSLETTER_TOO_OLD', 205);
define('ENS_ERROR_USER_NOT_EXISTS', 301);
define('ENS_ERROR_USER_NOT_VALID', 302);
define('ENS_ERROR_USER_ID_NOT_FOUND', 303);
define('ENS_ERROR_AUDIENCE_NOT_EXISTS', 401);
define('ENS_ERROR_AUDIENCE_NOT_VALID', 402);
define('ENS_ERROR_INVALID_FROM', 502);
define('ENS_ERROR_WRONG_PARAMETER_COUNT', -32602);
define('ENS_ERROR_UNKNOWN', -99);
define('ENS_ERROR_INVALID_API_KEY', 11);
define('ENS_ERROR_TOKEN_EXPIRED', 12);
define('ENS_ERROR_TOKEN_PREVIOUSLY_USED', 13);
define('ENS_ERROR_UNSUPPORTED', 101);
define('ENS_ERROR_PERMISSION_DENIED', 102);
define('ENS_ERROR_INVALID_ARGUMENT', 103);
define('ENS_ERROR_NEWSLETTER_NOT_EXISTS', 201);
define('ENS_ERROR_NEWSLETTER_NOT_VALID', 202);
define('ENS_ERROR_NEWSLETTER_NOT_SENT', 203);
define('ENS_ERROR_NEWSLETTER_CANT_SEND', 204);
define('ENS_ERROR_NEWSLETTER_TOO_OLD', 205);
define('ENS_ERROR_USER_NOT_EXISTS', 301);
define('ENS_ERROR_USER_NOT_VALID', 302);
define('ENS_ERROR_USER_ID_NOT_FOUND', 303);
define('ENS_ERROR_AUDIENCE_NOT_EXISTS', 401);
define('ENS_ERROR_AUDIENCE_NOT_VALID', 402);
define('ENS_ERROR_INVALID_FROM', 502);


function service_version() {
return 1022;
return 1023;
}

function service_init($hostoruniquekey, $api_key = false, $secret = false) {
Expand Down Expand Up @@ -237,121 +237,121 @@ function service_last_method_args() {

}

if (!isset($GLOBALS['voxmail_wrapper_uaprefix']))
if (!isset($GLOBALS['service_wrapper_uaprefix']))
$GLOBALS['service_wrapper_uaprefix'] = "service-wrapper/".service_version()." ";
function service_info() {
return service_invoke('service.info');
}

function service_newsletter_load($nid, $fields = array ()) {
return service_invoke('service.newsletter.load', $nid, $fields);
}

function service_newsletter_create($data) {
return service_invoke('service.newsletter.create', $data);
}

function service_newsletter_update($nid, $data) {
return service_invoke('service.newsletter.update', $nid, $data);
}

function service_newsletter_delete($nid) {
return service_invoke('service.newsletter.delete', $nid);
}

function service_newsletter_duplicate($nid) {
return service_invoke('service.newsletter.duplicate', $nid);
}

function service_newsletter_check($nid) {
return service_invoke('service.newsletter.check', $nid);
}

function service_newsletter_send($nid, $timestamp = 0) {
return service_invoke('service.newsletter.send', $nid, $timestamp);
}

function service_newsletter_csend($data, $timestamp = 0) {
return service_invoke('service.newsletter.csend', $data, $timestamp);
}

function service_newsletter_send_test($nid, $to = false) {
return service_invoke('service.newsletter.send_test', $nid, $to);
}

function service_newsletter_results($nid, $section = '') {
return service_invoke('service.newsletter.results', $nid, $section);
}

function service_newsletter_results_users($nid, $filters = array (), $order = '', $pageLength = 0, $pageNo = 0) {
return service_invoke('service.newsletter.results_users', $nid, $filters, $order, $pageLength, $pageNo);
}

function service_newsletter_list($filters = array (), $order = '', $pageLength = 0, $pageNo = 0) {
return service_invoke('service.newsletter.list', $filters, $order, $pageLength, $pageNo);
}

function service_user_load($uid_mail, $fields = array ()) {
return service_invoke('service.user.load', $uid_mail, $fields);
}

function service_user_login($uid_mail, $pass, $fields = array ()) {
return service_invoke('service.user.login', $uid_mail, $pass, $fields);
}

function service_user_subscribe($data, $ip = false) {
return service_invoke('service.user.subscribe', $data, $ip);
}

function service_user_unsubscribe($uid_mail, $ip = false) {
return service_invoke('service.user.unsubscribe', $uid_mail, $ip);
}

function service_user_disable_mail($uid_mail, $type = 'admin', $ip = '') {
return service_invoke('service.user.disable_mail', $uid_mail, $type, $ip);
}

function service_user_enable_mail($uid_mail, $ip = '') {
return service_invoke('service.user.enable_mail', $uid_mail, $ip);
}

function service_user_create($data) {
return service_invoke('service.user.create', $data);
}

function service_user_update($uid_mail, $data, $create_if_not_exists = false) {
return service_invoke('service.user.update', $uid_mail, $data, $create_if_not_exists);
}

function service_user_erase($uid_mail) {
return service_invoke('service.user.erase', $uid_mail);
}

function service_user_list($filters = array (), $order = '', $pageLength = 0, $pageNo = 0) {
return service_invoke('service.user.list', $filters, $order, $pageLength, $pageNo);
}

function service_user_count($filters = array ()) {
return service_invoke('service.user.count', $filters);
}

function service_user_profile_fields_list() {
return service_invoke('service.user.profile_fields.list');
}

function service_audience_reset($aidlist) {
return service_invoke('service.audience.reset', $aidlist);
}

function service_audience_list($filters = array ()) {
return service_invoke('service.audience.list', $filters);
}

function service_audience_create($data) {
return service_invoke('service.audience.create', $data);
}

function service_audience_delete($aid) {
return service_invoke('service.audience.delete', $aid);
}
function service_info() {
return service_invoke('service.info');
}

function service_newsletter_load($nid, $fields = array ()) {
return service_invoke('service.newsletter.load', $nid, $fields);
}

function service_newsletter_create($data) {
return service_invoke('service.newsletter.create', $data);
}

function service_newsletter_update($nid, $data) {
return service_invoke('service.newsletter.update', $nid, $data);
}

function service_newsletter_delete($nid) {
return service_invoke('service.newsletter.delete', $nid);
}

function service_newsletter_duplicate($nid) {
return service_invoke('service.newsletter.duplicate', $nid);
}

function service_newsletter_check($nid) {
return service_invoke('service.newsletter.check', $nid);
}

function service_newsletter_send($nid, $timestamp = 0) {
return service_invoke('service.newsletter.send', $nid, $timestamp);
}

function service_newsletter_csend($data, $timestamp = 0) {
return service_invoke('service.newsletter.csend', $data, $timestamp);
}

function service_newsletter_send_test($nid, $to = false) {
return service_invoke('service.newsletter.send_test', $nid, $to);
}

function service_newsletter_results($nid, $section = '') {
return service_invoke('service.newsletter.results', $nid, $section);
}

function service_newsletter_results_users($nid, $filters = array (), $order = '', $pageLength = 0, $pageNo = 0) {
return service_invoke('service.newsletter.results_users', $nid, $filters, $order, $pageLength, $pageNo);
}

function service_newsletter_list($filters = array (), $order = '', $pageLength = 0, $pageNo = 0) {
return service_invoke('service.newsletter.list', $filters, $order, $pageLength, $pageNo);
}

function service_user_load($uid_mail, $fields = array ()) {
return service_invoke('service.user.load', $uid_mail, $fields);
}

function service_user_login($uid_mail, $pass, $fields = array ()) {
return service_invoke('service.user.login', $uid_mail, $pass, $fields);
}

function service_user_subscribe($data, $ip = false) {
return service_invoke('service.user.subscribe', $data, $ip);
}

function service_user_unsubscribe($uid_mail, $ip = false) {
return service_invoke('service.user.unsubscribe', $uid_mail, $ip);
}

function service_user_disable_mail($uid_mail, $type = 'admin', $ip = '') {
return service_invoke('service.user.disable_mail', $uid_mail, $type, $ip);
}

function service_user_enable_mail($uid_mail, $ip = '') {
return service_invoke('service.user.enable_mail', $uid_mail, $ip);
}

function service_user_create($data) {
return service_invoke('service.user.create', $data);
}

function service_user_update($uid_mail, $data, $create_if_not_exists = false) {
return service_invoke('service.user.update', $uid_mail, $data, $create_if_not_exists);
}

function service_user_erase($uid_mail) {
return service_invoke('service.user.erase', $uid_mail);
}

function service_user_list($filters = array (), $order = '', $pageLength = 0, $pageNo = 0) {
return service_invoke('service.user.list', $filters, $order, $pageLength, $pageNo);
}

function service_user_count($filters = array ()) {
return service_invoke('service.user.count', $filters);
}

function service_user_profile_fields_list() {
return service_invoke('service.user.profile_fields.list');
}

function service_audience_reset($aidlist) {
return service_invoke('service.audience.reset', $aidlist);
}

function service_audience_list($filters = array ()) {
return service_invoke('service.audience.list', $filters);
}

function service_audience_create($data) {
return service_invoke('service.audience.create', $data);
}

function service_audience_delete($aid) {
return service_invoke('service.audience.delete', $aid);
}

Loading

0 comments on commit 686ceda

Please sign in to comment.