--- a/admin/import.php +++ b/admin/import.php @@ -1,7 +1,8 @@ <?php - +if (php_sapi_name() != "cli") { + include_once ("../lib/common.inc.php"); - +auth(); $contractNoticeFields = array( "importFile", "agencyName", @@ -185,14 +186,20 @@ flush(); // run post import data processing -// cn + // + if ($success > 0) { +$conn->exec("update datasets set \"lastUpdated\" = NOW() where title = 'Contract Notices'"); echo "link amend<br>"; include ("linkAmendments.php"); echo "update UNSPSC<br>"; include ("updateUNSPSC.php"); + } +// cn + // agency //include ("setAgencyStatus.php"); //include ("setAgencyURLABN.php"); } +} ?>