View source
<?php
function hosting_install() {
db_query("UPDATE {system} SET weight = 10 WHERE type='module' and name='hosting'");
}
function hosting_update_1() {
$ret = array();
$ret[] = update_sql("UPDATE {system} SET weight = 10 WHERE type='module' and name='hosting'");
return $ret;
}
function hosting_update_2() {
$ret = array();
$ret[] = update_sql("DROP TABLE {hosting_config_template}");
return $ret;
}
function hosting_update_3() {
$ret = array();
$result = db_query("select n.nid from {node} n left join hosting_package p on n.nid = p.nid where short_name in ('hostslave', 'hostmaster')");
while ($obj = db_fetch_object($result)) {
$in[] = (int) $obj->nid;
}
$in = implode(", ", $in);
$ret[] = update_sql("UPDATE {node} SET status = 0 WHERE nid IN (" . $in . ")", $values);
return $ret;
}