Changeset 7725

Show
Ignore:
Timestamp:
05/14/09 18:55:56 (3 years ago)
Author:
xrobau
Message:

Fixed an issue with Asterisk 1.6's SayUnixTime? _not_ requiring slashes around the sound file to play, whilst 1.4 and below does. Refers to #3673.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/trunk/amp_conf/htdocs/admin/extensions.class.php

    r7545 r7725  
    969969class ext_sayunixtime extends extension { 
    970970  function output() { 
    971     return "SayUnixTime(".$this->data.")"; 
     971    global $version; // Asterisk Version 
     972    if (version_compare($version, "1.6", ">=")) { 
     973      // SayUnixTime in 1.6 and greater does NOT require slashes. If they're  
     974      // supplied, strip them out. 
     975      $fixed = str_replace("\\", "", $this->data); 
     976      return "SayUnixTime($fixed)"; 
     977    } else { 
     978      return "SayUnixTime(".$this->data.")"; 
     979    } 
    972980  } 
    973981}