Projet

Général

Profil

Révision 00be1f1f

Ajouté par Julien Enselme il y a plus de 8 ans

Update drupal 7.40 -> 7.41

Voir les différences:

drupal7/modules/overlay/overlay-parent.js
350 350
 *   TRUE if the URL represents an administrative link, FALSE otherwise.
351 351
 */
352 352
Drupal.overlay.isAdminLink = function (url) {
353
  if (Drupal.overlay.isExternalLink(url)) {
353
  if (!Drupal.urlIsLocal(url)) {
354 354
    return false;
355 355
  }
356 356

  
......
378 378
/**
379 379
 * Determine whether a link is external to the site.
380 380
 *
381
 * Deprecated. Use Drupal.urlIsLocal() instead.
382
 *
381 383
 * @param url
382 384
 *   The URL to be tested.
383 385
 *
......
385 387
 *   TRUE if the URL is external to the site, FALSE otherwise.
386 388
 */
387 389
Drupal.overlay.isExternalLink = function (url) {
388
  var re = RegExp('^((f|ht)tps?:)?//(?!' + window.location.host + ')');
389
  return re.test(url);
390
  return !Drupal.urlIsLocal(url);
390 391
};
391 392

  
392 393
/**
......
405 406
 */
406 407
Drupal.overlay.getInternalUrl = function (path) {
407 408
  var url = Drupal.settings.basePath + path;
408
  if (!this.isExternalLink(url)) {
409
  if (Drupal.urlIsLocal(url)) {
409 410
    return url;
410 411
  }
411 412
};

Formats disponibles : Unified diff