X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/e1be3d9f48b51a927c26d1ac0035b50b82423916..3546b304739f2b214667ec0127ae7762be4cd5d5:/lib/cmd.php diff --git a/lib/cmd.php b/lib/cmd.php index 37ba87b8..d7ba285d 100644 --- a/lib/cmd.php +++ b/lib/cmd.php @@ -128,3 +128,23 @@ function chksql($oSql, $sMsg = false) return $oSql; } + +function info($sMsg) +{ + echo date('Y-m-d H:i:s == ').$sMsg."\n"; +} + +$aWarnings = []; + +function warn($sMsg) +{ + $GLOBALS['aWarnings'][] = $sMsg; + echo date('Y-m-d H:i:s == ').'WARNING: '.$sMsg."\n"; +} + +function repeatWarnings() +{ + foreach ($GLOBALS['aWarnings'] as $sMsg) { + echo ' * ',$sMsg."\n"; + } +}