summaryrefslogtreecommitdiff
blob: 0a03c460e3387379c8a3c3f0d38425ac27a81b37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?

	$verbose = true;
	$qa = true;	

	require_once 'header.php';
	
	$url = "http://bugs.gentoo.org/buglist.cgi?bug_file_loc=&bug_file_loc_type=allwordssubstr&bug_id=&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bugidtype=include&chfieldfrom=&chfieldto=Now&chfieldvalue=&component=Ebuilds&email1=&email2=&emailtype1=exact&emailtype2=substring&field-1-0-0=bug_status&field-1-1-0=component&field-1-2-0=product&field-1-3-0=short_desc&field0-0-0=assigned_to&field0-1-0=assigned_to&field0-2-0=short_desc&keywords=&keywords_type=allwords&long_desc=&long_desc_type=allwordssubstr&product=Gentoo%20Linux&query_format=advanced&remaction=&short_desc=%2F&short_desc_type=allwordssubstr&status_whiteboard=&status_whiteboard_type=allwordssubstr&type-1-0-0=anyexact&type-1-1-0=anyexact&type-1-2-0=anyexact&type-1-3-0=allwordssubstr&type0-0-0=notequals&type0-1-0=notequals&type0-2-0=notsubstring&value-1-0-0=UNCONFIRMED%2CNEW%2CASSIGNED%2CREOPENED&value-1-1-0=Ebuilds&value-1-2-0=Gentoo%20Linux&value-1-3-0=%2F&value0-0-0=maintainer-wanted%40gentoo.org&value0-1-0=maintainer-needed%40gentoo.org&value0-2-0=new%20package&votes=&ctype=csv";
	
	$ch = curl_init($url);
	$fp = fopen("/tmp/bugs.csv", "w");
	
	curl_setopt($ch, CURLOPT_FILE, $fp);
	curl_setopt($ch, CURLOPT_HEADER, 0);
	
	curl_exec($ch);
	curl_close($ch);
	fclose($fp);

	
	die;
	
	$url = urlencode($url);
	
	$arr = file_get_contents($url);
	
	print_r($arr);
	
	$sql = "INSERT INTO package_bugs (bug, package, description, status) select b.bug_id AS bug, p.id AS package, b.short_short_desc, 1 FROM package p INNER JOIN category c ON p.category = c.id INNER JOIN bugzilla b ON b.short_short_desc LIKE ('%' || c.name || '/' || p.name || '%');";
	
	
	
?>