Merge branch '4.12' into 4

This commit is contained in:
Steve Boyd 2023-02-02 16:20:00 +13:00
commit 23efed1802
3 changed files with 9 additions and 2 deletions

View File

@ -64,6 +64,13 @@ class CLIRequestBuilder extends HTTPRequestBuilder
$variables['_GET']['url'] = $variables['_SERVER']['argv'][1];
$variables['_SERVER']['REQUEST_URI'] = $variables['_SERVER']['argv'][1];
}
// Set 'HTTPS' and 'SSL' flag for CLI depending on SS_BASE_URL scheme value.
$scheme = parse_url(Environment::getEnv('SS_BASE_URL') ?? '', PHP_URL_SCHEME);
if ($scheme == 'https') {
$variables['_SERVER']['HTTPS'] = 'on';
$variables['_SERVER']['SSL'] = true;
}
// Parse rest of variables as standard
return parent::cleanEnvironment($variables);

View File

@ -587,7 +587,7 @@ class GridFieldDetailForm_ItemRequest extends RequestHandler
/**
* Get the current paginator state
*/
private function getGridFieldPaginatorState(): GridState_Data
private function getGridFieldPaginatorState(): ?GridState_Data
{
$state = $this->getGridField()->getState(false);
$gridStateStr = $this->getStateManager()->getStateFromRequest($this->gridField, $this->getRequest());

View File

@ -207,7 +207,7 @@ class PermissionCheckboxSetField extends FormField
$odd = ($odd + 1) % 2;
$extraClass = $odd ? 'odd' : 'even';
$extraClass .= ' val' . str_replace(' ', '', $code ?? '');
$extraClass .= ' val' . str_replace([' ', '\\'], ['', '-'], $code ?? '');
$itemID = $this->ID() . '_' . preg_replace('/[^a-zA-Z0-9]+/', '', $code ?? '');
$disabled = $inheritMessage = '';
$checked = (isset($uninheritedCodes[$code]) || isset($inheritedCodes[$code]))