@@ -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 |
@@ -239,9 +239,9 @@ discard block |
||
| 239 | 239 | $gcl = $this->graphClause; |
| 240 | 240 | $classes = ($classes) ? $classes : array('http://www.w3.org/2004/02/skos/core#Concept'); |
| 241 | 241 | |
| 242 | - $quote_string = function($val) { return "'$val'"; }; |
|
| 243 | - $quoted_values = array_map($quote_string, $langs); |
|
| 244 | - $langFilter = "FILTER(?lang IN (" . implode(',', $quoted_values) . "))"; |
|
| 242 | + $quote_string = function($val) { return "'$val'"; }; |
|
| 243 | + $quoted_values = array_map($quote_string, $langs); |
|
| 244 | + $langFilter = "FILTER(?lang IN (" . implode(',', $quoted_values) . "))"; |
|
| 245 | 245 | |
| 246 | 246 | $values = $this->formatValues('?type', $classes, 'uri'); |
| 247 | 247 | $valuesProp = $this->formatValues('?prop', $props, null); |
@@ -1812,7 +1812,7 @@ discard block |
||
| 1812 | 1812 | |
| 1813 | 1813 | /** |
| 1814 | 1814 | * Generates a sparql query for finding the hierarchy for a concept. |
| 1815 | - * A concept may be a top concept in multiple schemes, returned as a single whitespace-separated literal. |
|
| 1815 | + * A concept may be a top concept in multiple schemes, returned as a single whitespace-separated literal. |
|
| 1816 | 1816 | * @param string $uri concept uri. |
| 1817 | 1817 | * @param string $lang |
| 1818 | 1818 | * @param string $fallback language to use if label is not available in the preferred language |
@@ -1889,10 +1889,10 @@ discard block |
||
| 1889 | 1889 | $ret[$uri]['exact'] = $row->exact->getUri(); |
| 1890 | 1890 | } |
| 1891 | 1891 | if (isset($row->tops)) { |
| 1892 | - $topConceptsList=explode(" ", $row->tops->getValue()); |
|
| 1893 | - // sort to garantee an alphabetical ordering of the URI |
|
| 1894 | - sort($topConceptsList); |
|
| 1895 | - $ret[$uri]['tops'] = $topConceptsList; |
|
| 1892 | + $topConceptsList=explode(" ", $row->tops->getValue()); |
|
| 1893 | + // sort to garantee an alphabetical ordering of the URI |
|
| 1894 | + sort($topConceptsList); |
|
| 1895 | + $ret[$uri]['tops'] = $topConceptsList; |
|
| 1896 | 1896 | } |
| 1897 | 1897 | if (isset($row->children)) { |
| 1898 | 1898 | if (!isset($ret[$uri]['narrower'])) { |