/[drupal]/drupal/includes/common.inc
ViewVC logotype

Diff of /drupal/includes/common.inc

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

revision 1.1032, Sat Oct 31 16:06:35 2009 UTC revision 1.1033, Sun Nov 1 14:08:17 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: common.inc,v 1.1031 2009/10/27 19:29:12 webchick Exp $  // $Id: common.inc,v 1.1032 2009/10/31 16:06:35 dries Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 2370  function _format_date_callback(array $ma Line 2370  function _format_date_callback(array $ma
2370   * alternative than url().   * alternative than url().
2371   */   */
2372  function url($path = NULL, array $options = array()) {  function url($path = NULL, array $options = array()) {
2373      static $url_outbound;
2374    
2375    // Merge in defaults.    // Merge in defaults.
2376    $options += array(    $options += array(
2377      'fragment' => '',      'fragment' => '',
# Line 2392  function url($path = NULL, array $option Line 2394  function url($path = NULL, array $option
2394    $original_path = $path;    $original_path = $path;
2395    
2396    // Allow other modules to alter the outbound URL and options.    // Allow other modules to alter the outbound URL and options.
2397    drupal_alter('url_outbound', $path, $options, $original_path);    // Since PHP code cannot be unloaded, we statically cache the implementations
2398      // of hook_url_outbound_alter() and only invoke them in case there are any.
2399      if (!isset($url_outbound)) {
2400        $url_outbound = (bool) module_implements('url_outbound_alter');
2401      }
2402      if ($url_outbound) {
2403        drupal_alter('url_outbound', $path, $options, $original_path);
2404      }
2405    
2406    if ($options['fragment']) {    if ($options['fragment']) {
2407      $options['fragment'] = '#' . $options['fragment'];      $options['fragment'] = '#' . $options['fragment'];

Legend:
Removed from v.1.1032  
changed lines
  Added in v.1.1033

  ViewVC Help
Powered by ViewVC 1.1.2