diff options
Diffstat (limited to 'lib/class/radio.class.php')
-rw-r--r-- | lib/class/radio.class.php | 25 |
1 files changed, 2 insertions, 23 deletions
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) { @@ -56,23 +52,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 * for the users, the new variables are put in f_??? and f_???_link |