Changeset 1688
- Timestamp:
- 08/23/08 23:40:49 (5 months ago)
- Location:
- trunk
- Files:
-
- 4 modified
-
lib/class/radio.class.php (modified) (5 diffs)
-
templates/show_edit_live_stream_row.inc.php (modified) (3 diffs)
-
templates/show_live_streams.inc.php (modified) (3 diffs)
-
templates/show_live_stream_row.inc.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/class/radio.class.php
r1607 r1688 35 35 public $frequency; 36 36 public $call_sign; 37 public $genre;38 37 public $catalog; 39 38 … … 87 86 $this->f_callsign = scrub_out($this->call_sign); 88 87 $this->f_frequency = scrub_out($this->frequency); 89 90 $genre = new Genre($this->genre);91 $genre->format();92 $this->f_genre = $genre->f_link;93 88 94 89 return true; … … 127 122 } 128 123 129 $genre = new Genre($data['genre']); 130 if (!$genre->name) { 131 Error::add('general','Invalid Genre Selected'); 132 } 133 134 if (Error::$state) { 124 if (Error::occurred()) { 135 125 return false; 136 126 } … … 142 132 $frequency = Dba::escape($data['frequency']); 143 133 $call_sign = Dba::escape($data['call_sign']); 144 $genre = Dba::escape($data['genre']);145 134 $id = Dba::escape($data['id']); 146 135 147 $sql = "UPDATE `live_stream` SET `name`='$name',`site_url`='$site_url',`url`='$url' ,`genre`='$genre'" .136 $sql = "UPDATE `live_stream` SET `name`='$name',`site_url`='$site_url',`url`='$url'" . 148 137 ",`frequency`='$frequency',`call_sign`='$call_sign' WHERE `id`='$id'"; 149 138 $db_results = Dba::query($sql); … … 175 164 } 176 165 177 if (Error:: $state) { return false; }166 if (Error::occurred()) { return false; } 178 167 179 168 // Clean up the input -
trunk/templates/show_edit_live_stream_row.inc.php
r1428 r1688 2 2 /* 3 3 4 Copyright (c) 2001 - 2007Ampache.org4 Copyright (c) Ampache.org 5 5 All rights reserved. 6 6 … … 29 29 <th><?php echo _('Callsign'); ?></th> 30 30 <th><?php echo _('Frequency'); ?></th> 31 <th><?php echo _('Genre'); ?></th>32 31 <th> </th> 33 32 </tr> … … 49 48 </td> 50 49 <td> 51 <?php show_genre_select('genre',$radio->genre); ?>52 </td>53 <td>54 50 <input type="hidden" name="id" value="<?php echo $radio->id; ?>" /> 55 51 <input type="hidden" name="type" value="live_stream" /> -
trunk/templates/show_live_streams.inc.php
r1513 r1688 29 29 <col id="col_callsign" /> 30 30 <col id="col_frequency" /> 31 <col id="col_ genre" />31 <col id="col_tag" /> 32 32 <col id="col_action" /> 33 33 </colgroup> … … 37 37 <th class="cel_callsign"><?php echo Ajax::text('?page=browse&action=set_sort&sort=call_sign',_('Callsign'),'live_stream_call_sign'); ?></th> 38 38 <th class="cel_frequency"><?php echo Ajax::text('?page=browse&action=set_sort&sort=frequency',_('Frequency'),'live_stream_frequency'); ?></th> 39 <th class="cel_genre"><?php echo _(' Genre'); ?></th>39 <th class="cel_genre"><?php echo _('Tag'); ?></th> 40 40 <th class="cel_action"><?php echo _('Action'); ?> </th> 41 41 </tr> … … 59 59 <th class="cel_callsign"><?php echo Ajax::text('?page=browse&action=set_sort&sort=call_sign',_('Callsign'),'live_stream_call_sign_bottom'); ?></th> 60 60 <th class="cel_frequency"><?php echo Ajax::text('?page=browse&action=set_sort&sort=frequency',_('Frequency'),'live_stream_frequency_bottom'); ?></th> 61 <th class="cel_genre"><?php echo _(' Genre'); ?></th>61 <th class="cel_genre"><?php echo _('Tag'); ?></th> 62 62 <th class="cel_action"><?php echo _('Action'); ?> </th> 63 63 </tr> -
trunk/templates/show_live_stream_row.inc.php
r1250 r1688 2 2 /* 3 3 4 Copyright (c) 2001 - 2007Ampache.org4 Copyright (c) Ampache.org 5 5 All rights reserved. 6 6 … … 26 26 <td class="cel_callsign"><?php echo $radio->f_callsign; ?></td> 27 27 <td class="cel_frequency"><?php echo $radio->f_frequency; ?></td> 28 <td class="cel_ genre"><?php echo $radio->f_genre; ?></td>28 <td class="cel_tag"><?php echo $radio->f_tag; ?></td> 29 29 <td class="cel_action"> 30 <?php if ( $GLOBALS['user']->has_access('50')) { ?>30 <?php if (Access::check('interface','50')) { ?> 31 31 <?php echo Ajax::button('?action=show_edit_object&type=live_stream&id=' . $radio->id,'edit',_('Edit'),'edit_radio_' . $radio->id); ?> 32 32 <?php } ?> 33 <?php if ( $GLOBALS['user']->has_access('75')) { ?>33 <?php if (Access::check('interface','75')) { ?> 34 34 <?php echo Ajax::button('?page=browse&action=delete_object&type=live_stream&id=' . $radio->id,'delete',_('Delete'),'delete_radio_' . $radio->id); ?> 35 35 <?php } ?>
