Skip to content

Commit

Permalink
Merge branch 'backdrop:1.x' into issue_5891
Browse files Browse the repository at this point in the history
  • Loading branch information
kiamlaluno committed Feb 9, 2024
2 parents 2fa55b4 + 74bfbda commit 525a244
Show file tree
Hide file tree
Showing 109 changed files with 667 additions and 652 deletions.
9 changes: 9 additions & 0 deletions .cspell/backdrop.dic
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ drush
dynsrc
edik
editbackdropimage
editunblock
elementtype
enddate
endskip
Expand All @@ -109,6 +110,7 @@ evid
expandtab
exportables
extname
externa
EXTR
falias
farb
Expand Down Expand Up @@ -155,6 +157,7 @@ geary
Giggabyte
gname
Gnomovision
gotit
grippie
groupinfo
groupnames
Expand Down Expand Up @@ -223,6 +226,7 @@ localzone
LXSS
manytoone
marzo
master
maxadjustment
maxdate
menutoggle
Expand Down Expand Up @@ -267,6 +271,7 @@ mytype
myusername
myverylongurlexample
myverylongurl
nalias
natu
NCHUNKS
nclosing
Expand Down Expand Up @@ -309,6 +314,7 @@ oldtext
oneof
onmediaerror
opensans
Optionchecker
otherjob
othername
otherval
Expand All @@ -332,6 +338,7 @@ primarytabstext
PRNG
propertyname
Punycode
queryor
quicktime
Quieligo
ratis
Expand Down Expand Up @@ -370,6 +377,7 @@ simpletest
simpletests
sioc
sito
slave
skipdots
smartmenus
softtabstop
Expand Down Expand Up @@ -403,6 +411,7 @@ tagwords
tarname
targetdir
tascript
tempstore
tést
Teletubbies
tempstore
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Backdrop is [GPL v2](http://www.gnu.org/licenses/gpl-2.0.html) (or higher)
software. See the LICENSE.txt file for complete text. Distributions of this
software may relicense it as any later version of the GPL.

All Backdrop code is Copyright 2001 - 2023 by the original authors.
All Backdrop code is Copyright 2001 - 2024 by the original authors.

Backdrop also includes works under different copyright notices that are
distributed according to the terms of the GNU General Public License or a
Expand Down
2 changes: 1 addition & 1 deletion core/includes/bootstrap.inc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* The current system version.
*/
define('BACKDROP_VERSION', '1.27.x-dev');
define('BACKDROP_VERSION', '1.28.x-dev');

/**
* Core API compatibility.
Expand Down
95 changes: 31 additions & 64 deletions core/includes/common.inc
Original file line number Diff line number Diff line change
Expand Up @@ -3471,11 +3471,13 @@ function backdrop_css_defaults($data = NULL) {
* styles will be aggregated and compressed. Defaults to TRUE.
* - 'browsers': An array containing information specifying which browsers
* should load the CSS item. See backdrop_pre_render_conditional_comments()
* for details.
* for details. This option is deprecated and no longer has an effect.
*
* @return
* @return array
* An array of queued cascading stylesheets.
*
* @since 1.27.0 The 'browsers' option is deprecated.
*
* @see backdrop_get_css()
*/
function backdrop_add_css($data = NULL, $options = NULL) {
Expand Down Expand Up @@ -4053,7 +4055,7 @@ function backdrop_build_css_cache($css) {

// Per the W3C specification at http://www.w3.org/TR/REC-CSS2/cascade.html#at-import,
// @import rules must proceed any other style, so we move those to the top.
$regexp = '/@import[^;]+;/i';
$regexp = '/@import[^;\'"]*(?:\'[^\']*\'|"[^"]*")[^;]*;/i';
preg_match_all($regexp, $data, $matches);
$data = preg_replace($regexp, '', $data);
$data = implode('', $matches[0]) . $data;
Expand Down Expand Up @@ -4614,13 +4616,16 @@ function backdrop_region_class($region) {
* file will be aggregated. Defaults to TRUE.
* - browsers: An array containing information specifying which browsers
* should load the JavaScript item. See
* backdrop_pre_render_conditional_comments() for details.
* backdrop_pre_render_conditional_comments() for details. This option is
* deprecated and no longer has an effect.
*
* @return
* @return array
* The current array of JavaScript files, settings, and in-line code,
* including Backdrop defaults, anything previously added with calls to
* backdrop_add_js(), and this function call's additions.
*
* @since 1.27.0 The 'browsers' option is deprecated.
*
* @see backdrop_get_js()
*/
function backdrop_add_js($data = NULL, $options = NULL) {
Expand Down Expand Up @@ -6374,33 +6379,24 @@ function backdrop_system_listing($mask, $directory, $key = 'name', $min_depth =
}

/**
* Pre-render callback: Renders #browsers into #prefix and #suffix.
* Pre-render callback: Provides backwards-compatibility for #browsers property.
*
* @param $elements
* A render array with a '#browsers' property. The '#browsers' property can
* contain any or all of the following keys:
* - 'IE': If FALSE, the element is not rendered by Internet Explorer. If
* TRUE, the element is rendered by Internet Explorer. Can also be a string
* containing an expression for Internet Explorer to evaluate as part of a
* conditional comment. For example, this can be set to 'lt IE 7' for the
* element to be rendered in Internet Explorer 6, but not in Internet
* Explorer 7 or higher. Defaults to TRUE.
* - '!IE': If FALSE, the element is not rendered by browsers other than
* Internet Explorer. If TRUE, the element is rendered by those browsers.
* Defaults to TRUE.
* Examples:
* - To render an element in all browsers, '#browsers' can be left out or set
* to array('IE' => TRUE, '!IE' => TRUE).
* - To render an element in Internet Explorer only, '#browsers' can be set
* to array('!IE' => FALSE).
* - To render an element in Internet Explorer 6 only, '#browsers' can be set
* to array('IE' => 'lt IE 7', '!IE' => FALSE).
* - To render an element in Internet Explorer 8 and higher and in all other
* browsers, '#browsers' can be set to array('IE' => 'gte IE 8').
* A render array with a '#browsers' property. This property formerly provided
* the ability target IE vs. non-IE browsers. However, it no longer provides
* this functionality as this has not been supported since IE10. Now if the
* '#browsers' property is set it will do one of the following:
* - '!IE': If TRUE, the element will be returned with no modifications.
* If FALSE, the element will not be rendered at all.
* - 'IE': Any value passed in this key will be ignored.
*
* @return
* The passed-in element with markup for conditional comments potentially
* added to '#prefix' and '#suffix'.
* @return array
* A placeholder array for IE-specific files, or the unmodified element if
* this element would render in any non-IE browser.
*
* @deprecated Since 1.27.0
*
* @since 1.27.0 Conditional comments are no longer rendered.
*/
function backdrop_pre_render_conditional_comments($elements) {
$browsers = isset($elements['#browsers']) ? $elements['#browsers'] : array();
Expand All @@ -6409,41 +6405,12 @@ function backdrop_pre_render_conditional_comments($elements) {
'!IE' => TRUE,
);

// If rendering in all browsers, no need for conditional comments.
if ($browsers['IE'] === TRUE && $browsers['!IE']) {
return $elements;
}

// Determine the conditional comment expression for Internet Explorer to
// evaluate.
if ($browsers['IE'] === TRUE) {
$expression = 'IE';
}
elseif ($browsers['IE'] === FALSE) {
$expression = '!IE';
}
else {
$expression = $browsers['IE'];
}

// Wrap the element's potentially existing #prefix and #suffix properties with
// conditional comment markup. The conditional comment expression is evaluated
// by Internet Explorer only. To control the rendering by other browsers,
// either the "downlevel-hidden" or "downlevel-revealed" technique must be
// used. See http://en.wikipedia.org/wiki/Conditional_comment for details.
$elements += array(
'#prefix' => '',
'#suffix' => '',
);
if (!$browsers['!IE']) {
// "downlevel-hidden".
$elements['#prefix'] = "\n<!--[if $expression]>\n" . $elements['#prefix'];
$elements['#suffix'] .= "<![endif]-->\n";
}
else {
// "downlevel-revealed".
$elements['#prefix'] = "\n<!--[if $expression]><!-->\n" . $elements['#prefix'];
$elements['#suffix'] .= "<!--<![endif]-->\n";
// If not allowed to output to non-IE browsers, suppress the element entirely.
if ($browsers['!IE'] === FALSE) {
return array(
'#type' => NULL,
'#value' => 'Element removed, the "browsers" property targeting only IE browsers is no longer supported.',
);
}

return $elements;
Expand Down
2 changes: 2 additions & 0 deletions core/includes/database/mysql/database.inc
Original file line number Diff line number Diff line change
Expand Up @@ -379,9 +379,11 @@ class DatabaseConnection_mysql extends DatabaseConnection {
$this->query("CREATE TABLE {backdrop_utf8mb4_test} (id VARCHAR(255), PRIMARY KEY(id(255))) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci ROW_FORMAT=DYNAMIC ENGINE=INNODB");
}
catch (Exception $e) {
$this->utf8mb4Supported = FALSE;
return FALSE;
}
$this->query("DROP TABLE IF EXISTS {backdrop_utf8mb4_test}");
$this->utf8mb4Supported = TRUE;
return TRUE;
}
}
Expand Down
2 changes: 1 addition & 1 deletion core/includes/database/mysql/schema.inc
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class DatabaseSchema_mysql extends DatabaseSchema {
* Create an SQL string for a field to be used in table creation or alteration.
*
* Before passing a field out of a schema definition into this function it has
* to be processed by _db_process_field().
* to be processed by DatabaseSchema_mysql::processField().
*
* @param $name
* Name of the field.
Expand Down
2 changes: 1 addition & 1 deletion core/includes/menu.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1917,7 +1917,7 @@ function theme_menu_toggle($variables) {
$output = '<input id="' . $id . '" class="menu-toggle-state element-invisible" type="checkbox" aria-controls="' . $id . '" />';
$output .= '<label class="menu-toggle-button" for="' . $id . '">';
$output .= '<span class="menu-toggle-button-icon"></span>';
$output .= '<span class="menu-toggle-button-text">' . $variables['text'] . '</span>';
$output .= (!empty($variables['text'])) ? '<span class="menu-toggle-button-text">' . check_plain($variables['text']) . '</span>' : '';
$output .= '<span class="menu-toggle-assistive-text element-invisible">' . t('Toggle menu visibility') . '</span>';
$output .= '</label>';
}
Expand Down
2 changes: 0 additions & 2 deletions core/layouts/legacy/one_column/one-column.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
width: 100%;
margin-left: auto;
margin-right: auto;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
clear: both;
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,13 @@
.layout--three-three-four-column .l-container,
.layout--three-three-four-column .l-triptych,
.layout--three-three-four-column .l-footer-wrapper {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
width: 100%;
margin-left: auto;
margin-right: auto;
}
.layout--three-three-four-column .l-content,
.layout--three-three-four-column .l-sidebar {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
padding: 0 15px;
}
Expand All @@ -44,17 +40,13 @@
.layout--three-three-four-column .l-triptych-first,
.layout--three-three-four-column .l-triptych-middle,
.layout--three-three-four-column .l-triptych-last {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
padding: 0 20px 0;
}
.layout--three-three-four-column .l-footer-first-column,
.layout--three-three-four-column .l-footer-second-column,
.layout--three-three-four-column .l-footer-third-column,
.layout--three-three-four-column .l-footer-fourth-column {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
padding: 0 10px;
}
Expand Down Expand Up @@ -103,16 +95,12 @@
}
.layout--three-three-four-column .l-footer-first-column,
.layout--three-three-four-column .l-footer-second-column {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
padding: 0 10px;
width: 50%;
}
.layout--three-three-four-column .l-footer-third-column,
.layout--three-three-four-column .l-footer-fourth-column {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
padding: 0 10px;
width: 50%;
Expand Down
4 changes: 0 additions & 4 deletions core/layouts/legacy/two_column/two-column.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,12 @@
width: 100%;
margin-left: auto;
margin-right: auto;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
clear: both;
}
.layout--two-column .l-content,
.layout--two-column .l-sidebar {
padding: 0 15px;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}

Expand Down
4 changes: 0 additions & 4 deletions core/layouts/legacy/two_column_flipped/two-column-flipped.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,12 @@
width: 100%;
margin-left: auto;
margin-right: auto;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
clear: both;
}
.layout--two-column-flipped .l-content,
.layout--two-column-flipped .l-sidebar {
padding: 0 15px;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}

Expand Down

0 comments on commit 525a244

Please sign in to comment.