summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/class/ajax.class.php25
-rw-r--r--lib/class/localplay.class.php5
2 files changed, 26 insertions, 4 deletions
diff --git a/lib/class/ajax.class.php b/lib/class/ajax.class.php
index e4e4baf8..1a064395 100644
--- a/lib/class/ajax.class.php
+++ b/lib/class/ajax.class.php
@@ -157,5 +157,30 @@ class Ajax {
} // run
+ /**
+ * start_container
+ * This checks to see if we're AJAX'in if we aren't then it echos out the
+ * html needed to start a container that can be replaced by Ajax
+ */
+ public static function start_container($name) {
+
+ if (AJAX_INCLUDE == '1') { return true; }
+
+ echo '<div id="' . scrub_out($name) . '">';
+
+ } // start_container
+
+ /**
+ * end_container
+ * This ends the container if we're not doing the AJAX thing
+ */
+ public static function end_container() {
+
+ if (AJAX_INCLUDE == '1') { return true; }
+
+ echo "</div>";
+
+ } // end_container
+
} // end Ajax class
?>
diff --git a/lib/class/localplay.class.php b/lib/class/localplay.class.php
index 02276b13..15f945f2 100644
--- a/lib/class/localplay.class.php
+++ b/lib/class/localplay.class.php
@@ -593,10 +593,7 @@ class Localplay {
*/
public function delete_all() {
-
- $function = $this->_function_map['delete_all'];
-
- if (!$this->_player->$function($songs)) {
+ if (!$this->_player->clear_playlist()) {
debug_event('localplay','Error: Unable to delete entire playlist, check ' . $this->type . ' controller','1');
return false;
}