summaryrefslogtreecommitdiff
path: root/modules/drupal/drupal.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/drupal/drupal.module')
-rw-r--r--modules/drupal/drupal.module3
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/drupal/drupal.module b/modules/drupal/drupal.module
index 63638523d..ab0921fed 100644
--- a/modules/drupal/drupal.module
+++ b/modules/drupal/drupal.module
@@ -251,8 +251,7 @@ function drupal_client_ping($client, $system) {
if ($client['link'] && $client['name'] && $client['mail'] && $client['slogan'] && $client['mission']) {
$result = db_query("SELECT cid FROM {client} WHERE link = '%s'", $client['link']);
- if (db_num_rows($result)) {
- $record = db_fetch_object($result);
+ if ($record = db_fetch_object($result)) {
$client['cid'] = $record->cid;
// We have an existing record.
db_query("UPDATE {client} SET link = '%s', name = '%s', mail = '%s', slogan = '%s', mission = '%s', users = %d, nodes = %d, version = '%s', changed = '%s' WHERE cid = %d", $client['uid'], $client['link'], $client['name'], $client['mail'], $client['slogan'], $client['mission'], $client['users'], $client['nodes'], $client['version'], time(), $client['cid']);