/[drupal]/contributions/modules/xmlsitemap/xmlsitemap_user/xmlsitemap_user.module
ViewVC logotype

Diff of /contributions/modules/xmlsitemap/xmlsitemap_user/xmlsitemap_user.module

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

revision 1.12.2.53, Sun Mar 1 01:57:41 2009 UTC revision 1.12.2.54, Sun Mar 1 04:42:30 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: xmlsitemap_user.module,v 1.12.2.52 2009/03/01 01:34:19 kiam Exp $  // $Id: xmlsitemap_user.module,v 1.12.2.53 2009/03/01 01:57:41 kiam Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 112  function xmlsitemap_user_user($op, &$edi Line 112  function xmlsitemap_user_user($op, &$edi
112      case 'insert':      case 'insert':
113        $row = new stdClass();        $row = new stdClass();
114        $row->uid = $account->uid;        $row->uid = $account->uid;
115        $row->changed = time();        $row->changed = XMLSITEMAP_TIME;
116        $row->previously_changed = $account->created;        $row->previously_changed = $account->created;
117        $row->priority_override = isset($edit['xmlsitemap_user_priority']) ? $edit['xmlsitemap_user_priority'] : -2.0;        $row->priority_override = isset($edit['xmlsitemap_user_priority']) ? $edit['xmlsitemap_user_priority'] : -2.0;
118        drupal_write_record('xmlsitemap_user', $row);        drupal_write_record('xmlsitemap_user', $row);
# Line 124  function xmlsitemap_user_user($op, &$edi Line 124  function xmlsitemap_user_user($op, &$edi
124          $row = new stdClass();          $row = new stdClass();
125          $row->uid = $account->uid;          $row->uid = $account->uid;
126          $row->previously_changed = $account->created;          $row->previously_changed = $account->created;
127          $row->changed = time();          $row->changed = XMLSITEMAP_TIME;
128        }        }
129        else {        else {
130          $row = $result;          $row = $result;
131          $row->previously_changed = $row->changed;          $row->previously_changed = $row->changed;
132          $row->changed = time();          $row->changed = XMLSITEMAP_TIME;
133        }        }
134        if (module_exists('comment')) {        if (module_exists('comment')) {
135          $row->comments = (integer) db_result(db_query("SELECT COUNT(cid) FROM {comments} WHERE uid = %d", $user->uid));          $row->comments = (integer) db_result(db_query("SELECT COUNT(cid) FROM {comments} WHERE uid = %d", $user->uid));
# Line 198  function xmlsitemap_user_xmlsitemap_link Line 198  function xmlsitemap_user_xmlsitemap_link
198          $row->loc = 'user/'. $user->uid;          $row->loc = 'user/'. $user->uid;
199          $row->id = $user->uid;          $row->id = $user->uid;
200          $row->changed = $user->changed;          $row->changed = $user->changed;
201          $row->changefreq = max(time() - $user->changed, empty($user->previously_changed) ? 0 : $user->changed - $user->previously_changed);          $row->changefreq = max(XMLSITEMAP_TIME - $user->changed, empty($user->previously_changed) ? 0 : $user->changed - $user->previously_changed);
202          if ($user->priority_override != -2.0) {          if ($user->priority_override != -2.0) {
203            $row->priority = $user->priority_override;            $row->priority = $user->priority_override;
204          }          }

Legend:
Removed from v.1.12.2.53  
changed lines
  Added in v.1.12.2.54

  ViewVC Help
Powered by ViewVC 1.1.2