@@ -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 | } |
@@ -559,9 +559,9 @@ |
||
| 559 | 559 | $vocid = $request->getVocab()->getId(); |
| 560 | 560 | return $this->returnError('404', 'Not Found', "No download source URL known for vocabulary $vocid in language $dataLang"); |
| 561 | 561 | } |
| 562 | - } else { |
|
| 562 | + } else { |
|
| 563 | 563 | header("Location: " . $urls[$format]); |
| 564 | - } |
|
| 564 | + } |
|
| 565 | 565 | } |
| 566 | 566 | |
| 567 | 567 | private function returnDataResults($results, $format) { |
@@ -33,16 +33,16 @@ |
||
| 33 | 33 | // Encrypt the current time |
| 34 | 34 | $honey_time_encrypted = $this->getEncryptedTime(); |
| 35 | 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" . |
|
| 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 | /** |
| 41 | - * Validate honeypot is empty |
|
| 42 | - * |
|
| 43 | - * @param mixed $value |
|
| 44 | - * @return boolean |
|
| 45 | - */ |
|
| 41 | + * Validate honeypot is empty |
|
| 42 | + * |
|
| 43 | + * @param mixed $value |
|
| 44 | + * @return boolean |
|
| 45 | + */ |
|
| 46 | 46 | public function validateHoneypot($value) |
| 47 | 47 | { |
| 48 | 48 | if ($this->disabled) { |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | * |
| 66 | 66 | * @param string $query |
| 67 | 67 | * @return string |
| 68 | - */ |
|
| 68 | + */ |
|
| 69 | 69 | protected function generateQueryPrefixes($query) |
| 70 | 70 | { |
| 71 | 71 | // Check for undefined prefixes |
@@ -233,9 +233,9 @@ discard block |
||
| 233 | 233 | $gcl = $this->graphClause; |
| 234 | 234 | $classes = ($classes) ? $classes : array('http://www.w3.org/2004/02/skos/core#Concept'); |
| 235 | 235 | |
| 236 | - $quote_string = function($val) { return "'$val'"; }; |
|
| 237 | - $quoted_values = array_map($quote_string, $langs); |
|
| 238 | - $langFilter = "FILTER(?lang IN (" . implode(',', $quoted_values) . "))"; |
|
| 236 | + $quote_string = function($val) { return "'$val'"; }; |
|
| 237 | + $quoted_values = array_map($quote_string, $langs); |
|
| 238 | + $langFilter = "FILTER(?lang IN (" . implode(',', $quoted_values) . "))"; |
|
| 239 | 239 | |
| 240 | 240 | $values = $this->formatValues('?type', $classes, 'uri'); |
| 241 | 241 | $valuesProp = $this->formatValues('?prop', $props, null); |
@@ -951,7 +951,7 @@ discard block |
||
| 951 | 951 | return $query; |
| 952 | 952 | } |
| 953 | 953 | /** |
| 954 | - * This function can be overwritten in other SPARQL dialects for the possibility of handling the differenc language clauses |
|
| 954 | + * This function can be overwritten in other SPARQL dialects for the possibility of handling the differenc language clauses |
|
| 955 | 955 | * @param string $lang |
| 956 | 956 | * @return string formatted language clause |
| 957 | 957 | */ |
@@ -1845,7 +1845,7 @@ discard block |
||
| 1845 | 1845 | |
| 1846 | 1846 | /** |
| 1847 | 1847 | * Generates a sparql query for finding the hierarchy for a concept. |
| 1848 | - * A concept may be a top concept in multiple schemes, returned as a single whitespace-separated literal. |
|
| 1848 | + * A concept may be a top concept in multiple schemes, returned as a single whitespace-separated literal. |
|
| 1849 | 1849 | * @param string $uri concept uri. |
| 1850 | 1850 | * @param string $lang |
| 1851 | 1851 | * @param string $fallback language to use if label is not available in the preferred language |
@@ -1922,10 +1922,10 @@ discard block |
||
| 1922 | 1922 | $ret[$uri]['exact'] = $row->exact->getUri(); |
| 1923 | 1923 | } |
| 1924 | 1924 | if (isset($row->tops)) { |
| 1925 | - $topConceptsList=explode(" ", $row->tops->getValue()); |
|
| 1926 | - // sort to garantee an alphabetical ordering of the URI |
|
| 1927 | - sort($topConceptsList); |
|
| 1928 | - $ret[$uri]['tops'] = $topConceptsList; |
|
| 1925 | + $topConceptsList=explode(" ", $row->tops->getValue()); |
|
| 1926 | + // sort to garantee an alphabetical ordering of the URI |
|
| 1927 | + sort($topConceptsList); |
|
| 1928 | + $ret[$uri]['tops'] = $topConceptsList; |
|
| 1929 | 1929 | } |
| 1930 | 1930 | if (isset($row->children)) { |
| 1931 | 1931 | if (!isset($ret[$uri]['narrower'])) { |