Skip to content

Commit

Permalink
MDL-69050 lang: Fix the variable name in the admin/cli/svgtool.php
Browse files Browse the repository at this point in the history
  • Loading branch information
mudrd8mz committed Sep 24, 2020
1 parent cde6c9d commit 7a079a8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions admin/cli/svgtool.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,17 @@
}

// If necessary add files that should be ignored - such as in 3rd party plugins.
$blacklist = array();
$ignorelist = array();
$path = $options['path'];
if (!file_exists($path)) {
cli_error("Invalid path $path");
}

if ($options['ie9fix']) {
core_admin_recurse_svgs($path, '', 'core_admin_svgtool_ie9fix', $blacklist);
core_admin_recurse_svgs($path, '', 'core_admin_svgtool_ie9fix', $ignorelist);

} else if ($options['noaspectratio']) {
core_admin_recurse_svgs($path, '', 'core_admin_svgtool_noaspectratio', $blacklist);
core_admin_recurse_svgs($path, '', 'core_admin_svgtool_noaspectratio', $ignorelist);

} else {
$help =
Expand Down Expand Up @@ -153,17 +153,17 @@ function core_admin_svgtool_noaspectratio($file) {
* @param string $base
* @param string $sub
* @param string $filecallback
* @param array $blacklist
* @param array $ignorelist List of files to be ignored and skipped.
*/
function core_admin_recurse_svgs($base, $sub, $filecallback, $blacklist) {
function core_admin_recurse_svgs($base, $sub, $filecallback, $ignorelist) {
if (is_dir("$base/$sub")) {
$items = new DirectoryIterator("$base/$sub");
foreach ($items as $item) {
if ($item->isDot()) {
continue;
}
$file = $item->getFilename();
core_admin_recurse_svgs("$base/$sub", $file, $filecallback, $blacklist);
core_admin_recurse_svgs("$base/$sub", $file, $filecallback, $ignorelist);
}
unset($item);
unset($items);
Expand All @@ -174,7 +174,7 @@ function core_admin_recurse_svgs($base, $sub, $filecallback, $blacklist) {
return;
}
$file = realpath("$base/$sub");
if (in_array($file, $blacklist)) {
if (in_array($file, $ignorelist)) {
return;
}
$filecallback($file);
Expand Down

0 comments on commit 7a079a8

Please sign in to comment.