X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/e686ce868062a70acfbdddc68c8f4384789f0a40..679674913695dabf03305db92ea10e99aa6a29be:/lib/cmd.php?ds=sidebyside 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"; + } +}