Posted by sun on July 16, 2012 at 4:45pm
7 followers
| Project: | Drupal core |
| Version: | 7.x-dev |
| Component: | cron system |
| Category: | bug report |
| Priority: | normal |
| Assigned: | sun |
| Status: | closed (fixed) |
| Issue tags: | needs backport to D7, Testing system |
Issue Summary
Spin-off from #1215104: Use the non-interactive installer in WebTestBase::setUp()
Problem
- Any call to drupal_cron_run() (re-)enables writing of the current $user's session.
Details
- drupal_save_session() contains a pointer to the handbook page http://drupal.org/node/218104 that explains how to use it properly (which, alas, should really be documented on the API function instead).
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| drupal8.cron-run-session-save.0.patch | 685 bytes | Idle | PASSED: [[SimpleTest]]: [MySQL] 39,745 pass(es). | View details |
Comments
#1
#2
Seems to be the right way to do it and it fixes existing problems at least with install_drupal :)
#3
drupal8.cron-run-session-save.0.patch queued for re-testing.
#4
drupal8.cron-run-session-save.0.patch queued for re-testing.
#5
Looks fine but the variable name
$old_save_sessiondoesn't look right. Can we just call that $original_session or something?#6
$original_sessionwould be misleading, since the variable doesn't contain $_SESSION.So I went with
$original_session_saving.#7
OK that works well enough, I can't think of anything better. Committed/pushed to 8.x, moving to 7.x for backport.
#8
Backported!
#9
#10
Thanks!
#11
Hm. That variable name is indeed pretty terrible, but all the alternatives I can think of are 57-characters long and I know how you feel about those. ;P
Committed and pushed to 7.x. Thanks!
#12
Automatically closed -- issue fixed for 2 weeks with no activity.