Changeset 2818063
- Timestamp:
- 11/15/2022 07:19:33 AM (3 years ago)
- Location:
- crowdaa-sync
- Files:
-
- 4 edited
- 74 copied
-
tags/1.6.2 (copied) (copied from crowdaa-sync/trunk)
-
tags/1.6.2/CHANGELOG (copied) (copied from crowdaa-sync/trunk/CHANGELOG) (1 diff)
-
tags/1.6.2/LICENSE.txt (copied) (copied from crowdaa-sync/trunk/LICENSE.txt)
-
tags/1.6.2/README.txt (copied) (copied from crowdaa-sync/trunk/README.txt) (1 diff)
-
tags/1.6.2/admin (copied) (copied from crowdaa-sync/trunk/admin)
-
tags/1.6.2/admin/class-crowdaa-sync-add-info-api.php (copied) (copied from crowdaa-sync/trunk/admin/class-crowdaa-sync-add-info-api.php)
-
tags/1.6.2/admin/class-crowdaa-sync-add-info-wp.php (copied) (copied from crowdaa-sync/trunk/admin/class-crowdaa-sync-add-info-wp.php)
-
tags/1.6.2/admin/class-crowdaa-sync-admin-display.php (copied) (copied from crowdaa-sync/trunk/admin/class-crowdaa-sync-admin-display.php)
-
tags/1.6.2/admin/class-crowdaa-sync-api.php (copied) (copied from crowdaa-sync/trunk/admin/class-crowdaa-sync-api.php)
-
tags/1.6.2/admin/class-crowdaa-sync-ext-hooks.php (copied) (copied from crowdaa-sync/trunk/admin/class-crowdaa-sync-ext-hooks.php)
-
tags/1.6.2/admin/class-crowdaa-sync-meta-box.php (copied) (copied from crowdaa-sync/trunk/admin/class-crowdaa-sync-meta-box.php)
-
tags/1.6.2/admin/class-crowdaa-sync-rest-api.php (copied) (copied from crowdaa-sync/trunk/admin/class-crowdaa-sync-rest-api.php)
-
tags/1.6.2/admin/class-crowdaa-sync-wp-hooks.php (copied) (copied from crowdaa-sync/trunk/admin/class-crowdaa-sync-wp-hooks.php)
-
tags/1.6.2/admin/css/crowdaa-sync-admin.css (copied) (copied from crowdaa-sync/trunk/admin/css/crowdaa-sync-admin.css)
-
tags/1.6.2/admin/js/crowdaa-sync-admin.js (copied) (copied from crowdaa-sync/trunk/admin/js/crowdaa-sync-admin.js)
-
tags/1.6.2/admin/partials/crowdaa-sync-admin-display.php (copied) (copied from crowdaa-sync/trunk/admin/partials/crowdaa-sync-admin-display.php)
-
tags/1.6.2/cacert.pem (copied) (copied from crowdaa-sync/trunk/cacert.pem)
-
tags/1.6.2/composer.json (copied) (copied from crowdaa-sync/trunk/composer.json)
-
tags/1.6.2/crowdaa-sync.php (copied) (copied from crowdaa-sync/trunk/crowdaa-sync.php) (2 diffs)
-
tags/1.6.2/includes (copied) (copied from crowdaa-sync/trunk/includes)
-
tags/1.6.2/includes/class-crowdaa-sync-exception.php (copied) (copied from crowdaa-sync/trunk/includes/class-crowdaa-sync-exception.php)
-
tags/1.6.2/includes/class-crowdaa-sync-permissions.php (copied) (copied from crowdaa-sync/trunk/includes/class-crowdaa-sync-permissions.php) (6 diffs)
-
tags/1.6.2/includes/class-crowdaa-sync-syncdb.php (copied) (copied from crowdaa-sync/trunk/includes/class-crowdaa-sync-syncdb.php)
-
tags/1.6.2/includes/class-crowdaa-sync-timer.php (copied) (copied from crowdaa-sync/trunk/includes/class-crowdaa-sync-timer.php)
-
tags/1.6.2/includes/class-crowdaa-sync-utils.php (copied) (copied from crowdaa-sync/trunk/includes/class-crowdaa-sync-utils.php)
-
tags/1.6.2/includes/class-crowdaa-sync-versions.php (copied) (copied from crowdaa-sync/trunk/includes/class-crowdaa-sync-versions.php)
-
tags/1.6.2/includes/class-crowdaa-sync.php (copied) (copied from crowdaa-sync/trunk/includes/class-crowdaa-sync.php)
-
tags/1.6.2/index.php (copied) (copied from crowdaa-sync/trunk/index.php)
-
tags/1.6.2/languages (copied) (copied from crowdaa-sync/trunk/languages)
-
tags/1.6.2/public (copied) (copied from crowdaa-sync/trunk/public)
-
tags/1.6.2/uninstall.php (copied) (copied from crowdaa-sync/trunk/uninstall.php)
-
tags/1.6.2/vendor (copied) (copied from crowdaa-sync/trunk/vendor)
-
tags/1.6.2/vendor/bin (copied) (copied from crowdaa-sync/trunk/vendor/bin)
-
tags/1.6.2/vendor/composer/autoload_psr4.php (copied) (copied from crowdaa-sync/trunk/vendor/composer/autoload_psr4.php)
-
tags/1.6.2/vendor/composer/autoload_static.php (copied) (copied from crowdaa-sync/trunk/vendor/composer/autoload_static.php)
-
tags/1.6.2/vendor/composer/installed.json (copied) (copied from crowdaa-sync/trunk/vendor/composer/installed.json)
-
tags/1.6.2/vendor/firebase (copied) (copied from crowdaa-sync/trunk/vendor/firebase)
-
tags/1.6.2/vendor/guzzlehttp/guzzle/CHANGELOG.md (copied) (copied from crowdaa-sync/trunk/vendor/guzzlehttp/guzzle/CHANGELOG.md)
-
tags/1.6.2/vendor/guzzlehttp/guzzle/README.md (copied) (copied from crowdaa-sync/trunk/vendor/guzzlehttp/guzzle/README.md)
-
tags/1.6.2/vendor/guzzlehttp/guzzle/composer.json (copied) (copied from crowdaa-sync/trunk/vendor/guzzlehttp/guzzle/composer.json)
-
tags/1.6.2/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php (copied) (copied from crowdaa-sync/trunk/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php)
-
tags/1.6.2/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php (copied) (copied from crowdaa-sync/trunk/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php)
-
tags/1.6.2/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php (copied) (copied from crowdaa-sync/trunk/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php)
-
tags/1.6.2/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php (copied) (copied from crowdaa-sync/trunk/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php)
-
tags/1.6.2/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php (copied) (copied from crowdaa-sync/trunk/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php)
-
tags/1.6.2/vendor/guzzlehttp/guzzle/src/MessageFormatter.php (copied) (copied from crowdaa-sync/trunk/vendor/guzzlehttp/guzzle/src/MessageFormatter.php)
-
tags/1.6.2/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php (copied) (copied from crowdaa-sync/trunk/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php)
-
tags/1.6.2/vendor/guzzlehttp/promises/CHANGELOG.md (copied) (copied from crowdaa-sync/trunk/vendor/guzzlehttp/promises/CHANGELOG.md)
-
tags/1.6.2/vendor/guzzlehttp/promises/src/EachPromise.php (copied) (copied from crowdaa-sync/trunk/vendor/guzzlehttp/promises/src/EachPromise.php)
-
tags/1.6.2/vendor/guzzlehttp/promises/src/FulfilledPromise.php (copied) (copied from crowdaa-sync/trunk/vendor/guzzlehttp/promises/src/FulfilledPromise.php)
-
tags/1.6.2/vendor/guzzlehttp/promises/src/RejectedPromise.php (copied) (copied from crowdaa-sync/trunk/vendor/guzzlehttp/promises/src/RejectedPromise.php)
-
tags/1.6.2/vendor/guzzlehttp/psr7/CHANGELOG.md (copied) (copied from crowdaa-sync/trunk/vendor/guzzlehttp/psr7/CHANGELOG.md)
-
tags/1.6.2/vendor/guzzlehttp/psr7/README.md (copied) (copied from crowdaa-sync/trunk/vendor/guzzlehttp/psr7/README.md)
-
tags/1.6.2/vendor/guzzlehttp/psr7/composer.json (copied) (copied from crowdaa-sync/trunk/vendor/guzzlehttp/psr7/composer.json)
-
tags/1.6.2/vendor/guzzlehttp/psr7/src/CachingStream.php (copied) (copied from crowdaa-sync/trunk/vendor/guzzlehttp/psr7/src/CachingStream.php)
-
tags/1.6.2/vendor/guzzlehttp/psr7/src/DroppingStream.php (copied) (copied from crowdaa-sync/trunk/vendor/guzzlehttp/psr7/src/DroppingStream.php)
-
tags/1.6.2/vendor/guzzlehttp/psr7/src/FnStream.php (copied) (copied from crowdaa-sync/trunk/vendor/guzzlehttp/psr7/src/FnStream.php)
-
tags/1.6.2/vendor/guzzlehttp/psr7/src/Header.php (copied) (copied from crowdaa-sync/trunk/vendor/guzzlehttp/psr7/src/Header.php)
-
tags/1.6.2/vendor/guzzlehttp/psr7/src/InflateStream.php (copied) (copied from crowdaa-sync/trunk/vendor/guzzlehttp/psr7/src/InflateStream.php)
-
tags/1.6.2/vendor/guzzlehttp/psr7/src/LazyOpenStream.php (copied) (copied from crowdaa-sync/trunk/vendor/guzzlehttp/psr7/src/LazyOpenStream.php)
-
tags/1.6.2/vendor/guzzlehttp/psr7/src/LimitStream.php (copied) (copied from crowdaa-sync/trunk/vendor/guzzlehttp/psr7/src/LimitStream.php)
-
tags/1.6.2/vendor/guzzlehttp/psr7/src/Message.php (copied) (copied from crowdaa-sync/trunk/vendor/guzzlehttp/psr7/src/Message.php)
-
tags/1.6.2/vendor/guzzlehttp/psr7/src/MessageTrait.php (copied) (copied from crowdaa-sync/trunk/vendor/guzzlehttp/psr7/src/MessageTrait.php)
-
tags/1.6.2/vendor/guzzlehttp/psr7/src/MimeType.php (copied) (copied from crowdaa-sync/trunk/vendor/guzzlehttp/psr7/src/MimeType.php)
-
tags/1.6.2/vendor/guzzlehttp/psr7/src/MultipartStream.php (copied) (copied from crowdaa-sync/trunk/vendor/guzzlehttp/psr7/src/MultipartStream.php)
-
tags/1.6.2/vendor/guzzlehttp/psr7/src/NoSeekStream.php (copied) (copied from crowdaa-sync/trunk/vendor/guzzlehttp/psr7/src/NoSeekStream.php)
-
tags/1.6.2/vendor/guzzlehttp/psr7/src/Query.php (copied) (copied from crowdaa-sync/trunk/vendor/guzzlehttp/psr7/src/Query.php)
-
tags/1.6.2/vendor/guzzlehttp/psr7/src/ServerRequest.php (copied) (copied from crowdaa-sync/trunk/vendor/guzzlehttp/psr7/src/ServerRequest.php)
-
tags/1.6.2/vendor/guzzlehttp/psr7/src/Stream.php (copied) (copied from crowdaa-sync/trunk/vendor/guzzlehttp/psr7/src/Stream.php)
-
tags/1.6.2/vendor/guzzlehttp/psr7/src/Uri.php (copied) (copied from crowdaa-sync/trunk/vendor/guzzlehttp/psr7/src/Uri.php)
-
tags/1.6.2/vendor/guzzlehttp/psr7/src/UriComparator.php (copied) (copied from crowdaa-sync/trunk/vendor/guzzlehttp/psr7/src/UriComparator.php)
-
tags/1.6.2/vendor/guzzlehttp/psr7/src/Utils.php (copied) (copied from crowdaa-sync/trunk/vendor/guzzlehttp/psr7/src/Utils.php)
-
tags/1.6.2/vendor/symfony/deprecation-contracts/LICENSE (copied) (copied from crowdaa-sync/trunk/vendor/symfony/deprecation-contracts/LICENSE)
-
tags/1.6.2/vendor/symfony/deprecation-contracts/composer.json (copied) (copied from crowdaa-sync/trunk/vendor/symfony/deprecation-contracts/composer.json)
-
trunk/CHANGELOG (modified) (1 diff)
-
trunk/README.txt (modified) (1 diff)
-
trunk/crowdaa-sync.php (modified) (2 diffs)
-
trunk/includes/class-crowdaa-sync-permissions.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
crowdaa-sync/tags/1.6.2/CHANGELOG
r2805875 r2818063 6 6 7 7 ## [Unreleased] 8 9 ## [1.6.2] - 2022-11-15 10 11 ### Changed 12 13 - Fixed the user/permissions synchronization (complete crashes in both direction) 8 14 9 15 ## [1.6.1] - 2022-10-27 -
crowdaa-sync/tags/1.6.2/README.txt
r2805875 r2818063 6 6 Requires PHP: 7.3 7 7 Tested up to: 5.9 8 Stable tag: 1.6. 18 Stable tag: 1.6.2 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
crowdaa-sync/tags/1.6.2/crowdaa-sync.php
r2805875 r2818063 14 14 * Plugin URI: 15 15 * Description: Plugin for synchronizing WordPress site and Crowdaa CMS 16 * Version: 1.6. 116 * Version: 1.6.2 17 17 * Requires at least: 5.5 18 18 * Requires PHP: 7.2 … … 34 34 * Uses SemVer - https://semver.org 35 35 */ 36 define('CROWDAA_SYNC_VERSION', '1.6. 1');36 define('CROWDAA_SYNC_VERSION', '1.6.2'); 37 37 define('CROWDAA_SYNC_PLUGIN_DIR', __DIR__); 38 38 define('CROWDAA_SYNC_PLUGIN_NAME', 'crowdaa-sync'); -
crowdaa-sync/tags/1.6.2/includes/class-crowdaa-sync-permissions.php
r2805875 r2818063 574 574 $user = get_user_by('id', $userId); 575 575 $memberships = Crowdaa_Sync_Utils::quick_select(self::swpm_members_table(), [ 576 'user name'=> $user->data->user_login,576 'user_name' => $user->data->user_login, 577 577 'account_state' => 'active', 578 ] );578 ], 'membership_level'); 579 579 580 580 $memberships_ids = Crowdaa_Sync_Utils::object_array_extract_field('membership_level', $memberships); … … 590 590 $function = 'set_user_perms__'.$alias; 591 591 592 return(self::$function($userId));592 self::$function($userId, $badges); 593 593 } 594 594 … … 658 658 if (count($badges) > 0 && count($memberships) > 0) { 659 659 $syncedIds = $sync_db->get_entries_with_api_ids($badges, 'wp_id'); 660 if ( $count($syncedIds) > 0) {660 if (count($syncedIds) > 0) { 661 661 $firstSyncedId = $syncedIds[0]->wp_id; 662 662 Crowdaa_Sync_Utils::quick_update(self::swpm_members_table(), [ 663 ' ID' => $memberships->ID,663 'member_id' => $memberships->member_id, 664 664 ], [ 665 665 'membership_level' => $firstSyncedId, … … 668 668 } else if (count($badges) == 0 && count($memberships) > 0) { 669 669 Crowdaa_Sync_Utils::quick_delete(self::swpm_members_table(), [ 670 ' ID' => $memberships->ID,670 'member_id' => $memberships->member_id, 671 671 ]); 672 672 } else if (count($badges) > 0 && count($memberships) == 0) { … … 674 674 675 675 Crowdaa_Sync_Utils::quick_insert(self::swpm_members_table(), [ 676 "member_id" => 2,677 676 "user_name" => $user->user_login, 678 677 "first_name" => '', … … 700 699 ]); 701 700 } 702 703 return ($memberships_ids);704 701 } 705 702 -
crowdaa-sync/trunk/CHANGELOG
r2805875 r2818063 6 6 7 7 ## [Unreleased] 8 9 ## [1.6.2] - 2022-11-15 10 11 ### Changed 12 13 - Fixed the user/permissions synchronization (complete crashes in both direction) 8 14 9 15 ## [1.6.1] - 2022-10-27 -
crowdaa-sync/trunk/README.txt
r2805875 r2818063 6 6 Requires PHP: 7.3 7 7 Tested up to: 5.9 8 Stable tag: 1.6. 18 Stable tag: 1.6.2 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
crowdaa-sync/trunk/crowdaa-sync.php
r2805875 r2818063 14 14 * Plugin URI: 15 15 * Description: Plugin for synchronizing WordPress site and Crowdaa CMS 16 * Version: 1.6. 116 * Version: 1.6.2 17 17 * Requires at least: 5.5 18 18 * Requires PHP: 7.2 … … 34 34 * Uses SemVer - https://semver.org 35 35 */ 36 define('CROWDAA_SYNC_VERSION', '1.6. 1');36 define('CROWDAA_SYNC_VERSION', '1.6.2'); 37 37 define('CROWDAA_SYNC_PLUGIN_DIR', __DIR__); 38 38 define('CROWDAA_SYNC_PLUGIN_NAME', 'crowdaa-sync'); -
crowdaa-sync/trunk/includes/class-crowdaa-sync-permissions.php
r2805875 r2818063 574 574 $user = get_user_by('id', $userId); 575 575 $memberships = Crowdaa_Sync_Utils::quick_select(self::swpm_members_table(), [ 576 'user name'=> $user->data->user_login,576 'user_name' => $user->data->user_login, 577 577 'account_state' => 'active', 578 ] );578 ], 'membership_level'); 579 579 580 580 $memberships_ids = Crowdaa_Sync_Utils::object_array_extract_field('membership_level', $memberships); … … 590 590 $function = 'set_user_perms__'.$alias; 591 591 592 return(self::$function($userId));592 self::$function($userId, $badges); 593 593 } 594 594 … … 658 658 if (count($badges) > 0 && count($memberships) > 0) { 659 659 $syncedIds = $sync_db->get_entries_with_api_ids($badges, 'wp_id'); 660 if ( $count($syncedIds) > 0) {660 if (count($syncedIds) > 0) { 661 661 $firstSyncedId = $syncedIds[0]->wp_id; 662 662 Crowdaa_Sync_Utils::quick_update(self::swpm_members_table(), [ 663 ' ID' => $memberships->ID,663 'member_id' => $memberships->member_id, 664 664 ], [ 665 665 'membership_level' => $firstSyncedId, … … 668 668 } else if (count($badges) == 0 && count($memberships) > 0) { 669 669 Crowdaa_Sync_Utils::quick_delete(self::swpm_members_table(), [ 670 ' ID' => $memberships->ID,670 'member_id' => $memberships->member_id, 671 671 ]); 672 672 } else if (count($badges) > 0 && count($memberships) == 0) { … … 674 674 675 675 Crowdaa_Sync_Utils::quick_insert(self::swpm_members_table(), [ 676 "member_id" => 2,677 676 "user_name" => $user->user_login, 678 677 "first_name" => '', … … 700 699 ]); 701 700 } 702 703 return ($memberships_ids);704 701 } 705 702
Note: See TracChangeset
for help on using the changeset viewer.