Skip to content

Commit 56cce64

Browse files
authored
Merge pull request #166 from gigya/develop
6.1.1
2 parents 9ff0863 + e2bb91e commit 56cce64

File tree

11 files changed

+41
-25
lines changed

11 files changed

+41
-25
lines changed

GigyaAction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ public function init()
196196

197197
/* Loads requirements for any Gigya's Google-Analytics integration. */
198198
if ( ! empty( $this->global_options['google_analytics'] ) ) {
199-
wp_enqueue_script( 'gigya_ga', GIGYA__CDN_PROTOCOL . '.gigya.com/js/gigyaGAIntegration.js' );
199+
wp_enqueue_script( 'gigya_ga', 'https://cdns.gigya.com/js/gigyaGAIntegration.js' );
200200
}
201201
}
202202

admin/admin.GigyaSettings.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,11 +193,11 @@ public static function onSave() {
193193
);
194194

195195
if ( ! empty( $res ) ) {
196-
$gigyaErrCode = $res->getErrorCode();
197-
if ( $gigyaErrCode > 0 ) {
198-
$gigyaErrMsg = $res->getErrorMessage();
196+
$gigya_error_code = $res->getErrorCode();
197+
if ( $gigya_error_code > 0 ) {
198+
$gigya_error_message = $res->getErrorMessage();
199199

200-
self::setError( $gigyaErrCode, $gigyaErrMsg, ( ! empty( $res->getData() ) ) ? $res->getString( "callId", "N/A" ) : null );
200+
self::setError( $gigya_error_code, $gigya_error_message, ( ! empty( $res->getData() ) ) ? $res->getString( "callId", "N/A" ) : null );
201201

202202
/* Prevent updating values */
203203
static::_keepOldApiValues();

admin/forms/globalSettingsForm.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ function globalSettingsForm() {
7676
'eu1.gigya.com' => __( 'EU Data Center' ),
7777
'au1.gigya.com' => __( 'AU Data Center' ),
7878
'ru1.gigya.com' => __( 'RU Data Center' ),
79-
'cn1.gigya-api.cn' => __( 'CN Data Center' ),
79+
'cn1.sapcdm.cn' => __( 'CN Data Center' ),
8080
'other' => __( 'Other' )
8181
);
8282
if (!array_key_exists($dataCenter, $options)) {
@@ -187,4 +187,4 @@ function globalSettingsForm() {
187187
}
188188

189189
echo _gigya_form_render( $form, GIGYA__SETTINGS_GLOBAL );
190-
}
190+
}

admin/forms/screenSetSettingsForm.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,16 @@ function screenSetSettingsForm() {
115115
$form = [];
116116

117117
$form['raas_txt'] = [
118-
'markup' => '<small><span>RaaS requires initial configuration in SAP Customer Data Cloud\'s Admin Console. Screen sets can be defined in the <a class="link-https" target="_blank" rel="external nofollow noopener noreferrer" href="https://console.gigya.com/site/partners/Settings.aspx#cmd%3DUserManagement360.ScreenSets" title="https://console.gigya.com/site/partners/Settings.aspx#/screen-sets-app/dashboard">UI Builder</a>. The page will display a list of predefined default screen-sets, each with an ID. Click on the "Visual Editor" link next to the screen-set that you want to use, this will open the <a class="external" target="_blank" title="UI Builder" rel="internal" href="https://developers.gigya.com/display/GD/UI+Builder">Visual Editor</a> window. You can modify the screens, or just hit the "Save" button to activate them. Please make sure that the screen-set IDs that are defined below match the IDs of the screen-sets you have configured in the <a class="link-https" target="_blank" rel="external nofollow noopener noreferrer" href="https://console.gigya.com/site/partners/Settings.aspx#cmd%3DUserManagement360.ScreenSets" title="https://console.gigya.com/site/partners/Settings.aspx#cmd%3DUserManagement360.ScreenSets">UI Builder</a> page.</span></small>',
118+
'markup' => '<small><span>RaaS requires initial configuration in SAP Customer Data Cloud\'s Admin Console. Screen sets can be defined in the
119+
<a class="link-https" target="_blank" rel="external nofollow noopener noreferrer" href="https://console.gigya.com/site/partners/Settings.aspx#/screen-sets-app/web/dashboard" title="UI Builder">UI Builder</a>.
120+
The page will display a list of predefined default screen-sets, each with an ID.
121+
Click on the "Visual Editor" link next to the screen-set that you want to use, this will open the
122+
<a class="external" target="_blank" title="UI Builder" rel="internal" href="https://help.sap.com/viewer/8b8d6fffe113457094a17701f63e3d6a/GIGYA/en-US/417d11df70b21014bbc5a10ce4041860.html">Visual Editor</a>
123+
window.
124+
You can modify the screens, or just hit the "Save" button to activate them.
125+
Please make sure that the screen-set IDs that are defined below match the IDs of the screen-sets you have configured in the
126+
<a class="link-https" target="_blank" rel="external nofollow noopener noreferrer" href="https://console.gigya.com/site/partners/Settings.aspx#/screen-sets-app/web/dashboard" title="UI Builder">UI Builder</a>
127+
page.</span></small>',
119128
];
120129

121130
$form['raas_screens'] = [
@@ -220,7 +229,7 @@ function screenSetSettingsForm() {
220229
'rows' => buildExistingCustomScreenSetArray( $table_name, $screenset_list ),
221230
];
222231
} else {
223-
$first_line = __( 'Error retrieving custom screen-set list from SAP Customer Data Cloud. It will not be possible to embed CDC screen-sets on your website. If the problem persists, please contact CDC support.' );
232+
$first_line = __( 'Error retrieving custom screen-set list from SAP Customer Data Cloud. It will not be possible to embed CDC screen-sets on your website. Please make sure that the <a href="?page=gigya_global_settings">Global Configuration</a> has been set correctly. If the problem persists, please contact SAP CDC support.' );
224233
$second_line = __( 'Check the error log for more details.' );
225234
$connection_error = array(
226235
'error_message' => array(),

admin/tpl/adminPage-wrapper.tpl.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<?php endforeach; ?>
1717
</div>
1818
<?php
19-
$helpUrl = 'https://developers.gigya.com/display/GD/WordPress';
20-
printf( __( 'To learn more about SAP Customer Data Cloud & how to setup an account, please visit our developer documentation <a target="_blank" rel="noopener noreferrer" href="%1$s">here</a>.' ), $helpUrl );
19+
$helpUrl = 'https://help.sap.com/viewer/8b8d6fffe113457094a17701f63e3d6a/LATEST/en-US/414f36ba70b21014bbc5a10ce4041860.html';
20+
printf( __( 'To learn more about SAP Customer Data Cloud & how to setup an account, please visit our developer documentation <a target="_blank" rel="noopener noreferrer" href="%1$s" title="SAP CDC Documentation">here</a>.' ), $helpUrl );
2121
?>
22-
</div>
22+
</div>

cms_kit/GigyaApiHelper.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,23 @@ class GigyaApiHelper
3333
* @param string $authMode Authentication method: user_secret or user_rsa
3434
*/
3535
public function __construct( $apiKey, $userKey, $authKey, $dataCenter, $authMode = 'user_secret' ) {
36-
$this->defConfigFilePath = ".." . DIRECTORY_SEPARATOR . "configuration/DefaultConfiguration.json";
36+
$this->defConfigFilePath = '..' . DIRECTORY_SEPARATOR . 'configuration/DefaultConfiguration.json';
3737
$defaultConf = @file_get_contents( $this->defConfigFilePath );
3838
if ( ! $defaultConf ) {
3939
$confArray = array();
4040
} else {
4141
$confArray = json_decode( file_get_contents( $this->defConfigFilePath ) );
4242
}
43-
$this->userKey = ! empty( $userKey ) ? $userKey : $confArray['appKey'];
43+
$this->userKey = ! empty( $userKey ) ? $userKey : ( $confArray['appKey'] ?? '' );
4444
$this->authMode = $authMode;
4545
if ( $authMode === 'user_secret' ) {
4646
$this->authKey = ! empty( $authKey ) ? self::decrypt( $authKey, SECURE_AUTH_KEY ) : self::decrypt( $confArray['appSecret'], SECURE_AUTH_KEY );
4747
} else {
4848
$this->authKey = self::decrypt( $authKey, SECURE_AUTH_KEY );
4949
}
5050

51-
$this->apiKey = ! empty( $apiKey ) ? $apiKey : $confArray['apiKey'];
52-
$this->dataCenter = ! empty( $dataCenter ) ? $dataCenter : $confArray['dataCenter'];
51+
$this->apiKey = ! empty( $apiKey ) ? $apiKey : ( $confArray['apiKey'] ?? '' );
52+
$this->dataCenter = ! empty( $dataCenter ) ? $dataCenter : ( $confArray['dataCenter'] ?? 'us1.gigya.com' );
5353

5454
$this->env = '{"cms_name":"WordPress","cms_version":"WordPress_' . get_bloginfo( 'version' ) . '","gigya_version":"Gigya_module_' . GIGYA__VERSION . '","php_version":"' . phpversion() . '"}'; /* WordPress only */
5555
}

features/login/GigyaLoginWidget.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
use Gigya\WordPress\GigyaLoginSet;
4+
35
/**
46
* Adds LoginWidget widget.
57
*/
@@ -10,7 +12,7 @@ class GigyaLogin_Widget extends WP_Widget {
1012
*/
1113
function __construct() {
1214
$args = array(
13-
'description' => __( 'Login by SAP Customer Data Cloud' )
15+
'description' => __( 'Login by SAP Customer Data Cloud' )
1416
);
1517
parent::__construct( 'gigya_login', __( 'SAP CDC Login' ), $args );
1618
}
@@ -138,4 +140,4 @@ public function update( $new_instance, $old_instance ) {
138140
return $new_instance;
139141
}
140142

141-
}
143+
}

features/raas/GigyaOfflineSync.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ public function __construct() {
1313
* @param string $job_type
1414
* @param string $job_status
1515
* @param string $to
16-
* @param int $processed_items
17-
* @param int $failed_items
16+
* @param int|null $processed_items
17+
* @param int|null $failed_items
1818
* @param string $custom_email_body
1919
*/
2020
public function sendCronEmail( $job_type, $job_status, $to, $processed_items = null, $failed_items = null, $custom_email_body = '' ) {
@@ -30,4 +30,4 @@ public function sendCronEmail( $job_type, $job_status, $to, $processed_items = n
3030

3131
wp_mail( $to, 'SAP CDC cron job of type ' . $job_type . ' ' . $job_status . ' on website ' . get_bloginfo(), $email_body );
3232
}
33-
}
33+
}

gigya.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: SAP Customer Data Cloud
44
* Plugin URI: https://www.sap.com/products/crm/customer-data-management.html
55
* Description: Allows sites to utilize the SAP Customer Data Cloud API for authentication and social network updates.
6-
* Version: 6.1.0
6+
* Version: 6.1.1
77
* Author: SAP SE
88
* Author URI: https://www.sap.com/products/crm/customer-data-management.html
99
* License: Apache v2.0
@@ -20,7 +20,7 @@
2020
*/
2121
define( 'GIGYA__MINIMUM_WP_VERSION', '4.7' );
2222
define( 'GIGYA__MINIMUM_PHP_VERSION', '7.0' );
23-
define( 'GIGYA__VERSION', '6.1.0' );
23+
define( 'GIGYA__VERSION', '6.1.1' );
2424
define( 'GIGYA__PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
2525
define( 'GIGYA__PLUGIN_URL', plugin_dir_url( __FILE__ ) );
2626
define( 'GIGYA__DEFAULT_JS_CDN', 'https://cdns.gigya.com/js/socialize.js' );
@@ -264,6 +264,7 @@ function _gigParam( $array, $key, $default = null, $obfuscate = false ) {
264264
*/
265265
function _gigya_data_center( $settings ) {
266266
$default_data_center = 'us1.gigya.com';
267+
267268
if ( $settings['data_center'] == 'other' ) {
268269
if ( ! empty( $settings['other_ds'] ) ) {
269270
return $settings['other_ds'];

install.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ private function upgradeWidgets() {
144144
// Updating the sidebars.
145145
$sb = get_option( 'sidebars_widgets' );
146146
foreach ( $sb as $k => $sidebar ) {
147-
if ( count( $sidebar ) > 0 )
147+
if ( is_array( $sidebar ) and ( count( $sidebar ) > 0 ) )
148148
{
149149
foreach ( $sidebar as $widget )
150150
{

0 commit comments

Comments
 (0)