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

Diff of /contributions/modules/stalker/stalker.module

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.module,v 1.1 2009/10/23 17:06:00 eaton Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 27  function stalker_user($op, &$edit, &$acc Line 27  function stalker_user($op, &$edit, &$acc
27    
28    switch ($op) {    switch ($op) {
29      case 'view':      case 'view':
30        if (($user->uid != $account->uid) || variable_get('stalker_narcissism', FALSE)) {        // Update the counter for how many times we've viewed this page
31          // Update the counter for how many times we've viewed this page        $view_count = stalker_get_count($user->uid, $account->uid);
32          $view_count = stalker_get_count($user->uid, $account->uid);        $view_count++;
33          $view_count++;  
34          // Update the counter for how many times we've viewed this page
35          // Update the counter for how many times we've viewed this page        stalker_set_count($view_count, $user->uid, $account->uid);
         stalker_set_count($view_count, $user->uid, $account->uid);  
       }  
36    
37        if (user_access('view stalkers')) {        if (user_access('view stalkers') && ($user->uid != $account->uid || variable_get('stalker_narcissism', TRUE))) {
38          $content = theme('stalker_user', $account);          $content = theme('stalker_user', $account);
39    
40          // Here is our first peek at a "renderable array".          // Here is our first peek at a "renderable array".

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

  ViewVC Help
Powered by ViewVC 1.1.2