} ################################################################ // PLATFORM // Query to see if the Platform already exists, if so, get the ID ################################################################# //check it against the previous row - no need to do another lookup if we've already figured out the platform //strip out double quotes $platformName = trim(str_replace('"', '', $platformName)); if ($platformName == "") { $platformName = $holdPlatform; } if ($platformID == NULL || $platformName != $holdPlatform) { //get the platformID if available $platformTestObj = new Platform(); $platformObj = new Platform(); $platformObj = $platformTestObj->getByName($platformName); if (is_object($platformObj)) { $platformID = $platformObj->platformID; } //Find the most recent month for this year / Platform that we have statistics for if override isn't set if ($platformID && !$startMonth) { if ($overrideInd == 1) { $logOutput .= _("Override indicator set - all months will be imported."); } else { $monthArray = $platformObj->getTotalMonths($resourceType, $archiveInd, $year); $count_months = $monthArray['count_months']; $min_month = $monthArray['min_month']; $max_month = $monthArray['max_month']; if ($count_months == 12) { $logOutput .= _("Entire year already exists for this Platform / year. No counts will be imported."); $startMonth = 13;