Changeset 48

Show
Ignore:
Timestamp:
05/24/08 13:34:40 (2 years ago)
Author:
nperriault
Message:

Upgraded scripts to use symfony 1.1, everything is broken, use with caution.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/apps/main/config/factories.yml

    r41 r48  
     1prod: 
     2  logger: 
     3    class:        sfAggregateLogger 
     4    param: 
     5      level:      err 
     6      loggers: 
     7        sf_file_debug: 
     8          class:  sfFileLogger 
     9          param: 
     10            file: %SF_LOG_DIR%/%SF_APP%_%SF_ENVIRONMENT%.log 
     11 
    112cli: 
    213  controller: 
     
    1223 
    1324all: 
     25  i18n: 
     26    class: sfI18N 
     27    param: 
     28      source:              XLIFF 
     29      debug:               off 
     30      untranslated_prefix: "[T]" 
     31      untranslated_suffix: "[/T]" 
     32      cache: 
     33        class: sfFileCache 
     34        param: 
     35          automatic_cleaning_factor: 0 
     36          cache_dir:                 %SF_I18N_CACHE_DIR% 
     37          lifetime:                  86400 
     38          prefix:                    %SF_APP_DIR% 
    1439  storage: 
    1540    class:                     sfSessionStorage 
     
    1843      session_cookie_domain:   .<?php echo SYMFONIANS_MAIN_DOMAIN."\n" ?> 
    1944      session_cookie_lifetime: <?php echo (30 * 86400)."\n" ?>  
    20  
    21 #  view_cache: 
    22 #    class:                     sfSQLiteCache 
    23 #    param: 
    24 #      automaticCleaningFactor: 0 
    25 #      database:                %SF_ROOT_DIR%/cache/cache.db 
    26  
    27 #  controller: 
    28 #    class: sfFrontWebController 
    29 # 
    30 #  request: 
    31 #    class: sfWebRequest 
    32 # 
    33 #  response: 
    34 #    class: sfWebResponse 
    35 # 
    36 #  user: 
    37 #    class: myUser 
    38 # 
    39 #  storage: 
    40 #    class: sfSessionStorage 
    41 #    param: 
    42 #      session_name: symfony 
    43 # 
    44 #  view_cache: 
    45 #    class: sfFileCache 
    46 #    param: 
    47 #      automaticCleaningFactor: 0 
    48 #      cacheDir:                %SF_TEMPLATE_CACHE_DIR% 
  • trunk/apps/main/config/filters.yml

    r2 r48  
    44rendering: ~ 
    55 
    6 web_debug: ~ 
    7  
    86security:  ~ 
    97 
    108rememberFilter: 
    119  class:    myRememberFilter 
    12  
    13 csrf: 
    14   class:    sfCSRFFilter 
    15   param: 
    16     secret: 5ymf0n14n5 
    1710 
    1811conditionalCache: 
     
    2619common:    ~ 
    2720 
    28 flash:     ~ 
    29  
    3021execution: ~ 
  • trunk/apps/main/config/settings.yml

    r2 r48  
    11prod: 
    22  .settings: 
     3    logging_enabled:        on 
    34    no_script_name:         on 
    45    cache:                  on 
     
    78dev: 
    89  .settings: 
    9     # E_ALL | E_STRICT = 4095 
    10     error_reporting:        4095 
     10    error_reporting:        <?php echo E_ALL | E_STRICT."\n" ?> 
    1111    web_debug:              on 
    1212    cache:                  off 
     
    1717search: 
    1818  .settings: 
    19     # E_ALL | E_STRICT = 4095 
    20     error_reporting:        4095 
     19    error_reporting:        <?php echo E_ALL | E_STRICT."\n" ?> 
    2120    web_debug:              off 
    2221    cache:                  off 
     
    2726staging: 
    2827  .settings: 
    29     # E_ALL | E_STRICT = 4095 
    30     error_reporting:        4095 
     28    error_reporting:        <?php echo E_ALL | E_STRICT."\n" ?> 
    3129    web_debug:              on 
    3230    cache:                  on 
     
    3735test: 
    3836  .settings: 
    39     # E_ALL | E_STRICT & ~E_NOTICE = 2047 
    40     error_reporting:        2047 
     37    error_reporting:        <?php echo E_ALL | E_STRICT & ~E_NOTICE."\n" ?> 
    4138    cache:                  on 
    4239    web_debug:              off 
     
    6562 
    6663  .settings: 
    67     available:              on        # Enable the whole application. Switch to off to redirect all requests to the unavailable module and action. 
    68  
    69 #    # Optional features. Deactivating unused features boots performance a bit. 
    70 #    use_database:           on        # Enable database manager. Set to off if you don't use a database. 
    71 #    use_security:           on        # Enable security features (login and credentials). Set to off for public applications. 
    72 #    use_flash:              on        # Enable flash parameter feature. Set to off if you never use the set_flash() method in actions. 
    73     i18n:                   on       # Enable interface translation. Set to off if your application should not be translated. 
    74 #    check_symfony_version:  off       # Enable check of symfony version for every request. Set to on to have symfony clear the cache automatically when the framework is upgraded. Set to off if you always clear the cache after an upgrade. 
    75 #    use_process_cache:      on        # Enable symfony optimizations based on PHP accelerators. Set to off for tests or when you have enabled a PHP accelerator in your server but don't want symfony to use it internally. 
    76 #    compressed:             off       # Enable PHP response compression. Set to on to compress the outgoing HTML via the PHP handler. 
    77 #    check_lock:             off       # Enable the application lock system triggered by the clear-cache and disable tasks. Set to on to have all requests to disabled applications redirected to the $sf_symfony_data_dir/web/arrors/unavailable.php page. 
    78 
    79 #    # Output escaping settings 
    80     escaping_strategy:      both        # Determines how variables are made available to templates. Accepted values: bc, both, on, off. The value off deactivates escaping completely and gives a slight boost. 
    81     escaping_method:   ESC_ENTITIES   # Function or helper used for escaping. Accepted values: ESC_RAW, ESC_ENTITIES, ESC_JS, ESC_JS_NO_ENTITIES. 
    82 
    83 #    # Routing settings 
    84 #    suffix:                 .         # Default suffix for generated URLs. If set to a single dot (.), no suffix is added. Possible values: .html, .php, and so on. 
    85 #    no_script_name:         off       # Enable the front controller name in generated URLs 
    86  
    87     # Validation settings, used for error generation by the Validation helper 
    88     validation_error_prefix:    '' 
    89     validation_error_suffix:    '' 
    90     validation_error_class:     form_error 
    91     validation_error_id_prefix: error_for_ 
    92  
    93 #    # Cache settings 
    94 #    cache:                  off       # Enable the template cache 
    95 #    etag:                   on        # Enable etag handling 
    96 
    97 #    # Logging and debugging settings 
    98 #    web_debug:              off       # Enable the web debug toolbar 
    99 #    error_reporting:        341       # Determines which events are logged. The default value is E_PARSE | E_COMPILE_ERROR | E_ERROR | E_CORE_ERROR | E_USER_ERROR = 341 
    100 
    101 #    # Assets paths 
    102 #    rich_text_js_dir:       js/tiny_mce 
    103 #    prototype_web_dir:      /sf/prototype 
    104 #    admin_web_dir:          /sf/sf_admin 
    105 #    web_debug_web_dir:      /sf/sf_web_debug 
    106 
    107 #    # Helpers included in all templates by default 
     64    available:              on 
     65    default_culture:        en 
     66    i18n:                   on 
     67    escaping_strategy:      on 
     68    escaping_method:        ESC_ENTITIES 
    10869    standard_helpers:       [Partial, Cache, Form, MoreForm, I18N, Button, ObjectUrl, Breadcrumb, Image, Event, MoreDate] 
    109 # 
    110 #    # Activated modules from plugins or from the symfony core 
    11170    enabled_modules:        [cryptographp, sfGuardAuth, sfLucene] 
    112 
    113 #    # Charset used for the response 
    114 #    charset:                utf-8 
    115 
    116 #    # Miscellaneous 
    117 #    strip_comments:         on         # Remove comments in core framework classes as defined in the core_compile.yml 
    118 #    autoloading_functions:  ~          # Functions called when a class is requested and this it is not already loaded. Expects an array of callables. Used by the framework bridges. 
    119 #    timeout:                1800       # Session timeout, in seconds 
    120 #    max_forwards:           5 
    121 #    path_info_array:        SERVER 
    122 #    path_info_key:          PATH_INFO 
    123 #    url_format:             PATH 
    124 
    125 #    # ORM 
    126 #    orm:                    propel 
     71    charset:                utf-8 
  • trunk/apps/main/lib/i18nSubdomainFilter.class.php

    r2 r48  
    99   * @param int     $level 
    1010   */ 
    11   public function log($message, $level = SF_LOG_DEBUG) 
     11  public function log($message, $level = sfLogger::DEBUG) 
    1212  { 
    13     sfLogger::getInstance()->log('{i18nSubdomainFilter} '.$message, $level); 
     13    sfContext::getInstance()->getLogger()->log('{i18nSubdomainFilter} '.$message, $level); 
    1414  } 
    1515 
  • trunk/apps/main/lib/myActions.class.php

    r37 r48  
    241241    catch (sfException $e) 
    242242    { 
    243       $this->setFlash('warning', $e->getMessage()); 
     243      $this->getUser()->setFlash('warning', $e->getMessage()); 
    244244      $this->forward404(sprintf('User "%s" is flooding by mail', $this->getUser()->getGuardUser()->getUsername())); 
    245245    } 
  • trunk/apps/main/modules/applications/actions/actions.class.php

    r10 r48  
    1616      $this->updateFromRequest(); 
    1717      parent::purgeObjectRelatedCache($this->application); 
    18       $this->setFlash('notice', $this->__('Application added')); 
     18      $this->getUser()->setFlash('notice', $this->__('Application added')); 
    1919      $this->getUser()->setAttribute('from_app_creation', true, 'symfonians'); 
    2020      $this->redirect('@application_connect_as_developer?slug='.$this->application->getSlug()); 
     
    3333    if (!$this->getUser()->isAdmin() && $this->application->getSubmitterId() != $this->getUser()->getId()) 
    3434    { 
    35       $this->setFlash('warning', $this->__('You are not allowed to edit this record')); 
     35      $this->getUser()->setFlash('warning', $this->__('You are not allowed to edit this record')); 
    3636      $this->redirect('@application_page?slug='.$this->application->getSlug()); 
    3737    } 
     
    4141      $this->updateFromRequest(); 
    4242      parent::purgeObjectRelatedCache($this->application); 
    43       $this->setFlash('notice', $this->__('Application updated')); 
     43      $this->getUser()->setFlash('notice', $this->__('Application updated')); 
    4444      $this->getUser()->setAttribute('from_app_creation', true, 'symfonians'); 
    4545      $this->redirect('@application_page?slug='.$this->application->getSlug()); 
     
    5757      $this->updateCompanyConnectionFromRequest(); 
    5858      parent::purgeObjectRelatedCache($this->connection); 
    59       $this->setFlash('notice', $this->__('Connection updated')); 
     59      $this->getUser()->setFlash('notice', $this->__('Connection updated')); 
    6060      $this->redirect('@application_page?slug='.$this->application->getSlug()); 
    6161    } 
     
    7777      $this->updateDeveloperConnectionFromRequest(); 
    7878      parent::purgeObjectRelatedCache($this->connection); 
    79       $this->setFlash('notice', $this->__('Connection updated')); 
     79      $this->getUser()->setFlash('notice', $this->__('Connection updated')); 
    8080      $this->redirect('@application_page?slug='.$this->application->getSlug()); 
    8181    } 
     
    9696    if ($connection_data && $this->application->hasCompanyConnected($connection_data['company_id'])) 
    9797    { 
    98       $this->setFlash('warning', $this->__('The company you entered is already related to this application')); 
     98      $this->getUser()->setFlash('warning', $this->__('The company you entered is already related to this application')); 
    9999      $this->redirect('@application_page?slug='.$this->application->getSlug()); 
    100100    } 
     
    106106      parent::purgeObjectRelatedCache($this->connection); 
    107107 
    108       $this->setFlash('notice', $this->__('The company has been marked as connected to this application')); 
     108      $this->getUser()->setFlash('notice', $this->__('The company has been marked as connected to this application')); 
    109109      $this->redirect('@application_page?slug='.$this->application->getSlug()); 
    110110    } 
     
    121121    if ($this->application->hasDeveloper($this->getUser()->getId())) 
    122122    { 
    123       $this->setFlash('warning', $this->__('This person is already related to this application')); 
     123      $this->getUser()->setFlash('warning', $this->__('This person is already related to this application')); 
    124124      $this->redirect('@application_page?slug='.$this->application->getSlug()); 
    125125    } 
     
    135135      parent::purgeObjectRelatedCache($this->connection); 
    136136 
    137       $this->setFlash('notice', $this->__('You have been marked as implied with this application')); 
     137      $this->getUser()->setFlash('notice', $this->__('You have been marked as implied with this application')); 
    138138      $this->redirect('@application_page?slug='.$this->application->getSlug()); 
    139139    } 
     
    147147    if (!$this->getUser()->isAdmin() && $this->getUser()->getId() != $this->application->getSubmitterId()) 
    148148    { 
    149       $this->setFlash('warning', $this->__('You are not allowed to delete this application')); 
     149      $this->getUser()->setFlash('warning', $this->__('You are not allowed to delete this application')); 
    150150    } 
    151151    else 
     
    153153      parent::purgeObjectRelatedCache($this->application); 
    154154      $this->application->delete(); 
    155       $this->setFlash('notice', $this->__('Application has been deleted')); 
     155      $this->getUser()->setFlash('notice', $this->__('Application has been deleted')); 
    156156    } 
    157157    $this->redirect('@application_home'); 
     
    257257    $this->application->save(); 
    258258    parent::purgeHomepage(); 
    259     $this->setFlash('notice', $this->__('Application has been promoted on homepage')); 
     259    $this->getUser()->setFlash('notice', $this->__('Application has been promoted on homepage')); 
    260260    $this->redirect('@application_page?slug='.$this->application->getSlug()); 
    261261  } 
     
    367367    { 
    368368      $this->getRequest()->setError('errors', $this->__('Unable to save this record')); 
    369       sfLogger::getInstance()->err('Blocking error at application save time: '.$e->getMessage()); 
     369      sfContext::getInstance()->getLogger()->err('Blocking error at application save time: '.$e->getMessage()); 
    370370      return false; 
    371371    } 
     
    395395    { 
    396396      $this->getRequest()->setError('errors', $this->__('Unable to save this relation')); 
    397       sfLogger::getInstance()->err('Blocking error at ApplicationCompany save time: '.$e->getMessage()); 
     397      sfContext::getInstance()->getLogger()->err('Blocking error at ApplicationCompany save time: '.$e->getMessage()); 
    398398    } 
    399399  } 
     
    422422    { 
    423423      $this->getRequest()->setError('errors', $this->__('Unable to save this relation')); 
    424       sfLogger::getInstance()->err('Blocking error at ApplicationDeveloper save time: '.$e->getMessage()); 
     424      sfContext::getInstance()->getLogger()->err('Blocking error at ApplicationDeveloper save time: '.$e->getMessage()); 
    425425    } 
    426426  } 
  • trunk/apps/main/modules/blog_admin/actions/actions.class.php

    r2 r48  
    1616      $this->updateBlogPostFromRequest(); 
    1717      $this->saveBlogPost($this->blog_post); 
    18       $this->setFlash('notice', 'Your modifications have been saved'); 
     18      $this->getUser()->setFlash('notice', 'Your modifications have been saved'); 
    1919       
    2020      $cacheManager = $this->getContext()->getViewCacheManager(); 
  • trunk/apps/main/modules/companies/actions/actions.class.php

    r2 r48  
    1616      $this->updateFromRequest(); 
    1717      parent::purgeObjectRelatedCache($this->company); 
    18       $this->setFlash('notice', $this->__('Company added')); 
     18      $this->getUser()->setFlash('notice', $this->__('Company added')); 
    1919      $this->getUser()->setAttribute('from_company_creation', true, 'symfonians'); 
    2020      $this->redirect('@company_connect_as_member?slug='.$this->company->getSlug()); 
     
    2828    if (!$this->getUser()->isAdmin() && $this->company->getSubmitterId() != $this->getUser()->getId()) 
    2929    { 
    30       $this->setFlash('warning', $this->__('You are not allowed to edit this record')); 
     30      $this->getUser()->setFlash('warning', $this->__('You are not allowed to edit this record')); 
    3131      $this->redirect('@company_page?slug='.$this->company->getSlug()); 
    3232    } 
     
    3636      $this->updateFromRequest(); 
    3737      parent::purgeObjectRelatedCache($this->company); 
    38       $this->setFlash('notice', $this->__('Company updated')); 
     38      $this->getUser()->setFlash('notice', $this->__('Company updated')); 
    3939      $this->redirect('@company_page?slug='.$this->company->getSlug()); 
    4040    } 
     
    4949    if ($this->getUser()->getId() != $this->connection->getUserId()) 
    5050    { 
    51       $this->setFlash('warning', $this->__('You are not allowed to edit this record')); 
     51      $this->getUser()->setFlash('warning', $this->__('You are not allowed to edit this record')); 
    5252      $this->redirect('@company_page?slug='.$this->company->getSlug()); 
    5353    } 
     
    5757      $this->updateConnectionFromRequest(); 
    5858      parent::purgeObjectRelatedCache($this->company); 
    59       $this->setFlash('notice', $this->__('Your connection informations has been updated')); 
     59      $this->getUser()->setFlash('notice', $this->__('Your connection informations has been updated')); 
    6060      $this->redirect('@company_page?slug='.$this->company->getSlug()); 
    6161    } 
     
    8484      $this->updateConnectionFromRequest(); 
    8585      parent::purgeObjectRelatedCache($this->connection); 
    86       $this->setFlash('notice', $this->__('Your connection informations has been added')); 
     86      $this->getUser()->setFlash('notice', $this->__('Your connection informations has been added')); 
    8787      $this->redirect('@company_page?slug='.$this->company->getSlug()); 
    8888    } 
     
    9898    if (!$this->company->getAllowContact()) 
    9999    { 
    100       $this->setFlash('warning', $this->__('You are not allowed to contact this company')); 
     100      $this->getUser()->setFlash('warning', $this->__('You are not allowed to contact this company')); 
    101101      $this->redirect('@company_page?slug='.$this->company->getSlug()); 
    102102    } 
     
    117117        return sfView::SUCCESS; 
    118118      } 
    119       $this->setFlash('notice', $this->__('Your message has been sent to %company%', 
     119      $this->getUser()->setFlash('notice', $this->__('Your message has been sent to %company%', 
    120120                                          array('%company%' => $this->company->getName()))); 
    121121      $this->redirect('@company_page?slug='.$this->company->getSlug()); 
     
    128128    if (!$this->getUser()->isAdmin() && $this->getUser()->getId() != $this->company->getSubmitterId()) 
    129129    { 
    130       $this->setFlash('warning', $this->__('You are not allowed to delete this company')); 
     130      $this->getUser()->setFlash('warning', $this->__('You are not allowed to delete this company')); 
    131131    } 
    132132    else 
     
    134134      parent::purgeObjectRelatedCache($this->company); 
    135135      $this->company->delete(); 
    136       $this->setFlash('notice', $this->__('Company has been deleted')); 
     136      $this->getUser()->setFlash('notice', $this->__('Company has been deleted')); 
    137137    } 
    138138    $this->redirect('@companies_home'); 
     
    301301    { 
    302302      $this->getRequest()->setError('errors', $this->__('Unable to save this record')); 
    303       sfLogger::getInstance()->err('Blocking error at company save time: '.$e->getMessage()); 
     303      sfContext::getInstance()->getLogger()->err('Blocking error at company save time: '.$e->getMessage()); 
    304304      return false; 
    305305    } 
     
    327327    { 
    328328      $this->getRequest()->setError('errors', $this->__('Unable to save this relation')); 
    329       sfLogger::getInstance()->err('Blocking error at relation save time: '.$e->getMessage()); 
     329      sfContext::getInstance()->getLogger()->err('Blocking error at relation save time: '.$e->getMessage()); 
    330330      return false; 
    331331    } 
  • trunk/apps/main/modules/events/actions/actions.class.php

    r2 r48  
    1414    $this->forward404Unless($event, 'event not found'); 
    1515    $event->delete(); 
    16     $this->setFlash('notice', $this->__('Event deleted')); 
     16    $this->getUser()->setFlash('notice', $this->__('Event deleted')); 
    1717    $redirect = $this->getRequest()->getReferer(); 
    1818    $this->redirect($redirect ? $redirect : '@event_home'); 
  • trunk/apps/main/modules/jobs/actions/actions.class.php

    r43 r48  
    1616      $this->updateFromRequest(); 
    1717      parent::purgeObjectRelatedCache($this->job); 
    18       $this->setFlash('notice', $this->getI18N()->__('Job offer published')); 
     18      $this->getUser()->setFlash('notice', $this->getI18N()->__('Job offer published')); 
    1919      $this->redirect('@job_page?slug='.$this->job->getSlug()); 
    2020    } 
     
    2727    if (!$this->getUser()->isAdmin() && $this->job->getContactId() != $this->getUser()->getId()) 
    2828    { 
    29       $this->setFlash('warning', $this->getI18N()->__('You are not allowed to edit this record')); 
     29      $this->getUser()->setFlash('warning', $this->getI18N()->__('You are not allowed to edit this record')); 
    3030      $this->redirect('@job_page?slug='.$this->job->getSlug()); 
    3131    } 
     
    3535      $this->updateFromRequest(); 
    3636      parent::purgeObjectRelatedCache($this->job); 
    37       $this->setFlash('notice', $this->getI18N()->__('Job offer has been updated')); 
     37      $this->getUser()->setFlash('notice', $this->getI18N()->__('Job offer has been updated')); 
    3838      $this->redirect('@job_page?slug='.$this->job->getSlug()); 
    3939    } 
     
    4848    if (!is_null($this->job->getExpiresAt()) && $this->job->getExpiresAt(null) < time()) 
    4949    { 
    50       $this->setFlash('warning', $this->getI18N()->__('This job offer is perempted')); 
     50      $this->getUser()->setFlash('warning', $this->getI18N()->__('This job offer is perempted')); 
    5151    } 
    5252  } 
     
    5757    if (!$this->getUser()->isAdmin() && $this->getUser()->getId() != $this->job->getContactId()) 
    5858    { 
    59       $this->setFlash('warning', $this->getI18N()->__('You are not allowed to delete this job offer')); 
     59      $this->getUser()->setFlash('warning', $this->getI18N()->__('You are not allowed to delete this job offer')); 
    6060    } 
    6161    else 
     
    6363      parent::purgeObjectRelatedCache($this->job); 
    6464      $this->job->delete(); 
    65       $this->setFlash('notice', $this->getI18N()->__('Job offer has been deleted')); 
     65      $this->getUser()->setFlash('notice', $this->getI18N()->__('Job offer has been deleted')); 
    6666    } 
    6767    $this->redirect('@jobs_home'); 
     
    245245    { 
    246246      $this->getRequest()->setError('errors', $this->getI18N()->__('Unable to save this record')); 
    247       sfLogger::getInstance()->err('Blocking error at job save time: '.$e->getMessage()); 
     247      sfContext::getInstance()->getLogger()->err('Blocking error at job save time: '.$e->getMessage()); 
    248248      return sfView::SUCCESS; 
    249249    } 
  • trunk/apps/main/modules/people/actions/actions.class.php

    r2 r48  
    1515    if (!$this->recipient->getAllowContact(true)) 
    1616    { 
    17       $this->setFlash('warning',$this->__('You are not allowed to contact this user')); 
     17      $this->getUser()->setFlash('warning',$this->__('You are not allowed to contact this user')); 
    1818      $this->redirect('@person_page?username='.$this->recipient->getUsername()); 
    1919    } 
     
    3131                                          'reply-to'  => array('address' => $user->getEmail(), 
    3232                                                               'name'    => $user->getDisplayName()))); 
    33       $this->setFlash('notice', $this->__('Your message has been sent to %person%', 
     33      $this->getUser()->setFlash('notice', $this->__('Your message has been sent to %person%', 
    3434                                          array('%person%' => $this->recipient->getDisplayName()))); 
    3535      $this->redirect('@person_page?username='.$this->recipient->getUsername()); 
     
    6868    if (!$this->getUser()->isAdmin()) 
    6969    { 
    70       $this->setFlash('warning',$this->__('You are not allowed to delete this account')); 
     70      $this->getUser()->setFlash('warning',$this->__('You are not allowed to delete this account')); 
    7171    } 
    7272    else 
     
    7575      parent::purgeObjectRelatedCache($this->user); 
    7676      $this->user->delete(); 
    77       $this->setFlash('notice',$this->__('Member account has been deleted')); 
     77      $this->getUser()->setFlash('notice',$this->__('Member account has been deleted')); 
    7878    } 
    7979    $this->redirect('@people_home'); 
     
    151151    { 
    152152      $recommendation->delete(); 
    153       $this->setFlash('notice', $this->__('The recommendation has been deleted')); 
     153      $this->getUser()->setFlash('notice', $this->__('The recommendation has been deleted')); 
    154154    } 
    155155    else 
    156156    { 
    157       $this->setFlash('warning',$this->__('You are not allowed to delete this recommendation')); 
     157      $this->getUser()->setFlash('warning',$this->__('You are not allowed to delete this recommendation')); 
    158158    } 
    159159    $this->redirect('@person_page?username='.$this->getRequestParameter('to_username')); 
     
    166166    if ($this->user->getId() == $this->getUser()->getId()) 
    167167    { 
    168       $this->setFlash('warning',$this->__('You cannot recommend yourself ;)')); 
     168      $this->getUser()->setFlash('warning',$this->__('You cannot recommend yourself ;)')); 
    169169      $this->redirect('@person_page?username='.$this->user->getUsername()); 
    170170    } 
     
    207207        } 
    208208 
    209         $this->setFlash('notice', $message); 
     209        $this->getUser()->setFlash('notice', $message); 
    210210        $this->redirect('@person_page?username='.$this->user->getUsername()); 
    211211      } 
     
    217217      { 
    218218        $this->getRequest()->setError('errors',$this->__('Unable to save this record')); 
    219         sfLogger::getInstance()->err('Blocking error at recommendation save time: '.$e->getMessage()); 
     219        sfContext::getInstance()->getLogger()->err('Blocking error at recommendation save time: '.$e->getMessage()); 
    220220        return sfView::SUCCESS; 
    221221      } 
  • trunk/apps/main/modules/sfGuardAuth/actions/actions.class.php

    r2 r48  
    2121    try 
    2222    { 
    23       $this->setFlash('notice', $this->__('Your account has been activated. You can now log in using the username and password you provided at registration time.')); 
     23      $this->getUser()->setFlash('notice', $this->__('Your account has been activated. You can now log in using the username and password you provided at registration time.')); 
    2424      $this->getUser()->setAttribute('redirect_after_login', '@user_profile'); 
    2525      $this->redirect('@sf_guard_signin'); 
     
    3232    { 
    3333      $this->getRequest()->setError('errors', $this->__('Unable to activate your account')); 
    34       sfLogger::getInstance()->err('Blocking error at account activation time: '.$e->getMessage()); 
     34      sfContext::getInstance()->getLogger()->err('Blocking error at account activation time: '.$e->getMessage()); 
    3535      return sfView::SUCCESS; 
    3636    } 
     
    4545      $user->setPassword($password); 
    4646      $user->save(); 
    47       $this->setFlash('notice', $this->__('Your password has been changed')); 
     47      $this->getUser()->setFlash('notice', $this->__('Your password has been changed')); 
    4848      $this->redirect('@user_profile'); 
    4949    } 
     
    6767    else 
    6868    { 
    69       sfLogger::getInstance()->err('Unable to remove user avatar'); 
     69      sfContext::getInstance()->getLogger()->err('Unable to remove user avatar'); 
    7070      return $this->renderText($this->__('Picture deletion failed')); 
    7171    } 
     
    9393        return sfView::SUCCESS; 
    9494      } 
    95       $this->setFlash('notice', $this->__('A new password has been emailed to %email%', 
     95      $this->getUser()->setFlash('notice', $this->__('A new password has been emailed to %email%', 
    9696                                          array('%email%' => $email))); 
    9797      $this->redirect('@sf_guard_signin'); 
     
    168168      $this->user->save(); 
    169169      $this->purgePersonRelatedCache($this->user); 
    170       $this->setFlash('notice', $this->__('Your profile has been updated')); 
     170      $this->getUser()->setFlash('notice', $this->__('Your profile has been updated')); 
    171171      $this->redirect('@user_profile'); 
    172172    } 
     
    178178    { 
    179179      $this->getRequest()->setError('errors', $this->__('Unable to save your profile')); 
    180       sfLogger::getInstance()->err('Blocking error at profile save time: '.$e->getMessage()); 
     180      sfContext::getInstance()->getLogger()->err('Blocking error at profile save time: '.$e->getMessage()); 
    181181      return sfView::SUCCESS; 
    182182    } 
     
    205205      } 
    206206      $this->user->save(); 
    207       $this->setFlash('notice', $this->__('Your skills have been updated')); 
     207      $this->getUser()->setFlash('notice', $this->__('Your skills have been updated')); 
    208208      $this->redirect('@user_profile_skills'); 
    209209    } 
     
    262262        return sfView::SUCCESS; 
    263263      } 
    264       $this->setFlash('notice', sfContext::getInstance()->getI18N() 
     264      $this->getUser()->setFlash('notice', sfContext::getInstance()->getI18N() 
    265265                      ->__('A confirmation mail has been sent to %mail%', 
    266266                           array('%mail%' => $user->getEmail()))); 
     
    274274    { 
    275275      $this->getRequest()->setError('errors', $this->__('Unable to register your account')); 
    276       sfLogger::getInstance()->err('Blocking error at account registration time: '.$e->getMessage()); 
     276      sfContext::getInstance()->getLogger()->err('Blocking error at account registration time: '.$e->getMessage()); 
    277277      return sfView::SUCCESS; 
    278278    } 
     
    305305        return sfView::SUCCESS; 
    306306      } 
    307       $this->setFlash('notice', $this->__('Your activation mail has been sent to '.$user->getEmail())); 
     307      $this->getUser()->setFlash('notice', $this->__('Your activation mail has been sent to '.$user->getEmail())); 
    308308      $this->redirect('@homepage'); 
    309309    } 
  • trunk/apps/main/modules/sfGuardAuth/lib/BasesfGuardAuthActions.class.php

    r2 r48  
    6666      } 
    6767       
    68       $routing = sfRouting::getInstance(); 
     68      $routing = sfContext::getInstance()->getRouting(); 
    6969      try 
    7070      { 
    7171        $controller = sfContext::getInstance()->getController(); 
    72         $uri = sfRouting::getInstance()->getCurrentInternalUri(true); 
     72        $uri = sfContext::getInstance()->getRouting()->getCurrentInternalUri(true); 
    7373        $redirect = $controller->genUrl($uri, true); 
    7474        $user->setAttribute('redirect_after_login', $redirect); 
     
    9595  { 
    9696    $this->getUser()->setAttribute('redirect_after_login',  
    97                                    sfRouting::getInstance()->getCurrentInternalUri(true)); 
     97                                   sfContext::getInstance()->getRouting()->getCurrentInternalUri(true)); 
    9898    $this->getResponse()->setStatusCode(403); 
    9999  } 
  • trunk/apps/main/modules/utils/actions/actions.class.php

    r2 r48  
    2525      } 
    2626 
    27       $this->setFlash('notice', $this->__('Your message has been sent')); 
     27      $this->getUser()->setFlash('notice', $this->__('Your message has been sent')); 
    2828      $this->forward('utils', 'contactSent'); 
    2929    } 
     
    9090    if (!$owner && !$this->getUser()->hasCredential('admin')) 
    9191    { 
    92       $this->setFlash('warning', $this->__('You do not own this connection')); 
     92      $this->getUser()->setFlash('warning', $this->__('You do not own this connection')); 
    9393      $this->redirect($redirect_route); 
    9494    } 
     
    9696    $connection->delete(); 
    9797    $this->forward404Unless($redirect_route); 
    98     $this->setFlash('notice', $this->__('The connection has been deleted')); 
     98    $this->getUser()->setFlash('notice', $this->__('The connection has been deleted')); 
    9999    $this->redirect($redirect_route); 
    100100  } 
  • trunk/apps/main/templates/_menu.php

    r2 r48  
    3333</ul> 
    3434 
    35 <?php echo form_tag('sfLucene/search', 'method=get class=search-controls id=search') ?> 
    36   <?php echo input_tag('query', $sf_params->get('query'), 'accesskey=q') ?> 
    37   <?php // if (has_search_categories()): ?> 
    38     <?php // include_search_categories() ?> 
    39   <?php //endif ?> 
    40   <?php echo submit_tag(__('Search'), 'accesskey=s') ?> 
     35<form action="<?php echo url_for('sfLucene/search') ?>" method="get" class="search-controls" id="search"> 
     36  <input type="text" name="query" accesskey="q" value="<?php echo $sf_params->get('query') ?>" /> 
     37  <input type="submit" value="<?php echo __('Search') ?>" accesskey="s" /> 
    4138  <?php if (sfConfig::get('app_lucene_advanced', true)): ?> 
    42     <?php echo submit_tag(__('Advanced'), 'accesskey=a') ?
     39    <input type="submit" value="<?php echo __('Advanced') ?>" accesskey="a" /
    4340  <?php endif ?> 
    44 <?php echo end_form() ?
     41</form
    4542 
    4643<div style="clear:both"></div> 
  • trunk/apps/main/templates/_messages.php

    r2 r48  
     1<?php /* 
    12<?php if ($sf_request->hasErrors()): ?> 
    23<div class="form-errors"> 
     
    910</div> 
    1011<?php endif; ?> 
    11 <?php if ($sf_flash->has('notice')): ?> 
     12<?php if ($sf_user->hasFlash('notice')): ?> 
    1213<p class="notice"> 
    13   <?php echo $sf_flash->get('notice') ?> 
     14  <?php echo $sf_user->getFlash('notice') ?> 
    1415</p> 
    1516<?php endif; ?> 
    16 <?php if ($sf_flash->has('warning')): ?> 
     17<?php if ($sf_user->hasFlash('warning')): ?> 
    1718<p class="warning"> 
    18   <?php echo $sf_flash->get('warning') ?> 
     19  <?php echo $sf_user->getFlash('warning') ?> 
    1920</p> 
    2021<?php endif; ?> 
     22*/ ?> 
  • trunk/apps/main/templates/layout.php

    r39 r48  
    4141    <div id="main"> 
    4242      <div class="inner"> 
    43         <?php echo $sf_data->getRaw('sf_content') ?> 
     43        <?php echo $sf_content ?> 
    4444      </div> 
    4545    </div> 
  • trunk/apps/main/templates/maps_layout.php

    r2 r48  
    3737    <div id="main"> 
    3838      <div class="inner"> 
    39         <?php echo $sf_data->getRaw('sf_content') ?> 
     39        <?php echo $sf_content ?> 
    4040      </div> 
    4141    </div> 
  • trunk/batch/post_load.php

    r2 r48  
    77 
    88// initialize database manager 
    9 $databaseManager = new sfDatabaseManager(); 
    10 $databaseManager->initialize(); 
     9$databaseManager = new sfDatabaseManager($configuration); 
     10$databaseManager->loadConfiguration(); 
    1111$con = Propel::getConnection(); 
    1212 
  • trunk/batch/reinit.sh

    r2 r48  
    11#!/bin/bash 
    22 
    3 php symfony propel-build-all 
    4 php symfony cc 
    5 php symfony propel-load-data main 
    6 php symfony fix-perm
     3php symfony propel:build-all 
     4php symfony cache:clear 
     5php symfony propel:data-load main 
     6php symfony project:permission
    77php ./batch/post_load.php 
    88 
  • trunk/batch/update_geolocalizations.php

    r2 r48  
    88 
    99// initialize database manager 
    10 $databaseManager = new sfDatabaseManager(); 
    11 $databaseManager->initialize(); 
     10$databaseManager = new sfDatabaseManager($configuration); 
     11$databaseManager->loadConfiguration(); 
    1212$con = Propel::getConnection(); 
    1313 
  • trunk/config/ProjectConfiguration.class.php

    r9 r48  
    11<?php 
    2 // symfony directories 
    3 $sf_symfony_lib_dir  = dirname(__FILE__).'/../lib/symfony'; 
    4 $sf_symfony_data_dir = dirname(__FILE__).'/../data/symfony'; 
     2require_once dirname(__FILE__).'/../lib/symfony/autoload/sfCoreAutoload.class.php'; 
     3sfCoreAutoload::register(); 
    54 
    6 // symfonians constants definition 
    7 if (!defined('SYMFONIANS_MAIN_DOMAIN')) 
     5class ProjectConfiguration extends sfProjectConfiguration 
    86{ 
    9   $main_host = 'symfonians.tld'; 
    10   if (array_key_exists('HTTP_HOST', $_SERVER)) 
     7  public function setup() 
    118  { 
    12     $host_parts = explode('.', $_SERVER['HTTP_HOST']); 
    13     $main_host = implode('.', array($host_parts[count($host_parts) -2], 
    14                                     $host_parts[count($host_parts) -1])); 
     9    // symfonians constants definition 
     10    if (!defined('SYMFONIANS_MAIN_DOMAIN')) 
     11    { 
     12      $main_host = 'symfonians.tld'; 
     13      if (array_key_exists('HTTP_HOST', $_SERVER)) 
     14      { 
     15        $host_parts = explode('.', $_SERVER['HTTP_HOST']); 
     16        $main_host = implode('.', array($host_parts[count($host_parts) -2], 
     17                                        $host_parts[count($host_parts) -1])); 
     18      } 
     19      define('SYMFONIANS_MAIN_DOMAIN', $main_host); 
     20    } 
    1521  } 
    16   define('SYMFONIANS_MAIN_DOMAIN', $main_host); 
    1722} 
  • trunk/lib/model/Application.php

    r2 r48  
    303303                            'sfPropelActAsTaggableBehavior')); 
    304304 
    305 sfLucenePropelBehavior::getInitializer()->setupModel('Application'); 
     305//sfLucenePropelBehavior::getInitializer()->setupModel('Application'); 
  • trunk/lib/model/BlogPost.php

    r2 r48  
    4949                            'sfPropelActAsTaggableBehavior')); 
    5050 
    51 sfLucenePropelBehavior::getInitializer()->setupModel('BlogPost'); 
     51//sfLucenePropelBehavior::getInitializer()->setupModel('BlogPost'); 
  • trunk/lib/model/Company.php

    r2 r48  
    251251                              array('location_getter' => 'getFullAddress'))); 
    252252 
    253 sfLucenePropelBehavior::getInitializer()->setupModel('Company'); 
     253//sfLucenePropelBehavior::getInitializer()->setupModel('Company'); 
  • trunk/lib/model/Event.php

    r2 r48  
    129129    if (!$this->getType()) 
    130130    { 
    131       sfLogger::getInstance()->err('No type specified for event'); 
     131      sfContext::getInstance()->getLogger()->err('No type specified for event'); 
    132132      return 0; 
    133133    } 
  • trunk/lib/model/Job.php

    r2 r48  
    9898      $this->getCompany()->setAllowContact(true); 
    9999      $this->getCompany()->save(); 
    100       sfLogger::getInstance()->info(sprintf('Company "%s" has now email contact enabled',  
     100      sfContext::getInstance()->getLogger()->info(sprintf('Company "%s" has now email contact enabled',  
    101101                                            $this->getCompany()->getName())); 
    102102    } 
     
    148148                              array('location_getter' => 'getPlace'))); 
    149149 
    150 sfLucenePropelBehavior::getInitializer()->setupModel('Job'); 
     150//sfLucenePropelBehavior::getInitializer()->setupModel('Job'); 
  • trunk/lib/model/LocalEvent.php

    r46 r48  
    5353                                    'permanent' => true))); 
    5454 
    55 sfLucenePropelBehavior::getInitializer()->setupModel('LocalEvent'); 
     55//sfLucenePropelBehavior::getInitializer()->setupModel('LocalEvent'); 
  • trunk/lib/model/PluginsfGuardUser.php

    r23 r48  
    771771 
    772772    parent::setKarma($karma_points); 
    773     sfLogger::getInstance()->info(sprintf('karmadebug: %s\'s karma updated to %d', 
     773    sfContext::getInstance()->getLogger()->info(sprintf('karmadebug: %s\'s karma updated to %d', 
    774774                                          $this->getUsername(), 
    775775                                          $karma_points)); 
     
    823823                            'sfPropelActAsTaggableBehavior')); 
    824824 
    825 sfLucenePropelBehavior::getInitializer()->setupModel('sfGuardUser'); 
     825//sfLucenePropelBehavior::getInitializer()->setupModel('sfGuardUser'); 
  • trunk/lib/symfonians/ImagesTools.class.php

    r2 r48  
    2323    $request = sfContext::getInstance()->getRequest(); 
    2424     
    25     sfLogger::getInstance()->info('{ImagesTools} Thumbnail creation parameters: '.var_export(func_get_args(), true)); 
     25    sfContext::getInstance()->getLogger()->info('{ImagesTools} Thumbnail creation parameters: '.var_export(func_get_args(), true)); 
    2626     
    2727    if (!$request->hasFiles()) 
     
    3232    if (!is_dir($destination_dir) && !@mkdir($destination_dir)) 
    3333    { 
    34       sfLogger::getInstance()->err('{ImagesTools} Cannot find nor create dir ' . $destination_dir); 
     34      sfContext::getInstance()->getLogger()->err('{ImagesTools} Cannot find nor create dir ' . $destination_dir); 
    3535      throw new sfException('{ImagesTools} Impossible to create directory'); 
    3636    } 
     
    7777    catch (Exception $e) 
    7878    { 
    79       sfLogger::getInstance()->err(sprintf('{ImagesTools} Error generating thumb from source "%s" to destination "%s": %s', $source_path, $destination, $e->getMessage())); 
     79      sfContext::getInstance()->getLogger()->err(sprintf('{ImagesTools} Error generating thumb from source "%s" to destination "%s": %s', $source_path, $destination, $e->getMessage())); 
    8080    } 
    8181  } 
  • trunk/plugins

    • Property svn:externals changed from
      sfPropelAlternativeSchemaPlugin http://svn.symfony-project.com/plugins/sfPropelAlternativeSchemaPlugin
      sfWebBrowserPlugin http://svn.symfony-project.com/plugins/sfWebBrowserPlugin
      sfPagerNavigationPlugin http://svn.symfony-project.com/plugins/sfPagerNavigationPlugin
      sfFeed2Plugin http://svn.symfony-project.com/plugins/sfFeed2Plugin
      sfPropelMigrationsLightPlugin -r7087 http://svn.symfony-project.com/plugins/sfPropelMigrationsLightPlugin/trunk/
      sfSwiftPlugin -r6447 http://svn.symfony-project.com/plugins/sfSwiftPlugin/trunk
      sfLucenePlugin -r7866 http://svn.symfony-project.com/plugins/sfLucenePlugin/branches/1.1
      sfGuardPlugin http://svn.symfony-project.com/plugins/sfGuardPlugin/branches/1.1
      to
      sfPropelAlternativeSchemaPlugin http://svn.symfony-project.com/plugins/sfPropelAlternativeSchemaPlugin
      sfWebBrowserPlugin http://svn.symfony-project.com/plugins/sfWebBrowserPlugin
      sfPagerNavigationPlugin http://svn.symfony-project.com/plugins/sfPagerNavigationPlugin
      sfFeed2Plugin http://svn.symfony-project.com/plugins/sfFeed2Plugin
      sfPropelMigrationsLightPlugin -r7087 http://svn.symfony-project.com/plugins/sfPropelMigrationsLightPlugin/trunk/
      sfSwiftPlugin -r6447 http://svn.symfony-project.com/plugins/sfSwiftPlugin/trunk
      sfLucenePlugin http://svn.symfony-project.com/plugins/sfLucenePlugin/branches/1.1
      sfGuardPlugin http://svn.symfony-project.com/plugins/sfGuardPlugin/branches/1.1
  • trunk/plugins/sfPropelActAsLocalizableBehaviorPlugin/lib/model/om/BasesfLocalization.php

    r2 r48  
    7373        { 
    7474 
    75                  
    76                  
    77                 if ($v !== null && !is_int($v) && is_numeric($v)) { 
     75                                                if ($v !== null && !is_int($v) && is_numeric($v)) { 
    7876                        $v = (int) $v; 
    7977                } 
     
    8987        { 
    9088 
    91                  
    92                  
    93                 if ($v !== null && !is_string($v)) { 
     89                                                if ($v !== null && !is_string($v)) { 
    9490                        $v = (string) $v;  
    9591                } 
     
    105101        { 
    106102 
    107                  
    108                  
    109                 if ($v !== null && !is_int($v) && is_numeric($v)) { 
     103                                                if ($v !== null && !is_int($v) && is_numeric($v)) { 
    110104                        $v = (int) $v; 
    111105                } 
  • trunk/plugins/sfPropelActAsLocalizableBehaviorPlugin/lib/model/om/BasesfLocalizationPeer.php

    r2 r48  
    5858        public static function getMapBuilder() 
    5959        { 
    60                 include_once 'plugins/sfPropelActAsLocalizableBehaviorPlugin/lib/model/map/sfLocalizationMapBuilder.php'; 
    6160                return BasePeer::getMapBuilder('plugins.sfPropelActAsLocalizableBehaviorPlugin.lib.model.map.sfLocalizationMapBuilder'); 
    6261        } 
     
    165164        { 
    166165 
    167     foreach (sfMixer::getCallables('BasesfLocalizationPeer:addDoSelectRS:addDoSelectRS') as $callable) 
     166    foreach (sfMixer::getCallables('BasesfLocalizationPeer:doSelectRS:doSelectRS') as $callable) 
    168167    { 
    169168      call_user_func($callable, 'BasesfLocalizationPeer', $criteria, $con); 
     
    200199                return $results; 
    201200        } 
     201 
     202  static public function getUniqueColumnNames() 
     203  { 
     204    return array(array('model_name', 'model_id')); 
     205  } 
    202206         
    203207        public static function getTableMap() 
     
    422426        } 
    423427} else { 
    424                         require_once 'plugins/sfPropelActAsLocalizableBehaviorPlugin/lib/model/map/sfLocalizationMapBuilder.php'; 
    425         Propel::registerMapBuilder('plugins.sfPropelActAsLocalizableBehaviorPlugin.lib.model.map.sfLocalizationMapBuilder'); 
     428                        Propel::registerMapBuilder('plugins.sfPropelActAsLocalizableBehaviorPlugin.lib.model.map.sfLocalizationMapBuilder'); 
    426429} 
  • trunk/plugins/sfPropelActAsTaggableBehaviorPlugin/lib/model/om/BaseTag.php

    r2 r48  
    4040        { 
    4141 
    42                  
    43                  
    44                 if ($v !== null && !is_int($v) && is_numeric($v)) { 
     42                                                if ($v !== null && !is_int($v) && is_numeric($v)) { 
    4543                        $v = (int) $v; 
    4644                } 
     
    5654        { 
    5755 
    58                  
    59                  
    60                 if ($v !== null && !is_string($v)) { 
     56                                                if ($v !== null && !is_string($v)) { 
    6157                        $v = (string) $v;  
    6258                } 
  • trunk/plugins/sfPropelActAsTaggableBehaviorPlugin/lib/model/om/BaseTagPeer.php

    r2 r48  
    4949        public static function getMapBuilder() 
    5050        { 
    51                 include_once 'plugins/sfPropelActAsTaggableBehaviorPlugin/lib/model/map/TagMapBuilder.php'; 
    5251                return BasePeer::getMapBuilder('plugins.sfPropelActAsTaggableBehaviorPlugin.lib.model.map.TagMapBuilder'); 
    5352        } 
     
    150149        { 
    151150 
    152     foreach (sfMixer::getCallables('BaseTagPeer:addDoSelectRS:addDoSelectRS') as $callable) 
     151    foreach (sfMixer::getCallables('BaseTagPeer:doSelectRS:doSelectRS') as $callable) 
    153152    { 
    154153      call_user_func($callable, 'BaseTagPeer', $criteria, $con); 
     
    185184                return $results; 
    186185        } 
     186 
     187  static public function getUniqueColumnNames() 
     188  { 
     189    return array(); 
     190  } 
    187191         
    188192        public static function getTableMap() 
     
    407411        } 
    408412} else { 
    409                         require_once 'plugins/sfPropelActAsTaggableBehaviorPlugin/lib/model/map/TagMapBuilder.php'; 
    410         Propel::registerMapBuilder('plugins.sfPropelActAsTaggableBehaviorPlugin.lib.model.map.TagMapBuilder'); 
     413                        Propel::registerMapBuilder('plugins.sfPropelActAsTaggableBehaviorPlugin.lib.model.map.TagMapBuilder'); 
    411414} 
  • trunk/plugins/sfPropelActAsTaggableBehaviorPlugin/lib/model/om/BaseTagging.php

    r2 r48  
    6262        { 
    6363 
    64                  
    65                  
    66                 if ($v !== null && !is_int($v) && is_numeric($v)) { 
     64                                                if ($v !== null && !is_int($v) && is_numeric($v)) { 
    6765                        $v = (int) $v; 
    6866                } 
     
    7876        { 
    7977 
    80                  
    81                  
    82                 if ($v !== null && !is_string($v)) { 
     78                                                if ($v !== null && !is_string($v)) { 
    8379                        $v = (string) $v;  
    8480                } 
     
    9490        { 
    9591 
    96                  
    97                  
    98                 if ($v !== null && !is_string($v)) { 
     92                                                if ($v !== null && !is_string($v)) { 
    9993                        $v = (string) $v;  
    10094                } 
     
    110104        { 
    111105 
    112                  
    113                  
    114                 if ($v !== null && !is_int($v) && is_numeric($v)) { 
     106                                                if ($v !== null && !is_int($v) && is_numeric($v)) { 
    115107                        $v = (int) $v; 
    116108                } 
  • trunk/plugins/sfPropelActAsTaggableBehaviorPlugin/lib/model/om/BaseTaggingPeer.php

    r2 r48  
    5555        public static function getMapBuilder() 
    5656        { 
    57                 include_once 'plugins/sfPropelActAsTaggableBehaviorPlugin/lib/model/map/TaggingMapBuilder.php'; 
    5857                return BasePeer::getMapBuilder('plugins.sfPropelActAsTaggableBehaviorPlugin.lib.model.map.TaggingMapBuilder'); 
    5958        } 
     
    160159        { 
    161160 
    162     foreach (sfMixer::getCallables('BaseTaggingPeer:addDoSelectRS:addDoSelectRS') as $callable) 
     161    foreach (sfMixer::getCallables('BaseTaggingPeer:doSelectRS:doSelectRS') as $callable) 
    163162    { 
    164163      call_user_func($callable, 'BaseTaggingPeer', $criteria, $con); 
     
    195194                return $results; 
    196195        } 
     196 
     197  static public function getUniqueColumnNames() 
     198  { 
     199    return array(); 
     200  } 
    197201         
    198202        public static function getTableMap() 
     
    417421        } 
    418422} else { 
    419                         require_once 'plugins/sfPropelActAsTaggableBehaviorPlugin/lib/model/map/TaggingMapBuilder.php'; 
    420         Propel::registerMapBuilder('plugins.sfPropelActAsTaggableBehaviorPlugin.lib.model.map.TaggingMapBuilder'); 
     423                        Propel::registerMapBuilder('plugins.sfPropelActAsTaggableBehaviorPlugin.lib.model.map.TaggingMapBuilder'); 
    421424} 
  • trunk/plugins/sfPropelActAsTaggableBehaviorPlugin/lib/sfPropelActAsTaggableBehavior.class.php

    r2 r48  
    5555    if ((!isset($object->_tags)) || ($object->_tags == null)) 
    5656    { 
    57       $object->_tags = new sfParameterHolder(); 
     57      $object->_tags = new sfNamespacedParameterHolder(); 
    5858    } 
    5959 
  • trunk/symfony

    r2 r48  
    11#!/usr/bin/env php 
    22<?php 
    3  
    4 /* 
    5  * This file is part of the symfony package. 
    6  * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com> 
    7  *  
    8  * For the full copyright and license information, please view the LICENSE 
    9  * file that was distributed with this source code. 
    10  */ 
    11  
    123chdir(dirname(__FILE__)); 
    13 include('config/config.php'); 
    14 include($sf_symfony_data_dir.'/bin/symfony.php'); 
     4require_once(dirname(__FILE__).'/config/ProjectConfiguration.class.php'); 
     5$configuration = new ProjectConfiguration(); 
     6include($configuration->getSymfonyLibDir().'/command/cli.php'); 
  • trunk/test/bootstrap/functional.php

    r2 r48  
    44 * This file is part of the symfony package. 
    55 * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com> 
    6  *  
     6 * 
    77 * For the full copyright and license information, please view the LICENSE 
    88 * file that was distributed with this source code. 
     
    1414  $traces = debug_backtrace(); 
    1515  $caller = $traces[0]; 
    16   $app = array_pop(explode(DIRECTORY_SEPARATOR, dirname($caller['file']))); 
     16 
     17  $dirPieces = explode(DIRECTORY_SEPARATOR, dirname($caller['file'])); 
     18  $app = array_pop($dirPieces); 
    1719} 
    1820 
    19 // define symfony constant 
    20 define('SF_ROOT_DIR',    realpath(dirname(__FILE__).'/../..')); 
    21 define('SF_APP',         $app); 
    22 define('SF_ENVIRONMENT', 'test'); 
    23 define('SF_DEBUG',       true); 
    24  
    25 // initialize symfony 
    26 require_once(SF_ROOT_DIR.DIRECTORY_SEPARATOR.'apps'.DIRECTORY_SEPARATOR.SF_APP.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'config.php'); 
     21require_once dirname(__FILE__).'/../../config/ProjectConfiguration.class.php'; 
     22$configuration = ProjectConfiguration::getApplicationConfiguration($app, 'test', isset($debug) ? $debug : true); 
     23sfContext::createInstance($configuration); 
    2724 
    2825// remove all cache 
    29 sfToolkit::clearDirectory(sfConfig::get('sf_cache_dir')); 
     26sfToolkit::clearDirectory(sfConfig::get('sf_app_cache_dir')); 
  • trunk/test/bootstrap/unit.php

    r2 r48  
    1010 
    1111$_test_dir = realpath(dirname(__FILE__).'/..'); 
    12 define('SF_ROOT_DIR', realpath($_test_dir.'/..')); 
    1312 
    14 // symfony directories 
    15 include(SF_ROOT_DIR.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'config.php'); 
    16  
    17 require_once($sf_symfony_lib_dir.'/vendor/lime/lime.php'); 
     13require_once(dirname(__FILE__).'/../../config/ProjectConfiguration.class.php'); 
     14$configuration = new ProjectConfiguration(realpath($_test_dir.'/..')); 
     15include($configuration->getSymfonyLibDir().'/vendor/lime/lime.php'); 
  • trunk/web/index.php

    r2 r48  
    11<?php 
    22 
    3 define('SF_ROOT_DIR',    realpath(dirname(__FILE__).'/..')); 
    4 define('SF_APP',         'main'); 
    5 define('SF_ENVIRONMENT', 'prod'); 
    6 define('SF_DEBUG',       false); 
     3require_once(dirname(__FILE__).'/../config/ProjectConfiguration.class.php'); 
    74 
    8 require_once(SF_ROOT_DIR.DIRECTORY_SEPARATOR.'apps'.DIRECTORY_SEPARATOR.SF_APP.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'config.php'); 
    9  
    10 sfContext::getInstance()->getController()->dispatch(); 
     5$configuration = ProjectConfiguration::getApplicationConfiguration('main', 'prod', false); 
     6sfContext::createInstance($configuration)->dispatch(); 
  • trunk/web/main_dev.php

    r2 r48  
    11<?php 
    22 
    3 define('SF_ROOT_DIR',    realpath(dirname(__FILE__).'/..')); 
    4 define('SF_APP',         'main'); 
    5 define('SF_ENVIRONMENT', 'dev'); 
    6 define('SF_DEBUG',       true); 
     3require_once(dirname(__FILE__).'/../config/ProjectConfiguration.class.php'); 
    74 
    8 require_once(SF_ROOT_DIR.DIRECTORY_SEPARATOR.'apps'.DIRECTORY_SEPARATOR.SF_APP.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'config.php'); 
    9  
    10 sfContext::getInstance()->getController()->dispatch(); 
     5$configuration = ProjectConfiguration::getApplicationConfiguration('main', 'dev', true); 
     6sfContext::createInstance($configuration)->dispatch(); 
  • trunk/web/main_staging.php

    r2 r48  
    11<?php 
    22 
    3 define('SF_ROOT_DIR',    realpath(dirname(__FILE__).'/..')); 
    4 define('SF_APP',         'main'); 
    5 define('SF_ENVIRONMENT', 'staging'); 
    6 define('SF_DEBUG',       true); 
     3require_once(dirname(__FILE__).'/../config/ProjectConfiguration.class.php'); 
    74 
    8 require_once(SF_ROOT_DIR.DIRECTORY_SEPARATOR.'apps'.DIRECTORY_SEPARATOR.SF_APP.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'config.php'); 
    9  
    10 sfContext::getInstance()->getController()->dispatch(); 
     5$configuration = ProjectConfiguration::getApplicationConfiguration('main', 'staging', true); 
     6sfContext::createInstance($configuration)->dispatch();