From b09371c9b4564a87dfccdb0997cdf2cc3dfa63cf Mon Sep 17 00:00:00 2001 From: nuxsmin Date: Mon, 20 Feb 2017 02:41:43 +0100 Subject: [PATCH] * [FIX] Fixed wrong user/group when importing items. Thanks to @wernerreuser and @davidkast for the feedback. Solves #436 * [MOD] Updated build number --- inc/SP/Core/Upgrade/Check.class.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/inc/SP/Core/Upgrade/Check.class.php b/inc/SP/Core/Upgrade/Check.class.php index b472bcb4..b3d2d1e7 100644 --- a/inc/SP/Core/Upgrade/Check.class.php +++ b/inc/SP/Core/Upgrade/Check.class.php @@ -37,16 +37,16 @@ class Check { $query = /** @lang SQL */ 'SELECT * FROM - (SELECT COUNT(*) AS accounts_user FROM accounts WHERE account_userId NOT IN (SELECT user_id FROM usrData)) a, - (SELECT COUNT(*) AS accounts_useredit FROM accounts WHERE account_userEditId NOT IN (SELECT user_id FROM usrData)) b, - (SELECT COUNT(*) AS accounts_category FROM accounts WHERE account_categoryId NOT IN (SELECT category_id FROM categories)) c, - (SELECT COUNT(*) AS accounts_customer FROM accounts WHERE account_customerId NOT IN (SELECT customer_id FROM customers)) d, - (SELECT COUNT(*) AS accountshistory_user FROM accHistory WHERE acchistory_userId NOT IN (SELECT user_id FROM usrData)) e, - (SELECT COUNT(*) AS accountshistory_useredit FROM accHistory WHERE acchistory_userEditId NOT IN (SELECT user_id FROM usrData)) f, - (SELECT COUNT(*) AS accountshistory_category FROM accHistory WHERE acchistory_categoryId NOT IN (SELECT category_id FROM categories)) g, - (SELECT COUNT(*) AS accountshistory_customer FROM accHistory WHERE acchistory_customerId NOT IN (SELECT customer_id FROM customers)) h, - (SELECT COUNT(*) AS users_group FROM usrData WHERE user_groupId NOT IN (SELECT usergroup_id FROM usrGroups)) i, - (SELECT COUNT(*) AS users_profile FROM usrData WHERE user_profileId NOT IN (SELECT userprofile_id FROM usrProfiles)) j'; + (SELECT COUNT(*) AS accounts_user FROM accounts WHERE account_userId NOT IN (SELECT user_id FROM usrData) OR account_userId IS NULL) a, + (SELECT COUNT(*) AS accounts_useredit FROM accounts WHERE account_userEditId NOT IN (SELECT user_id FROM usrData) OR account_userEditId IS NULL) b, + (SELECT COUNT(*) AS accounts_category FROM accounts WHERE account_categoryId NOT IN (SELECT category_id FROM categories) OR account_categoryId IS NULL) c, + (SELECT COUNT(*) AS accounts_customer FROM accounts WHERE account_customerId NOT IN (SELECT customer_id FROM customers) OR account_customerId IS NULL) d, + (SELECT COUNT(*) AS accountshistory_user FROM accHistory WHERE acchistory_userId NOT IN (SELECT user_id FROM usrData) OR acchistory_userId IS NULL) e, + (SELECT COUNT(*) AS accountshistory_useredit FROM accHistory WHERE acchistory_userEditId NOT IN (SELECT user_id FROM usrData) OR acchistory_userEditId IS NULL) f, + (SELECT COUNT(*) AS accountshistory_category FROM accHistory WHERE acchistory_categoryId NOT IN (SELECT category_id FROM categories) OR acchistory_categoryId IS NULL) g, + (SELECT COUNT(*) AS accountshistory_customer FROM accHistory WHERE acchistory_customerId NOT IN (SELECT customer_id FROM customers) OR acchistory_customerId IS NULL) h, + (SELECT COUNT(*) AS users_group FROM usrData WHERE user_groupId NOT IN (SELECT usergroup_id FROM usrGroups) OR user_groupId IS NULL) i, + (SELECT COUNT(*) AS users_profile FROM usrData WHERE user_profileId NOT IN (SELECT userprofile_id FROM usrProfiles) OR user_profileId IS NULL) j'; $Data = new QueryData(); $Data->setQuery($query);