Merge branch '3.7' into 3

This commit is contained in:
Robbie Averill 2020-08-26 12:15:15 -07:00
commit 39c73e5286
3 changed files with 7 additions and 4 deletions

View File

@ -167,9 +167,10 @@ if(!isset($_SERVER['HTTP_HOST'])) {
*/
} 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($_GET) stripslashes_recursively($_GET);
if($_POST) stripslashes_recursively($_POST);

View File

@ -48,7 +48,7 @@ Class and filenames are in `UpperCamelCase` format:
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.
### Methods

View File

@ -2614,8 +2614,10 @@ class i18n extends SS_Object implements TemplateGlobalProvider, Flushable {
$themesBase = Director::baseFolder() . '/themes';
if(is_dir($themesBase)) {
foreach(scandir($themesBase) as $theme) {
$themename = (string)Config::inst()->get('SSViewer', 'theme');
if(
strpos($theme, (string)Config::inst()->get('SSViewer', 'theme')) === 0
!empty($themename)
&& strpos($theme, $themename) === 0
&& file_exists("{$themesBase}/{$theme}/lang/")
) {
$filename = $adapter->getFilenameForLocale($locale);