| @@ -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); | 
| @@ -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 | } | 
| @@ -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'])) { | 
| @@ -575,9 +575,9 @@ discard block | ||
| 575 | 575 | $vocid = $request->getVocab()->getId(); | 
| 576 | 576 |                  return $this->returnError('404', 'Not Found', "No download source URL known for vocabulary $vocid in language $dataLang"); | 
| 577 | 577 | } | 
| 578 | -		} else { | |
| 578 | +    } else { | |
| 579 | 579 |              header("Location: " . $urls[$format]); | 
| 580 | - } | |
| 580 | + } | |
| 581 | 581 | } | 
| 582 | 582 | |
| 583 | 583 |      private function returnDataResults($results, $format) { | 
| @@ -1100,15 +1100,15 @@ discard block | ||
| 1100 | 1100 |          foreach($changeList as $conceptInfo) { | 
| 1101 | 1101 |              if (array_key_exists('date', $conceptInfo)) { | 
| 1102 | 1102 | $simpleChangeList[] = array( 'uri' => $conceptInfo['uri'], | 
| 1103 | - 'prefLabel' => $conceptInfo['prefLabel'], | |
| 1104 | -                                               'date' => $conceptInfo['date']->format("Y-m-d\TH:i:sO") ); | |
| 1103 | + 'prefLabel' => $conceptInfo['prefLabel'], | |
| 1104 | +                                                'date' => $conceptInfo['date']->format("Y-m-d\TH:i:sO") ); | |
| 1105 | 1105 | } | 
| 1106 | 1106 | } | 
| 1107 | 1107 | return $this->returnJson(array_merge_recursive($this->context, | 
| 1108 | 1108 |                                                          array('@context' => array( '@language' => $request->getLang(), | 
| 1109 | - 'prefLabel' => 'skos:prefLabel', | |
| 1110 | - 'xsd' => 'http://www.w3.org/2001/XMLSchema#', | |
| 1111 | - 'date' => array( '@id' => 'http://purl.org/dc/terms/date', '@type' => 'http://www.w3.org/2001/XMLSchema#dateTime') ) | |
| 1109 | + 'prefLabel' => 'skos:prefLabel', | |
| 1110 | + 'xsd' => 'http://www.w3.org/2001/XMLSchema#', | |
| 1111 | + 'date' => array( '@id' => 'http://purl.org/dc/terms/date', '@type' => 'http://www.w3.org/2001/XMLSchema#dateTime') ) | |
| 1112 | 1112 | ), | 
| 1113 | 1113 |                                                          array('changeList' => $simpleChangeList))); | 
| 1114 | 1114 | |
| @@ -72,7 +72,7 @@ | ||
| 72 | 72 | return $help; | 
| 73 | 73 | } | 
| 74 | 74 | |
| 75 | - // if not, see if there was a comment/definition for the property in the graph | |
| 75 | + // if not, see if there was a comment/definition for the property in the graph | |
| 76 | 76 |          if ($this->tooltip !== null) { | 
| 77 | 77 | return $this->tooltip; | 
| 78 | 78 | } | 
| @@ -594,10 +594,10 @@ | ||
| 594 | 594 | } | 
| 595 | 595 | |
| 596 | 596 | /** | 
| 597 | - * Formats the list of concepts as labels arranged by modification month | |
| 598 | - * @param Array $changeList | |
| 599 | - * @param string $lang the language for displaying dates in the change list | |
| 600 | - */ | |
| 597 | + * Formats the list of concepts as labels arranged by modification month | |
| 598 | + * @param Array $changeList | |
| 599 | + * @param string $lang the language for displaying dates in the change list | |
| 600 | + */ | |
| 601 | 601 | public function formatChangeList($changeList, $lang) | 
| 602 | 602 |      { | 
| 603 | 603 | $formatByDate = array(); | 
| @@ -531,14 +531,14 @@ | ||
| 531 | 531 |                  if(!$is_well_known && !$proplabel) { | 
| 532 | 532 | $envLangLabels = $this->model->getDefaultSparql()->queryLabel($longUri, $this->getEnvLang()); | 
| 533 | 533 | |
| 534 | -					if($envLangLabels) { | |
| 535 | - $proplabel = $envLangLabels[$this->getEnvLang()]; | |
| 534 | +          if($envLangLabels) { | |
| 535 | + $proplabel = $envLangLabels[$this->getEnvLang()]; | |
| 536 | 536 |                      } else { | 
| 537 | 537 | $defaultPropLabel = $this->model->getDefaultSparql()->queryLabel($longUri, ''); | 
| 538 | -						if(isset($defaultPropLabel[''])) { | |
| 539 | - $proplabel = $defaultPropLabel['']; | |
| 540 | - } | |
| 541 | - } | |
| 538 | +            if(isset($defaultPropLabel[''])) { | |
| 539 | + $proplabel = $defaultPropLabel['']; | |
| 540 | + } | |
| 541 | + } | |
| 542 | 542 | } | 
| 543 | 543 | |
| 544 | 544 | // look for superproperties in the current graph |