mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 00:16:46 +02:00
MDL-40112 badges: Drop unused image field from badge table
This commit is contained in:
parent
f8e6e5bc30
commit
e50220f840
7 changed files with 15 additions and 12 deletions
|
@ -108,7 +108,6 @@ class badge {
|
|||
public $timemodified;
|
||||
public $usercreated;
|
||||
public $usermodified;
|
||||
public $image;
|
||||
public $issuername;
|
||||
public $issuerurl;
|
||||
public $issuercontact;
|
||||
|
@ -241,7 +240,6 @@ class badge {
|
|||
|
||||
$fordb->name = get_string('copyof', 'badges', $this->name);
|
||||
$fordb->status = BADGE_STATUS_INACTIVE;
|
||||
$fordb->image = 0;
|
||||
$fordb->usercreated = $USER->id;
|
||||
$fordb->usermodified = $USER->id;
|
||||
$fordb->timecreated = time();
|
||||
|
@ -1081,10 +1079,7 @@ function badges_process_badge_image(badge $badge, $iconfile) {
|
|||
require_once($CFG->libdir. '/gdlib.php');
|
||||
|
||||
if (!empty($CFG->gdversion)) {
|
||||
if ($fileid = (int)process_new_icon($badge->get_context(), 'badges', 'badgeimage', $badge->id, $iconfile)) {
|
||||
$badge->image = $fileid;
|
||||
$badge->save();
|
||||
}
|
||||
process_new_icon($badge->get_context(), 'badges', 'badgeimage', $badge->id, $iconfile);
|
||||
@unlink($iconfile);
|
||||
|
||||
// Clean up file draft area after badge image has been saved.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue