Changeset 6560

Show
Ignore:
Timestamp:
09/04/08 12:38:47 (3 months ago)
Author:
p_lindheimer
Message:

ref #3156 added optional format= line that is sometimes required for streaming applications

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.5/music/page.music.php

    r6555 r6560  
    4444        case "editednewstream": 
    4545                $stream = isset($_REQUEST['stream'])?$_REQUEST['stream']:''; 
     46                $format = isset($_REQUEST['format'])?trim($_REQUEST['format']):''; 
     47                if ($format != "") { 
     48                        $stream .= "\nformat=$format"; 
     49                } 
    4650                makestreamcatergory($path_to_dir,$stream); 
    4751                createmusicconf(); 
     
    326330        </tr> 
    327331        <tr> 
     332        <tr> 
     333                <td><a href="#" class="info"><?php echo _("Optional Format:")?><span><?php echo _("Optional value for \"format=\" line used to provide the format to Asterisk. This should be a format understood by Asterisk such as ulaw, and is specific to the streaming application you are using. See information on musiconhold.conf configuration for different audio and internet streaming source options.")?> </span></a></td> 
     334                <td><input type="text" name="format" size="6" value=""></td> 
     335        </tr> 
     336        <tr> 
    328337                <td colspan="2"><br><h6><input name="Submit" type="submit" value='<?php echo _("Submit Changes")?>' ></h6></td>          
    329338        </tr> 
     
    365374        if (file_exists("{$path_to_dir}/.custom")) { 
    366375                $application = file_get_contents("{$path_to_dir}/.custom"); 
     376                $application = explode("\n",$application); 
     377                if (isset($application[1])) { 
     378                        $format = explode('=',$application[1],2); 
     379                        $format = $format[1]; 
     380                } else { 
     381                        $format = ""; 
     382                } 
    367383        } else { 
    368384                $application = false; 
     
    385401                <tr> 
    386402                        <td><a href="#" class="info"><?php echo _("Application:")?><span><?php echo _("This is the \"application=\" line used to provide the streaming details to Asterisk. See information on musiconhold.conf configuration for different audio and internet streaming source options.")?> </span></a></td> 
    387                         <td><input type="text" name="stream" size="80" value="<?php echo $application?>"></td> 
     403                        <td><input type="text" name="stream" size="80" value="<?php echo $application[0]?>"></td> 
     404                </tr> 
     405                <tr> 
     406                        <td><a href="#" class="info"><?php echo _("Optional Format:")?><span><?php echo _("Optional value for \"format=\" line used to provide the format to Asterisk. This should be a format understood by Asterisk such as ulaw, and is specific to the streaming application you are using. See information on musiconhold.conf configuration for different audio and internet streaming source options.")?> </span></a></td> 
     407                        <td><input type="text" name="format" size="6" value="<?php echo $format?>"></td> 
    388408                </tr> 
    389409                <tr> 
Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads