Compare commits
27 Commits
Author | SHA1 | Date |
---|---|---|
github-actions | b3fa93d446 | |
Guy Sartorelli | 19bd071b65 | |
Guy Sartorelli | a58508370f | |
Steve Boyd | 316e7f5a6d | |
github-actions | 1f036ea6d2 | |
github-actions | e593d8d30b | |
Guy Sartorelli | d791a4e254 | |
Steve Boyd | 652c32f55b | |
Steve Boyd | e7fa82673f | |
Steve Boyd | 70955c442d | |
Guy Sartorelli | b32b299e7c | |
Steve Boyd | 7070529202 | |
Steve Boyd | fe6d042b85 | |
Guy Sartorelli | 89a7478ca1 | |
Sabina Talipova | 68174f34f2 | |
Guy Sartorelli | 29211f58b8 | |
Steve Boyd | 5f2398da07 | |
Steve Boyd | c125f26dda | |
Steve Boyd | 770e31445d | |
Steve Boyd | 26629e3b5c | |
Guy Sartorelli | a9133931d8 | |
Guy Sartorelli | c3dd76cee1 | |
Steve Boyd | ad4342f1d0 | |
Steve Boyd | da859a967d | |
Maxime Rainville | 2fc65d336f | |
Steve Boyd | dcf140fe8f | |
Sabina Talipova | 031d47ce20 |
|
@ -1,10 +1,10 @@
|
|||
name: Keepalive
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
# The 4th of every month at 10:50am UTC
|
||||
# At 9:45 AM UTC, on day 6 of the month
|
||||
schedule:
|
||||
- cron: '50 10 4 * *'
|
||||
- cron: '45 9 6 * *'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
keepalive:
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
name: Merge-up
|
||||
|
||||
on:
|
||||
# At 11:20 AM UTC, only on Monday
|
||||
schedule:
|
||||
- cron: '20 11 * * 1'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
merge-up:
|
||||
name: Merge-up
|
||||
# Only run cron on the silverstripe account
|
||||
if: (github.event_name == 'schedule' && github.repository_owner == 'silverstripe') || (github.event_name != 'schedule')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Merge-up
|
||||
uses: silverstripe/gha-merge-up@v1
|
|
@ -1,3 +0,0 @@
|
|||
mappings:
|
||||
IFramePage: SilverStripe\IFrame\IFramePage
|
||||
IFramePage_Controller: SilverStripe\IFrame\IFramePageController
|
|
@ -1,4 +1,4 @@
|
|||
Copyright (c) 2019, SilverStripe Limited
|
||||
Copyright (c) 2019, Silverstripe Limited
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
12
README.md
12
README.md
|
@ -16,22 +16,12 @@ circumvent.
|
|||
Various attributes of the IFrame can be controlled from CMS fields, such as size and content that surrounds the
|
||||
IFrame itself.
|
||||
|
||||
## Requirements
|
||||
|
||||
* Silverstripe ^4.0
|
||||
|
||||
**Note:** For a Silverstripe 3.x compatible version, please use [the 1.x release line](https://github.com/silverstripe/silverstripe-iframe/tree/1.0).
|
||||
|
||||
## Installation
|
||||
|
||||
Install with Composer:
|
||||
|
||||
```
|
||||
```sh
|
||||
composer require silverstripe/iframe
|
||||
```
|
||||
|
||||
After installation, ensure you run `dev/build?flush` in either your browser or via command line.
|
||||
|
||||
## Instructions
|
||||
|
||||
For usage instructions see the [user manual](docs/en/userguide/index.md).
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
<?php
|
|
@ -1,6 +0,0 @@
|
|||
---
|
||||
Name: iframelegacy
|
||||
---
|
||||
SilverStripe\ORM\DatabaseAdmin:
|
||||
classname_value_remapping:
|
||||
IFramePage: 'SilverStripe\IFrame\IFramePage'
|
|
@ -13,12 +13,12 @@
|
|||
}
|
||||
],
|
||||
"require": {
|
||||
"php": "^7.4 || ^8.0",
|
||||
"silverstripe/cms": "^4.0"
|
||||
"php": "^8.1",
|
||||
"silverstripe/cms": "^5"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^9.5",
|
||||
"squizlabs/php_codesniffer": "^3.0"
|
||||
"phpunit/phpunit": "^9.6",
|
||||
"squizlabs/php_codesniffer": "^3"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
@ -33,4 +33,4 @@
|
|||
},
|
||||
"minimum-stability": "dev",
|
||||
"prefer-stable": true
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ class IFramePageController extends PageController
|
|||
$desiredProtocol = $this->ForceProtocol;
|
||||
if ($desiredProtocol && $currentProtocol !== $desiredProtocol) {
|
||||
$enforcedLocation = preg_replace(
|
||||
"#^${currentProtocol}#",
|
||||
"#^{$currentProtocol}#",
|
||||
$desiredProtocol ?? '',
|
||||
$this->AbsoluteLink() ?? ''
|
||||
);
|
||||
|
|
|
@ -128,7 +128,7 @@ class IFramePageTest extends SapphireTest
|
|||
$controller = new IFramePageController($page);
|
||||
$controller->doInit();
|
||||
$response = $controller->getResponse();
|
||||
$this->assertEquals($response->getHeader('Location'), 'https://host.com/iframe/');
|
||||
$this->assertEquals('https://host.com/iframe', $response->getHeader('Location'));
|
||||
|
||||
Config::modify()->set(Director::class, 'alternate_protocol', 'https');
|
||||
Config::modify()->set(Director::class, 'alternate_base_url', 'https://host.com');
|
||||
|
@ -136,7 +136,7 @@ class IFramePageTest extends SapphireTest
|
|||
$controller = new IFramePageController($page);
|
||||
$controller->doInit();
|
||||
$response = $controller->getResponse();
|
||||
$this->assertEquals($response->getHeader('Location'), 'http://host.com/iframe/');
|
||||
$this->assertEquals('http://host.com/iframe', $response->getHeader('Location'));
|
||||
|
||||
$_SERVER = $origServer;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue