1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-04 18:29:40 +02:00

commit everything.

This commit is contained in:
Karl 'vollmerk' Vollmer 2010-03-22 04:11:39 +00:00
parent b2dca63940
commit bcf2c41c9f
2 changed files with 5 additions and 4 deletions

View file

@ -42,10 +42,11 @@ switch ($_REQUEST['action']) {
} }
$album = new Album($_REQUEST['album_id']); $album = new Album($_REQUEST['album_id']);
$art = new Art($album->id,'album');
// Pull the image information // Pull the image information
$data = array('file'=>$_FILES['file']['tmp_name']); $data = array('file'=>$_FILES['file']['tmp_name']);
$image_data = Art::get_from_source($data); $image_data = $art->get_from_source($data);
// If we got something back insert it // If we got something back insert it
if ($image_data) { if ($image_data) {
@ -146,11 +147,11 @@ switch ($_REQUEST['action']) {
/* Check to see if we have the image url still */ /* Check to see if we have the image url still */
$image_id = $_REQUEST['image']; $image_id = $_REQUEST['image'];
$album_id = $_REQUEST['album_id']; $album_id = $_REQUEST['album_id'];
$art = new Art($album_id,'album');
$image = Art::get_from_source($_SESSION['form']['images'][$image_id]); $image = $art->get_from_source($_SESSION['form']['images'][$image_id]);
$mime = $_SESSION['form']['images'][$image_id]['mime']; $mime = $_SESSION['form']['images'][$image_id]['mime'];
$art = new Art($album_id,'album');
$art->insert($image,$mime); $art->insert($image,$mime);
header("Location:" . Config::get('web_path') . "/albums.php?action=show&album=" . $art->uid); header("Location:" . Config::get('web_path') . "/albums.php?action=show&album=" . $art->uid);

View file

@ -715,7 +715,7 @@ class Catalog extends database_object {
if (count($results)) { if (count($results)) {
// Pull the string representation from the source // Pull the string representation from the source
$image = Art::get_from_source($results['0']); $image = $art->get_from_source($results['0']);
if (strlen($image) > '5') { if (strlen($image) > '5') {
$art->insert($image,$results['0']['mime']); $art->insert($image,$results['0']['mime']);
// If they've enabled resizing of images generate the thumbnail now // If they've enabled resizing of images generate the thumbnail now