Skip to content

Commit 0d8ba6e

Browse files
committed
Update to backdrop 1.29.0.
1 parent e6af4e5 commit 0d8ba6e

File tree

505 files changed

+4101
-1648
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

505 files changed

+4101
-1648
lines changed

www/core/includes/bootstrap.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
/**
88
* The current system version.
99
*/
10-
define('BACKDROP_VERSION', '1.28.2');
10+
define('BACKDROP_VERSION', '1.29.0');
1111

1212
/**
1313
* Core API compatibility.

www/core/includes/database/mysql/database.inc

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,29 @@ class DatabaseConnection_mysql extends DatabaseConnection {
199199
return 'mysql';
200200
}
201201

202+
/**
203+
* Returns the version of the database server.
204+
*/
205+
public function version() {
206+
$version = parent::version();
207+
208+
// Some MariaDB version strings prepend a fake MySQL version to the front,
209+
// which is always "5.5.5-". This was done to so that old MySQL clients
210+
// could connect to newer MariaDB servers.
211+
// For example, 5.5.5-10.5.11-MariaDB:
212+
// - 5.5.5 is a fake MySQL version.
213+
// - 10.5.11 would be the actual MariaDB version.
214+
// See https://github.com/MariaDB/server/blob/f6633bf058802ad7da8196d01fd19d75c53f7274/include/mysql_com.h#L42
215+
// Remove any leading MySQL 5.5.5- prefixes:
216+
$regex = '/^(?:5\.5\.5-)?(\d+\.\d+\.\d+.*-mariadb.*)/i';
217+
preg_match($regex, $version, $matches);
218+
if (!empty($matches[1])) {
219+
$version = $matches[1];
220+
}
221+
222+
return $version;
223+
}
224+
202225
public function databaseType() {
203226
return 'mysql';
204227
}

www/core/includes/drupal.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1711,6 +1711,7 @@ function drupal_tempnam($directory, $prefix) {
17111711
* Creates a .htaccess file in the given directory.
17121712
*
17131713
* @deprecated since 1.0.0
1714+
* @see file_save_htaccess()
17141715
*/
17151716
function file_create_htaccess($directory, $private = TRUE, $force_overwrite = FALSE) {
17161717
watchdog_deprecated_function('drupal', __FUNCTION__);

www/core/includes/file.inc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -514,8 +514,8 @@ function file_save_htaccess($directory, $private = TRUE, $force_overwrite = FALS
514514

515515
$htaccess_lines = file_htaccess_lines($private);
516516

517-
// Write the .htaccess file.
518-
if (file_put_contents($htaccess_path, $htaccess_lines)) {
517+
// Write the .htaccess file. Suppress any PHP error and write to watchdog.
518+
if (@file_put_contents($htaccess_path, $htaccess_lines)) {
519519
backdrop_chmod($htaccess_path, 0444);
520520
}
521521
else {
@@ -2372,7 +2372,8 @@ function file_scan_directory($dir, $mask, $options = array(), $depth = 0) {
23722372
$uri = "$dir/$filename";
23732373
$uri = file_stream_wrapper_uri_normalize($uri);
23742374
if (is_dir($uri) && $options['recurse']) {
2375-
// Give priority to files in this folder by merging them in after any subdirectory files.
2375+
// Give priority to files in this folder by merging them in after any
2376+
// subdirectory files.
23762377
$files = array_merge(file_scan_directory($uri, $mask, $options, $depth + 1), $files);
23772378
}
23782379
elseif ($depth >= $options['min_depth'] && preg_match($mask, $filename)) {

0 commit comments

Comments
 (0)