/[drupal]/contributions/modules/weblinks/weblinks.module
ViewVC logotype

Diff of /contributions/modules/weblinks/weblinks.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.4.58.2.83, Sun Aug 31 18:16:11 2008 UTC revision 1.1.4.58.2.84, Mon Sep 1 00:20:21 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: weblinks.module,v 1.1.4.58.2.82 2008/08/31 00:55:32 nancyw Exp $  // $Id: weblinks.module,v 1.1.4.58.2.83 2008/08/31 18:16:11 rmiddle Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 1728  function _weblinks_get_query($tid = 0, $ Line 1728  function _weblinks_get_query($tid = 0, $
1728      $query = 'SELECT COUNT(n.nid) FROM {node} n ';      $query = 'SELECT COUNT(n.nid) FROM {node} n ';
1729    }    }
1730    else {    else {
1731      $query = 'SELECT n.nid FROM {node} n ';        $query = 'SELECT DISTINCT(n.nid) FROM {node} n ';
1732    }    }
1733    $query .= 'INNER JOIN {node_revisions} nr ON nr.vid = n.vid ';    $query .= 'INNER JOIN {node_revisions} nr ON nr.vid = n.vid ';
1734    $query .= 'INNER JOIN {weblinks} bw ON bw.vid = nr.vid ';    $query .= 'INNER JOIN {weblinks} bw ON bw.vid = nr.vid ';
# Line 1766  function _weblinks_get_query($tid = 0, $ Line 1766  function _weblinks_get_query($tid = 0, $
1766    }    }
1767    
1768    $query = db_rewrite_sql($query);    $query = db_rewrite_sql($query);
1769    // drupal_set_message("$tid / $sort / $query", 'status');
1770    
1771    if ($limit) {    if ($limit) {
1772      $result = db_query_range($query, $tid, 0, $limit);      $result = db_query_range($query, $tid, 0, $limit);
# Line 1777  function _weblinks_get_query($tid = 0, $ Line 1778  function _weblinks_get_query($tid = 0, $
1778    return $result;    return $result;
1779  }  }
1780    
   
1781  /**  /**
1782   * Prepare block content.   * Prepare block content.
1783   */   */

Legend:
Removed from v.1.1.4.58.2.83  
changed lines
  Added in v.1.1.4.58.2.84

  ViewVC Help
Powered by ViewVC 1.1.2