Skip to content

hard coded paths cause exceptions on non-default Moodle configurations #3

Description

@durzo

There are a few places that use hard coded paths such as $CFG->dataroot/temp/backup/ to look for the backup log and $CFG->dataroot/lang/ for language packs which may not always be correct and results in an exception if $CFG->backuptempdir or $CFG->langlocalroot have been changed.

in 3.9, backup location has also been moved to $CFG->localcachedir, which will also cause this to throw an exception. (MDL-68166)

Files:

unlink($CFG->dataroot.'/temp/backup/'.$backupid.'.log');

unlink($CFG->dataroot.'/temp/backup/'.$restoreid.'.log');

$langstringdir = $CFG->dataroot.'/lang/';

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions