Moodle

Dehackify handling of CLI scripts

Details

  • Type: Task Task
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: 2.0
  • Fix Version/s: 2.0
  • Component/s: General
  • Labels:
    None
  • Affected Branches:
    MOODLE_20_STABLE
  • Fixed Branches:
    MOODLE_20_STABLE

Description

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)

Issue Links

Activity

Hide
Petr Škoda (skodak) added a comment -

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)

Show
Petr Škoda (skodak) added a comment - 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)

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: