summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-04-27 06:12:32 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-04-27 06:12:32 +0000
commitded956d517fac5b46040a0478eb8415b30ef0baa (patch)
treec6cc349fd0c3fdd643be86745970a01fa602396c
parent0e1e087655f05f0629a54cad98ed3fbe8a6e0484 (diff)
downloadampache-ded956d517fac5b46040a0478eb8415b30ef0baa.tar.gz
ampache-ded956d517fac5b46040a0478eb8415b30ef0baa.tar.bz2
ampache-ded956d517fac5b46040a0478eb8415b30ef0baa.zip
added ability to add search results to playlist, or download if batch downloaded is enabled, also fixed user browse sorting
-rw-r--r--batch.php5
-rwxr-xr-xdocs/CHANGELOG3
-rw-r--r--search.php1
-rw-r--r--server/ajax.server.php8
-rw-r--r--server/index.ajax.php2
-rw-r--r--server/stream.ajax.php2
-rw-r--r--templates/show_playlist.inc.php2
-rw-r--r--templates/show_search.inc.php2
-rw-r--r--templates/show_search_bar.inc.php2
-rw-r--r--templates/show_search_options.inc.php32
-rw-r--r--templates/show_users.inc.php8
11 files changed, 56 insertions, 11 deletions
diff --git a/batch.php b/batch.php
index 2005ad22..4555f27e 100644
--- a/batch.php
+++ b/batch.php
@@ -1,7 +1,7 @@
<?php
/*
- Copyright (c) 2001 - 2007 Ampache.org
+ Copyright (c) Ampache.org
All rights reserved.
This program is free software; you can redistribute it and/or
@@ -64,6 +64,9 @@ switch ($_REQUEST['action']) {
$song_ids = $genre->get_songs();
$name = $genre->name;
break;
+ case 'browse':
+ $song_ids = Browse::get_saved();
+ $name = 'Batch-' . date("dmY",time());
default:
// Rien a faire
break;
diff --git a/docs/CHANGELOG b/docs/CHANGELOG
index 36cb3bae..46cff16a 100755
--- a/docs/CHANGELOG
+++ b/docs/CHANGELOG
@@ -4,7 +4,10 @@
--------------------------------------------------------------------------
v.3.4
+ - Added ability to Add Search Results to playlist, or download
+ if batch download is enabled
- Fixed Remove one vote, removes all votes on democratic play
+ - Fixed sorting issue on Browse Users
--------------------------------------------------------------------------
v.3.4-Beta3 04/20/2008
diff --git a/search.php b/search.php
index 62165041..9f96e689 100644
--- a/search.php
+++ b/search.php
@@ -41,6 +41,7 @@ switch ($_REQUEST['action']) {
}
case 'search':
require_once Config::get('prefix') . '/templates/show_search.inc.php';
+ require_once Config::get('prefix') . '/templates/show_search_options.inc.php';
$results = run_search($_REQUEST);
Browse::set_type('song');
Browse::set_static_content(1);
diff --git a/server/ajax.server.php b/server/ajax.server.php
index 2cca5c5a..b7f7adcf 100644
--- a/server/ajax.server.php
+++ b/server/ajax.server.php
@@ -1,7 +1,7 @@
<?php
/*
- Copyright (c) 2001 - 2007 Ampache.org
+ Copyright (c) Ampache.org
All rights reserved.
This program is free software; you can redistribute it and/or
@@ -236,6 +236,12 @@ switch ($_REQUEST['action']) {
$GLOBALS['user']->playlist->add_object($song_id,'song');
} // end foreach
break;
+ case 'browse_set':
+ $objects = Browse::get_saved();
+ foreach ($objects as $object_id) {
+ $GLOBALS['user']->playlist->add_object($object_id,'song');
+ }
+ break;
case 'album_random':
case 'artist_random':
case 'genre_random':
diff --git a/server/index.ajax.php b/server/index.ajax.php
index f7bf9ea5..47d2b45f 100644
--- a/server/index.ajax.php
+++ b/server/index.ajax.php
@@ -1,7 +1,7 @@
<?php
/*
- Copyright (c) 2001 - 2007 Ampache.org
+ Copyright (c) Ampache.org
All rights reserved.
This program is free software; you can redistribute it and/or
diff --git a/server/stream.ajax.php b/server/stream.ajax.php
index 7983c2c7..a7e7203f 100644
--- a/server/stream.ajax.php
+++ b/server/stream.ajax.php
@@ -1,7 +1,7 @@
<?php
/*
- Copyright (c) 2001 - 2007 Ampache.org
+ Copyright (c) Ampache.org
All rights reserved.
This program is free software; you can redistribute it and/or
diff --git a/templates/show_playlist.inc.php b/templates/show_playlist.inc.php
index f04326fd..3b72496f 100644
--- a/templates/show_playlist.inc.php
+++ b/templates/show_playlist.inc.php
@@ -29,7 +29,7 @@
<li><a href="<?php echo Config::get('web_path'); ?>/playlist.php?action=normalize_tracks&amp;playlist_id=<?php echo $playlist->id; ?>"><?php echo _('Normalize Tracks'); ?></a></li>
<?php if (Access::check_function('batch_download')) { ?>
<li><a href="<?php echo Config::get('web_path'); ?>/batch.php?action=playlist&amp;id=<?php echo $playlist->id; ?>">
- <?php echo get_user_icon('batch_download',_('Batch Download')); ?>
+ <?php echo _('Batch Download')); ?>
</a></li>
<?php } ?>
<li><?php echo Ajax::text('?action=basket&type=playlist&id=' . $playlist->id,_('Add All'),'play_playlist'); ?></li>
diff --git a/templates/show_search.inc.php b/templates/show_search.inc.php
index 644baa55..a23ccc70 100644
--- a/templates/show_search.inc.php
+++ b/templates/show_search.inc.php
@@ -1,7 +1,7 @@
<?php
/*
- Copyright (c) 2001 - 2007 Ampache.org
+ Copyright (c) Ampache.org
All rights reserved.
This program is free software; you can redistribute it and/or
diff --git a/templates/show_search_bar.inc.php b/templates/show_search_bar.inc.php
index e186b78f..69835896 100644
--- a/templates/show_search_bar.inc.php
+++ b/templates/show_search_bar.inc.php
@@ -1,7 +1,7 @@
<?php
/*
- Copyright (c) 2001 - 2007 Ampache.org
+ Copyright (c) Ampache.org
All rights reserved.
This program is free software; you can redistribute it and/or
diff --git a/templates/show_search_options.inc.php b/templates/show_search_options.inc.php
new file mode 100644
index 00000000..71f7266d
--- /dev/null
+++ b/templates/show_search_options.inc.php
@@ -0,0 +1,32 @@
+<?php
+/*
+
+ Copyright (c) Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; version 2
+ of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+?>
+<?php show_box_top(_('Options')); ?>
+<div id="search_options">
+<ul>
+ <li><?php echo Ajax::text('?action=basket&type=browse_set',_('Add Search Results'),'add_search_results'); ?></li>
+ <?php if (Access::check_function('batch_download')) { ?>
+ <li><a href="<?php echo Config::get('web_path'); ?>/batch.php?action=browse"><?php echo _('Batch Download'); ?></a></li>
+ <?php } ?>
+</ul>
+</div>
+<?php show_box_bottom(); ?>
diff --git a/templates/show_users.inc.php b/templates/show_users.inc.php
index 9a2b276c..92f78804 100644
--- a/templates/show_users.inc.php
+++ b/templates/show_users.inc.php
@@ -1,7 +1,7 @@
<?php
/*
- Copyright (c) 2001 - 2007 Ampache.org
+ Copyright (c) Ampache.org
All rights reserved.
This program is free software; you can redistribute it and/or
@@ -101,9 +101,9 @@ foreach ($object_ids as $user_id) {
</tr>
<?php } //end foreach users ?>
<tr class="th-bottom">
- <th class="cel_username"><?php echo Ajax::text('?page=browse&action=set_sort&sort=fullname',_('Fullname'),'users_sort_fullname'); ?>( <?php echo Ajax::text('?page=browse&action=set_sort&sort=username',_('Username'),'users_sort_username');?>)</th>
- <th class="cel_lastseen"><?php echo Ajax::text('?page=browse&action=set_sort&sort=last_seen',_('Last Seen'),'users_sort_lastseen'); ?></th>
- <th class="cel_registrationdate"><?php echo Ajax::text('?page=browse&action=set_sort&sort=create_date',_('Registration Date'),'users_sort_createdate'); ?></th>
+ <th class="cel_username"><?php echo Ajax::text('?page=browse&action=set_sort&sort=fullname',_('Fullname'),'users_sort_fullname1'); ?>( <?php echo Ajax::text('?page=browse&action=set_sort&sort=username',_('Username'),'users_sort_username1');?>)</th>
+ <th class="cel_lastseen"><?php echo Ajax::text('?page=browse&action=set_sort&sort=last_seen',_('Last Seen'),'users_sort_lastseen1'); ?></th>
+ <th class="cel_registrationdate"><?php echo Ajax::text('?page=browse&action=set_sort&sort=create_date',_('Registration Date'),'users_sort_createdate1'); ?></th>
<th class="cel_activity"><?php echo _('Activity'); ?></th>
<?php if (Config::get('track_user_ip')) { ?>
<th class="cel_lastip"><?php echo _('Last Ip'); ?></th>