Changeset 8369
- Timestamp:
- 04/09/08 01:39:27 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.1/lib/task/project/upgrade1.1/sfPropelUpgrade.class.php
r7397 r8369 4 4 * This file is part of the symfony package. 5 5 * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com> 6 * 6 * 7 7 * For the full copyright and license information, please view the LICENSE 8 8 * file that was distributed with this source code. … … 22 22 { 23 23 $file = sfConfig::get('sf_config_dir').'/propel.ini'; 24 if(is_readable($file)) 25 { 26 $content = file_get_contents($file); 27 $content = str_replace('addon.propel.builder.', 'plugins.sfPropelPlugin.lib.propel.builder.', $content, $count); 24 28 25 $content = file_get_contents($file); 26 $content = str_replace('addon.propel.builder.', 'plugins.sfPropelPlugin.lib.propel.builder.', $content, $count); 29 if ($count) 30 { 31 $this->logSection('propel', sprintf('Migrating %s', $file)); 32 file_put_contents($file, $content); 33 } 27 34 28 if ($count) 29 { 30 $this->logSection('propel', sprintf('Migrating %s', $file)); 31 file_put_contents($file, $content); 32 } 33 34 // add default date and time format 35 $content = file_get_contents($file); 36 if (false === strpos($content, 'propel.defaultDateFormat')) 37 { 38 $content .= <<<EOF 35 // add default date and time format 36 $content = file_get_contents($file); 37 if (false === strpos($content, 'propel.defaultDateFormat')) 38 { 39 $content .= <<<EOF 39 40 40 41 propel.defaultTimeStampFormat = Y-m-d H:i:s … … 43 44 44 45 EOF; 45 $this->logSection('propel', sprintf('Migrating %s', $file)); 46 file_put_contents($file, $content); 46 $this->logSection('propel', sprintf('Migrating %s', $file)); 47 file_put_contents($file, $content); 48 } 47 49 } 48 50 }

