getAssoc($sql); if($verbose) shell::msg(count($arr)." ebuilds to check"); foreach($arr as $ebuild_id => $homepages) { if(!empty($homepages)) $arr = arrHomepages($homepages); else { $arr = array(); } if(count($arr)) { foreach($arr as $homepage) { $arr_insert = array( 'ebuild' => $ebuild_id, 'homepage' => $homepage, ); $db->autoExecute('ebuild_homepage', $arr_insert, MDB2_AUTOQUERY_INSERT); } } } /** * Create an array of the arch keywords * * @param string keywords * @return array */ function arrHomepages($str) { $arr = explode(' ', $str); $arr_keywords = array(); if(count($arr)) { foreach($arr as $str) { if(substr($str, 0, 4) == "http" || substr($str, 0, 6) == "ftp://" || substr($str, 0, 9) == "gopher://") $arr_homepages[] = $str; } } return $arr_homepages; } ?>