Development

Changeset 12967

You must first sign up to be able to contribute.

Changeset 12967

Show
Ignore:
Timestamp:
11/13/08 11:22:53 (1 year ago)
Author:
Sylvio
Message:

sfDynamicCMSPlugin: fix a bug about Symfony branch getter (not compatible with SF branch above 1.0)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfDynamicCMSPlugin/branches/1.0/lib/sfDynamicCMSTools.class.php

    r12947 r12967  
    570570  public static function getSymfonyBranch() 
    571571  { 
    572     $version=file_get_contents(sfConfig::get('sf_symfony_lib_dir').'/VERSION'); 
    573     return substr($version,0,3); 
     572    if(defined('SYMFONY_VERSION')) 
     573    { 
     574      return substr(SYMFONY_VERSION,0,3); 
     575    } 
     576    else 
     577    { 
     578      if(file_exists(sfConfig::get('sf_symfony_lib_dir').'/VERSION')) 
     579      { 
     580        return substr(file_get_contents(sfConfig::get('sf_symfony_lib_dir').'/VERSION'),0,3); 
     581      } 
     582      else 
     583      { 
     584        return false; 
     585      } 
     586    } 
    574587  } 
    575588   

The Sensio Labs Network

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