|
@@ -1841,8 +1841,11 @@ SQL;
|
|
|
if ($full) file_put_contents($reloadCachePidFile, getmypid());
|
|
if ($full) file_put_contents($reloadCachePidFile, getmypid());
|
|
|
try {
|
|
try {
|
|
|
//self::importPracownicy(); //TODO
|
|
//self::importPracownicy(); //TODO
|
|
|
|
|
+ error_log('now: self::reloadCache_reTeryt');
|
|
|
self::reloadCache_reTeryt($full);
|
|
self::reloadCache_reTeryt($full);
|
|
|
|
|
+ error_log('now: self::reloadCache_parseUmowy');
|
|
|
self::reloadCache_parseUmowy($full);
|
|
self::reloadCache_parseUmowy($full);
|
|
|
|
|
+ error_log('now: self::reloadCache_parseUmowy');
|
|
|
self::reloadCache_updateAll($full, $onlyBase);
|
|
self::reloadCache_updateAll($full, $onlyBase);
|
|
|
if ($full) file_put_contents($reloadCacheResultFile, "ok");
|
|
if ($full) file_put_contents($reloadCacheResultFile, "ok");
|
|
|
} catch (Exception $e) {
|
|
} catch (Exception $e) {
|
|
@@ -1997,8 +2000,12 @@ class BiAuditRelations {
|
|
|
if ($refTable = $this->refTables->getRefTable($fromTable, $toTable)) {
|
|
if ($refTable = $this->refTables->getRefTable($fromTable, $toTable)) {
|
|
|
if (!DB::getPDO()->fetchValue("select count(*) from `{$refTable}` where `PRIMARY_KEY` = '{$fromID}' and `REMOTE_PRIMARY_KEY` = '{$toID}' and `A_STATUS` != 'DELETED'")) {
|
|
if (!DB::getPDO()->fetchValue("select count(*) from `{$refTable}` where `PRIMARY_KEY` = '{$fromID}' and `REMOTE_PRIMARY_KEY` = '{$toID}' and `A_STATUS` != 'DELETED'")) {
|
|
|
DB::getPDO()->insert($refTable, ['PRIMARY_KEY' => $fromID, 'REMOTE_PRIMARY_KEY' => $toID, 'A_STATUS' => 'NORMAL', 'TRANSACTION_ID' => '-1']);
|
|
DB::getPDO()->insert($refTable, ['PRIMARY_KEY' => $fromID, 'REMOTE_PRIMARY_KEY' => $toID, 'A_STATUS' => 'NORMAL', 'TRANSACTION_ID' => '-1']);
|
|
|
- } else error_log('#2000 DEBUG found some records in REFs for table fromTable:'.$fromTable,' toTable:',$toTable);
|
|
|
|
|
- } else error_log('#2001 DEBUG not found ref table fromTable:'.$fromTable,' toTable:',$toTable);
|
|
|
|
|
|
|
+ } else { error_log('#2000 DEBUG found some records in REFs for table fromTable:'.$fromTable,' toTable:',$toTable);
|
|
|
|
|
+ echo('#2000 DEBUG found some records in REFs for table fromTable:'.$fromTable,' toTable:',$toTable);
|
|
|
|
|
+ }
|
|
|
|
|
+ } else { error_log('#2001 DEBUG not found ref table fromTable:'.$fromTable,' toTable:',$toTable);
|
|
|
|
|
+ echo('#2001 DEBUG not found ref table fromTable:'.$fromTable,' toTable:',$toTable);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public function findRelations($ID) {
|
|
public function findRelations($ID) {
|