Projet

Général

Profil

Révision 6135231a

Ajouté par Assos Assos il y a presque 6 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/lightbox2/lightbox2_handler_field_lightbox2.inc
124 124
      // We don't actually use the link, but we need it there for lightbox to function.
125 125
      if (empty($link)) {
126 126
        // Get the path name.
127
        $path = isset($_GET['q']) ? $_GET['q'] : '<front>';
128
        $link = url($path, array('absolute' => TRUE));
127
        $url = isset($_GET['q']) ? $_GET : '<front>';
128
        $path = '';
129
        $params = array();
130

  
131
        //Get the path and any parameters from the URL
132
        foreach ($url as $key => $value) {
133
          if ($key === 'q') {
134
            $path = $value;
135
          } else {
136
            $params[$key] = $value;
137
          }
138
        }
139

  
140
        $link = url($path, array('absolute' => TRUE, 'query' => $params));
129 141
      }
130 142

  
131 143
      // Get the token information and generate the value for the popup and the
......
142 154
      // div is hidden it won't show up as a lightbox.  We also specify a group
143 155
      // in the rel attribute in order to link the whole View together for paging.
144 156
      $group_name = !empty($this->options['custom_group']) ? $this->options['custom_group'] : ($this->options['rel_group'] ? 'lightbox-popup-' . $this->view->name . '-' . implode('/', $this->view->args) : '');
145
      return "<a href='$link #lightbox-popup-{$i}'  rel='lightmodal[{$group_name}|width:" . ($this->options['width'] ? $this->options['width'] : '600px') . ';height:' . ($this->options['height'] ? $this->options['height'] : '600px') . "][" . $caption . "]'>" . $tokens["[{$this->options['trigger_field']}]"] . "</a>
157
      $group_name = check_plain($group_name);
158
      $width = $this->options['width'] ? check_plain($this->options['width']) : '600px';
159
      $height = $this->options['height'] ? check_plain($this->options['height']) : '600px';
160
      $trigger_field = filter_xss_admin($this->options['trigger_field']);
161

  
162
      return "<a href='$link #lightbox-popup-{$i}'  rel='lightmodal[{$group_name}|width:" . $width . ';height:' . $height . "][" . $caption . "]'>" . $tokens["[{$trigger_field}]"] . "</a>
146 163
                <div style='display: none;'><div id='lightbox-popup-{$i}' class='lightbox-popup'>$popup</div></div>";
147 164
    }
148 165
    else {

Formats disponibles : Unified diff