Projet

Général

Profil

Révision c304a780

Ajouté par Assos Assos il y a environ 6 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/ctools/page_manager/plugins/tasks/user_edit.inc
9 9
 */
10 10
function page_manager_user_edit_page_manager_tasks() {
11 11
  return array(
12
    // This is a 'page' task and will fall under the page admin UI
12
    // This is a 'page' task and will fall under the page admin UI.
13 13
    'task type' => 'page',
14 14
    'title' => t('User Edit Template'),
15 15
    'admin title' => t('User edit template'),
......
65 65
    }
66 66
  }
67 67
  else {
68
    // automatically disable this task if it cannot be enabled.
68
    // Automatically disable this task if it cannot be enabled.
69 69
    variable_set('page_manager_user_edit_disabled', TRUE);
70 70
    if (!empty($GLOBALS['page_manager_enabling_user_edit'])) {
71 71
      drupal_set_message(t('Page manager module is unable to enable user/%user/edit because some other module already has overridden with %callback.', array('%callback' => $items['user/%user']['page callback'])), 'error');
......
114 114
  // Otherwise, fall back.
115 115
  if ($function == 'drupal_get_form') {
116 116

  
117
    //In order to ajax fields to work we need to run form_load_include.
118
    //Hence we eschew drupal_get_form and manually build the info and
119
    //call drupal_build_form.
117
    // In order to ajax fields to work we need to run form_load_include.
118
    // Hence we eschew drupal_get_form and manually build the info and
119
    // call drupal_build_form.
120 120
    $form_state = array();
121 121
    $form_id = 'user_profile_form';
122 122
    $args = array($account, $category);
......
125 125
    $output = drupal_build_form($form_id, $form_state);
126 126
    return $output;
127 127
  }
128
  //fire off "view" op so that triggers still work
128
  // Fire off "view" op so that triggers still work.
129 129
  // @todo -- this doesn't work anymore, and the alternatives seem bad.
130 130
  // will have to figure out how to fix this.
131
  // user_module_invoke('view', $array = array(), $account);
132 131
  return $function($account);
133 132
}
134 133

  
......
178 177
 *   The subtask id
179 178
 * @param $contexts
180 179
 *   The contexts loaded for the task.
180
 *
181 181
 * @return
182 182
 *   TRUE if the current user can access the page.
183 183
 */

Formats disponibles : Unified diff