summaryrefslogtreecommitdiffstats
path: root/lib/class
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-01-19 23:11:57 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-01-19 23:11:57 +0000
commit5296a8d351f94a04d19791e4c9d3b73c5cb82ac6 (patch)
treeb26f7d6ec135270353ec1feebc304e49c2311a14 /lib/class
parentffb43ad33ec6198df04cf188a205f236863d1dd3 (diff)
downloadampache-5296a8d351f94a04d19791e4c9d3b73c5cb82ac6.tar.gz
ampache-5296a8d351f94a04d19791e4c9d3b73c5cb82ac6.tar.bz2
ampache-5296a8d351f94a04d19791e4c9d3b73c5cb82ac6.zip
fixed issue with xmlapi when no limit provided, fixed now playing refresh, fixed single item update (Thx alex2008) added some more stuff for managing shoutbox stuff, started work on implementation of CoFs system added untested search method on xmlapi
Diffstat (limited to 'lib/class')
-rw-r--r--lib/class/browse.class.php12
-rw-r--r--lib/class/catalog.class.php16
-rw-r--r--lib/class/xmldata.class.php4
3 files changed, 23 insertions, 9 deletions
diff --git a/lib/class/browse.class.php b/lib/class/browse.class.php
index c9f43676..03ce742d 100644
--- a/lib/class/browse.class.php
+++ b/lib/class/browse.class.php
@@ -179,6 +179,7 @@ class Browse {
case 'album':
case 'artist':
case 'genre':
+ case 'shoutbox':
case 'live_stream':
$_SESSION['browse']['type'] = $type;
// Resets the simple browse
@@ -217,6 +218,9 @@ class Browse {
case 'playlist':
$valid_array = array('name','user');
break;
+ case 'shoutbox':
+ $valud_array = array('date','user','sticky');
+ break;
case 'live_stream':
$valid_array = array('name','call_sign','frequency');
break;
@@ -385,6 +389,9 @@ class Browse {
case 'flagged':
$sql = "SELECT `flagged`.`id` FROM `flagged` ";
break;
+ case 'shoutbox':
+ $sql - "SELECT `user_shout`.`id` FROM `user_shout` ";
+ break;
case 'playlist_song':
case 'song':
default:
@@ -713,6 +720,11 @@ class Browse {
require_once Config::get('prefix') . '/templates/show_catalogs.inc.php';
show_box_bottom();
break;
+ case 'shoutbox':
+ show_box_top(_('Shoutbox Records'),$class);
+ require_once Config::get('prefix') . '/templates/show_manage_shoutbox.inc.php';
+ show_box_bottom();
+ break;
case 'flagged':
show_box_top(_('Flagged Records'),$class);
require_once Config::get('prefix') . '/templates/show_flagged.inc.php';
diff --git a/lib/class/catalog.class.php b/lib/class/catalog.class.php
index 54a45273..a36bb485 100644
--- a/lib/class/catalog.class.php
+++ b/lib/class/catalog.class.php
@@ -1007,6 +1007,10 @@ class Catalog {
/* Flush anything that has happened so they don't think it's locked */
flush();
+ // Make sure they don't have a trailing / or \ on their path
+ $path = rtrim($path,"/");
+ $path = rtrim($path,"\\");
+
/*
* Step one Add this to the catalog table if it's not
* already there returns the new catalog_id
@@ -1017,10 +1021,6 @@ class Catalog {
$catalog_id = $this->create_catalog_entry($path,$name,$key, $ren, $sort, $type);
}
- // Make sure they don't have a trailing / or \ on their path
- $path = rtrim($path,"/");
- $path = rtrim($path,"\\");
-
/* Setup the $this with the new information */
$this->id = $catalog_id;
$this->path = $path;
@@ -1103,7 +1103,7 @@ class Catalog {
$songs = $artist->get_songs();
break;
case 'song':
- $songs[0] = new Song($id);
+ $songs[] = $id;
break;
} // end switch type
@@ -1114,14 +1114,14 @@ class Catalog {
if ($info['change']) {
$file = scrub_out($song->file);
echo "<dl>\n\t<dd>";
- echo "<b>$file " . _('Updated') . "</b>\n";
+ echo "<strong>$file " . _('Updated') . "</strong>\n";
echo $info['text'];
echo "\t</dd>\n</dl><hr align=\"left\" width=\"50%\" />";
flush();
} // if change
else {
echo"<dl>\n\t<dd>";
- echo "<b>$song->file</b><br />" . _('No Update Needed') . "\n";
+ echo "<strong>" . scrub_out($song->file) . "</strong><br />" . _('No Update Needed') . "\n";
echo "\t</dd>\n</dl><hr align=\"left\" width=\"50%\" />";
flush();
}
@@ -1277,7 +1277,6 @@ class Catalog {
} // add_to_catalog
-
/**
* get_remote_catalog
* get a remote catalog and runs update if needed this requires
@@ -1342,7 +1341,6 @@ class Catalog {
return;
}
-
$data = php_xmlrpc_decode($response->value());
// Print out the catalogs we are going to sync
diff --git a/lib/class/xmldata.class.php b/lib/class/xmldata.class.php
index 491d4074..a75d6dfc 100644
--- a/lib/class/xmldata.class.php
+++ b/lib/class/xmldata.class.php
@@ -58,6 +58,8 @@ class xmlData {
*/
public static function set_limit($limit) {
+ if (!$limit) { return false; }
+
$limit = intval($limit);
self::$limit = $limit;
@@ -139,6 +141,7 @@ class xmlData {
} // end foreach artists
$final = self::_header() . $string . self::_footer();
+
return $final;
} // artists
@@ -240,6 +243,7 @@ class xmlData {
"\t<name><![CDATA[$playlist->name]]></name>\n" .
"\t<owner><![CDATA[$playlist->f_user]]</owner>\n" .
"\t<items>$item_total</items>\n" .
+ "\t<type>$playlist->type</type>\n" .
"</playlist>\n";