1 | # changes in
|
---|
2 | # ../mythweb/modules/video/edit.php
|
---|
3 | # starting at line 57:
|
---|
4 |
|
---|
5 |
|
---|
6 |
|
---|
7 | # if (is_uploaded_file($_FILES['coverfile']['tmp_name'])) {
|
---|
8 | # $filename = setting('VideoArtworkDir', hostname).'/id-'.$_REQUEST['intid'].'.jpg';
|
---|
9 | # move_uploaded_file($_FILES['coverfile']['tmp_name'], $filename);
|
---|
10 | # chmod($filename, 0644); // make cover file readable by other users
|
---|
11 | # $Video->cover_file = $filename;
|
---|
12 | # }
|
---|
13 | if (is_uploaded_file($_FILES['coverfile']['tmp_name'])) {
|
---|
14 | $filename = $Video->title;
|
---|
15 | if($Video->season != '0')
|
---|
16 | $filename = $filename.'_'.$Video->season;
|
---|
17 | $filename = $filename.'_id'.$_REQUEST['intid'].'.jpg';
|
---|
18 | move_uploaded_file($_FILES['coverfile']['tmp_name'], setting('VideoArtworkDir', hostname).'/'.$filename);
|
---|
19 | chmod(setting('VideoArtworkDir', hostname).'/'.$filename, 0644); // make cover file readable by other users
|
---|
20 | $Video->cover_file = $filename;
|
---|
21 | }
|
---|
22 |
|
---|
23 | $Video->save();
|
---|
24 | ?>
|
---|