Issue Details (XML | Word | Printable)

Key: MDL-17776
Type: Task Task
Status: Resolved Resolved
Resolution: Fixed
Priority: Critical Critical
Assignee: Petr Skoda
Reporter: Petr Skoda
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

Dehackify handling of CLI scripts

Created: 03/Jan/09 10:30 PM   Updated: 03/Jan/09 11:30 PM
Return to search
Component/s: General
Affects Version/s: 2.0
Fix Version/s: 2.0

Issue Links:
Relates
 

Participants: Petr Skoda
Security Level: None
Resolved date: 03/Jan/09
Affected Branches: MOODLE_20_STABLE
Fixed Branches: MOODLE_20_STABLE


 Description  « Hide
handling of CLI scripts is very chaotic at the moment - some of them abut FULLME=='cron', other pollute the codebase with tons of IFs, etc...

Solution:
* in setup.php define CLI_SCRIPT=true|false
* replace FULLME hacks with if (CLI_SCRIPT)

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Petr Skoda committed 9 files to 'Moodle CVS' - 03/Jan/09 11:28 PM
MDL-17776 added new define CLI_SCRIPT that identifies all CLI scripts + cron (cli scripts do not have session and do not like HTML in output and are executed from command line, cron is an exception)
MODIFY admin/cron.php   Rev. 1.156    (+6 -12 lines)
MODIFY lib/accesslib.php   Rev. 1.565    (+5 -5 lines)
MODIFY lib/portfolio/exceptions.php   Rev. 1.3    (+1 -1 lines)
MODIFY lib/weblib.php   Rev. 1.1197    (+7 -7 lines)
MODIFY admin/handlevirus.php   Rev. 1.13    (+2 -5 lines)
MODIFY lib/sessionlib.php   Rev. 1.15    (+6 -3 lines)
MODIFY lib/moodlelib.php   Rev. 1.1144    (+4 -4 lines)
MODIFY admin/process_email.php   Rev. 1.8    (+2 -2 lines)
MODIFY lib/setup.php   Rev. 1.258    (+18 -1 lines)
Petr Skoda added a comment - 03/Jan/09 11:28 PM
added new define CLI_SCRIPT that identifies all CLI scripts + cron (cli scripts do not have session and do not like HTML in output and are executed from command line, cron is an exception)

Petr Skoda made changes - 03/Jan/09 11:28 PM
Field Original Value New Value
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Petr Skoda made changes - 03/Jan/09 11:30 PM
Link This issue has been marked as being related by MDL-17754 [ MDL-17754 ]