Package: ocsinventory-server / 2.5+dfsg1-1

use_system_libraries Patch series | download
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
Description: Use Debian packaged libraries
Author: Jean-Michel Vourgère <nirgal@debian.org>
Forwarded: not-needed
Reviewed-By: Xavier Guimard <x.guimard@free.fr>
Last-Update: 2018-08-02

--- a/ocsreports/plugins/main_sections/ms_computer/ms_qrcode.php
+++ b/ocsreports/plugins/main_sections/ms_computer/ms_qrcode.php
@@ -20,7 +20,7 @@
  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  * MA 02110-1301, USA.
  */
-require_once(TC_LIB_BARCODE);
+require_once('/usr/share/phpqrcode/phpqrcode.php');
 require_once('require/function_admininfo.php');
 if (is_numeric($protectedGet['systemid']) && array_key_exists($protectedGet['default_value'], $array_qr_action)) {
     if ($array_qr_action[$protectedGet['default_value']]['TYPE'] == 'url') {
@@ -39,7 +39,5 @@
         $msg = $val[$fields_info[1]];
     }
 
-    $barcode = new \Com\Tecnick\Barcode\Barcode();
-    $qrcode = $barcode->getBarcodeObj('QRCODE,H', $msg, 400, 400, 'black', array(20, 20, 20, 20));
-    $qrcode->getPng();
+    QRcode::png($msg, false, QR_ECLEVEL_H, 10, 2);
 }
--- a/ocsreports/require/function_commun.php
+++ b/ocsreports/require/function_commun.php
@@ -331,12 +331,12 @@
 
 				<title>OCS Inventory</title>
 				<link rel="shortcut icon" href="favicon.ico">
-				<link rel="stylesheet" href="libraries/bootstrap/css/bootstrap.min.css">
-				<link rel="stylesheet" href="libraries/bootstrap/css/bootstrap-theme.min.css">
-				<link rel="stylesheet" href="libraries/select2/css/select2.min.css" />
+				<link rel="stylesheet" href="/javascript/bootstrap/css/bootstrap.min.css">
+				<link rel="stylesheet" href="/javascript/bootstrap/css/bootstrap-theme.min.css">
+				<link rel="stylesheet" href="/javascript/select2.js/select2.min.js" />
 				<link rel="stylesheet" href="themes/'.$value_theme['tvalue']['CUSTOM_THEME'].'/style.css">
 				<link rel="stylesheet" href="css/dataTables-custom.css">
-				<link rel="stylesheet" href="libraries/datatable/media/css/dataTables.bootstrap.css">
+				<link rel="stylesheet" href="/javascript/jquery-datatables/css/dataTables.bootstrap.css">
 				<link rel="stylesheet" href="css/ocsreports.css">
         <link rel="stylesheet" href="css/bootstrap-datetimepicker.css">
 				<link rel="stylesheet" href="css/header.css">
@@ -347,21 +347,21 @@
     if (!$noJavascript) {
         //js for graph
         echo '
-        <script src="libraries/jquery/jquery.js" type="text/javascript"></script>
-        <script src="libraries/jquery-migrate-1/jquery-migrate.min.js" type="text/javascript"></script>
-        <script src="libraries/jquery-fileupload/jquery.ui.widget.min.js" type="text/javascript"></script>
-        <script src="libraries/jquery-fileupload/jquery.iframe-transport.min.js" type="text/javascript"></script>
-        <script src="libraries/jquery-fileupload/jquery.fileupload.min.js" type="text/javascript"></script>
-        <script src="libraries/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
-        <script src="libraries/select2/js/select2.min.js" type="text/javascript"></script>
+        <script src="/javascript/jquery/jquery.min.js" type="text/javascript"></script>
+        <script src="/javascript/jquery-migrate-1.min.js" type="text/javascript"></script>
+        <script src="/javascript/jquery-ui/ui/widget.min.js" type="text/javascript"></script>
+        <script src="/javascript/jquery-file-upload/jquery.iframe-transport.js" type="text/javascript"></script>
+        <script src="/javascript/jquery-file-upload/jquery.fileupload.js" type="text/javascript"></script>
+        <script src="/javascript/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
+        <script src="/javascript/select2.js/select2.min.js" type="text/javascript"></script>
         <script src="js/bootstrap-custom.js" type="text/javascript"></script>
         <script src="js/bootstrap-datetimepicker.js" type="text/javascript"></script>
         <script src="js/bootstrap-datetimepicker-locale.js" type="text/javascript"></script>
         <script src="js/bootstrap-formhelpers.js" type="text/javascript"></script>
-        <script src="libraries/charts.js/Chart.min.js" type="text/javascript"></script>
+        <script src="/javascript/chartjs/Chart.js" type="text/javascript"></script>
         <!-- js for Datatables -->
-        <script src="libraries/datatable/media/js/jquery.dataTables.min.js" type="text/javascript"></script>
-        <script src="libraries/datatable/media/js/dataTables.bootstrap.js" type="text/javascript"></script>
+        <script src="/javascript/jquery-datatables/jquery.dataTables.min.js" type="text/javascript"></script>
+        <script src="/javascript/jquery-datatables/dataTables.bootstrap.min.js" type="text/javascript"></script>
         <script src="js/function.js" type="text/javascript"></script>
         <script src="js/dataTables.conditionalPaging.js" type="text/javascript"></script>';
 
--- a/ocsreports/var.php
+++ b/ocsreports/var.php
@@ -50,7 +50,7 @@
 /**
  * Mac address file
  */
-define('MAC_FILE', __DIR__ . '/files/oui.txt');
+define('MAC_FILE', '/usr/share/ieee-data/oui.txt');
 /**
  * Backend folder (AUTH / CAS / etc )
  */
@@ -58,7 +58,7 @@
 /**
  * Library PHPCAS
  */
-define('PHPCAS', __DIR__ . '/libraries/phpcas/CAS.php');
+define('PHPCAS', '/usr/share/php/CAS.php');
 /**
  * Library TC-LIB-BARCODE
  */