@@ -39,11 +39,11 @@ |
||
39 | 39 | return $html; |
40 | 40 | } |
41 | 41 | /** |
42 | - * Validate honeypot is empty |
|
43 | - * |
|
44 | - * @param mixed $value |
|
45 | - * @return boolean |
|
46 | - */ |
|
42 | + * Validate honeypot is empty |
|
43 | + * |
|
44 | + * @param mixed $value |
|
45 | + * @return boolean |
|
46 | + */ |
|
47 | 47 | public function validateHoneypot($value) |
48 | 48 | { |
49 | 49 | if ($this->disabled) { |
@@ -124,8 +124,8 @@ |
||
124 | 124 | */ |
125 | 125 | public function getEnvLang() |
126 | 126 | { |
127 | - // get language from locale, same as used by gettext, set by Controller |
|
128 | - return substr(getenv("LC_ALL"), 0, 2); // @codeCoverageIgnore |
|
127 | + // get language from locale, same as used by gettext, set by Controller |
|
128 | + return substr(getenv("LC_ALL"), 0, 2); // @codeCoverageIgnore |
|
129 | 129 | } |
130 | 130 | |
131 | 131 | /** |
@@ -7,11 +7,11 @@ |
||
7 | 7 | abstract class BaseConfig extends DataObject |
8 | 8 | { |
9 | 9 | |
10 | - /** |
|
11 | - * Returns a boolean value based on a literal value from the config.ttl configuration. |
|
12 | - * @param string $property the property to query |
|
13 | - * @param boolean $default the default value if the value is not set in configuration |
|
14 | - */ |
|
10 | + /** |
|
11 | + * Returns a boolean value based on a literal value from the config.ttl configuration. |
|
12 | + * @param string $property the property to query |
|
13 | + * @param boolean $default the default value if the value is not set in configuration |
|
14 | + */ |
|
15 | 15 | protected function getBoolean($property, $default = false) |
16 | 16 | { |
17 | 17 | $val = $this->getResource()->getLiteral($property); |
@@ -517,13 +517,13 @@ |
||
517 | 517 | |
518 | 518 | $defaultPropLabel = $this->model->getDefaultSparql()->queryLabel($longUri, ''); |
519 | 519 | |
520 | - if($envLangLabels) { |
|
521 | - $proplabel = $envLangLabels[$this->getEnvLang()]; |
|
520 | + if($envLangLabels) { |
|
521 | + $proplabel = $envLangLabels[$this->getEnvLang()]; |
|
522 | 522 | } else { |
523 | - if($defaultPropLabel) { |
|
524 | - $proplabel = $defaultPropLabel['']; |
|
525 | - } |
|
526 | - } |
|
523 | + if($defaultPropLabel) { |
|
524 | + $proplabel = $defaultPropLabel['']; |
|
525 | + } |
|
526 | + } |
|
527 | 527 | } |
528 | 528 | |
529 | 529 | // look for superproperties in the current graph |
@@ -30,14 +30,14 @@ |
||
30 | 30 | $url = $baseurl . "$vocid/"; |
31 | 31 | } else { |
32 | 32 | |
33 | - if ($localname !== $uri && $localname === urlencode($localname)) { |
|
34 | - // the URI can be shortened |
|
33 | + if ($localname !== $uri && $localname === urlencode($localname)) { |
|
34 | + // the URI can be shortened |
|
35 | 35 | $url = $baseurl . "$vocid/page/$localname"; |
36 | 36 | } else { |
37 | 37 | // must use full URI |
38 | - $query = http_build_query(array('uri'=>$uri)); |
|
38 | + $query = http_build_query(array('uri'=>$uri)); |
|
39 | 39 | $url = $baseurl . "$vocid/page/?" . $query; |
40 | - } |
|
40 | + } |
|
41 | 41 | } |
42 | 42 | $this->redirect303($url); |
43 | 43 | } |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | * |
65 | 65 | * @param string $query |
66 | 66 | * @return string |
67 | - */ |
|
67 | + */ |
|
68 | 68 | protected function generateQueryPrefixes($query) |
69 | 69 | { |
70 | 70 | // Check for undefined prefixes |
@@ -261,25 +261,25 @@ discard block |
||
261 | 261 | } |
262 | 262 | |
263 | 263 | /** |
264 | - * Used to generate the BIND + FILTER part related to the languages |
|
265 | - * @param $varnameInput the name of the variable from which to extract the language |
|
266 | - * @param $varnameOutput the name of the variable that will contain the language tag |
|
267 | - * @param array $values languages to use in the FILTER |
|
268 | - * @return string part of the sparql query dealing wit the languages |
|
269 | - */ |
|
264 | + * Used to generate the BIND + FILTER part related to the languages |
|
265 | + * @param $varnameInput the name of the variable from which to extract the language |
|
266 | + * @param $varnameOutput the name of the variable that will contain the language tag |
|
267 | + * @param array $values languages to use in the FILTER |
|
268 | + * @return string part of the sparql query dealing wit the languages |
|
269 | + */ |
|
270 | 270 | protected function formatValuesFilterAndBind($varnameInput, $varnameOutput, $values) { |
271 | - $queryPart = "BIND(lang($varnameInput) AS $varnameOutput)"; |
|
272 | - $first = true; |
|
271 | + $queryPart = "BIND(lang($varnameInput) AS $varnameOutput)"; |
|
272 | + $first = true; |
|
273 | 273 | |
274 | - $queryPart .= "FILTER(" ; |
|
274 | + $queryPart .= "FILTER(" ; |
|
275 | 275 | foreach ($values as $val) { |
276 | 276 | if($first != true){ |
277 | 277 | $queryPart .= ' || '; |
278 | 278 | } |
279 | - $first = false; |
|
279 | + $first = false; |
|
280 | 280 | $queryPart .= "$varnameOutput = '$val'"; |
281 | 281 | } |
282 | - $queryPart .= ")"; |
|
282 | + $queryPart .= ")"; |
|
283 | 283 | |
284 | 284 | return $queryPart; |
285 | 285 | } |
@@ -1832,7 +1832,7 @@ discard block |
||
1832 | 1832 | |
1833 | 1833 | /** |
1834 | 1834 | * Generates a sparql query for finding the hierarchy for a concept. |
1835 | - * A concept may be a top concept in multiple schemes, returned as a single whitespace-separated literal. |
|
1835 | + * A concept may be a top concept in multiple schemes, returned as a single whitespace-separated literal. |
|
1836 | 1836 | * @param string $uri concept uri. |
1837 | 1837 | * @param string $lang |
1838 | 1838 | * @param string $fallback language to use if label is not available in the preferred language |
@@ -1909,10 +1909,10 @@ discard block |
||
1909 | 1909 | $ret[$uri]['exact'] = $row->exact->getUri(); |
1910 | 1910 | } |
1911 | 1911 | if (isset($row->tops)) { |
1912 | - $topConceptsList=explode(" ", $row->tops->getValue()); |
|
1913 | - // sort to garantee an alphabetical ordering of the URI |
|
1914 | - sort($topConceptsList); |
|
1915 | - $ret[$uri]['tops'] = $topConceptsList; |
|
1912 | + $topConceptsList=explode(" ", $row->tops->getValue()); |
|
1913 | + // sort to garantee an alphabetical ordering of the URI |
|
1914 | + sort($topConceptsList); |
|
1915 | + $ret[$uri]['tops'] = $topConceptsList; |
|
1916 | 1916 | } |
1917 | 1917 | if (isset($row->children)) { |
1918 | 1918 | if (!isset($ret[$uri]['narrower'])) { |