예제 #1
0
 /**
  * @brief Get all footprints with invalid filenames (file does not exist)
  *
  * @param Database  &$database      reference to the database onject
  * @param User      &$current_user  reference to the current user which is logged in
  * @param Log       &$log           reference to the Log-object
  *
  * @retval array    all footprints with broken filename as a one-dimensional
  *                  array of Footprint objects, sorted by their names
  *
  * @throws Exception if there was an error
  */
 public static function get_broken_filename_footprints(&$database, &$current_user, &$log)
 {
     $broken_filename_footprints = array();
     $root_footprint = new Footprint($database, $current_user, $log, 0);
     $all_footprints = $root_footprint->get_subelements(true);
     foreach ($all_footprints as $footprint) {
         if (!$footprint->is_filename_valid()) {
             $broken_filename_footprints[] = $footprint;
         }
     }
     return $broken_filename_footprints;
 }