User tests: Successful: Unsuccessful:
Pull Request for Issue #36179 .
The changes makes sure the value in correct type, and uses correct order.
Please follow #36179
PHP notice, and configuration loaded incorrectly, eg wrong toolbar for Super admin.
Configuration loaded correctly
no
Status | New | ⇒ | Pending |
Category | ⇒ | Front End Plugins |
Title |
|
hmhm, yea, I probably better change to krsort()
instead of array_reverse()
.
so it will sort the same for old and new values
Labels |
Added:
Release Blocker
?
|
Yes, it works. Or we can just use ksort
and stop at the first matching set.
// Sort the array, so the items with highest access level goes first
ksort($extraOptionsAll);
// Get configuration depend from User group
foreach ($extraOptionsAll as $set => $val)
{
$val = (object) $val;
$val->access = empty($val->access) ? [] : $val->access;
if (array_intersect($ugroups, $val->access))
{
$extraOptions = $val;
$toolbarParams = (object) $toolbarParamsAll[$set];
break;
}
}
Compare to the current code, it has super tiny improvement because it does not have to loop through all the sets (stop at the first matching). Let me know if you want to make change, otherwise, I will record my test result.
No no, it should not stop on first,
Example if you added some group in two sets (accidentally or in purpose), then it should pick last with higher access level.
Well I would leave it as it is :)
Not a problem. As I mentioned, it is a super tiny improvement :D.
I have tested this item
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC
I have tested this item
I have tested this item
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-12-05 17:19:03 |
Closed_By | ⇒ | wilsonge | |
Labels |
Added:
?
|
Thanks!
If I'm not mistaken, this won't work for old Tiny MCE configuration (for example, site updated from older version 4.0.5 and don't change editor settings after update). In that case, set 2 would be used for Super Users and it's not right.