Skip to content

Commit

Permalink
Backdrop 1.29.0 (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
shelane authored Sep 18, 2024
1 parent ad919e1 commit 7d24ba2
Show file tree
Hide file tree
Showing 511 changed files with 4,068 additions and 1,648 deletions.
2 changes: 1 addition & 1 deletion docroot/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.28.2');
define('BACKDROP_VERSION', '1.29.0');

/**
* Core API compatibility.
Expand Down
23 changes: 23 additions & 0 deletions docroot/core/includes/database/mysql/database.inc
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,29 @@ class DatabaseConnection_mysql extends DatabaseConnection {
return 'mysql';
}

/**
* Returns the version of the database server.
*/
public function version() {
$version = parent::version();

// Some MariaDB version strings prepend a fake MySQL version to the front,
// which is always "5.5.5-". This was done to so that old MySQL clients
// could connect to newer MariaDB servers.
// For example, 5.5.5-10.5.11-MariaDB:
// - 5.5.5 is a fake MySQL version.
// - 10.5.11 would be the actual MariaDB version.
// See https://github.com/MariaDB/server/blob/f6633bf058802ad7da8196d01fd19d75c53f7274/include/mysql_com.h#L42
// Remove any leading MySQL 5.5.5- prefixes:
$regex = '/^(?:5\.5\.5-)?(\d+\.\d+\.\d+.*-mariadb.*)/i';
preg_match($regex, $version, $matches);
if (!empty($matches[1])) {
$version = $matches[1];
}

return $version;
}

public function databaseType() {
return 'mysql';
}
Expand Down
1 change: 1 addition & 0 deletions docroot/core/includes/drupal.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1711,6 +1711,7 @@ function drupal_tempnam($directory, $prefix) {
* Creates a .htaccess file in the given directory.
*
* @deprecated since 1.0.0
* @see file_save_htaccess()
*/
function file_create_htaccess($directory, $private = TRUE, $force_overwrite = FALSE) {
watchdog_deprecated_function('drupal', __FUNCTION__);
Expand Down
7 changes: 4 additions & 3 deletions docroot/core/includes/file.inc
Original file line number Diff line number Diff line change
Expand Up @@ -514,8 +514,8 @@ function file_save_htaccess($directory, $private = TRUE, $force_overwrite = FALS

$htaccess_lines = file_htaccess_lines($private);

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

0 comments on commit 7d24ba2

Please sign in to comment.