blob: d0a9d80c6e67e7a9fd1920835b7bfed59a672fb5 (
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
|
<?
require_once 'header.php';
require_once 'class.portage.tree.php';
$tree = new PortageTree();
$arr_arches = $tree->getArches();
$arr = importDiff('arch', $arr_arches);
if(count($arr['delete'])) {
foreach($arr['delete'] as $name) {
$sql = "DELETE FROM arch WHERE name = ".$db->quote($name).";";
shell::msg($sql);
$db->query($sql);
}
}
if(count($arr['insert'])) {
foreach($arr['insert'] as $name) {
$arr_insert = array('name' => $name);
$db->autoExecute('arch', $arr_insert, MDB2_AUTOQUERY_INSERT);
}
}
unset($arr);
?>
|