summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-06-18 04:23:53 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-06-18 04:23:53 +0000
commitcabbf907970a6d514a4b9288abcfec3c0c6b2d55 (patch)
tree696dd21199d779c8764d035261f66e12c730dcce
parent4811ddc8c70a7189d7347286a2892451109c226c (diff)
downloadampache-cabbf907970a6d514a4b9288abcfec3c0c6b2d55.tar.gz
ampache-cabbf907970a6d514a4b9288abcfec3c0c6b2d55.tar.bz2
ampache-cabbf907970a6d514a4b9288abcfec3c0c6b2d55.zip
make the live stream add work again by removing genre needs to get tag added, but I can do that later
-rw-r--r--lib/class/core.class.php40
-rw-r--r--lib/class/radio.class.php16
-rw-r--r--templates/show_add_live_stream.inc.php8
3 files changed, 42 insertions, 22 deletions
diff --git a/lib/class/core.class.php b/lib/class/core.class.php
new file mode 100644
index 00000000..bd0e422d
--- /dev/null
+++ b/lib/class/core.class.php
@@ -0,0 +1,40 @@
+<?php
+/*
+
+ Copyright (c) Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License v2
+ as published by the Free Software Foundation.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+/**
+ * Core
+ * This is really just a namespace class, it's full of static functions
+ * would be replaced by a namespace library once that exists in php
+ */
+class Core {
+
+ /**
+ * constructor
+ * This doesn't do anything
+ */
+ private function __construct() {
+
+ return false;
+
+ } // construction
+
+} // Core
+?>
diff --git a/lib/class/radio.class.php b/lib/class/radio.class.php
index 99232944..b1ee3f3d 100644
--- a/lib/class/radio.class.php
+++ b/lib/class/radio.class.php
@@ -168,17 +168,6 @@ class Radio {
Error::add('url','Invalid URL must be http:// or https://');
}
- // If they specified other try to use that
- if (strlen($data['other_genre'])) {
- $data['genre'] = Catalog::check_genre($data['other_genre']);
- }
-
- // Make sure it's a real genre
- $genre = new Genre($data['genre']);
- if (!$genre->name) {
- Error::add('genre','Invalid Genre');
- }
-
// Make sure it's a real catalog
$catalog = new Catalog($data['catalog']);
if (!$catalog->name) {
@@ -191,14 +180,13 @@ class Radio {
$name = Dba::escape($data['name']);
$site_url = Dba::escape($data['site_url']);
$url = Dba::escape($data['url']);
- $genre = $genre->id;
$catalog = $catalog->id;
$frequency = Dba::escape($data['frequency']);
$call_sign = Dba::escape($data['call_sign']);
// If we've made it this far everything must be ok... I hope
- $sql = "INSERT INTO `live_stream` (`name`,`site_url`,`url`,`genre`,`catalog`,`frequency`,`call_sign`) " .
- "VALUES ('$name','$site_url','$url','$genre','$catalog','$frequency','$call_sign')";
+ $sql = "INSERT INTO `live_stream` (`name`,`site_url`,`url`,`catalog`,`frequency`,`call_sign`) " .
+ "VALUES ('$name','$site_url','$url','$catalog','$frequency','$call_sign')";
$db_results = Dba::query($sql);
return $db_results;
diff --git a/templates/show_add_live_stream.inc.php b/templates/show_add_live_stream.inc.php
index 2dc9382d..f9b12e98 100644
--- a/templates/show_add_live_stream.inc.php
+++ b/templates/show_add_live_stream.inc.php
@@ -58,14 +58,6 @@
</td>
</tr>
<tr>
- <td valign="top"><?php echo _('Genre'); ?></td>
- <td>
- <?php echo show_genre_select('genre',intval($_REQUEST['genre'])); ?>
- <br /><?php echo _('OR'); ?><br />
- <input type="text" name="other_genre" value="<?php echo scrub_out($_REQUEST['other_genre']); ?>" />
- </td>
-</tr>
-<tr>
<td><?php echo _('Catalog'); ?></td>
<td>
<?php echo show_catalog_select('catalog',intval($_REQUEST['catalog'])); ?>