Ignorar:
Fecha y hora:
26/05/2016 14:17:08 (hace 8 años)
Autor:
José Gregorio Puentes <jpuentes@…>
Branches:
stable, version-3.0
Children:
32a0eb4
Parents:
b907fa2
Mensaje:

se actualizo la version del modulo views

Fichero:
1 editado

Leyenda

No modificado
Añadido
Eliminado
  • modules_contrib/views/modules/user/views_plugin_argument_default_user.inc

    r177a560 r59029b2  
    99 */
    1010class views_plugin_argument_default_user extends views_plugin_argument_default {
    11   var $option_name = 'default_argument_user';
     11  function option_definition() {
     12    $options = parent::option_definition();
     13    $options['user'] = array('default' => '', 'bool' => TRUE, 'translatable' => FALSE);
    1214
    13   function argument_form(&$form, &$form_state) {
    14     $form[$this->option_name] = array(
     15    return $options;
     16  }
     17
     18  function options_form(&$form, &$form_state) {
     19    $form['user'] = array(
    1520      '#type' => 'checkbox',
    1621      '#title' => t('Also look for a node and use the node author'),
    17       '#default_value' => !empty($this->argument->options[$this->option_name]),
    18       '#process' => array('views_process_dependency'),
    19       '#dependency' => array(
    20         'radio:options[default_action]' => array('default'),
    21         'radio:options[default_argument_type]' => array($this->id)
    22       ),
    23       '#dependency_count' => 2,
     22      '#default_value' => $this->options['user'],
    2423    );
     24  }
     25
     26  function convert_options(&$options) {
     27    if (!isset($options['user']) && isset($this->argument->options['default_argument_user'])) {
     28      $options['user'] = $this->argument->options['default_argument_user'];
     29    }
    2530  }
    2631
     
    4045    }
    4146
    42     if (!empty($this->argument->options[$this->option_name])) {
     47    if (!empty($this->options['user'])) {
    4348      foreach (range(1, 3) as $i) {
    4449        $node = menu_get_object('node', $i);
     
    5358    }
    5459
    55     if (!empty($this->argument->options[$this->option_name])) {
     60    if (!empty($this->options['user'])) {
    5661      if (arg(0) == 'node' && is_numeric(arg(1))) {
    5762        $node = node_load(arg(1));
     
    7075  }
    7176}
    72 
Nota: Vea TracChangeset para ayuda en el uso del visor de conjuntos de cambios.