$begauthor = $posfile + 1; $endauthor = strpos($line, ",", $begauthor); while ($endauthor !== false) { $authors[] = trim(substr($line, $begauthor, $endauthor - $begauthor)); $begauthor = $endauthor + 1; $endauthor = strpos($line, ",", $begauthor); } $authors[] = trim(substr($line, $begauthor)); // Insert the user $CoverageFile = new CoverageFile(); if ($CoverageFile->GetIdFromName($file, $buildid) === false) { $xml .= add_XML_value("warning", "*File not found for: " . $file); } else { foreach ($authors as $author) { $User = new User(); $CoverageFile2User->UserId = $User->GetIdFromName($author); if ($CoverageFile2User->UserId === false) { $xml .= add_XML_value("warning", "*User not found for: " . $author); } else { $CoverageFile2User->FullPath = $file; $CoverageFile2User->Insert(); } } } } $pos = $pos2; $pos2 = strpos($contents, "\n", $pos2 + 1); } // end looping through lines } // end if strlen>0