Development

#2676: WebDebugRelativeRoot.patch

You must first sign up to be able to contribute.

Ticket #2676: WebDebugRelativeRoot.patch

File WebDebugRelativeRoot.patch, 1.1 kB (added by Carl.Vondrick, 10 months ago)

Patch for relative root

  • lib/log/sfWebDebugLogger.class.php

    old new  
    33/* 
    44 * This file is part of the symfony package. 
    55 * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com> 
    6  *  
     6 * 
    77 * For the full copyright and license information, please view the LICENSE 
    88 * file that was distributed with this source code. 
    99 */ 
     
    8989    } 
    9090 
    9191    // add needed assets for the web debug toolbar 
     92    $root = $this->context->getRequest()->getRelativeUrlRoot(); 
    9293    $assets = sprintf(' 
    9394      <script type="text/javascript" src="%s"></script> 
    9495      <link rel="stylesheet" type="text/css" media="screen" href="%s" />', 
    95       sfConfig::get('sf_web_debug_web_dir').'/js/main.js', 
    96       sfConfig::get('sf_web_debug_web_dir').'/css/main.css' 
     96      $root . sfConfig::get('sf_web_debug_web_dir').'/js/main.js', 
     97      $root . sfConfig::get('sf_web_debug_web_dir').'/css/main.css' 
    9798    ); 
    9899    $content = str_ireplace('</head>', $assets.'</head>', $content); 
    99100