Skip to content

Commit 34d5bb7

Browse files
KarimKarim
Karim
authored and
Karim
committed
* Index system
* Data related corrections * Preview * Display year * Fullview * Classifications added
1 parent 0e069ff commit 34d5bb7

File tree

25 files changed

+781
-925
lines changed

25 files changed

+781
-925
lines changed

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
**2024**
4+
* Index system
5+
* Data related corrections
6+
* Preview
7+
* Display year
8+
* Fullview
9+
* Classifications added
10+
311
**05.02.2023**
412
* Library System
513
* Special chars support for PAIA2

COPYRIGHT.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
This file is part of Lukida.
22

3-
Copyright 2015-2024
3+
Copyright 2015-2025
44
Verbundzentrale des GBV (VZG)
55
Platz der Göttinger Sieben 1
66
37073 Göttingen

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Lukida
22

3-
Lukida (c) 2015-2024 is a Discovery-Software from VZG.
3+
Lukida (c) 2015-2025 is a Discovery-Software from VZG.
44
Lukida-Homepage is [here](https://www.lukida.org/)
55

66
## Requirements

kernel/application/controllers/Vzg_controller.php

+99-93
Large diffs are not rendered by default.

kernel/application/libraries/General.php

+152-78
Large diffs are not rendered by default.

kernel/application/libraries/databases/Mysql.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -391,9 +391,9 @@ public function getCentralDB($Type, $Filter=array())
391391
foreach ( $Filter as $One )
392392
{
393393
if ( isset($One["classification"]) && isset($One["code"]) && in_array(strtoupper($One["classification"]),
394-
array("ASB", "BBK", "BKL", "CLC", "DDC", "FID",
395-
"FIVR", "FIVS", "KAB", "MSC", "NATLIZ", "NLM",
396-
"RVK", "SDNB", "SFB", "SSD", "SSGN", "ZDBS")) )
394+
array("ASB", "BBK", "BKL", "CLC", "DDC", "ESSB", "FID",
395+
"FIVR", "FIVS", "GHB", "KAB", "MSC", "NATLIZ", "NLM",
396+
"RVK", "SDNB", "SFB", "SSD", "SSGN", "ZDBS")) )
397397
{
398398
$CNT++;
399399
$SQL .= ($CNT == 1) ? " where" : " or";

kernel/application/libraries/exports/Standard.php

+437-680
Large diffs are not rendered by default.

kernel/application/libraries/index_systems/Solr.php

+32-18
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,23 @@ private function CleanID($string)
6666
}
6767
}
6868

69+
private function CleanForeignID($string)
70+
{
71+
if ( is_array($string) )
72+
{
73+
foreach ($string as &$one)
74+
{
75+
$one = $this->CleanID($one);
76+
}
77+
return $string;
78+
}
79+
else
80+
{
81+
$string = trim($string, " '\"");
82+
return str_replace(array("(",")"), array("\(","\)"), substr($string,0,8)) . preg_replace("/[^A-Z\(\)a-z0-9_]/", "", substr($string,8));
83+
}
84+
}
85+
6986
private function solr_edismax($search,$package,$facets)
7087
{
7188

@@ -82,7 +99,7 @@ private function solr_edismax($search,$package,$facets)
8299
$Tmp = explode(",",substr($search, 10, strlen($search)-11));
83100
foreach ($Tmp as &$One)
84101
{
85-
$One = $this->CleanID($One);
102+
$One = $this->CleanForeignID($One);
86103
}
87104
$matches = array
88105
(
@@ -134,12 +151,10 @@ private function solr_edismax($search,$package,$facets)
134151
}
135152
}
136153

