Changeset 48

Show
Ignore:
Timestamp:
05/24/08 13:34:40
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