Changeset 48
- Timestamp:
- 05/24/08 13:34:40
- Files:
-
- trunk/apps/main/config/factories.yml (modified) (3 diffs)
- trunk/apps/main/config/filters.yml (modified) (2 diffs)
- trunk/apps/main/config/i18n.yml (deleted)
- trunk/apps/main/config/logging.yml (deleted)
- trunk/apps/main/config/mainConfiguration.class.php (added)
- trunk/apps/main/config/settings.yml (modified) (6 diffs)
- trunk/apps/main/lib/i18nSubdomainFilter.class.php (modified) (1 diff)
- trunk/apps/main/lib/myActions.class.php (modified) (1 diff)
- trunk/apps/main/modules/applications/actions/actions.class.php (modified) (15 diffs)
- trunk/apps/main/modules/blog_admin/actions/actions.class.php (modified) (1 diff)
- trunk/apps/main/modules/companies/actions/actions.class.php (modified) (12 diffs)
- trunk/apps/main/modules/events/actions/actions.class.php (modified) (1 diff)
- trunk/apps/main/modules/jobs/actions/actions.class.php (modified) (7 diffs)
- trunk/apps/main/modules/people/actions/actions.class.php (modified) (8 diffs)
- trunk/apps/main/modules/sfGuardAuth/actions/actions.class.php (modified) (11 diffs)
- trunk/apps/main/modules/sfGuardAuth/lib/BasesfGuardAuthActions.class.php (modified) (2 diffs)
- trunk/apps/main/modules/utils/actions/actions.class.php (modified) (3 diffs)
- trunk/apps/main/templates/_menu.php (modified) (1 diff)
- trunk/apps/main/templates/_messages.php (modified) (2 diffs)
- trunk/apps/main/templates/layout.php (modified) (1 diff)
- trunk/apps/main/templates/maps_layout.php (modified) (1 diff)
- trunk/batch/post_load.php (modified) (1 diff)
- trunk/batch/reinit.sh (modified) (1 diff)
- trunk/batch/update_geolocalizations.php (modified) (1 diff)
- trunk/config/ProjectConfiguration.class.php (moved) (moved from trunk/config/config.php) (1 diff)
- trunk/data/environment.migrated (added)
- trunk/lib/form (added)
- trunk/lib/form/ActivationForm.class.php (added)
- trunk/lib/form/ApplicationCompanyForm.class.php (added)
- trunk/lib/form/ApplicationDeveloperForm.class.php (added)
- trunk/lib/form/ApplicationForm.class.php (added)
- trunk/lib/form/BaseFormPropel.class.php (added)
- trunk/lib/form/BlogPostForm.class.php (added)
- trunk/lib/form/CompanyForm.class.php (added)
- trunk/lib/form/CompanyPersonForm.class.php (added)
- trunk/lib/form/EventForm.class.php (added)
- trunk/lib/form/JobForm.class.php (added)
- trunk/lib/form/LocalEventForm.class.php (added)
- trunk/lib/form/RecommendationForm.class.php (added)
- trunk/lib/form/base (added)
- trunk/lib/form/base/BaseActivationForm.class.php (added)
- trunk/lib/form/base/BaseApplicationCompanyForm.class.php (added)
- trunk/lib/form/base/BaseApplicationDeveloperForm.class.php (added)
- trunk/lib/form/base/BaseApplicationForm.class.php (added)
- trunk/lib/form/base/BaseBlogPostForm.class.php (added)
- trunk/lib/form/base/BaseCompanyForm.class.php (added)
- trunk/lib/form/base/BaseCompanyPersonForm.class.php (added)
- trunk/lib/form/base/BaseEventForm.class.php (added)
- trunk/lib/form/base/BaseJobForm.class.php (added)
- trunk/lib/form/base/BaseLocalEventForm.class.php (added)
- trunk/lib/form/base/BaseRecommendationForm.class.php (added)
- trunk/lib/model/Application.php (modified) (1 diff)
- trunk/lib/model/BlogPost.php (modified) (1 diff)
- trunk/lib/model/Company.php (modified) (1 diff)
- trunk/lib/model/Event.php (modified) (1 diff)
- trunk/lib/model/Job.php (modified) (2 diffs)
- trunk/lib/model/LocalEvent.php (modified) (1 diff)
- trunk/lib/model/PluginsfGuardUser.php (modified) (2 diffs)
- trunk/lib/symfonians/ImagesTools.class.php (modified) (3 diffs)
- trunk/plugins (modified) (1 prop)
- trunk/plugins/sfPropelActAsLocalizableBehaviorPlugin/lib/form (added)
- trunk/plugins/sfPropelActAsLocalizableBehaviorPlugin/lib/form/base (added)
- trunk/plugins/sfPropelActAsLocalizableBehaviorPlugin/lib/form/base/BasesfLocalizationForm.class.php (added)
- trunk/plugins/sfPropelActAsLocalizableBehaviorPlugin/lib/form/sfLocalizationForm.class.php (added)
- trunk/plugins/sfPropelActAsLocalizableBehaviorPlugin/lib/model/map/sfLocalizationMapBuilder.php (modified) (previous)
- trunk/plugins/sfPropelActAsLocalizableBehaviorPlugin/lib/model/om/BasesfLocalization.php (modified) (3 diffs)
- trunk/plugins/sfPropelActAsLocalizableBehaviorPlugin/lib/model/om/BasesfLocalizationPeer.php (modified) (4 diffs)
- trunk/plugins/sfPropelActAsTaggableBehaviorPlugin/lib/form (added)
- trunk/plugins/sfPropelActAsTaggableBehaviorPlugin/lib/form/TagForm.class.php (added)
- trunk/plugins/sfPropelActAsTaggableBehaviorPlugin/lib/form/TaggingForm.class.php (added)
- trunk/plugins/sfPropelActAsTaggableBehaviorPlugin/lib/form/base (added)
- trunk/plugins/sfPropelActAsTaggableBehaviorPlugin/lib/form/base/BaseTagForm.class.php (added)
- trunk/plugins/sfPropelActAsTaggableBehaviorPlugin/lib/form/base/BaseTaggingForm.class.php (added)
- trunk/plugins/sfPropelActAsTaggableBehaviorPlugin/lib/model/map/TagMapBuilder.php (modified) (previous)
- trunk/plugins/sfPropelActAsTaggableBehaviorPlugin/lib/model/map/TaggingMapBuilder.php (modified) (previous)
- trunk/plugins/sfPropelActAsTaggableBehaviorPlugin/lib/model/om/BaseTag.php (modified) (2 diffs)
- trunk/plugins/sfPropelActAsTaggableBehaviorPlugin/lib/model/om/BaseTagPeer.php (modified) (4 diffs)
- trunk/plugins/sfPropelActAsTaggableBehaviorPlugin/lib/model/om/BaseTagging.php (modified) (4 diffs)
- trunk/plugins/sfPropelActAsTaggableBehaviorPlugin/lib/model/om/BaseTaggingPeer.php (modified) (4 diffs)
- trunk/plugins/sfPropelActAsTaggableBehaviorPlugin/lib/sfPropelActAsTaggableBehavior.class.php (modified) (1 diff)
- trunk/symfony (modified) (1 diff)
- trunk/test/bootstrap/functional.php (modified) (2 diffs)
- trunk/test/bootstrap/unit.php (modified) (1 diff)
- trunk/web/index.php (modified) (1 diff)
- trunk/web/main_dev.php (modified) (1 diff)
- trunk/web/main_staging.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/apps/main/config/factories.yml
r41 r48 1 prod: 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 1 12 cli: 2 13 controller: … … 12 23 13 24 all: 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% 14 39 storage: 15 40 class: sfSessionStorage … … 18 43 session_cookie_domain: .<?php echo SYMFONIANS_MAIN_DOMAIN."\n" ?> 19 44 session_cookie_lifetime: <?php echo (30 * 86400)."\n" ?> 20 21 # view_cache:22 # class: sfSQLiteCache23 # param:24 # automaticCleaningFactor: 025 # database: %SF_ROOT_DIR%/cache/cache.db26 27 # controller:28 # class: sfFrontWebController29 #30 # request:31 # class: sfWebRequest32 #33 # response:34 # class: sfWebResponse35 #36 # user:37 # class: myUser38 #39 # storage:40 # class: sfSessionStorage41 # param:42 # session_name: symfony43 #44 # view_cache:45 # class: sfFileCache46 # param:47 # automaticCleaningFactor: 048 # cacheDir: %SF_TEMPLATE_CACHE_DIR%trunk/apps/main/config/filters.yml
r2 r48 4 4 rendering: ~ 5 5 6 web_debug: ~7 8 6 security: ~ 9 7 10 8 rememberFilter: 11 9 class: myRememberFilter 12 13 csrf:14 class: sfCSRFFilter15 param:16 secret: 5ymf0n14n517 10 18 11 conditionalCache: … … 26 19 common: ~ 27 20 28 flash: ~29 30 21 execution: ~ trunk/apps/main/config/settings.yml
r2 r48 1 1 prod: 2 2 .settings: 3 logging_enabled: on 3 4 no_script_name: on 4 5 cache: on … … 7 8 dev: 8 9 .settings: 9 # E_ALL | E_STRICT = 4095 10 error_reporting: 4095 10 error_reporting: <?php echo E_ALL | E_STRICT."\n" ?> 11 11 web_debug: on 12 12 cache: off … … 17 17 search: 18 18 .settings: 19 # E_ALL | E_STRICT = 4095 20 error_reporting: 4095 19 error_reporting: <?php echo E_ALL | E_STRICT."\n" ?> 21 20 web_debug: off 22 21 cache: off … … 27 26 staging: 28 27 .settings: 29 # E_ALL | E_STRICT = 4095 30 error_reporting: 4095 28 error_reporting: <?php echo E_ALL | E_STRICT."\n" ?> 31 29 web_debug: on 32 30 cache: on … … 37 35 test: 38 36 .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" ?> 41 38 cache: on 42 39 web_debug: off … … 65 62 66 63 .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 108 69 standard_helpers: [Partial, Cache, Form, MoreForm, I18N, Button, ObjectUrl, Breadcrumb, Image, Event, MoreDate] 109 #110 # # Activated modules from plugins or from the symfony core111 70 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 9 9 * @param int $level 10 10 */ 11 public function log($message, $level = SF_LOG_DEBUG)11 public function log($message, $level = sfLogger::DEBUG) 12 12 { 13 sf Logger::getInstance()->log('{i18nSubdomainFilter} '.$message, $level);13 sfContext::getInstance()->getLogger()->log('{i18nSubdomainFilter} '.$message, $level); 14 14 } 15 15 trunk/apps/main/lib/myActions.class.php
r37 r48 241 241 catch (sfException $e) 242 242 { 243 $this-> setFlash('warning', $e->getMessage());243 $this->getUser()->setFlash('warning', $e->getMessage()); 244 244 $this->forward404(sprintf('User "%s" is flooding by mail', $this->getUser()->getGuardUser()->getUsername())); 245 245 } trunk/apps/main/modules/applications/actions/actions.class.php
r10 r48 16 16 $this->updateFromRequest(); 17 17 parent::purgeObjectRelatedCache($this->application); 18 $this-> setFlash('notice', $this->__('Application added'));18 $this->getUser()->setFlash('notice', $this->__('Application added')); 19 19 $this->getUser()->setAttribute('from_app_creation', true, 'symfonians'); 20 20 $this->redirect('@application_connect_as_developer?slug='.$this->application->getSlug()); … … 33 33 if (!$this->getUser()->isAdmin() && $this->application->getSubmitterId() != $this->getUser()->getId()) 34 34 { 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')); 36 36 $this->redirect('@application_page?slug='.$this->application->getSlug()); 37 37 } … … 41 41 $this->updateFromRequest(); 42 42 parent::purgeObjectRelatedCache($this->application); 43 $this-> setFlash('notice', $this->__('Application updated'));43 $this->getUser()->setFlash('notice', $this->__('Application updated')); 44 44 $this->getUser()->setAttribute('from_app_creation', true, 'symfonians'); 45 45 $this->redirect('@application_page?slug='.$this->application->getSlug()); … … 57 57 $this->updateCompanyConnectionFromRequest(); 58 58 parent::purgeObjectRelatedCache($this->connection); 59 $this-> setFlash('notice', $this->__('Connection updated'));59 $this->getUser()->setFlash('notice', $this->__('Connection updated')); 60 60 $this->redirect('@application_page?slug='.$this->application->getSlug()); 61 61 } … … 77 77 $this->updateDeveloperConnectionFromRequest(); 78 78 parent::purgeObjectRelatedCache($this->connection); 79 $this-> setFlash('notice', $this->__('Connection updated'));79 $this->getUser()->setFlash('notice', $this->__('Connection updated')); 80 80 $this->redirect('@application_page?slug='.$this->application->getSlug()); 81 81 } … … 96 96 if ($connection_data && $this->application->hasCompanyConnected($connection_data['company_id'])) 97 97 { 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')); 99 99 $this->redirect('@application_page?slug='.$this->application->getSlug()); 100 100 } … … 106 106 parent::purgeObjectRelatedCache($this->connection); 107 107 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')); 109 109 $this->redirect('@application_page?slug='.$this->application->getSlug()); 110 110 } … … 121 121 if ($this->application->hasDeveloper($this->getUser()->getId())) 122 122 { 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')); 124 124 $this->redirect('@application_page?slug='.$this->application->getSlug()); 125 125 } … … 135 135 parent::purgeObjectRelatedCache($this->connection); 136 136 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')); 138 138 $this->redirect('@application_page?slug='.$this->application->getSlug()); 139 139 } … … 147 147 if (!$this->getUser()->isAdmin() && $this->getUser()->getId() != $this->application->getSubmitterId()) 148 148 { 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')); 150 150 } 151 151 else … … 153 153 parent::purgeObjectRelatedCache($this->application); 154 154 $this->application->delete(); 155 $this-> setFlash('notice', $this->__('Application has been deleted'));155 $this->getUser()->setFlash('notice', $this->__('Application has been deleted')); 156 156 } 157 157 $this->redirect('@application_home'); … … 257 257 $this->application->save(); 258 258 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')); 260 260 $this->redirect('@application_page?slug='.$this->application->getSlug()); 261 261 } … … 367 367 { 368 368 $this->getRequest()->setError('errors', $this->__('Unable to save this record')); 369 sf Logger::getInstance()->err('Blocking error at application save time: '.$e->getMessage());369 sfContext::getInstance()->getLogger()->err('Blocking error at application save time: '.$e->getMessage()); 370 370 return false; 371 371 } … … 395 395 { 396 396 $this->getRequest()->setError('errors', $this->__('Unable to save this relation')); 397 sf Logger::getInstance()->err('Blocking error at ApplicationCompany save time: '.$e->getMessage());397 sfContext::getInstance()->getLogger()->err('Blocking error at ApplicationCompany save time: '.$e->getMessage()); 398 398 } 399 399 } … … 422 422 { 423 423 $this->getRequest()->setError('errors', $this->__('Unable to save this relation')); 424 sf Logger::getInstance()->err('Blocking error at ApplicationDeveloper save time: '.$e->getMessage());424 sfContext::getInstance()->getLogger()->err('Blocking error at ApplicationDeveloper save time: '.$e->getMessage()); 425 425 } 426 426 } trunk/apps/main/modules/blog_admin/actions/actions.class.php
r2 r48 16 16 $this->updateBlogPostFromRequest(); 17 17 $this->saveBlogPost($this->blog_post); 18 $this-> setFlash('notice', 'Your modifications have been saved');18 $this->getUser()->setFlash('notice', 'Your modifications have been saved'); 19 19 20 20 $cacheManager = $this->getContext()->getViewCacheManager(); trunk/apps/main/modules/companies/actions/actions.class.php
r2 r48 16 16 $this->updateFromRequest(); 17 17 parent::purgeObjectRelatedCache($this->company); 18 $this-> setFlash('notice', $this->__('Company added'));18 $this->getUser()->setFlash('notice', $this->__('Company added')); 19 19 $this->getUser()->setAttribute('from_company_creation', true, 'symfonians'); 20 20 $this->redirect('@company_connect_as_member?slug='.$this->company->getSlug()); … … 28 28 if (!$this->getUser()->isAdmin() && $this->company->getSubmitterId() != $this->getUser()->getId()) 29 29 { 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')); 31 31 $this->redirect('@company_page?slug='.$this->company->getSlug()); 32 32 } … … 36 36 $this->updateFromRequest(); 37 37 parent::purgeObjectRelatedCache($this->company); 38 $this-> setFlash('notice', $this->__('Company updated'));38 $this->getUser()->setFlash('notice', $this->__('Company updated')); 39 39 $this->redirect('@company_page?slug='.$this->company->getSlug()); 40 40 } … … 49 49 if ($this->getUser()->getId() != $this->connection->getUserId()) 50 50 { 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')); 52 52 $this->redirect('@company_page?slug='.$this->company->getSlug()); 53 53 } … … 57 57 $this->updateConnectionFromRequest(); 58 58 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')); 60 60 $this->redirect('@company_page?slug='.$this->company->getSlug()); 61 61 } … … 84 84 $this->updateConnectionFromRequest(); 85 85 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')); 87 87 $this->redirect('@company_page?slug='.$this->company->getSlug()); 88 88 } … … 98 98 if (!$this->company->getAllowContact()) 99 99 { 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')); 101 101 $this->redirect('@company_page?slug='.$this->company->getSlug()); 102 102 } … … 117 117 return sfView::SUCCESS; 118 118 } 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%', 120 120 array('%company%' => $this->company->getName()))); 121 121 $this->redirect('@company_page?slug='.$this->company->getSlug()); … … 128 128 if (!$this->getUser()->isAdmin() && $this->getUser()->getId() != $this->company->getSubmitterId()) 129 129 { 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')); 131 131 } 132 132 else … … 134 134 parent::purgeObjectRelatedCache($this->company); 135 135 $this->company->delete(); 136 $this-> setFlash('notice', $this->__('Company has been deleted'));136 $this->getUser()->setFlash('notice', $this->__('Company has been deleted')); 137 137 } 138 138 $this->redirect('@companies_home'); … … 301 301 { 302 302 $this->getRequest()->setError('errors', $this->__('Unable to save this record')); 303 sf Logger::getInstance()->err('Blocking error at company save time: '.$e->getMessage());303 sfContext::getInstance()->getLogger()->err('Blocking error at company save time: '.$e->getMessage()); 304 304 return false; 305 305 } … … 327 327 { 328 328 $this->getRequest()->setError('errors', $this->__('Unable to save this relation')); 329 sf Logger::getInstance()->err('Blocking error at relation save time: '.$e->getMessage());329 sfContext::getInstance()->getLogger()->err('Blocking error at relation save time: '.$e->getMessage()); 330 330 return false; 331 331 } trunk/apps/main/modules/events/actions/actions.class.php
r2 r48 14 14 $this->forward404Unless($event, 'event not found'); 15 15 $event->delete(); 16 $this-> setFlash('notice', $this->__('Event deleted'));16 $this->getUser()->setFlash('notice', $this->__('Event deleted')); 17 17 $redirect = $this->getRequest()->getReferer(); 18 18 $this->redirect($redirect ? $redirect : '@event_home'); trunk/apps/main/modules/jobs/actions/actions.class.php
r43 r48 16 16 $this->updateFromRequest(); 17 17 parent::purgeObjectRelatedCache($this->job); 18 $this-> setFlash('notice', $this->getI18N()->__('Job offer published'));18 $this->getUser()->setFlash('notice', $this->getI18N()->__('Job offer published')); 19 19 $this->redirect('@job_page?slug='.$this->job->getSlug()); 20 20 } … … 27 27 if (!$this->getUser()->isAdmin() && $this->job->getContactId() != $this->getUser()->getId()) 28 28 { 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')); 30 30 $this->redirect('@job_page?slug='.$this->job->getSlug()); 31 31 } … … 35 35 $this->updateFromRequest(); 36 36 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')); 38 38 $this->redirect('@job_page?slug='.$this->job->getSlug()); 39 39 } … … 48 48 if (!is_null($this->job->getExpiresAt()) && $this->job->getExpiresAt(null) < time()) 49 49 { 50 $this-> setFlash('warning', $this->getI18N()->__('This job offer is perempted'));50 $this->getUser()->setFlash('warning', $this->getI18N()->__('This job offer is perempted')); 51 51 } 52 52 } … … 57 57 if (!$this->getUser()->isAdmin() && $this->getUser()->getId() != $this->job->getContactId()) 58 58 { 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')); 60 60 } 61 61 else … … 63 63 parent::purgeObjectRelatedCache($this->job); 64 64 $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')); 66 66 } 67 67 $this->redirect('@jobs_home'); … … 245 245 { 246 246 $this->getRequest()->setError('errors', $this->getI18N()->__('Unable to save this record')); 247 sf Logger::getInstance()->err('Blocking error at job save time: '.$e->getMessage());247 sfContext::getInstance()->getLogger()->err('Blocking error at job save time: '.$e->getMessage()); 248 248 return sfView::SUCCESS; 249 249 } trunk/apps/main/modules/people/actions/actions.class.php
r2 r48 15 15 if (!$this->recipient->getAllowContact(true)) 16 16 { 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')); 18 18 $this->redirect('@person_page?username='.$this->recipient->getUsername()); 19 19 } … … 31 31 'reply-to' => array('address' => $user->getEmail(), 32 32 '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%', 34 34 array('%person%' => $this->recipient->getDisplayName()))); 35 35 $this->redirect('@person_page?username='.$this->recipient->getUsername()); … … 68 68 if (!$this->getUser()->isAdmin()) 69 69 { 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')); 71 71 } 72 72 else … … 75 75 parent::purgeObjectRelatedCache($this->user); 76 76 $this->user->delete(); 77 $this-> setFlash('notice',$this->__('Member account has been deleted'));77 $this->getUser()->setFlash('notice',$this->__('Member account has been deleted')); 78 78 } 79 79 $this->redirect('@people_home'); … … 151 151 { 152 152 $recommendation->delete(); 153 $this-> setFlash('notice', $this->__('The recommendation has been deleted'));153 $this->getUser()->setFlash('notice', $this->__('The recommendation has been deleted')); 154 154 } 155 155 else 156 156 { 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')); 158 158 } 159 159 $this->redirect('@person_page?username='.$this->getRequestParameter('to_username')); … … 166 166 if ($this->user->getId() == $this->getUser()->getId()) 167 167 { 168 $this-> setFlash('warning',$this->__('You cannot recommend yourself ;)'));168 $this->getUser()->setFlash('warning',$this->__('You cannot recommend yourself ;)')); 169 169 $this->redirect('@person_page?username='.$this->user->getUsername()); 170 170 } … … 207 207 } 208 208 209 $this-> setFlash('notice', $message);209 $this->getUser()->setFlash('notice', $message); 210 210 $this->redirect('@person_page?username='.$this->user->getUsername()); 211 211 } … … 217 217 { 218 218 $this->getRequest()->setError('errors',$this->__('Unable to save this record')); 219 sf Logger::getInstance()->err('Blocking error at recommendation save time: '.$e->getMessage());219 sfContext::getInstance()->getLogger()->err('Blocking error at recommendation save time: '.$e->getMessage()); 220 220 return sfView::SUCCESS; 221 221 } trunk/apps/main/modules/sfGuardAuth/actions/actions.class.php
r2 r48 21 21 try 22 22 { 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.')); 24 24 $this->getUser()->setAttribute('redirect_after_login', '@user_profile'); 25 25 $this->redirect('@sf_guard_signin'); … … 32 32 { 33 33 $this->getRequest()->setError('errors', $this->__('Unable to activate your account')); 34 sf Logger::getInstance()->err('Blocking error at account activation time: '.$e->getMessage());34 sfContext::getInstance()->getLogger()->err('Blocking error at account activation time: '.$e->getMessage()); 35 35 return sfView::SUCCESS; 36 36 } … … 45 45 $user->setPassword($password); 46 46 $user->save(); 47 $this-> setFlash('notice', $this->__('Your password has been changed'));47 $this->getUser()->setFlash('notice', $this->__('Your password has been changed')); 48 48 $this->redirect('@user_profile'); 49 49 } … … 67 67 else 68 68 { 69 sf Logger::getInstance()->err('Unable to remove user avatar');69 sfContext::getInstance()->getLogger()->err('Unable to remove user avatar'); 70 70 return $this->renderText($this->__('Picture deletion failed')); 71 71 } … … 93 93 return sfView::SUCCESS; 94 94 } 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%', 96 96 array('%email%' => $email))); 97 97 $this->redirect('@sf_guard_signin'); … … 168 168 $this->user->save(); 169 169 $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')); 171 171 $this->redirect('@user_profile'); 172 172 } … … 178 178 { 179 179 $this->getRequest()->setError('errors', $this->__('Unable to save your profile')); 180 sf Logger::getInstance()->err('Blocking error at profile save time: '.$e->getMessage());180 sfContext::getInstance()->getLogger()->err('Blocking error at profile save time: '.$e->getMessage()); 181 181 return sfView::SUCCESS; 182 182 } … … 205 205 } 206 206 $this->user->save(); 207 $this-> setFlash('notice', $this->__('Your skills have been updated'));207 $this->getUser()->setFlash('notice', $this->__('Your skills have been updated')); 208 208 $this->redirect('@user_profile_skills'); 209 209 } … … 262 262 return sfView::SUCCESS; 263 263 } 264 $this-> setFlash('notice', sfContext::getInstance()->getI18N()264 $this->getUser()->setFlash('notice', sfContext::getInstance()->getI18N() 265 265 ->__('A confirmation mail has been sent to %mail%', 266 266 array('%mail%' => $user->getEmail()))); … … 274 274 { 275 275 $this->getRequest()->setError('errors', $this->__('Unable to register your account')); 276 sf Logger::getInstance()->err('Blocking error at account registration time: '.$e->getMessage());276 sfContext::getInstance()->getLogger()->err('Blocking error at account registration time: '.$e->getMessage()); 277 277 return sfView::SUCCESS; 278 278 } … … 305 305 return sfView::SUCCESS; 306 306 } 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())); 308 308 $this->redirect('@homepage'); 309 309 } trunk/apps/main/modules/sfGuardAuth/lib/BasesfGuardAuthActions.class.php
r2 r48 66 66 } 67 67 68 $routing = sf Routing::getInstance();68 $routing = sfContext::getInstance()->getRouting(); 69 69 try 70 70 { 71 71 $controller = sfContext::getInstance()->getController(); 72 $uri = sf Routing::getInstance()->getCurrentInternalUri(true);72 $uri = sfContext::getInstance()->getRouting()->getCurrentInternalUri(true); 73 73 $redirect = $controller->genUrl($uri, true); 74 74 $user->setAttribute('redirect_after_login', $redirect); … … 95 95 { 96 96 $this->getUser()->setAttribute('redirect_after_login', 97 sf Routing::getInstance()->getCurrentInternalUri(true));97 sfContext::getInstance()->getRouting()->getCurrentInternalUri(true)); 98 98 $this->getResponse()->setStatusCode(403); 99 99 } trunk/apps/main/modules/utils/actions/actions.class.php
r2 r48 25 25 } 26 26 27 $this-> setFlash('notice', $this->__('Your message has been sent'));27 $this->getUser()->setFlash('notice', $this->__('Your message has been sent')); 28 28 $this->forward('utils', 'contactSent'); 29 29
