Development

Changeset 9569

You must first sign up to be able to contribute.

Changeset 9569

Show
Ignore:
Timestamp:
06/13/08 05:03:55 (5 years ago)
Author:
Stephen.Ostrow
Message:

Fixed the cross application link code to use the no_script_name setting from the settings file of the proper app

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfDoctrineSimpleCMSPlugin/branches/symfony-1.0/lib/helper/CrossApplicationHelper.php

    r9530 r9569  
    3939    } 
    4040  } 
     41  /** 
     42   * Take care of no_script_name 
     43   */ 
     44  $appSettingsFile = SF_ROOT_DIR.DIRECTORY_SEPARATOR.'apps'.DIRECTORY_SEPARATOR.$app.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'settings.yml' ; 
     45  if (file_exists($appSettingsFile)) 
     46  { 
     47    $yml = sfYaml::load($appSettingsFile) ; 
     48    $no_script_name = isset($yml[$env]['.settings']['no_script_name']) ? $yml[$env]['.settings']['no_script_name'] : false; 
     49  } 
     50   
    4151  if ($env == 'dev') 
    4252  { 
     
    4555  else  
    4656  { 
    47     $path = 'http://' . $host . $routeUrl ; 
     57    $path = 'http://' . $host . ( ! $no_script_name ? ('/'. $app . '.php') : '') . $routeUrl ; 
    4858  } 
    4959  return $path ;