File: 0016-Use-installed-third-party-libraries.patch

package info (click to toggle)
shaarli 0.14.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 5,612 kB
  • sloc: php: 30,001; javascript: 2,083; makefile: 139; xml: 69; python: 42; sh: 35
file content (44 lines) | stat: -rw-r--r-- 1,313 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
From: James Valleroy <jvalleroy@mailbox.org>
Date: Sat, 9 Dec 2023 08:33:25 -0500
Subject: Use installed third party libraries

Forwarded: not-needed
---
 index.php | 2 +-
 init.php  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/index.php b/index.php
index cd51704..3c92010 100644
--- a/index.php
+++ b/index.php
@@ -14,7 +14,7 @@
  */
 
 require_once 'inc/rain.tpl.class.php';
-require_once __DIR__ . '/vendor/autoload.php';
+require_once '/usr/share/shaarli/autoload.php';
 
 // Shaarli library
 require_once 'application/bookmark/LinkUtils.php';
diff --git a/init.php b/init.php
index 367ecc1..92eea4e 100644
--- a/init.php
+++ b/init.php
@@ -1,6 +1,6 @@
 <?php
 
-require_once __DIR__ . '/vendor/autoload.php';
+require_once '/usr/share/shaarli/autoload.php';
 
 use Shaarli\Helper\ApplicationUtils;
 use Shaarli\Security\SessionManager;
@@ -23,7 +23,7 @@ ini_set('upload_max_filesize', '16M');
 error_reporting(E_ALL & ~E_WARNING & ~E_DEPRECATED);
 
 // 3rd-party libraries
-if (! file_exists(__DIR__ . '/vendor/autoload.php')) {
+if (! file_exists('/usr/share/shaarli/autoload.php')) {
     header('Content-Type: text/plain; charset=utf-8');
     echo "Error: missing Composer configuration\n\n"
         ."If you installed Shaarli through Git or using the development branch,\n"