summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-10-12 04:55:20 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-10-12 04:55:20 +0000
commitba62ca14b91934d9f5d81ff3a29fcf434acd1fdc (patch)
tree0b06c8d81016408a5141d347ca47bedd44adc286 /lib
parentf5a47635bd7b3d4b3c12f0f6f42424316a074e71 (diff)
downloadampache-ba62ca14b91934d9f5d81ff3a29fcf434acd1fdc.tar.gz
ampache-ba62ca14b91934d9f5d81ff3a29fcf434acd1fdc.tar.bz2
ampache-ba62ca14b91934d9f5d81ff3a29fcf434acd1fdc.zip
added abilty to display and delete localplay instances
Diffstat (limited to 'lib')
-rw-r--r--lib/class/dba.class.php16
-rw-r--r--lib/class/localplay.class.php22
2 files changed, 38 insertions, 0 deletions
diff --git a/lib/class/dba.class.php b/lib/class/dba.class.php
index c2c60fce..3facabd3 100644
--- a/lib/class/dba.class.php
+++ b/lib/class/dba.class.php
@@ -130,6 +130,22 @@ class Dba {
} // num_rows
/**
+ * affected_rows
+ * This emulates the mysql_affected_rows function
+ */
+ public static function affected_rows($resource) {
+
+ $result = mysql_affected_rows($resource);
+
+ if (!$result) {
+ return '0';
+ }
+
+ return $result;
+
+ } // affected_rows
+
+ /**
* _connect
* This connects to the database, used by the DBH function
*/
diff --git a/lib/class/localplay.class.php b/lib/class/localplay.class.php
index 6e01bfe0..6f996e3f 100644
--- a/lib/class/localplay.class.php
+++ b/lib/class/localplay.class.php
@@ -566,6 +566,18 @@ class Localplay {
} // current_instance
/**
+ * get_instance
+ * This returns the specified instance
+ */
+ public function get_instance($uid) {
+
+ $data = $this->_player->get_instance($uid);
+
+ return $data;
+
+ } // get_instance
+
+ /**
* add_instance
* This adds a new instance for the current controller type
*/
@@ -576,6 +588,16 @@ class Localplay {
} // add_instance
/**
+ * delete_instance
+ * This removes an instance (it actually calls the players function)
+ */
+ public function delete_instance($instance_uid) {
+
+ $this->_player->delete_instance($instance_uid);
+
+ } // delete_instance
+
+ /**
* set_active_instance
* This sets the active instance of the localplay controller
*/