View | Details | Raw Unified | Return to bug 14295
Collapse All | Expand All

(-)a/C4/UploadedFiles.pm (-4 / +6 lines)
Lines 175-185 sub UploadFile { Link Here
175
175
176
    my $dbh = C4::Context->dbh;
176
    my $dbh = C4::Context->dbh;
177
    my $query = qq{
177
    my $query = qq{
178
        INSERT INTO uploaded_files (id, filename, dir)
178
        INSERT INTO uploaded_files
179
        VALUES (?,?, ?);
179
        (id, filename, dir, filesize, owner)
180
        VALUES (?,?, ?, ?, ?);
180
    };
181
    };
181
    my $sth = $dbh->prepare($query);
182
    my $sth = $dbh->prepare($query);
182
    if($sth->execute($id, $filename, $dir)) {
183
    my $ue = C4::Context->userenv;
184
    my $owner = $ue? $ue->{number}: undef;
185
    if( $sth->execute($id, $filename, $dir, length($data), $owner ) ) {
183
        return $id;
186
        return $id;
184
    }
187
    }
185
188
186
- 

Return to bug 14295