Commit b3f79b7e authored by Jonny Bradley's avatar Jonny Bradley
Browse files

[FIX] Replace `vendor_bundled/vendor` in secdb file paths with a shorter token...

[FIX] Replace `vendor_bundled/vendor` in secdb file paths with a shorter token `%VB%` to avoid maximum index length issues preventing secdb inserts, breaking the installer
parent 182729ed
......@@ -393,6 +393,8 @@ function build_secdb_queries($dir, $version, &$queries, $excludes = [])
}
if (is_readable($entry)) {
// shorten vendor_bundled path to avoid mysql index length issues
$file = str_replace('./vendor_bundled/vendor/', '%VB%', $file);
$hash = md5_file($entry);
$queries[] = "('$file', '$hash', '$version')";
}
......
......@@ -249,7 +249,8 @@ function md5_check_dir($dir, &$result, $vcs_diff = [])
$result[$entry] = tra('File is not readable. Unable to check.');
} else {
$md5val = md5_file($entry);
$dbresult = $tikilib->query($query, [$entry]);
$filename = str_replace('./vendor_bundled/vendor/', '%VB%', $entry);
$dbresult = $tikilib->query($query, [$filename]);
$is_tikifile = false;
$is_tikiver = [];
$valid_tikiver = [];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment