Development

Changeset 6336

You must first sign up to be able to contribute.

Changeset 6336

Show
Ignore:
Timestamp:
12/06/07 14:31:49 (10 months ago)
Author:
fabien
Message:

added default date and time format for BC in propel.ini + added an upgrade task for existing projects

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/data/skeleton/project/config/propel.ini

    r6154 r6336  
    4444 
    4545propel.mysql.tableType = InnoDB 
     46 
     47propel.defaultTimeStampFormat = Y-m-d H:i:s 
     48propel.defaultTimeFormat = H:i:s 
     49propel.defaultDateFormat = Y-m-d 
  • trunk/lib/task/project/upgrade1.1/sfPropelUpgrade.class.php

    r5232 r6336  
    3131      file_put_contents($file, $content); 
    3232    } 
     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 
     39 
     40propel.defaultTimeStampFormat = Y-m-d H:i:s 
     41propel.defaultTimeFormat = H:i:s 
     42propel.defaultDateFormat = Y-m-d 
     43 
     44EOF; 
     45      $this->dispatcher->notify(new sfEvent($this, 'command.log', array($this->formatter->formatSection('propel', sprintf('Migrating %s', $file))))); 
     46      file_put_contents($file, $content); 
     47    } 
    3348  } 
    3449}