Development

Changeset 7965

You must first sign up to be able to contribute.

Changeset 7965

Show
Ignore:
Timestamp:
03/19/08 12:33:16 (1 year ago)
Author:
fabien
Message:

removed comment stripping if you don't have the tokenizer enabled + added a new entry in the web debug toolbar for the tokenizer (closes #3134, #2231)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.1/lib/debug/sfWebDebug.class.php

    r7899 r7965  
    308308      'cache'        => sfConfig::get('sf_cache')           ? 'on' : 'off', 
    309309      'compression'  => sfConfig::get('sf_compressed')      ? 'on' : 'off', 
     310      'tokenizer'    => function_exists('token_get_all')    ? 'on' : 'off', 
    310311      'syck'         => extension_loaded('syck')            ? 'on' : 'off', 
    311312      'eaccelerator' => extension_loaded('eaccelerator') && ini_get('eaccelerator.enable') ? 'on' : 'off', 
  • branches/1.1/lib/util/sfToolkit.class.php

    r7792 r7965  
    184184  public static function stripComments($source) 
    185185  { 
    186     if (!sfConfig::get('sf_strip_comments', true)) 
    187     { 
    188       return $source; 
    189     } 
    190  
    191     // tokenizer available? 
    192     if (!function_exists('token_get_all')) 
    193     { 
    194       $source = sfToolkit::pregtr($source, array('#/\*((?!\*/)[\d\D\s])*\*/#' => '',   // remove /* ... */ 
    195                                                  '#^\s*//.*$#m'               => '')); // remove // ... 
    196  
     186    if (!sfConfig::get('sf_strip_comments', true) || !function_exists('token_get_all')) 
     187    { 
    197188      return $source; 
    198189    } 

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting, and supporting several large Open-Source projects.