From f593f18131d6a0cbf30b558b208e86b9fc957f13 Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Mon, 27 Oct 2008 09:24:34 +0000 Subject: Commit, still no internet paying for it.. curse you free.fr --- lib/class/radio.class.php | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) (limited to 'lib/class/radio.class.php') diff --git a/lib/class/radio.class.php b/lib/class/radio.class.php index 09ac9876..ee3cf4aa 100644 --- a/lib/class/radio.class.php +++ b/lib/class/radio.class.php @@ -25,7 +25,7 @@ * This handles the internet radio stuff, that is inserted into live_stream * this can include podcasts or what-have-you */ -class Radio { +class Radio extends database_object { /* DB based variables */ public $id; @@ -42,11 +42,7 @@ class Radio { */ public function __construct($id) { - $this->id = intval($id); - - if (!$this->id) { return false; } - - $info = $this->_get_info(); + $info = $this->get_info($id,'live_stream'); // Set the vars foreach ($info as $key=>$value) { @@ -55,23 +51,6 @@ class Radio { } // constructor - /** - * _get_info - * Private function for getting the information for this object from the database - */ - private function _get_info() { - - $id = Dba::escape($this->id); - - $sql = "SELECT * FROM `live_stream` WHERE `id`='$id'"; - $db_results = Dba::query($sql); - - $results = Dba::fetch_assoc($db_results); - - return $results; - - } // _get_info - /** * format * This takes the normal data from the database and makes it pretty -- cgit