$sNextFile = $aResult['import-diff'];
if (!file_exists($sNextFile))
{
- echo "Cannot open $nextFile\n";
+ echo "Cannot open $sNextFile\n";
exit;
}
// Don't update the import status - we don't know what this file contains
unset($aReplicationLag);
exec($sCMDCheckReplicationLag, $aReplicationLag, $iErrorLevel);
- while ($iErrorLevel == 1 || $aReplicationLag[0] < 1)
+ while ($iErrorLevel > 0 || $aReplicationLag[0] < 1)
{
if ($iErrorLevel)
{
$fCMDStartTime = time();
echo $sCMDDownload."\n";
exec($sCMDDownload, $sJunk, $iErrorLevel);
- while ($iErrorLevel == 1)
+ while ($iErrorLevel > 0)
{
echo "Error: $iErrorLevel\n";
sleep(60);