Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-11434

$CFG->filelifetime = 0 has no effect

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.7, 1.7.1, 1.7.2, 1.8, 1.8.1, 1.8.2
    • 1.8.3, 1.9
    • Resource
    • None
    • Any
    • MOODLE_17_STABLE, MOODLE_18_STABLE
    • MOODLE_18_STABLE, MOODLE_19_STABLE

    Description

      Setting $CFG->filelifetime = 0 in config.php has no effect. This is because file.php checks to see if $CFG->filelifetime is empty. In PHP, empty(0) is true, which means your filelifetime is set to 86400, the default.

      The workaround is to set $CFG->filelifetime = 1, but I think file.php should check to see if (!isset($CFG>filelifetime)) as per the attached patch. The value would be consistently applied throughout its possible range.

      Attachments

        Activity

          People

            skodak Petr Skoda
            chrisf Chris Fryer
            Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              11/Oct/07