Changeset 1688

Show
Ignore:
Timestamp:
08/23/08 23:40:49 (5 months ago)
Author:
vollmerk
Message:

fixed the live stream stuff, and removed references to the genre stuff, and replaced it with tag

Location:
trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/lib/class/radio.class.php

    r1607 r1688  
    3535        public $frequency; 
    3636        public $call_sign; 
    37         public $genre;  
    3837        public $catalog;  
    3938 
     
    8786                $this->f_callsign       = scrub_out($this->call_sign);  
    8887                $this->f_frequency      = scrub_out($this->frequency);  
    89  
    90                 $genre = new Genre($this->genre);  
    91                 $genre->format();  
    92                 $this->f_genre          = $genre->f_link;  
    9388 
    9489                return true;  
     
    127122                }  
    128123 
    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()) {  
    135125                        return false;  
    136126                }  
     
    142132                $frequency      = Dba::escape($data['frequency']);  
    143133                $call_sign      = Dba::escape($data['call_sign']);  
    144                 $genre          = Dba::escape($data['genre']);  
    145134                $id             = Dba::escape($data['id']);  
    146135 
    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'" .  
    148137                        ",`frequency`='$frequency',`call_sign`='$call_sign' WHERE `id`='$id'";  
    149138                $db_results = Dba::query($sql);  
     
    175164                }  
    176165 
    177                 if (Error::$state) { return false; }  
     166                if (Error::occurred()) { return false; }  
    178167 
    179168                // Clean up the input 
  • trunk/templates/show_edit_live_stream_row.inc.php

    r1428 r1688  
    22/* 
    33 
    4  Copyright (c) 2001 - 2007 Ampache.org 
     4 Copyright (c) Ampache.org 
    55 All rights reserved. 
    66 
     
    2929        <th><?php echo _('Callsign'); ?></th> 
    3030        <th><?php echo _('Frequency'); ?></th> 
    31         <th><?php echo _('Genre'); ?></th> 
    3231        <th>&nbsp;</th> 
    3332</tr> 
     
    4948</td> 
    5049<td> 
    51         <?php show_genre_select('genre',$radio->genre); ?> 
    52 </td> 
    53 <td> 
    5450        <input type="hidden" name="id" value="<?php echo $radio->id; ?>" /> 
    5551        <input type="hidden" name="type" value="live_stream" /> 
  • trunk/templates/show_live_streams.inc.php

    r1513 r1688  
    2929  <col id="col_callsign" /> 
    3030  <col id="col_frequency" /> 
    31   <col id="col_genre" /> 
     31  <col id="col_tag" /> 
    3232  <col id="col_action" /> 
    3333</colgroup> 
     
    3737        <th class="cel_callsign"><?php echo Ajax::text('?page=browse&action=set_sort&sort=call_sign',_('Callsign'),'live_stream_call_sign');  ?></th> 
    3838        <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>  
    4040        <th class="cel_action"><?php echo _('Action'); ?> </th> 
    4141</tr> 
     
    5959        <th class="cel_callsign"><?php echo Ajax::text('?page=browse&action=set_sort&sort=call_sign',_('Callsign'),'live_stream_call_sign_bottom');  ?></th> 
    6060        <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>  
    6262        <th class="cel_action"><?php echo _('Action'); ?> </th> 
    6363</tr> 
  • trunk/templates/show_live_stream_row.inc.php

    r1250 r1688  
    22/* 
    33 
    4  Copyright (c) 2001 - 2007 Ampache.org 
     4 Copyright (c) Ampache.org 
    55 All rights reserved. 
    66 
     
    2626<td class="cel_callsign"><?php echo $radio->f_callsign; ?></td> 
    2727<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> 
    2929<td class="cel_action"> 
    30         <?php if ($GLOBALS['user']->has_access('50')) { ?> 
     30        <?php if (Access::check('interface','50')) { ?> 
    3131                <?php echo Ajax::button('?action=show_edit_object&type=live_stream&id=' . $radio->id,'edit',_('Edit'),'edit_radio_' . $radio->id); ?> 
    3232        <?php } ?> 
    33         <?php if ($GLOBALS['user']->has_access('75')) { ?> 
     33        <?php if (Access::check('interface','75')) { ?> 
    3434                <?php echo Ajax::button('?page=browse&action=delete_object&type=live_stream&id=' . $radio->id,'delete',_('Delete'),'delete_radio_' . $radio->id); ?> 
    3535        <?php } ?>