diff options
author | Remi Collet <fedora@famillecollet.com> | 2016-09-26 08:50:26 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2016-09-26 08:50:26 +0200 |
commit | 83efb3b56a900ab197b32143f58a8ea86bdd6880 (patch) | |
tree | 1bfe706513fdac88311f5b1929ce7adf11400b4f | |
parent | 12ee33e97dcf8f076649dd7c643e8b789a152f54 (diff) |
glpi: fix autoloader
-rw-r--r-- | glpi-9.1-pr1056.patch | 30 | ||||
-rw-r--r-- | glpi-dev.spec | 6 |
2 files changed, 36 insertions, 0 deletions
diff --git a/glpi-9.1-pr1056.patch b/glpi-9.1-pr1056.patch new file mode 100644 index 0000000..85593c6 --- /dev/null +++ b/glpi-9.1-pr1056.patch @@ -0,0 +1,30 @@ +From e58360e8f377e95ef96711b8b4466b0a7c066a89 Mon Sep 17 00:00:00 2001 +From: Remi Collet <fedora@famillecollet.com> +Date: Mon, 26 Sep 2016 08:45:22 +0200 +Subject: [PATCH] ensure GLPI autoloader always first in the stack + +--- + inc/autoload.function.php | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/inc/autoload.function.php b/inc/autoload.function.php +index 12fc186..3fce416 100644 +--- a/inc/autoload.function.php ++++ b/inc/autoload.function.php +@@ -336,12 +336,12 @@ function glpi_autoload($classname) { + } + } + +-// Use spl autoload to allow stackable autoload. +-spl_autoload_register('glpi_autoload'); +- + // composer autoload + $autoload = dirname(__DIR__) . '/vendor/autoload.php'; + if (!file_exists($autoload)) { + die('Run "composer install --no-dev" in the glpi tree'); + } + require_once $autoload; ++ ++// Use spl autoload to allow stackable autoload. ++spl_autoload_register('glpi_autoload', false, true); +\ No newline at end of file diff --git a/glpi-dev.spec b/glpi-dev.spec index 254716d..50e37a2 100644 --- a/glpi-dev.spec +++ b/glpi-dev.spec @@ -55,6 +55,8 @@ Source3: %{name}-logrotate Source4: %{name}-nginx.conf Source5: %{name}-fedora-autoloader.php +Patch1: %{name}-9.1-pr1056.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: gettext @@ -170,6 +172,8 @@ techniciens grâce à une maintenance plus cohérente. %prep %setup -q -n %{name}-%{gh_commit} +%patch1 -p1 + grep %{version} config/define.php find . -name \*.orig -exec rm {} \; -print @@ -419,6 +423,8 @@ fi * Mon Sep 26 2016 Remi Collet <remi@fedoraproject.org> - 0.91-1 - update to 0.91 https://github.com/glpi-project/glpi/milestone/2?closed=1 +- add patch to ensure correct autolading + open https://github.com/glpi-project/glpi/pull/1056 * Fri Sep 23 2016 Johan Cwiklinski <jcwiklinski@teclib.com> - 9.1-0.1.20160922gitf4143e3 - First pre-build for 9.1 series |