137-
// $this->CI->printArray2File($matches);
138-
139154
// Remove not allowed complex phrases based on used key
140155
foreach ( $matches[1] as $index => $key )
141156
{
142-
if ( ! in_array(strtolower(trim($key)), array("abruf", "acqdate","author","autor","call","class", "classlocal",
157+
if ( ! in_array(strtolower(trim($key)), array("abruf", "acqdate","author","autor","call","class", "classlocal","doi",
143158
"client","collection","collection_details","contents","corporation","country","erwdatum","foreignid","format","format2",
144159
"genre","id","inhalt","isn","jahr","koerper","land","langcode","language","location","mandant","norm","ppn","ppnlink","prov","publisher",
145160
"reihe","sachgebiet","schlagwort","series","signatur","signature","sprache","sprachcode","standort","subject","thema","titel",
@@ -153,7 +168,6 @@ private function solr_edismax($search,$package,$facets)
153168
// to build query string MainSearch
154169
$MainSearch = "";
155170
$search = trim($search);
156-
// $this->CI->printArray2File($search);
157171
foreach ( $matches[0] as $index => $complex )
158172
{
159173
$CType = strtolower(trim($matches[1][$index]));
@@ -213,6 +227,9 @@ private function solr_edismax($search,$package,$facets)
213227
case "classlocal":
214228
if ( isset($_SESSION["iln"]) ) $MainSearch .= "(notation_local_iln_str_mv:" . $_SESSION["iln"] . "\:" . $Phrases[0] . ")";
215229
break;
230+
case "doi":
231+
$MainSearch .= "(doi_str_mv:" . $Phrases[0] . ")";
232+
break;
216233
case "isn":
217234
$MainSearch .= "(issn:" . $Phrases[0] . " OR isbn:" . $Phrases[0] . ")";
218235
break;
@@ -274,7 +291,7 @@ private function solr_edismax($search,$package,$facets)
274291
break;
275292
case "erwdatum":
276293
case "acqdate":
277-
if ( isset($_SESSION["iln"]) ) $MainSearch .= "(selektneu_str_mv:" . $_SESSION["iln"] . "@" . $Phrases[0] . ")";
294+
if ( isset($_SESSION["iln"]) ) $MainSearch .= "(last_changed_iln_str_mv:" . $_SESSION["iln"] . "@" . $Phrases[0] . ")";
278295
break;
279296
case "abruf":
280297
case "call":
@@ -314,14 +331,15 @@ private function solr_edismax($search,$package,$facets)
314331
$MainSearch .= "(publishDateSort:" . $Phrases[0] . ")";
315332
break;
316333
case "ppnlink":
317-
$MainSearch .= "(id:" . $this->CleanID($Phrases[0]) . ")";
334+
$MainSearch .= "(ppnlink:" . $this->CleanID($Phrases[0]) . ")";
318335
break;
319336
case "id":
320337
case "ppn":
321338
$MainSearch .= "(id:" . $this->CleanID($Phrases[0]) . ")";
322339
break;
323340
default:
324-
$MainSearch .= $CType . "\:" . $Phrases[0] . "";
341+
// Kein Backslash bei diesem Doppelpunkt !!!
342+
$MainSearch .= $CType . ":" . $Phrases[0] . "";
325343
}
326344
}
327345
else
@@ -368,6 +386,9 @@ private function solr_edismax($search,$package,$facets)
368386
case "classlocal":
369387
if ( isset($_SESSION["iln"]) ) $MainSearch .= "(notation_local_iln_str_mv:" . $_SESSION["iln"] . "\:" . implode(" OR notation_local_iln_str_mv:" . $_SESSION["iln"] . "\:", $Phrases) . ")";
370388
break;
389+
case "doi":
390+
$MainSearch .= "(doi_str_mv:" . implode(" OR doi_str_mv:", $Phrases) . ")";
391+
break;
371392
case "isn":
372393
$MainSearch .= "(issn:" . implode(" OR issn:", $Phrases) . " OR "
373394
. " isbn:" . implode(" OR isbn:",$Phrases) . ")";
@@ -399,7 +420,7 @@ private function solr_edismax($search,$package,$facets)
399420
break;
400421
case "erwdatum":
401422
case "acqdate":
402-
if ( isset($_SESSION["iln"]) ) $MainSearch .= "(selektneu_str_mv:" . $_SESSION["iln"] . "@" . implode(" OR selektneu_str_mv:" . $_SESSION["iln"] . "@", $Phrases) . ")";
423+
if ( isset($_SESSION["iln"]) ) $MainSearch .= "(last_changed_iln_str_mv:" . $_SESSION["iln"] . "@" . implode(" OR last_changed_iln_str_mv:" . $_SESSION["iln"] . "@", $Phrases) . ")";
403424
break;
404425
case "abruf":
405426
case "call":
@@ -453,6 +474,7 @@ private function solr_edismax($search,$package,$facets)
453474
$MainSearch .= "(id:" . implode(" OR id:", $this->CleanID($Phrases)) . ")";
454475
break;
455476
default:
477+
// Kein Backslash bei diesem Doppelpunkt !!!
456478
$MainSearch .= "(" . $CType . ":" . implode(" OR " . $CType . ":",$Phrases) . ")";
457479
}
458480
}
@@ -752,8 +774,6 @@ private function solr_edismax($search,$package,$facets)
752774
// Store query in session
753775
$_SESSION["query"] = (string) $dismaxQuery;
754776

755-
// $this->CI->printArray2File($_SESSION["query"]);
756-
757777
// Execute query
758778
try
759779
{
@@ -830,7 +850,7 @@ public function search($search, $package, $facets, $params)
830850
$this->facets = $facets;
831851

832852
if ( isset($params['phonetic'] ) ) $this->phoneticsearch = $params['phonetic'];
833-
853+
834854
// Before search
835855
$this->search = $this->solr_before($this->search);
836856

@@ -890,17 +910,11 @@ public function getSimilarPublications($ppn)
890910
->addFilterQuery('collection_details:GBV_ILN_' . $_SESSION['iln']);
891911
}
892912

893-
// Store query in file
894-
// $this->CI->printArray2File((string) $dismaxQuery);
895-
896913
// Execute query
897914
$query_response = $client->query($dismaxQuery);
898915

899916
$container = $query_response->getResponse();
900917

901-
// Store answer in file
902-
// $this->CI->printArray2File($container);
903-
904918
$PPNList = array();
905919
if ( isset($container["moreLikeThis"][1]["docs"]))
906920
{

kernel/application/libraries/lb_systems/Paia2_daia2.php

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<?php
22

3-
//$this->CI->printArray2File($response);
4-
53
class Paia2_daia2 extends General
64
{
75
protected $CI;
@@ -84,7 +82,7 @@ private function postit($file, $data_to_send, $access_token = null)
8482
trigger_error(curl_error($http));
8583
}
8684

87-
if ( substr($file,-12) == "/auth/change" ) $data = utf8_decode($data);
85+
// if ( substr($file,-12) == "/auth/change" ) $data = utf8_decode($data);
8886

8987
curl_close($http);
9088
return $data;
@@ -440,14 +438,17 @@ public function changepw($old, $new)
440438
*/
441439
$post_data = array("patron" => $_SESSION[$this->isil]["userlogin"], "username" => $_SESSION[$this->isil]["userlogin"], "old_password" => $old, "new_password" => $new);
442440

443-
$change_response = json_decode($this->postit($this->paia.'/auth/change', $post_data, $_SESSION[$this->isil]['paiaToken']),true);
441+
$change_response = (array) json_decode($this->postit($this->paia.'/auth/change', $post_data, $_SESSION[$this->isil]['paiaToken']),true);
442+
443+
file_put_contents("alex.txt", print_r($change_response, true));
444444

445445
if ( isset($change_response["error_description"]) )
446446
{
447447
return (array("status" => -2,
448448
"error" => $this->CI->database->code2text("PASSWORDCHANGEFAILED")));
449449
}
450450

451+
451452
$this->login($_SESSION[$this->isil]["userlogin"], $new);
452453

453454
return (array("status" => 0));

kernel/application/libraries/lb_systems/Paia_daia.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ public function request($uri, $conditions=array())
309309

310310
$doc = array("doc" => array(array("item" => $uri)));
311311
$response = $this->postAsArray($this->paia.'/core/' . $_SESSION[$this->isil]["userlogin"] .'/request', $doc);
312-
//$this->CI->printArray2File($response);
312+
313313
if ( isset($response["doc"][0]["error"]) )
314314
{
315315
return (array("status" => -2,
@@ -330,7 +330,7 @@ public function cancel($uri)
330330

331331
$doc = array("doc" => array(array("item" => $uri)));
332332
$response = $this->postAsArray($this->paia.'/core/' . $_SESSION[$this->isil]["userlogin"] .'/cancel', $doc);
333-
//$this->CI->printArray2File($response);
333+
334334
if ( isset($response["doc"][0]["error"]) )
335335
{
336336
return (array("status" => -2,

kernel/application/libraries/record_formats/Marc21.php

-2
Original file line numberDiff line numberDiff line change
@@ -391,8 +391,6 @@ public function convert($container)
391391
}
392392
$container["results"] = $results_reduced;
393393

394-
// $this->CI->printArray2File($results_reduced);
395-
396394
return ($container);
397395
}
398396

kernel/application/libraries/themes/Bootstrap.php

-4
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ public function preview($container, $params)
6868

6969
$this->words .= " " . $this->pretty["title"] . " " . implode(" ",array_column($this->pretty["author"], "name"));
7070

71-
// $this->CI->printArray2File($_SESSION["data"]["results"][$this->PPN]);
72-
7371
$Output = "<div id='" . $this->PPN . "' class='medium " . $columns . "'><div class='panel'>";
7472
if ( $PPNList )
7573
{
@@ -206,8 +204,6 @@ public function fullview ( $params )
206204
$_SESSION["data"]["results"][$this->PPN] = array_merge($_SESSION["data"]["results"][$this->PPN],$this->SetContents("fullview"));
207205
$this->pretty = $_SESSION["data"]["results"][$this->PPN];
208206

209-
// $this->CI->printArray2File($_SESSION["data"]["results"][$this->PPN]);
210-
211207
// Start Output
212208
$Output = $this->header();
213209

kernel/application/systemassets/lukida/css/discover.css

+17-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,15 @@ html {
9090
text-align: center;
9191
font-size: 12px;
9292
line-height: 8px;
93-
width: 36px;
93+
width: 72px;
94+
}
95+
.preview-year
96+
{
97+
display: inline-block;
98+
text-align: center;
99+
font-size: 12px;
100+
line-height: 8px;
101+
width: 72px;
94102
}
95103
}
96104

@@ -118,6 +126,14 @@ html {
118126
line-height: 18px;
119127
width: 75px;
120128
}
129+
.preview-year
130+
{
131+
display: inline-block;
132+
text-align: center;
133+
font-size: 12px;
134+
line-height: 8px;
135+
width: 75px;
136+
}
121137
}
122138

123139
.tooltip-arrow,

0 commit comments

Comments
 (0)