summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul 'flowerysong' Arthur <flowerysong00@yahoo.com>2010-04-28 22:20:42 +0000
committerPaul 'flowerysong' Arthur <flowerysong00@yahoo.com>2010-04-28 22:20:42 +0000
commitb290f52c8d13b21cf4620035206957e3bc3dbcdb (patch)
tree7ad5b85061bb0a7c0c84968cb07c2a6aa7510951
parent7bed87b064736c76653279e779bc4a268f435483 (diff)
downloadampache-b290f52c8d13b21cf4620035206957e3bc3dbcdb.tar.gz
ampache-b290f52c8d13b21cf4620035206957e3bc3dbcdb.tar.bz2
ampache-b290f52c8d13b21cf4620035206957e3bc3dbcdb.zip
Some missed hunks for playlist editing and miscellaneous related cleanup.
-rw-r--r--lib/class/playlist.class.php9
-rw-r--r--server/ajax.server.php4
-rw-r--r--server/playlist.ajax.php2
-rw-r--r--templates/show_playlist.inc.php2
-rw-r--r--templates/show_playlist_full_row.inc.php2
5 files changed, 11 insertions, 8 deletions
diff --git a/lib/class/playlist.class.php b/lib/class/playlist.class.php
index 042716b2..928ff949 100644
--- a/lib/class/playlist.class.php
+++ b/lib/class/playlist.class.php
@@ -26,7 +26,7 @@
*/
class Playlist extends database_object {
- /* Variables from the Datbase */
+ /* Variables from the database */
public $id;
public $name;
public $user;
@@ -131,8 +131,9 @@ class Playlist extends database_object {
/**
* get_items
- * This returns an array of playlist songs that are in this playlist. Because the same
- * song can be on the same playlist twice they are key'd by the uid from playlist_data
+ * This returns an array of playlist songs that are in this playlist.
+ * Because the same song can be on the same playlist twice they are
+ * keyed by the uid from playlist_data
*/
public function get_items() {
@@ -436,7 +437,7 @@ class Playlist extends database_object {
/**
* delete
- * This deletes the current playlist and all assoicated data
+ * This deletes the current playlist and all associated data
*/
public function delete() {
diff --git a/server/ajax.server.php b/server/ajax.server.php
index 96a510cf..56a2e3a8 100644
--- a/server/ajax.server.php
+++ b/server/ajax.server.php
@@ -119,6 +119,7 @@ switch ($_REQUEST['action']) {
$radio->format();
break;
case 'playlist':
+ case 'playlist_full':
$key = 'playlist_row_' . $_GET['id'];
$playlist = new Playlist($_GET['id']);
$playlist->format();
@@ -149,7 +150,7 @@ switch ($_REQUEST['action']) {
$level = '50';
- if ($_POST['type'] == 'playlist') {
+ if ($_POST['type'] == 'playlist' || $_POST['type'] == 'playlist_full') {
$playlist = new Playlist($_POST['id']);
if ($GLOBALS['user']->id == $playlist->user) {
$level = '25';
@@ -197,6 +198,7 @@ switch ($_REQUEST['action']) {
$song->format();
break;
case 'playlist':
+ case 'playlist_full':
$key = 'playlist_row_' . $_POST['id'];
$playlist->update($_POST);
$playlist->format();
diff --git a/server/playlist.ajax.php b/server/playlist.ajax.php
index 9cf209cc..4c517746 100644
--- a/server/playlist.ajax.php
+++ b/server/playlist.ajax.php
@@ -82,7 +82,7 @@ switch ($_REQUEST['action']) {
// Pull the current active playlist items
$objects = $GLOBALS['user']->playlist->get_items();
- $name = $GLOBALS['user']->username . ' - ' . date("d/m/Y H:i:s",time());
+ $name = $GLOBALS['user']->username . ' - ' . date("Y-m-d H:i:s",time());
// generate the new playlist
$playlist_id = Playlist::create($name,'public');
diff --git a/templates/show_playlist.inc.php b/templates/show_playlist.inc.php
index a18289aa..a6d702ea 100644
--- a/templates/show_playlist.inc.php
+++ b/templates/show_playlist.inc.php
@@ -27,7 +27,7 @@
<?php
/* HINT: Playlist Type, Playlist Name */
show_box_top('<div id="playlist_row_' . $playlist->id . '">' .
- sprintf(_('%s %s Playlist'), $playlist->f_type, $playlist->name) .
+ sprintf(_('%s %s (Playlist)'), $playlist->f_type, $playlist->name) .
'</div>');
?>
<div id="information_actions">
diff --git a/templates/show_playlist_full_row.inc.php b/templates/show_playlist_full_row.inc.php
index cd480582..5d315540 100644
--- a/templates/show_playlist_full_row.inc.php
+++ b/templates/show_playlist_full_row.inc.php
@@ -21,4 +21,4 @@
*/
?>
-<?php echo sprintf(_('%s %s Playlist'), $playlist->f_type, $playlist->name); ?>
+<?php echo sprintf(_('%s %s (Playlist)'), $playlist->f_type, $playlist->name); ?>