Add logging of synchronization with wikidata
This commit is contained in:
parent
8a30cf2c2a
commit
a4f24e5478
|
@ -422,10 +422,12 @@ final class NodaWikidataFetcher {
|
||||||
SET `persinst_kurzinfo` = ?
|
SET `persinst_kurzinfo` = ?
|
||||||
WHERE `persinst_id` = ?");
|
WHERE `persinst_id` = ?");
|
||||||
|
|
||||||
if ($cergebnis->num_rows === 0) exit;
|
if ($cergebnis->num_rows === 0) {
|
||||||
|
throw new Exception("There is no actor of ID #" . $persinst_id);
|
||||||
|
}
|
||||||
|
|
||||||
$cinfo = $cergebnis->fetch_assoc();
|
$cinfo = $cergebnis->fetch_assoc();
|
||||||
if (!empty($cinfo['persinst_kurzinfo']) and substr($cinfo['persinst_kurzinfo'], 0, 3) != 'GND') {
|
if (!empty($cinfo['persinst_kurzinfo']) and substr($cinfo['persinst_kurzinfo'], 0, 3) !== 'GND') {
|
||||||
|
|
||||||
if (isset($_GET['keep'])) {
|
if (isset($_GET['keep'])) {
|
||||||
if (!($_GET['keep']) || $_GET['keep'] === 'replace') {
|
if (!($_GET['keep']) || $_GET['keep'] === 'replace') {
|
||||||
|
@ -711,6 +713,8 @@ final class NodaWikidataFetcher {
|
||||||
|
|
||||||
$this->getWikidataTranslationsForPersinst($data, $persinst_id);
|
$this->getWikidataTranslationsForPersinst($data, $persinst_id);
|
||||||
|
|
||||||
|
NodaLogEdit::logPersinstEdit($this->_mysqli_noda, $persinst_id, "wikidata-fetcher", $erfasst_von, 'update', 'synchronize');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1110,6 +1114,8 @@ final class NodaWikidataFetcher {
|
||||||
|
|
||||||
$this->getWikidataTranslationsForPlace($data, $onum);
|
$this->getWikidataTranslationsForPlace($data, $onum);
|
||||||
|
|
||||||
|
NodaLogEdit::logPlaceEdit($this->_mysqli_noda, $onum, "wikidata-fetcher", $erfasst_von, 'update', 'synchronize');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1431,6 +1437,8 @@ final class NodaWikidataFetcher {
|
||||||
// Get translations
|
// Get translations
|
||||||
if (!empty($data)) $this->getWikidataTranslationsForTag($data, $tag_id);
|
if (!empty($data)) $this->getWikidataTranslationsForTag($data, $tag_id);
|
||||||
|
|
||||||
|
NodaLogEdit::logTagEdit($this->_mysqli_noda, $tag_id, "wikidata-fetcher", $erfasst_von, 'update', 'synchronize');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue
Block a user