Skip to content

Commit

Permalink
MDL-15934 - fix small bug in cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mjollnir_ committed Aug 5, 2008
1 parent 6c0a941 commit 0b1ebfb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/portfoliolib.php
Expand Up @@ -1965,7 +1965,9 @@ public function process_stage_cleanup() {
require_once($CFG->dirroot . '/backup/lib.php');
delete_dir_contents($this->tempdir);
// @todo maybe add a hook in the plugin(s)
$DB->delete_records('portfolio_tempdata', array('id' => $this->tempdataid));
if ($this->caller->get('tempdataid')) {
$DB->delete_records('portfolio_tempdata', array('id' => $this->caller->get('tempdataid')));
}

return true;
}
Expand Down

0 comments on commit 0b1ebfb

Please sign in to comment.