/[drupal]/contributions/modules/stalker/stalker.pages.inc
ViewVC logotype

Diff of /contributions/modules/stalker/stalker.pages.inc

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

revision 1.1, Fri Oct 23 17:06:00 2009 UTC revision 1.2, Fri Oct 23 18:41:12 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id$  // $Id: stalker.pages.inc,v 1.1 2009/10/23 17:06:00 eaton Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 11  Line 11 
11   * Page callback function for user/%user/stalkers menu path   * Page callback function for user/%user/stalkers menu path
12   */   */
13  function stalker_user_page($account) {  function stalker_user_page($account) {
14    $sql = "SELECT stalker_uid, view_count FROM {stalker} WHERE profile_uid = %d AND view_count > %d ORDER BY view_count DESC";    if (variable_get('stalker_narcissism', TRUE)) {
15        $sql = "SELECT stalker_uid, view_count FROM {stalker} WHERE profile_uid = %d AND view_count > %d ORDER BY view_count DESC";
16      }
17      else {
18        $sql = "SELECT stalker_uid, view_count FROM {stalker} WHERE profile_uid = %d AND view_count > %d AND stalker_uid != profile_uid ORDER BY view_count DESC";
19      }
20    $result = db_query_range($sql, $account->uid, variable_get('stalker_threshold', 1), 0, 5);    $result = db_query_range($sql, $account->uid, variable_get('stalker_threshold', 1), 0, 5);
21    
22    $items = array();    $items = array();

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.2