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

Diff of /contributions/modules/gamertags/gamertags.module

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

revision 1.2.2.2 by pobster, Sun Nov 22 19:46:04 2009 UTC revision 1.2.2.3 by pobster, Sun Nov 22 20:40:00 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: gamertags.module,v 1.2.2.1 2009/11/22 19:43:40 pobster Exp $  // $Id: gamertags.module,v 1.2.2.2 2009/11/22 19:46:04 pobster Exp $
3    
4  /**  /**
5   * Implementation of hook_filter().   * Implementation of hook_filter().
# Line 44  function gamertags_filter_tips($delta, $ Line 44  function gamertags_filter_tips($delta, $
44   * Implementation of hook_menu().   * Implementation of hook_menu().
45   */   */
46  function gamertags_menu() {  function gamertags_menu() {
47    $items['admin/config/gamertags'] = array(    $items['admin/config/people/gamertags'] = array(
48      'title' => 'Gamertag Settings',      'title' => 'Gamertag Settings',
49      'description' => 'Settings for the Gamertags module.',      'description' => 'Settings for the Gamertags module.',
50      'page callback' => 'drupal_get_form',      'page callback' => 'drupal_get_form',
# Line 165  function gamertags_settings() { Line 165  function gamertags_settings() {
165  } // gamertags_settings  } // gamertags_settings
166    
167  /**  /**
168   * Implement hook_form_FORM_ID_alter().   * Implement hook_form_alter().
169   */   */
170  function gamertags_form_user_profile_form_alter(&$form, &$form_state) {  function gamertags_form_alter(&$form, &$form_state, $form_id) {
171    if ($form['#user_category'] == 'account') {    if (($form_id == 'user_register_form' && variable_get('gamertags_on_registration', TRUE) || $form_id == 'user_profile_form') && in_array($form['#user_category'], array('account', 'register'))) {
172      $account = $form['#user'];      $account = $form['#user'];
173      if (!_gamertags_test_any()) {      if (!_gamertags_test_any() || empty($account)) {
174        return;        return;
175      }      }
176      $form['gamertags'] = array(      $form['gamertags'] = array(
# Line 220  function gamertags_form_user_profile_for Line 220  function gamertags_form_user_profile_for
220        );        );
221      }      }
222    }    }
223  } // gamertags_form_user_profile_form_alter  } // gamertags_form_alter
224    
225  /**  /**
226   * Helper function to return TRUE if any gamertags are set to be collectable/ displayable.   * Helper function to return TRUE if any gamertags are set to be collectable/ displayable.

Legend:
Removed from v.1.2.2.2  
changed lines
  Added in v.1.2.2.3

  ViewVC Help
Powered by ViewVC 1.1.3