@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | } elseif ($parts[1] == 'data') { |
38 | 38 | $controller->data($request); |
39 | 39 | } elseif (sizeof($parts) == 2) { |
40 | - header("Location: " . $parts[1] . "/"); |
|
40 | + header("Location: ".$parts[1]."/"); |
|
41 | 41 | } else { |
42 | 42 | $vocab = $parts[1]; |
43 | 43 | try { |
@@ -93,5 +93,5 @@ discard block |
||
93 | 93 | } |
94 | 94 | } catch (Exception $e) { |
95 | 95 | header("HTTP/1.0 500 Internal Server Error"); |
96 | - echo('ERROR: ' . $e->getMessage()); |
|
96 | + echo('ERROR: '.$e->getMessage()); |
|
97 | 97 | } |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | return isset($results[$lang]) ? $results[$lang] : null; |
53 | 53 | } catch (EasyRdf\Http\Exception | EasyRdf\Exception | Throwable $e) { |
54 | 54 | if ($this->model->getConfig()->getLogCaughtExceptions()) { |
55 | - error_log('Caught exception: ' . $e->getMessage()); |
|
55 | + error_log('Caught exception: '.$e->getMessage()); |
|
56 | 56 | } |
57 | 57 | } |
58 | 58 | } |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | return isset($results) ? $results : null; |
75 | 75 | } catch (EasyRdf\Http\Exception | EasyRdf\Exception | Throwable $e) { |
76 | 76 | if ($this->model->getConfig()->getLogCaughtExceptions()) { |
77 | - error_log('Caught exception: ' . $e->getMessage()); |
|
77 | + error_log('Caught exception: '.$e->getMessage()); |
|
78 | 78 | } |
79 | 79 | } |
80 | 80 | } |
@@ -75,7 +75,7 @@ |
||
75 | 75 | if ($this->rest) { |
76 | 76 | return $term; |
77 | 77 | } |
78 | - return strpos($term, "*") === false ? $term . "*" : $term; // default to prefix search |
|
78 | + return strpos($term, "*") === false ? $term."*" : $term; // default to prefix search |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | public function getContentLang() |
@@ -32,9 +32,9 @@ |
||
32 | 32 | { |
33 | 33 | // Encrypt the current time |
34 | 34 | $honey_time_encrypted = $this->getEncryptedTime(); |
35 | - return '<div id="' . $honey_name . '_wrap" style="display:none;">' . "\r\n" . |
|
36 | - '<input name="' . $honey_name . '" type="text" value="" id="' . $honey_name . '"/>' . "\r\n" . |
|
37 | - '<input name="' . $honey_time . '" type="text" value="' . $honey_time_encrypted . '"/>' . "\r\n" . |
|
35 | + return '<div id="'.$honey_name.'_wrap" style="display:none;">'."\r\n". |
|
36 | + '<input name="'.$honey_name.'" type="text" value="" id="'.$honey_name.'"/>'."\r\n". |
|
37 | + '<input name="'.$honey_time.'" type="text" value="'.$honey_time_encrypted.'"/>'."\r\n". |
|
38 | 38 | '</div>'; |
39 | 39 | } |
40 | 40 | /** |
@@ -23,5 +23,5 @@ |
||
23 | 23 | |
24 | 24 | } catch (Exception $e) { |
25 | 25 | header("HTTP/1.0 500 Internal Server Error"); |
26 | - echo('ERROR: ' . $e->getMessage()); |
|
26 | + echo('ERROR: '.$e->getMessage()); |
|
27 | 27 | } |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | } |
10 | 10 | require_once '../vendor/autoload.php'; |
11 | 11 | } catch (Exception $e) { |
12 | - echo "Error: " . $e->getMessage(); |
|
12 | + echo "Error: ".$e->getMessage(); |
|
13 | 13 | return; |
14 | 14 | } |
15 | 15 | |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | $model = new Model(); |
18 | 18 | } catch (Exception $e) { |
19 | 19 | header("HTTP/1.1 500 Internal Server Error"); |
20 | - echo "Error: " . $e->getMessage(); |
|
20 | + echo "Error: ".$e->getMessage(); |
|
21 | 21 | exit(1); |
22 | 22 | } |
23 | 23 | |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | // if language code missing, redirect to guessed language |
34 | 34 | // in any case, redirect to <lang>/ |
35 | 35 | $lang = sizeof($parts) == 2 && $parts[1] !== '' ? $parts[1] : $controller->guessLanguage($request); |
36 | - header("Location: " . $lang . "/"); |
|
36 | + header("Location: ".$lang."/"); |
|
37 | 37 | } else { |
38 | 38 | if (array_key_exists($parts[1], $model->getConfig()->getLanguages())) { // global pages |
39 | 39 | $request->setLang($parts[1]); |
@@ -63,8 +63,8 @@ discard block |
||
63 | 63 | } |
64 | 64 | if (sizeof($parts) == 3) { // language code missing |
65 | 65 | $lang = $controller->guessLanguage($request); |
66 | - $newurl = $controller->getBaseHref() . $vocab . "/" . $lang . "/"; |
|
67 | - header("Location: " . $newurl); |
|
66 | + $newurl = $controller->getBaseHref().$vocab."/".$lang."/"; |
|
67 | + header("Location: ".$newurl); |
|
68 | 68 | } else { |
69 | 69 | if (array_key_exists($parts[2], $model->getConfig()->getLanguages())) { |
70 | 70 | $lang = $parts[2]; |
@@ -105,10 +105,10 @@ discard block |
||
105 | 105 | } |
106 | 106 | } else { // language code missing, redirect to some language version |
107 | 107 | $lang = $controller->guessLanguage($request, $vocab); |
108 | - $newurl = $controller->getBaseHref() . $vocab . "/" . $lang . "/" . implode('/', array_slice($parts, 2)); |
|
108 | + $newurl = $controller->getBaseHref().$vocab."/".$lang."/".implode('/', array_slice($parts, 2)); |
|
109 | 109 | $qs = $request->getServerConstant('QUERY_STRING'); |
110 | 110 | if ($qs) { |
111 | - $newurl .= "?" . $qs; |
|
111 | + $newurl .= "?".$qs; |
|
112 | 112 | } |
113 | 113 | header("Location: $newurl"); |
114 | 114 | } |
@@ -53,15 +53,15 @@ |
||
53 | 53 | |
54 | 54 | $localname = $vocab->getLocalName($uri); |
55 | 55 | if ($localname !== $uri && $localname === urlencode($localname)) { |
56 | - $paramstr = count($params) > 0 ? '?' . http_build_query($params) : ''; |
|
56 | + $paramstr = count($params) > 0 ? '?'.http_build_query($params) : ''; |
|
57 | 57 | if ($type && $type !== '' && $type !== 'vocab' && !($localname === '' && $type === 'page')) { |
58 | - return "$vocid/$lang/$type/$localname" . $paramstr; |
|
58 | + return "$vocid/$lang/$type/$localname".$paramstr; |
|
59 | 59 | } |
60 | 60 | |
61 | - return "$vocid/$lang/$localname" . $paramstr; |
|
61 | + return "$vocid/$lang/$localname".$paramstr; |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | $params['uri'] = $uri; |
65 | - return "$vocid/$lang/$type/?" . http_build_query($params); |
|
65 | + return "$vocid/$lang/$type/?".http_build_query($params); |
|
66 | 66 | } |
67 | 67 | } |
@@ -220,7 +220,7 @@ |
||
220 | 220 | { |
221 | 221 | if ($modifiedDate) { |
222 | 222 | $ifModifiedSince = $this->getIfModifiedSince(); |
223 | - $this->sendHeader("Last-Modified: " . $modifiedDate->format('D, d M Y H:i:s \G\M\T')); |
|
223 | + $this->sendHeader("Last-Modified: ".$modifiedDate->format('D, d M Y H:i:s \G\M\T')); |
|
224 | 224 | if ($ifModifiedSince !== null && $ifModifiedSince >= $modifiedDate) { |
225 | 225 | $this->sendHeader("HTTP/1.0 304 Not Modified"); |
226 | 226 | return true; |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | // 1. Ensure characters with special meaning in Lucene are escaped |
42 | 42 | $lucenemap = array(); |
43 | 43 | foreach (str_split(self::LUCENE_ESCAPE_CHARS) as $char) { |
44 | - $lucenemap[$char] = '\\' . $char; // escape with a backslash |
|
44 | + $lucenemap[$char] = '\\'.$char; // escape with a backslash |
|
45 | 45 | } |
46 | 46 | $term = strtr($term, $lucenemap); |
47 | 47 | |
@@ -128,11 +128,11 @@ discard block |
||
128 | 128 | # make text query clause |
129 | 129 | $lcletter = mb_strtolower($letter, 'UTF-8'); // convert to lower case, UTF-8 safe |
130 | 130 | $langClause = $this->generateLangClause($lang); |
131 | - $textcondPref = $this->createTextQueryCondition($letter . '*', 'skos:prefLabel', $langClause); |
|
132 | - $textcondAlt = $this->createTextQueryCondition($letter . '*', 'skos:altLabel', $langClause); |
|
133 | - $orderbyclause = $this->formatOrderBy("LCASE(?match)", $lang) . " STR(?s) LCASE(STR(?qualifier))"; |
|
131 | + $textcondPref = $this->createTextQueryCondition($letter.'*', 'skos:prefLabel', $langClause); |
|
132 | + $textcondAlt = $this->createTextQueryCondition($letter.'*', 'skos:altLabel', $langClause); |
|
133 | + $orderbyclause = $this->formatOrderBy("LCASE(?match)", $lang)." STR(?s) LCASE(STR(?qualifier))"; |
|
134 | 134 | |
135 | - $qualifierClause = $qualifier ? "OPTIONAL { ?s <" . $qualifier->getURI() . "> ?qualifier }" : ""; |
|
135 | + $qualifierClause = $qualifier ? "OPTIONAL { ?s <".$qualifier->getURI()."> ?qualifier }" : ""; |
|
136 | 136 | |
137 | 137 | $filterDeprecated = ""; |
138 | 138 | if (!$showDeprecated) { |