blob: 4e2d710b6de49a0020e57fc3d55eff3a7b7c87c7 (
plain)
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
|
diff -up bin/validate-json.rpm bin/validate-json
--- bin/validate-json.rpm 2016-04-15 11:02:32.629960716 +0200
+++ bin/validate-json 2016-04-15 11:07:01.583136406 +0200
@@ -6,28 +6,7 @@
* @author Christian Weiske <christian.weiske@netresearch.de>
*/
-/**
- * Dead simple autoloader
- *
- * @param string $className Name of class to load
- *
- * @return void
- */
-function __autoload($className)
-{
- $className = ltrim($className, '\\');
- $fileName = '';
- $namespace = '';
- if ($lastNsPos = strrpos($className, '\\')) {
- $namespace = substr($className, 0, $lastNsPos);
- $className = substr($className, $lastNsPos + 1);
- $fileName = str_replace('\\', DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR;
- }
- $fileName .= str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php';
- if (stream_resolve_include_path($fileName)) {
- require_once $fileName;
- }
-}
+require_once '/usr/share/php/JsonSchema4/autoload.php';
/**
* Show the json parse error that happened last
@@ -85,11 +64,6 @@ function parseHeaderValue($headerValue)
}
-// support running this tool from git checkout
-if (is_dir(__DIR__ . '/../src/JsonSchema')) {
- set_include_path(__DIR__ . '/../src' . PATH_SEPARATOR . get_include_path());
-}
-
$arOptions = array();
$arArgs = array();
array_shift($argv);//script itself
|