Development

Changeset 7966

You must first sign up to be able to contribute.

Changeset 7966

Show
Ignore:
Timestamp:
03/19/08 12:34:42 (6 months ago)
Author:
fabien
Message:

removed comment stripping if you don't have the tokenizer enabled (closes #2231)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.0/lib/util/sfToolkit.class.php

    r7791 r7966  
    177177  public static function stripComments($source) 
    178178  { 
    179     if (!sfConfig::get('sf_strip_comments', true)) 
    180     { 
    181       return $source; 
    182     } 
    183  
    184     // tokenizer available? 
    185     if (!function_exists('token_get_all')) 
    186     { 
    187       $source = sfToolkit::pregtr($source, array('#/\*((?!\*/)[\d\D\s])*\*/#' => '',   // remove /* ... */ 
    188                                                  '#^\s*//.*$#m'               => '')); // remove // ... 
    189  
     179    if (!sfConfig::get('sf_strip_comments', true) || !function_exists('token_get_all')) 
     180    { 
    190181      return $source; 
    191182    }