mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge branch '3.7' into 3
This commit is contained in:
commit
39c73e5286
@ -167,9 +167,10 @@ if(!isset($_SERVER['HTTP_HOST'])) {
|
|||||||
*/
|
*/
|
||||||
} else {
|
} else {
|
||||||
/**
|
/**
|
||||||
* Fix magic quotes setting
|
* Check if magic quotes are enabled (only relevant for php 5.3)
|
||||||
|
* get_magic_quotes_gpc() call is suppressed to avoid php7.4 deprecation notice
|
||||||
*/
|
*/
|
||||||
if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) {
|
if (function_exists('get_magic_quotes_gpc') && @get_magic_quotes_gpc()) {
|
||||||
if($_REQUEST) stripslashes_recursively($_REQUEST);
|
if($_REQUEST) stripslashes_recursively($_REQUEST);
|
||||||
if($_GET) stripslashes_recursively($_GET);
|
if($_GET) stripslashes_recursively($_GET);
|
||||||
if($_POST) stripslashes_recursively($_POST);
|
if($_POST) stripslashes_recursively($_POST);
|
||||||
|
@ -48,7 +48,7 @@ Class and filenames are in `UpperCamelCase` format:
|
|||||||
class MyClass {}
|
class MyClass {}
|
||||||
|
|
||||||
```
|
```
|
||||||
new word must be capitalized. Successive capitalized letters are used in
|
new words must be capitalized. Successive capitalized letters are used in
|
||||||
acronyms, e.g. a class `XMLImporter` is used while `XmlImporter` is not.
|
acronyms, e.g. a class `XMLImporter` is used while `XmlImporter` is not.
|
||||||
|
|
||||||
### Methods
|
### Methods
|
||||||
|
@ -2614,8 +2614,10 @@ class i18n extends SS_Object implements TemplateGlobalProvider, Flushable {
|
|||||||
$themesBase = Director::baseFolder() . '/themes';
|
$themesBase = Director::baseFolder() . '/themes';
|
||||||
if(is_dir($themesBase)) {
|
if(is_dir($themesBase)) {
|
||||||
foreach(scandir($themesBase) as $theme) {
|
foreach(scandir($themesBase) as $theme) {
|
||||||
|
$themename = (string)Config::inst()->get('SSViewer', 'theme');
|
||||||
if(
|
if(
|
||||||
strpos($theme, (string)Config::inst()->get('SSViewer', 'theme')) === 0
|
!empty($themename)
|
||||||
|
&& strpos($theme, $themename) === 0
|
||||||
&& file_exists("{$themesBase}/{$theme}/lang/")
|
&& file_exists("{$themesBase}/{$theme}/lang/")
|
||||||
) {
|
) {
|
||||||
$filename = $adapter->getFilenameForLocale($locale);
|
$filename = $adapter->getFilenameForLocale($locale);
|
||||||
|
Loading…
Reference in New Issue
Block a user