From fd89fee1a15f988fca80795bb1e0203818ecdfaa Mon Sep 17 00:00:00 2001 From: "Hans Krentel (hakre)" Date: Sat, 13 Jun 2026 02:44:42 +0200 Subject: [PATCH] Chore: Fix completion permissions Remove the executable bit from the completion file: it is sourced and should never have been executable. The globbetyglob()/make_scripts_executable() functions, introduced in ae7bebea ("Add autoconf && ./configure && make test_xml replacement", 2007-09-08), are no longer needed. Executable bits are now managed by version control, so the functions are removed as well. --- configure.php | 23 ----------------------- scripts/helpers/phpdoc-completion.sh | 0 2 files changed, 23 deletions(-) mode change 100755 => 100644 scripts/helpers/phpdoc-completion.sh diff --git a/configure.php b/configure.php index c20259a5d8..8f83848a5f 100755 --- a/configure.php +++ b/configure.php @@ -48,8 +48,6 @@ // phd_version() done // php_history() done -// ugly: make_scripts_executable - const RNG_SCHEMA_DIR = __DIR__ . DIRECTORY_SEPARATOR . 'docbook' . DIRECTORY_SEPARATOR . 'docbook-5.2.1' . DIRECTORY_SEPARATOR . 'rng' . DIRECTORY_SEPARATOR; const RNG_SCHEMA_FILE = RNG_SCHEMA_DIR . 'docbook.rng'; const RNG_SCHEMA_XINCLUDE_FILE = RNG_SCHEMA_DIR . 'docbookxi.rng'; @@ -192,25 +190,6 @@ function find_file($file_array) // {{{ return ''; } // }}} -// Recursive glob() with a callback function {{{ -function globbetyglob($globber, $userfunc) -{ - foreach (glob("$globber/*") as $file) { - if (is_dir($file)) { - globbetyglob($file, $userfunc); - } else { - call_user_func($userfunc, $file); - } - } -} // }}} - -function make_scripts_executable($filename) // {{{ -{ - if (substr($filename, -3) == '.sh') { - chmod($filename, 0755); - } -} // }}} - function print_xml_errors() { global $ac; @@ -532,8 +511,6 @@ function find_xml_files($path) // {{{ $ac["ONLYDIR"] = dirname(realpath($ac["GENERATE"])); } -globbetyglob("{$ac['basedir']}/scripts", 'make_scripts_executable'); - git_clean(); // Idempotent clean up git_status(); // Show local repository status diff --git a/scripts/helpers/phpdoc-completion.sh b/scripts/helpers/phpdoc-completion.sh old mode 100755 new mode 100644