This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/Control/Cookie.php b/src/Control/Cookie.php | |
index 9c48b4ced..ce6e4b5fd 100644 | |
--- a/src/Control/Cookie.php | |
+++ b/src/Control/Cookie.php | |
@@ -5,6 +5,11 @@ namespace SilverStripe\Control; | |
use SilverStripe\Core\Config\Configurable; | |
use SilverStripe\Core\Injector\Injector; | |
+use function in_array; | |
+use function strtolower; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class RequirementsEnhancement extends Requirements { | |
public static function ldJsonScript($script, $uniquenessID = null) { | |
self::backend()->ldJsonScript($script, $uniquenessID); | |
} | |
} | |
class Requirements_BackendEnhancement extends Requirements_Backend { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/view/Requirements.php b/view/Requirements.php | |
index a39d0e998..d7004b9a8 100644 | |
--- a/view/Requirements.php | |
+++ b/view/Requirements.php | |
@@ -419,6 +419,13 @@ class Requirements implements Flushable { | |
return self::backend()->debug(); | |
} | |
+ /** | |
+ * Output ld+json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/model/connect/MySQLDatabase.php b/model/connect/MySQLDatabase.php | |
index f0628e4..db011c4 100644 | |
--- a/model/connect/MySQLDatabase.php | |
+++ b/model/connect/MySQLDatabase.php | |
@@ -42,7 +42,7 @@ class MySQLDatabase extends SS_Database { | |
$this->connector->connect($parameters); | |
// This is important! | |
- $this->setSQLMode('ANSI'); | |
+ $this->setSQLMode('REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- FocusPoint can also be used in tandem with css-settings "object-fit" & "object-position". For example useful for a fullscreen-hero, when you don't know how the aspect-ratio of the viewport might look. The example below shows a portrait-, landscape, or 4:3 "square" image depending on the aspect-ratio it is shown. Even if the general rule is not to relay, which picture the browser might pick from the picture-element, it seems to work pretty well. Or in other words: pseudo media-queries in picture-element und css-media query match in praxis pretty well. --> | |
<picture> | |
<%-- 8:5 is like macbook pro display--%> | |
<source media="(min-width: 640px) and (min-aspect-ratio: 8/5)" | |
srcset="$SlideImage.FocusFillMax(640,400).URL 640w"> | |
<%-- 5:8 is portrait --%> | |
<source media="(min-width: 400px) and (max-aspect-ratio: 5/8)" | |
srcset="$SlideImage.FocusFillMax(400,640).URL 720w"> | |
<%-- 4:3 say desktop --%> | |
<source media="(min-width: 640px) and (min-aspect-ratio: 4/3)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class UniqueTextField extends TextField { | |
public function Type() { | |
return 'unique text'; | |
} | |
protected $restrictedTable; | |
protected $restrictedField; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/core/TempPath.php b/core/TempPath.php | |
index 88979ba..4f3a94c 100644 | |
--- a/core/TempPath.php | |
+++ b/core/TempPath.php | |
@@ -11,8 +11,9 @@ | |
function getTempFolder($base = null) { | |
$parent = getTempParentFolder($base); | |
- // The actual temp folder is a subfolder of getTempParentFolder(), named by username | |
- $subfolder = $parent . DIRECTORY_SEPARATOR . getTempFolderUsername(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this script loads the YouTube iframe-api, gets all instances and adds enablejsapi & origin-URL to the src-URL | |
// after initiating the API it adds playing-mode & paused-mode to the iframes | |
if ($('[src^="https://www.youtube.com/"]').length) { | |
var tag = document.createElement('script'); | |
tag.src = "https://www.youtube.com/iframe_api"; | |
var firstScriptTag = document.getElementsByTagName('script')[0]; | |
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// smart defaults for high quality and low file size | |
// https://github.com/nwtn/php-respimg/blob/master/src/Respimg.php#L235 | |
// --- | |
// Only: | |
// classexists: 'Imagick' | |
// --- | |
// Image: | |
// backend: 'FixedImagickBackend' | |
// ImagickBackend: |
NewerOlder