summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--batch.php9
-rwxr-xr-xdocs/CHANGELOG6
-rw-r--r--[-rwxr-xr-x]images/ampache-dark-bg.gifbin138 -> 138 bytes
-rw-r--r--[-rwxr-xr-x]images/ampache-light-bg.gifbin138 -> 138 bytes
-rw-r--r--[-rwxr-xr-x]images/ampache-mid.gifbin268 -> 268 bytes
-rw-r--r--lib/batch.lib.php19
-rw-r--r--lib/class/catalog.class.php6
-rw-r--r--lib/init.php2
8 files changed, 32 insertions, 10 deletions
diff --git a/batch.php b/batch.php
index 4e974cfd..2005ad22 100644
--- a/batch.php
+++ b/batch.php
@@ -20,6 +20,7 @@
*/
require_once 'lib/init.php';
+ob_end_clean();
//test that batch download is permitted
if (!Access::check_function('batch_download')) {
@@ -33,7 +34,13 @@ set_time_limit(0);
switch ($_REQUEST['action']) {
case 'tmp_playlist':
$tmpPlaylist = new tmpPlaylist($_REQUEST['id']);
- $song_ids = $tmpPlaylist->get_items();
+ $data = $tmpPlaylist->get_items();
+
+ // We have to translate these :(
+ foreach ($data as $row) {
+ $song_ids[] = $row['0'];
+ }
+
$name = $GLOBALS['user']->username . ' - Playlist';
break;
case 'playlist':
diff --git a/docs/CHANGELOG b/docs/CHANGELOG
index b137de6f..9f4f0303 100755
--- a/docs/CHANGELOG
+++ b/docs/CHANGELOG
@@ -3,6 +3,12 @@
--------------------------------------------------------------------------
--------------------------------------------------------------------------
+ v.3.4-Alpha3
+ - Fixed a problem with batch downloads and tmpplaylists
+ - Fixed missing set_timeout_limit(0); on add to catalog
+ functions
+
+--------------------------------------------------------------------------
v.3.4-Alpha2 09/03/2007
- Fixed a problem where it'd let you go through the install after
ampache had already been installed due to a change in the
diff --git a/images/ampache-dark-bg.gif b/images/ampache-dark-bg.gif
index e9fc72c9..e9fc72c9 100755..100644
--- a/images/ampache-dark-bg.gif
+++ b/images/ampache-dark-bg.gif
Binary files differ
diff --git a/images/ampache-light-bg.gif b/images/ampache-light-bg.gif
index 262430b8..262430b8 100755..100644
--- a/images/ampache-light-bg.gif
+++ b/images/ampache-light-bg.gif
Binary files differ
diff --git a/images/ampache-mid.gif b/images/ampache-mid.gif
index 57376ea4..57376ea4 100755..100644
--- a/images/ampache-mid.gif
+++ b/images/ampache-mid.gif
Binary files differ
diff --git a/lib/batch.lib.php b/lib/batch.lib.php
index d2712170..c49e04a4 100644
--- a/lib/batch.lib.php
+++ b/lib/batch.lib.php
@@ -1,7 +1,7 @@
<?php
/*
- Copyright (c) 2001 - 2006 Ampache.org
+ Copyright (c) 2001 - 2007 Ampache.org
All Rights Reserved
This program is free software; you can redistribute it and/or
@@ -24,19 +24,19 @@
* get_song_files
* tmakes array of song ids and returns
* array of path to actual files
- * @param $song_ids an array of song ids whose filenames you need
*/
-function get_song_files( $song_ids ) {
- global $user;
+function get_song_files($song_ids) {
+
$song_files = array();
- foreach( $song_ids as $song_id ) {
- $song = new Song( $song_id );
+ foreach ($song_ids as $song_id) {
+ $song = new Song($song_id);
/* Don't archive disabled songs */
- if ($song->status != 'disabled') {
+ if ($song->enabled) {
$total_size += sprintf("%.2f",($song->size/1048576));
- array_push( $song_files, $song->file );
+ array_push($song_files, $song->file);
} // if song isn't disabled
}
+
return array($song_files,$total_size);
} //get_song_files
@@ -61,12 +61,15 @@ function send_zip( $name, $song_files ) {
$arc->set_options( $options );
$arc->add_files( $song_files );
+
if (count($arc->error)) {
debug_event('archive',"Error: unable to add songs",'3');
+ return false;
} // if failed to add songs
if (!$arc->create_archive()) {
debug_event('archive',"Error: unable to create archive",'3');
+ return false;
} // if failed to create archive
$arc->download_file();
diff --git a/lib/class/catalog.class.php b/lib/class/catalog.class.php
index 4b8a854d..6f03e296 100644
--- a/lib/class/catalog.class.php
+++ b/lib/class/catalog.class.php
@@ -800,6 +800,9 @@ class Catalog {
/* Record the time.. time the catalog gen */
$start_time = time();
+ // Prevent the script from timing out and flush what we've got
+ set_time_limit(0);
+
/* Flush anything that has happened so they don't think it's locked */
flush();
@@ -1016,6 +1019,9 @@ class Catalog {
$this->path = rtrim($this->path,'/');
$this->path = rtrim($this->path,'\\');
+ // Prevent the script from timing out and flush what we've got
+ set_time_limit(0);
+
/* Get the songs and then insert them into the db */
$this->add_files($this->path,$type,0,$verbose);
diff --git a/lib/init.php b/lib/init.php
index e644924f..94dca030 100644
--- a/lib/init.php
+++ b/lib/init.php
@@ -71,7 +71,7 @@ if (!count($results)) {
}
/** This is the version.... fluf nothing more... **/
-$results['version'] = '3.4-Alpha2';
+$results['version'] = '3.4-Alpha3 Build (001)';
$results['int_config_version'] = '5';
$results['raw_web_path'] = $results['web_path'];