Issue Details (XML | Word | Printable)

Key: MDL-19774
Type: Bug Bug
Status: Open Open
Priority: Critical Critical
Assignee: Petr Škoda (skodak)
Reporter: Tim Hunt
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

cron should not use globals $PAGE or $USER. function cron_setup_user should go

Created: 13/Jul/09 02:06 PM   Updated: 13/Jul/09 02:06 PM
Component/s: Administration
Affects Version/s: 2.0
Fix Version/s: 2.0

Participants: Petr Škoda (skodak) and Tim Hunt
Security Level: None
Affected Branches: MOODLE_20_STABLE
Fixed Branches: MOODLE_20_STABLE


 Description  « Hide
I think that any code that may be used in a cron script should not rely on the globals $PAGE, $USER, etc.

Instead, it should take an explicit $page, $user arguments to any functions. Then we could delete the cron_setup_user function completely.

If that is not possible, perhaps for backwards compatibility, then we should not try to modify the global $PAGE. Instead we should create a new one when necessary.



 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.