@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | return $lname; |
98 | 98 | } |
99 | 99 | // already a full URI |
100 | - return $this->getUriSpace() . $lname; |
|
100 | + return $this->getUriSpace().$lname; |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | /** |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | $prop = (substr($prop, 0, 5) == 'dc11:') ? str_replace('dc11:', 'dc:', $prop) : $prop; |
160 | 160 | $value = $val->getValue(); |
161 | 161 | if ($value instanceof DateTime) { |
162 | - $val = Punic\Calendar::formatDate($value, 'full', $lang) . ' ' . Punic\Calendar::format($value, 'HH:mm:ss', $lang); |
|
162 | + $val = Punic\Calendar::formatDate($value, 'full', $lang).' '.Punic\Calendar::format($value, 'HH:mm:ss', $lang); |
|
163 | 163 | } |
164 | 164 | $ret[$prop][] = $val; |
165 | 165 | } |
@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | } |
271 | 271 | // don't know how to parse |
272 | 272 | $rev = $parts[2]; |
273 | - $datestr = $parts[3] . ' ' . $parts[4]; |
|
273 | + $datestr = $parts[3].' '.$parts[4]; |
|
274 | 274 | |
275 | 275 | return "$datestr (r$rev)"; |
276 | 276 | } |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | * Counts the statistics of the vocabulary. |
280 | 280 | * @return array of the concept/group counts |
281 | 281 | */ |
282 | - public function getStatistics($lang = '', $array=null, $group=null) |
|
282 | + public function getStatistics($lang = '', $array = null, $group = null) |
|
283 | 283 | { |
284 | 284 | $sparql = $this->getSparql(); |
285 | 285 | // find the number of concepts |
@@ -595,14 +595,14 @@ discard block |
||
595 | 595 | { |
596 | 596 | $changelist = $this->getSparql()->queryChangeList($clang, $offset, $prop); |
597 | 597 | $bydate = array(); |
598 | - foreach($changelist as $concept) { |
|
598 | + foreach ($changelist as $concept) { |
|
599 | 599 | $concept['datestring'] = Punic\Calendar::formatDate($concept['date'], 'medium', $lang); |
600 | - $bydate[Punic\Calendar::getMonthName($concept['date'], 'wide', $lang, true) . Punic\Calendar::format($concept['date'], ' y', $lang) ][strtolower($concept['prefLabel'])] = $concept; |
|
600 | + $bydate[Punic\Calendar::getMonthName($concept['date'], 'wide', $lang, true).Punic\Calendar::format($concept['date'], ' y', $lang)][strtolower($concept['prefLabel'])] = $concept; |
|
601 | 601 | } |
602 | 602 | return $bydate; |
603 | 603 | } |
604 | 604 | |
605 | - public function getTitle($lang=null) { |
|
605 | + public function getTitle($lang = null) { |
|
606 | 606 | return $this->config->getTitle($lang); |
607 | 607 | } |
608 | 608 |
@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | class PluginRegister { |
4 | 4 | private $requestedPlugins; |
5 | 5 | |
6 | - public function __construct($requestedPlugins=array()) { |
|
6 | + public function __construct($requestedPlugins = array()) { |
|
7 | 7 | $this->requestedPlugins = $requestedPlugins; |
8 | 8 | } |
9 | 9 | |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | if (isset($files[$type])) { |
39 | 39 | $ret[$name] = array(); |
40 | 40 | foreach ($files[$type] as $file) { |
41 | - array_push($ret[$name], 'plugins/' . $name . '/' . $file); |
|
41 | + array_push($ret[$name], 'plugins/'.$name.'/'.$file); |
|
42 | 42 | } |
43 | 43 | } |
44 | 44 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | * @param array $names the plugin name strings (foldernames) in an array |
69 | 69 | * @return array |
70 | 70 | */ |
71 | - public function getPluginsJS($names=null) { |
|
71 | + public function getPluginsJS($names = null) { |
|
72 | 72 | if ($names) { |
73 | 73 | $names = array_merge($this->requestedPlugins, $names); |
74 | 74 | return $this->filterPluginsByName('js', $names); |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | * @param array $names the plugin name strings (foldernames) in an array |
82 | 82 | * @return array |
83 | 83 | */ |
84 | - public function getPluginsCSS($names=null) { |
|
84 | + public function getPluginsCSS($names = null) { |
|
85 | 85 | if ($names) { |
86 | 86 | $names = array_merge($this->requestedPlugins, $names); |
87 | 87 | return $this->filterPluginsByName('css', $names); |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | * @param array $names the plugin name strings (foldernames) in an array |
95 | 95 | * @return array |
96 | 96 | */ |
97 | - public function getPluginsTemplates($names=null) { |
|
97 | + public function getPluginsTemplates($names = null) { |
|
98 | 98 | if ($names) { |
99 | 99 | $names = array_merge($this->requestedPlugins, $names); |
100 | 100 | return $this->filterPluginsByName('templates', $names); |
@@ -107,15 +107,15 @@ discard block |
||
107 | 107 | * @param array $names the plugin name strings (foldernames) in an array |
108 | 108 | * @return array |
109 | 109 | */ |
110 | - public function getTemplates($names=null) { |
|
110 | + public function getTemplates($names = null) { |
|
111 | 111 | $templateStrings = array(); |
112 | 112 | $plugins = $this->getPluginsTemplates($names); |
113 | 113 | foreach ($plugins as $folder => $templates) { |
114 | 114 | foreach ($templates as $path) { |
115 | 115 | if (file_exists($path)) { |
116 | 116 | $filename = explode('/', $path); |
117 | - $filename = $filename[sizeof($filename)-1]; |
|
118 | - $id = $folder . '-' . substr($filename, 0 , (strrpos($filename, "."))); |
|
117 | + $filename = $filename[sizeof($filename) - 1]; |
|
118 | + $id = $folder.'-'.substr($filename, 0, (strrpos($filename, "."))); |
|
119 | 119 | $templateStrings[$id] = file_get_contents($path); |
120 | 120 | } |
121 | 121 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | { |
23 | 23 | $label = $this->getLabel(); |
24 | 24 | $notation = $this->getNotation(); |
25 | - return $notation . $label; |
|
25 | + return $notation.$label; |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | public function getType() |
@@ -6,10 +6,10 @@ discard block |
||
6 | 6 | class GlobalConfig { |
7 | 7 | private $languages; |
8 | 8 | |
9 | - public function __construct($config_name='/../config.inc') |
|
9 | + public function __construct($config_name = '/../config.inc') |
|
10 | 10 | { |
11 | 11 | try { |
12 | - $file_path = dirname(__FILE__) . $config_name; |
|
12 | + $file_path = dirname(__FILE__).$config_name; |
|
13 | 13 | if (!file_exists($file_path)) { |
14 | 14 | throw new Exception('config.inc file is missing, please provide one.'); |
15 | 15 | } |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | $this->languages = $LANGUAGES; |
19 | 19 | } |
20 | 20 | } catch (Exception $e) { |
21 | - echo "Error: " . $e->getMessage(); |
|
21 | + echo "Error: ".$e->getMessage(); |
|
22 | 22 | return; |
23 | 23 | } |
24 | 24 | } |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | $baseurl = $this->getBaseHref(); |
22 | 22 | $vocid = $vocab->getId(); |
23 | 23 | $query = http_build_query(array('uri'=>$uri, 'format'=>$targetFormat)); |
24 | - $url = $baseurl . "rest/v1/$vocid/data?$query"; |
|
24 | + $url = $baseurl."rest/v1/$vocid/data?$query"; |
|
25 | 25 | $this->redirect303($url); |
26 | 26 | } |
27 | 27 | |
@@ -32,11 +32,11 @@ discard block |
||
32 | 32 | $localname = $vocab->getLocalName($uri); |
33 | 33 | if ($localname !== $uri && $localname === urlencode($localname)) { |
34 | 34 | // the URI can be shortened |
35 | - $url = $baseurl . "$vocid/page/$localname"; |
|
35 | + $url = $baseurl."$vocid/page/$localname"; |
|
36 | 36 | } else { |
37 | 37 | // must use full URI |
38 | 38 | $query = http_build_query(array('uri'=>$uri)); |
39 | - $url = $baseurl . "$vocid/page/?" . $query; |
|
39 | + $url = $baseurl."$vocid/page/?".$query; |
|
40 | 40 | } |
41 | 41 | $this->redirect303($url); |
42 | 42 | } |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | // guess vocabulary based on URI |
57 | 57 | $vocab = $this->model->guessVocabularyFromURI($request->getUri()); |
58 | 58 | if ($vocab === null) { |
59 | - return $this->returnError('404', 'Not Found', 'Unrecognized URI ' . $request->getUri()); |
|
59 | + return $this->returnError('404', 'Not Found', 'Unrecognized URI '.$request->getUri()); |
|
60 | 60 | } |
61 | 61 | $request->setVocab($vocab->getId()); |
62 | 62 | } |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | |
70 | 70 | // register a Twig filter for generating URLs for vocabulary resources (concepts and groups) |
71 | 71 | $controller = $this; // for use by anonymous function below |
72 | - $urlFilter = new Twig_SimpleFilter('link_url', function ($uri, $vocab, $lang, $type = 'page', $clang = null, $term = null) use ($controller) { |
|
72 | + $urlFilter = new Twig_SimpleFilter('link_url', function($uri, $vocab, $lang, $type = 'page', $clang = null, $term = null) use ($controller) { |
|
73 | 73 | // $vocab can either be null, a vocabulary id (string) or a Vocabulary object |
74 | 74 | if ($vocab === null) { |
75 | 75 | // target vocabulary is unknown, best bet is to link to the plain URI |
@@ -94,23 +94,23 @@ discard block |
||
94 | 94 | $localname = $vocab->getLocalName($uri); |
95 | 95 | if ($localname !== $uri && $localname === urlencode($localname)) { |
96 | 96 | // check that the prefix stripping worked, and there are no problematic chars in localname |
97 | - $paramstr = sizeof($params) > 0 ? '?' . http_build_query($params) : ''; |
|
97 | + $paramstr = sizeof($params) > 0 ? '?'.http_build_query($params) : ''; |
|
98 | 98 | if ($type && $type !== '' && $type !== 'vocab') { |
99 | - return "$vocid/$lang/$type/$localname" . $paramstr; |
|
99 | + return "$vocid/$lang/$type/$localname".$paramstr; |
|
100 | 100 | } |
101 | 101 | |
102 | - return "$vocid/$lang/$localname" . $paramstr; |
|
102 | + return "$vocid/$lang/$localname".$paramstr; |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | // case 2: URI outside vocabulary namespace, or has problematic chars |
106 | 106 | // pass the full URI as parameter instead |
107 | 107 | $params['uri'] = $uri; |
108 | - return "$vocid/$lang/$type/?" . http_build_query($params); |
|
108 | + return "$vocid/$lang/$type/?".http_build_query($params); |
|
109 | 109 | }); |
110 | 110 | $this->twig->addFilter($urlFilter); |
111 | 111 | |
112 | 112 | // register a Twig filter for generating strings from language codes with CLDR |
113 | - $langFilter = new Twig_SimpleFilter('lang_name', function ($langcode, $lang) { |
|
113 | + $langFilter = new Twig_SimpleFilter('lang_name', function($langcode, $lang) { |
|
114 | 114 | return Language::getName($langcode, $lang); |
115 | 115 | }); |
116 | 116 | $this->twig->addFilter($langFilter); |
@@ -251,12 +251,12 @@ discard block |
||
251 | 251 | private function createFeedbackHeaders($fromName, $fromEmail, $toMail) |
252 | 252 | { |
253 | 253 | $headers = "MIME-Version: 1.0″ . '\r\n"; |
254 | - $headers .= "Content-type: text/html; charset=UTF-8" . "\r\n"; |
|
254 | + $headers .= "Content-type: text/html; charset=UTF-8"."\r\n"; |
|
255 | 255 | if ($toMail) { |
256 | - $headers .= "Cc: " . $this->model->getConfig()->getFeedbackAddress() . "\r\n"; |
|
256 | + $headers .= "Cc: ".$this->model->getConfig()->getFeedbackAddress()."\r\n"; |
|
257 | 257 | } |
258 | 258 | |
259 | - $headers .= "From: $fromName <$fromEmail>" . "\r\n" . 'X-Mailer: PHP/' . phpversion(); |
|
259 | + $headers .= "From: $fromName <$fromEmail>"."\r\n".'X-Mailer: PHP/'.phpversion(); |
|
260 | 260 | return $headers; |
261 | 261 | } |
262 | 262 | |
@@ -271,20 +271,20 @@ discard block |
||
271 | 271 | { |
272 | 272 | $toAddress = ($toMail) ? $toMail : $this->model->getConfig()->getFeedbackAddress(); |
273 | 273 | if ($fromVocab !== null) { |
274 | - $message = 'Feedback from vocab: ' . strtoupper($fromVocab) . "<br />" . $message; |
|
274 | + $message = 'Feedback from vocab: '.strtoupper($fromVocab)."<br />".$message; |
|
275 | 275 | } |
276 | 276 | |
277 | - $subject = SERVICE_NAME . " feedback"; |
|
277 | + $subject = SERVICE_NAME." feedback"; |
|
278 | 278 | $headers = $this->createFeedbackHeaders($fromName, $fromEmail, $toMail); |
279 | 279 | $envelopeSender = FEEDBACK_ENVELOPE_SENDER; |
280 | 280 | $params = empty($envelopeSender) ? '' : "-f $envelopeSender"; |
281 | 281 | |
282 | 282 | // adding some information about the user for debugging purposes. |
283 | - $message = $message . "<br /><br /> Debugging information:" |
|
284 | - . "<br />Timestamp: " . date(DATE_RFC2822) |
|
285 | - . "<br />User agent: " . $request->getServerConstant('HTTP_USER_AGENT') |
|
286 | - . "<br />IP address: " . $request->getServerConstant('REMOTE_ADDR') |
|
287 | - . "<br />Referer: " . $request->getServerConstant('HTTP_REFERER'); |
|
283 | + $message = $message."<br /><br /> Debugging information:" |
|
284 | + . "<br />Timestamp: ".date(DATE_RFC2822) |
|
285 | + . "<br />User agent: ".$request->getServerConstant('HTTP_USER_AGENT') |
|
286 | + . "<br />IP address: ".$request->getServerConstant('REMOTE_ADDR') |
|
287 | + . "<br />Referer: ".$request->getServerConstant('HTTP_REFERER'); |
|
288 | 288 | |
289 | 289 | try { |
290 | 290 | mail($toAddress, $subject, $message, $headers, $params); |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | header("HTTP/1.0 404 Not Found"); |
293 | 293 | $template = $this->twig->loadTemplate('error-page.twig'); |
294 | 294 | if ($this->model->getConfig()->getLogCaughtExceptions()) { |
295 | - error_log('Caught exception: ' . $e->getMessage()); |
|
295 | + error_log('Caught exception: '.$e->getMessage()); |
|
296 | 296 | } |
297 | 297 | |
298 | 298 | echo $template->render( |
@@ -339,7 +339,7 @@ discard block |
||
339 | 339 | $vocids = ($vocabs !== null && $vocabs !== '') ? explode(' ', $vocabs) : null; |
340 | 340 | $vocabObjects = array(); |
341 | 341 | if ($vocids) { |
342 | - foreach($vocids as $vocid) { |
|
342 | + foreach ($vocids as $vocid) { |
|
343 | 343 | $vocabObjects[] = $this->model->getVocabulary($vocid); |
344 | 344 | } |
345 | 345 | } |
@@ -350,7 +350,7 @@ discard block |
||
350 | 350 | } catch (Exception $e) { |
351 | 351 | header("HTTP/1.0 404 Not Found"); |
352 | 352 | if ($this->model->getConfig()->getLogCaughtExceptions()) { |
353 | - error_log('Caught exception: ' . $e->getMessage()); |
|
353 | + error_log('Caught exception: '.$e->getMessage()); |
|
354 | 354 | } |
355 | 355 | $this->invokeGenericErrorPage($request, $e->getMessage()); |
356 | 356 | return; |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | 'search_count' => $counts, |
367 | 367 | 'languages' => $this->languages, |
368 | 368 | 'search_results' => $search_results, |
369 | - 'rest' => $parameters->getOffset()>0, |
|
369 | + 'rest' => $parameters->getOffset() > 0, |
|
370 | 370 | 'global_search' => true, |
371 | 371 | 'term' => $request->getQueryParam('q'), |
372 | 372 | 'lang_list' => $langList, |
@@ -391,7 +391,7 @@ discard block |
||
391 | 391 | } catch (Exception $e) { |
392 | 392 | header("HTTP/1.0 404 Not Found"); |
393 | 393 | if ($this->model->getConfig()->getLogCaughtExceptions()) { |
394 | - error_log('Caught exception: ' . $e->getMessage()); |
|
394 | + error_log('Caught exception: '.$e->getMessage()); |
|
395 | 395 | } |
396 | 396 | |
397 | 397 | echo $template->render( |
@@ -412,7 +412,7 @@ discard block |
||
412 | 412 | } catch (Exception $e) { |
413 | 413 | header("HTTP/1.0 404 Not Found"); |
414 | 414 | if ($this->model->getConfig()->getLogCaughtExceptions()) { |
415 | - error_log('Caught exception: ' . $e->getMessage()); |
|
415 | + error_log('Caught exception: '.$e->getMessage()); |
|
416 | 416 | } |
417 | 417 | |
418 | 418 | echo $template->render( |
@@ -429,7 +429,7 @@ discard block |
||
429 | 429 | 'vocab' => $vocab, |
430 | 430 | 'search_results' => $search_results, |
431 | 431 | 'search_count' => $counts, |
432 | - 'rest' => $parameters->getOffset()>0, |
|
432 | + 'rest' => $parameters->getOffset() > 0, |
|
433 | 433 | 'limit_parent' => $parameters->getParentLimit(), |
434 | 434 | 'limit_type' => $request->getQueryParam('type') ? explode('+', $request->getQueryParam('type')) : null, |
435 | 435 | 'limit_group' => $parameters->getGroupLimit(), |
@@ -554,7 +554,7 @@ discard block |
||
554 | 554 | * Loads and renders the view containing a list of recent changes in the vocabulary. |
555 | 555 | * @param Request $request |
556 | 556 | */ |
557 | - public function invokeChangeList($request, $prop='dc:created') |
|
557 | + public function invokeChangeList($request, $prop = 'dc:created') |
|
558 | 558 | { |
559 | 559 | // set language parameters for gettext |
560 | 560 | $this->setLanguageProperties($request->getLang()); |
@@ -633,7 +633,7 @@ discard block |
||
633 | 633 | foreach ($graphs as $graph) { |
634 | 634 | $conditions[] = "?graph=<$graph>"; |
635 | 635 | } |
636 | - return "FILTER (" . implode('||', $conditions) . ")"; |
|
636 | + return "FILTER (".implode('||', $conditions).")"; |
|
637 | 637 | } |
638 | 638 | |
639 | 639 | /** |
@@ -643,16 +643,16 @@ discard block |
||
643 | 643 | * @return string sparql query clauses |
644 | 644 | */ |
645 | 645 | protected function formatLimitAndOffset($limit, $offset) { |
646 | - $limit = ($limit) ? 'LIMIT ' . $limit : ''; |
|
647 | - $offset = ($offset) ? 'OFFSET ' . $offset : ''; |
|
646 | + $limit = ($limit) ? 'LIMIT '.$limit : ''; |
|
647 | + $offset = ($offset) ? 'OFFSET '.$offset : ''; |
|
648 | 648 | // eliminating whitespace and line changes when the conditions aren't needed. |
649 | 649 | $limitandoffset = ''; |
650 | 650 | if ($limit && $offset) { |
651 | - $limitandoffset = "\n" . $limit . "\n" . $offset; |
|
651 | + $limitandoffset = "\n".$limit."\n".$offset; |
|
652 | 652 | } elseif ($limit) { |
653 | - $limitandoffset = "\n" . $limit; |
|
653 | + $limitandoffset = "\n".$limit; |
|
654 | 654 | } elseif ($offset) { |
655 | - $limitandoffset = "\n" . $offset; |
|
655 | + $limitandoffset = "\n".$offset; |
|
656 | 656 | } |
657 | 657 | |
658 | 658 | return $limitandoffset; |
@@ -672,7 +672,7 @@ discard block |
||
672 | 672 | } |
673 | 673 | } |
674 | 674 | |
675 | - return implode(' UNION ', $typePatterns);; |
|
675 | + return implode(' UNION ', $typePatterns); ; |
|
676 | 676 | } |
677 | 677 | |
678 | 678 | /** |
@@ -798,7 +798,7 @@ discard block |
||
798 | 798 | // if search language and UI/display language differ, must also consider case where there is no prefLabel in |
799 | 799 | // the display language; in that case, should use the label with the same language as the matched label |
800 | 800 | $labelcondFallback = ($searchLang != $lang) ? |
801 | - "OPTIONAL { # in case previous OPTIONAL block gives no labels\n" . |
|
801 | + "OPTIONAL { # in case previous OPTIONAL block gives no labels\n". |
|
802 | 802 | "?s skos:prefLabel ?label . FILTER (LANGMATCHES(LANG(?label), LANG(?match))) }" : ""; |
803 | 803 | |
804 | 804 | /* |
@@ -850,15 +850,15 @@ discard block |
||
850 | 850 | |
851 | 851 | $schemecond = ''; |
852 | 852 | if (!empty($schemes)) { |
853 | - foreach($schemes as $scheme) { |
|
853 | + foreach ($schemes as $scheme) { |
|
854 | 854 | $schemecond .= "?s skos:inScheme <$scheme> . "; |
855 | 855 | } |
856 | 856 | } |
857 | 857 | |
858 | 858 | // extra conditions for parent and group, if specified |
859 | - $parentcond = ($params->getParentLimit()) ? "?s skos:broader+ <" . $params->getParentLimit() . "> ." : ""; |
|
860 | - $groupcond = ($params->getGroupLimit()) ? "<" . $params->getGroupLimit() . "> skos:member ?s ." : ""; |
|
861 | - $pgcond = $parentcond . $groupcond; |
|
859 | + $parentcond = ($params->getParentLimit()) ? "?s skos:broader+ <".$params->getParentLimit()."> ." : ""; |
|
860 | + $groupcond = ($params->getGroupLimit()) ? "<".$params->getGroupLimit()."> skos:member ?s ." : ""; |
|
861 | + $pgcond = $parentcond.$groupcond; |
|
862 | 862 | |
863 | 863 | $orderextra = $this->isDefaultEndpoint() ? $this->graph : ''; |
864 | 864 | |
@@ -926,9 +926,9 @@ discard block |
||
926 | 926 | $hit['type'][] = $this->shortenUri($typeuri); |
927 | 927 | } |
928 | 928 | |
929 | - if(!empty($fields)) { |
|
929 | + if (!empty($fields)) { |
|
930 | 930 | foreach ($fields as $prop) { |
931 | - $propname = $prop . 's'; |
|
931 | + $propname = $prop.'s'; |
|
932 | 932 | if (isset($row->$propname)) { |
933 | 933 | foreach (explode("\n", $row->$propname->getValue()) as $line) { |
934 | 934 | $rdata = str_getcsv($line, ',', '"', '"'); |
@@ -1403,7 +1403,7 @@ discard block |
||
1403 | 1403 | if (!isset($row->label) || $row->label->getLang() === $lang) { |
1404 | 1404 | $ret[$row->object->getUri()] = $val; |
1405 | 1405 | } elseif ($row->label->getLang() === $fallbacklang) { |
1406 | - $val['label'] .= ' (' . $row->label->getLang() . ')'; |
|
1406 | + $val['label'] .= ' ('.$row->label->getLang().')'; |
|
1407 | 1407 | $ret[$row->object->getUri()] = $val; |
1408 | 1408 | } |
1409 | 1409 | } |
@@ -1503,7 +1503,7 @@ discard block |
||
1503 | 1503 | if ($row->label->getLang() == $lang) { |
1504 | 1504 | $label = $row->label->getValue(); |
1505 | 1505 | } else { |
1506 | - $label = $row->label->getValue() . " (" . $row->label->getLang() . ")"; |
|
1506 | + $label = $row->label->getValue()." (".$row->label->getLang().")"; |
|
1507 | 1507 | } |
1508 | 1508 | |
1509 | 1509 | } |
@@ -1670,7 +1670,7 @@ discard block |
||
1670 | 1670 | if (isset($row->childlabel)) { |
1671 | 1671 | $label = $row->childlabel->getValue(); |
1672 | 1672 | if ($row->childlabel->getLang() !== $lang) { |
1673 | - $label .= " (" . $row->childlabel->getLang() . ")"; |
|
1673 | + $label .= " (".$row->childlabel->getLang().")"; |
|
1674 | 1674 | } |
1675 | 1675 | |
1676 | 1676 | } |
@@ -1692,7 +1692,7 @@ discard block |
||
1692 | 1692 | if (isset($row->label)) { |
1693 | 1693 | $preflabel = $row->label->getValue(); |
1694 | 1694 | if ($row->label->getLang() !== $lang) { |
1695 | - $preflabel .= ' (' . $row->label->getLang() . ')'; |
|
1695 | + $preflabel .= ' ('.$row->label->getLang().')'; |
|
1696 | 1696 | } |
1697 | 1697 | |
1698 | 1698 | $ret[$uri]['prefLabel'] = $preflabel; |
@@ -1855,7 +1855,7 @@ discard block |
||
1855 | 1855 | if ($row->label->getLang() == $lang) { |
1856 | 1856 | $values[$row->conc->getURI()]['prefLabel'] = $row->label->getValue(); |
1857 | 1857 | } else { |
1858 | - $values[$row->conc->getURI()]['prefLabel'] = $row->label->getValue() . " (" . $row->label->getLang() . ")"; |
|
1858 | + $values[$row->conc->getURI()]['prefLabel'] = $row->label->getValue()." (".$row->label->getLang().")"; |
|
1859 | 1859 | } |
1860 | 1860 | |
1861 | 1861 | } |
@@ -1896,7 +1896,7 @@ discard block |
||
1896 | 1896 | */ |
1897 | 1897 | private function generateChangeListQuery($lang, $offset, $prop) { |
1898 | 1898 | $gcl = $this->graphClause; |
1899 | - $offset = ($offset) ? 'OFFSET ' . $offset : ''; |
|
1899 | + $offset = ($offset) ? 'OFFSET '.$offset : ''; |
|
1900 | 1900 | |
1901 | 1901 | $query = <<<EOQ |
1902 | 1902 | SELECT DISTINCT ?concept ?date ?label |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | // 1. Ensure characters with special meaning in Lucene are escaped |
45 | 45 | $lucenemap = array(); |
46 | 46 | foreach (str_split(self::LUCENE_ESCAPE_CHARS) as $char) { |
47 | - $lucenemap[$char] = '\\' . $char; // escape with a backslash |
|
47 | + $lucenemap[$char] = '\\'.$char; // escape with a backslash |
|
48 | 48 | } |
49 | 49 | $term = strtr($term, $lucenemap); |
50 | 50 | |
@@ -102,8 +102,8 @@ discard block |
||
102 | 102 | |
103 | 103 | # make text query clause |
104 | 104 | $lcletter = mb_strtolower($letter, 'UTF-8'); // convert to lower case, UTF-8 safe |
105 | - $textcondPref = $this->createTextQueryCondition($letter . '*', 'skos:prefLabel', $lang); |
|
106 | - $textcondAlt = $this->createTextQueryCondition($letter . '*', 'skos:altLabel', $lang); |
|
105 | + $textcondPref = $this->createTextQueryCondition($letter.'*', 'skos:prefLabel', $lang); |
|
106 | + $textcondAlt = $this->createTextQueryCondition($letter.'*', 'skos:altLabel', $lang); |
|
107 | 107 | |
108 | 108 | $query = <<<EOQ |
109 | 109 | SELECT DISTINCT ?s ?label ?alabel |
@@ -81,7 +81,7 @@ |
||
81 | 81 | if ($this->rest) { |
82 | 82 | return $term; |
83 | 83 | } |
84 | - return strpos($term, "*") === false ? $term . "*" : $term; // default to prefix search |
|
84 | + return strpos($term, "*") === false ? $term."*" : $term; // default to prefix search |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | public function getContentLang() |