File: 0012-Remove-defines-of-PIWIK_VENDOR_PATH.patch

package info (click to toggle)
matomo 5.5.1%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 73,596 kB
  • sloc: php: 231,041; javascript: 102,286; python: 202; xml: 189; sh: 172; makefile: 20; sql: 10
file content (48 lines) | stat: -rw-r--r-- 1,677 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
From: William Desportes <williamdes@wdes.fr>
Date: Sun, 15 Dec 2024 23:00:05 +0100
Subject: Remove defines of PIWIK_VENDOR_PATH

Remove define PIWIK_VENDOR_PATH

Origin: vendor
Forwarded: not-needed
---
 core/bootstrap.php | 7 -------
 js/tracker.php     | 6 ------
 2 files changed, 13 deletions(-)

diff --git a/core/bootstrap.php b/core/bootstrap.php
index 7d58206..411fa19 100644
--- a/core/bootstrap.php
+++ b/core/bootstrap.php
@@ -27,13 +27,6 @@ error_reporting($errorLevel);
 @ini_set('display_errors', defined('PIWIK_DISPLAY_ERRORS') ? PIWIK_DISPLAY_ERRORS : @ini_get('display_errors'));
 @ini_set('xdebug.show_exception_trace', 0);
 
-if (!defined('PIWIK_VENDOR_PATH')) {
-    if (is_dir(PIWIK_INCLUDE_PATH . '/vendor')) {
-        define('PIWIK_VENDOR_PATH', PIWIK_INCLUDE_PATH . '/vendor'); // Piwik is the main project
-    } else {
-        define('PIWIK_VENDOR_PATH', PIWIK_INCLUDE_PATH . '/../..'); // Piwik is installed as a Composer dependency
-    }
-}
 
 // NOTE: the code above must be PHP 4 compatible
 require_once PIWIK_INCLUDE_PATH . '/core/testMinimumPhpVersion.php';
diff --git a/js/tracker.php b/js/tracker.php
index be82031..f71ab0e 100644
--- a/js/tracker.php
+++ b/js/tracker.php
@@ -43,12 +43,6 @@ if (!defined('PIWIK_USER_PATH')) {
 
 require_once PIWIK_INCLUDE_PATH . '/libs/upgradephp/upgrade.php';
 
-if (is_dir(PIWIK_INCLUDE_PATH . '/vendor')) {
-    define('PIWIK_VENDOR_PATH', PIWIK_INCLUDE_PATH . '/vendor'); // Piwik is the main project
-} else {
-    define('PIWIK_VENDOR_PATH', PIWIK_INCLUDE_PATH . '/../..'); // Piwik is installed as a Composer dependency
-}
-
 // Composer autoloader
 require PIWIK_VENDOR_PATH . '/autoload.php';