Commit 88ff28f4 authored by ergonlogic's avatar ergonlogic

Replace all db_fetch_object()'s with DBTNG equivalents.

parent 7404cc98
......@@ -111,7 +111,7 @@ function _provision_drupal_parse_info_file($filename) {
function _provision_system_query($type) {
$entries = array();
$result = db_query("SELECT * FROM {system} WHERE type='%s'", $type);
while ($entry = db_fetch_object($result)) {
while ($entry = $result->fetch()) {
$entries[] = $entry;
}
return $entries;
......
......@@ -62,7 +62,7 @@ function _provision_drupal_find_themes($scope, $key = '') {
function _provision_system_query($type) {
$entries = array();
$result = db_query("SELECT * FROM {system} WHERE type='%s'", $type);
while ($entry = db_fetch_object($result)) {
while ($entry = $result->fetch()) {
$entries[] = $entry;
}
return $entries;
......
......@@ -254,7 +254,7 @@ function drush_provision_tests_migrate_site($site, $target) {
function drush_provision_tests_run_remaining_tasks() {
$tasks = array();
$result = db_query("SELECT t.nid FROM {hosting_task} t INNER JOIN {node} n ON t.vid = n.vid WHERE t.task_status = %d ORDER BY n.changed, n.nid ASC", 0);
while ($node = db_fetch_object($result)) {
while ($node = $result->fetch()) {
$tasks[$node->nid] = node_load($node->nid);
}
......
......@@ -41,7 +41,7 @@ function drush_provision_hostmaster_uninstall() {
drush_log(dt('Destroying sites'), 'info');
$query = db_query("SELECT n.title AS uri, h.name AS context FROM {node} n INNER JOIN {hosting_site} s ON s.nid=n.nid LEFT JOIN {hosting_context} h ON h.nid = n.nid WHERE n.type = '%s' AND s.status != %d AND h.name != 'hostmaster'", 'site', -2);
while ($resource = db_fetch_object($query)) {
while ($resource = $query->fetch()) {
drush_log(dt("Destroying @resource", array('@resource' => $resource->uri)));
$context = $resource->context;
if (!$context) {
......@@ -53,7 +53,7 @@ function drush_provision_hostmaster_uninstall() {
drush_log(dt('Destroying platforms'), 'info');
$query = db_query("SELECT n.title AS uri, h.name AS context FROM {node} n INNER JOIN {hosting_platform} p LEFT JOIN {hosting_context} h ON h.nid = n.nid WHERE n.type = '%s' AND p.status != %d AND h.name != '%s'", 'platform', -2, d('@hostmaster')->platform->name);
while ($resource = db_fetch_object($query)) {
while ($resource = $query->fetch()) {
drush_log(dt("Destroying @resource", array('@resource' => $resource->uri)));
$context = $resource->context;
if (!$context) {
......@@ -65,7 +65,7 @@ function drush_provision_hostmaster_uninstall() {
drush_log(dt('Destroying servers'), 'info');
$query = db_query("SELECT n.title AS uri, h.name AS context FROM {node} n LEFT JOIN {hosting_context} h ON h.nid = n.nid WHERE n.type = '%s' AND h.name != '%s' AND h.name != '%s'", 'server', d('@hostmaster')->server->name, d('@hostmaster')->db_server->name);
while ($resource = db_fetch_object($query)) {
while ($resource = $query->fetch()) {
drush_log(dt("Destroying @resource", array('@resource' => $resource->uri)));
$context = $resource->context;
if (!$context) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment