Issue Details (XML | Word | Printable)

Key: MDL-14809
Type: Bug Bug
Status: Resolved Resolved
Resolution: Duplicate
Priority: Minor Minor
Assignee: Dan Marsden
Reporter: Dan Marsden
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

bad error checking in backup_module backuplib.php

Created: 13/May/08 07:30 AM   Updated: 13/May/08 07:34 AM
Return to search
Component/s: Backup
Affects Version/s: 1.9
Fix Version/s: None

Issue Links:
Duplicate
 

Participants: Dan Marsden
Security Level: None
Resolved date: 13/May/08
Affected Branches: MOODLE_19_STABLE


 Description  « Hide
thanks to Sam Marshall for details regarding this bug.

backup_module in backuplib.php these lines:

                foreach ($preferences->mods[$module]->instances as
$instance => $object) {
                    if (!empty($object->backup)) {
                        $status =
$onemodbackup($bf,$preferences,$instance);
                    }
                }

overwrite the $status flag and doesn't notify about anything failing - should change to something like this (untested!)
                foreach ($preferences->mods[$module]->instances as $instance => $object) {
                    if (!empty($object->backup)) {
                        $statusm = $onemodbackup($bf,$preferences,$instance);
                        if (!$statusm) {
                            notify('backup of:'.$module.'-'.$instance.' failed.');
                            $status = false;
                        }
                    }
                }

--should also check to see if backup is silent and only notify when not silent, and should log an entry to backup_log

:-)

Dan


 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Dan Marsden made changes - 13/May/08 07:34 AM
Field Original Value New Value
Assignee Eloy Lafuente (stronk7) [ stronk7 ] Dan Marsden [ danmarsden ]
Resolution Duplicate [ 3 ]
Status Open [ 1 ] Resolved [ 5 ]
Dan Marsden made changes - 13/May/08 07:34 AM
Link This issue duplicates MDL-12037 [ MDL-12037 ]