<h1>Project "FreeSWITCH user-contributed scripts, etc" received a push.</h1>

<h2>branch: master updated</h2>
<pre>
       via: 93112a4f782c3e44108439e6fdeb7789482735d4 (commit)
       via: b98a258f545eea7976d80c2bb6450a73caa9dd3c (commit)
       via: 55ef55a5a9e951b26c52b3d2f0e5f902e568f1f9 (commit)
       via: ca8489d71e127d5ff7beafbd91bcf5f9c683dd8d (commit)
       via: 0cb41713987185aec7f42c9cff174b6d2757e460 (commit)
       via: c2e63f1d8fc269cf17bd85d534c9099af8a454b6 (commit)
       via: ee436d35144c7d85629d2c7356db64d5f392d1ff (commit)
      from: 32250fa69ff8b942ca99c4eaabafde285cc27c9a (commit)


</pre>= COMMIT LOG ===========================================================
<div class="highlight"><pre>committer: Mitch Capper
comments: 
Merge branch &#39;master&#39; of ssh://git.freeswitch.org/freeswitch-contrib
</pre></div>
<div class="highlight"><pre>committer: Mathieu Parent
comments: 
MediaBortha: fix HTML form (hidden fields)

<span style="color: #000080; font-weight: bold">diff --git a/sathieu/cisco-xml/lib/MediaBrotha/Frontend/HTML.php b/sathieu/cisco-xml/lib/MediaBrotha/Frontend/HTML.php</span>
<span style="color: #000080; font-weight: bold">index 1c0454a..feb98e8 100644</span>
<span style="color: #A00000">--- a/sathieu/cisco-xml/lib/MediaBrotha/Frontend/HTML.php</span>
<span style="color: #00A000">+++ b/sathieu/cisco-xml/lib/MediaBrotha/Frontend/HTML.php</span>
<span style="color: #800080; font-weight: bold">@@ -137,23 +137,28 @@ class MediaBrotha_Frontend_HTML extends MediaBrotha_Frontend_HTTP {</span>
 
                 foreach($form as $field) {
                         if ($field-&gt;get(&#39;visibility&#39;) === &#39;hidden&#39;) {
<span style="color: #A00000">-                                continue;</span>
<span style="color: #00A000">+                                $inputElement = $this-&gt;_xml-&gt;createElement(&#39;input&#39;);</span>
<span style="color: #00A000">+                                $inputElement = $formElement-&gt;appendChild($inputElement);</span>
<span style="color: #00A000">+                                $inputElement-&gt;setAttribute(&#39;name&#39;, $field-&gt;get(&#39;name&#39;));</span>
<span style="color: #00A000">+                                $inputElement-&gt;setAttribute(&#39;value&#39;, $field-&gt;get(&#39;value&#39;));</span>
<span style="color: #00A000">+                                $inputElement-&gt;setAttribute(&#39;type&#39;, &#39;hidden&#39;);</span>
<span style="color: #00A000">+                        } else {</span>
<span style="color: #00A000">+                                $trElement = $this-&gt;_xml-&gt;createElement(&#39;tr&#39;);</span>
<span style="color: #00A000">+                                $trElement = $tableElement-&gt;appendChild($trElement);</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                                $tdElement1 = $this-&gt;_xml-&gt;createElement(&#39;th&#39;);</span>
<span style="color: #00A000">+                                $tdElement1 = $trElement-&gt;appendChild($tdElement1);</span>
<span style="color: #00A000">+                                $text1 = $this-&gt;_xml-&gt;createTextNode($field-&gt;get(&#39;display_name&#39;));</span>
<span style="color: #00A000">+                                $text1 = $tdElement1-&gt;appendChild($text1);</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                                $tdElement2 = $this-&gt;_xml-&gt;createElement(&#39;td&#39;);</span>
<span style="color: #00A000">+                                $tdElement2 = $trElement-&gt;appendChild($tdElement2);</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                                $inputElement = $this-&gt;_xml-&gt;createElement(&#39;input&#39;);</span>
<span style="color: #00A000">+                                $inputElement = $tdElement2-&gt;appendChild($inputElement);</span>
<span style="color: #00A000">+                                $inputElement-&gt;setAttribute(&#39;name&#39;, $field-&gt;get(&#39;name&#39;));</span>
<span style="color: #00A000">+                                $inputElement-&gt;setAttribute(&#39;value&#39;, $field-&gt;get(&#39;value&#39;));</span>
                         }
<span style="color: #A00000">-                        $trElement = $this-&gt;_xml-&gt;createElement(&#39;tr&#39;);</span>
<span style="color: #A00000">-                        $trElement = $tableElement-&gt;appendChild($trElement);</span>
<span style="color: #A00000">-</span>
<span style="color: #A00000">-                        $tdElement1 = $this-&gt;_xml-&gt;createElement(&#39;th&#39;);</span>
<span style="color: #A00000">-                        $tdElement1 = $trElement-&gt;appendChild($tdElement1);</span>
<span style="color: #A00000">-                        $text1 = $this-&gt;_xml-&gt;createTextNode($field-&gt;get(&#39;display_name&#39;));</span>
<span style="color: #A00000">-                        $text1 = $tdElement1-&gt;appendChild($text1);</span>
<span style="color: #A00000">-</span>
<span style="color: #A00000">-                        $tdElement2 = $this-&gt;_xml-&gt;createElement(&#39;td&#39;);</span>
<span style="color: #A00000">-                        $tdElement2 = $trElement-&gt;appendChild($tdElement2);</span>
<span style="color: #A00000">-</span>
<span style="color: #A00000">-                        $inputElement = $this-&gt;_xml-&gt;createElement(&#39;input&#39;);</span>
<span style="color: #A00000">-                        $inputElement = $tdElement2-&gt;appendChild($inputElement);</span>
<span style="color: #A00000">-                        $inputElement-&gt;setAttribute(&#39;name&#39;, $field-&gt;get(&#39;name&#39;));</span>
<span style="color: #A00000">-                        $inputElement-&gt;setAttribute(&#39;value&#39;, $field-&gt;get(&#39;value&#39;));</span>
                 }
 
                 $trElement = $this-&gt;_xml-&gt;createElement(&#39;tr&#39;);
</pre></div>
<div class="highlight"><pre>committer: Mathieu Parent
comments: 
MediaBrotha: LDAP search and result

<span style="color: #000080; font-weight: bold">diff --git a/sathieu/cisco-xml/lib/MediaBrotha/Backend/LDAP.php b/sathieu/cisco-xml/lib/MediaBrotha/Backend/LDAP.php</span>
<span style="color: #000080; font-weight: bold">index 2b04351..a1a0e98 100644</span>
<span style="color: #A00000">--- a/sathieu/cisco-xml/lib/MediaBrotha/Backend/LDAP.php</span>
<span style="color: #00A000">+++ b/sathieu/cisco-xml/lib/MediaBrotha/Backend/LDAP.php</span>
<span style="color: #800080; font-weight: bold">@@ -50,16 +50,22 @@ class MediaBrotha_Backend_LDAP extends MediaBrotha_Backend {</span>
 
         // Browsing
         public function mediaFromBufferItem($entry) {
<span style="color: #A00000">-                if ($entry) {</span>
<span style="color: #A00000">-                        $media = new MediaBrotha_Media(</span>
<span style="color: #00A000">+                if (is_a($entry, &#39;Net_LDAP2_Entry&#39;)) {</span>
<span style="color: #00A000">+                        return new MediaBrotha_Media(</span>
                                 &#39;ldap:///&#39;.$entry-&gt;dn(),
                                 Array(
                                         &#39;display_name&#39; =&gt; $entry-&gt;dn(), //$entry-&gt;getValue(&#39;sn&#39;, &#39;single&#39;),
                                 ),
                                 &#39;text/directory&#39;
<span style="color: #A00000">-                                //$finfo-&gt;file($file-&gt;getPathname(), FILEINFO_MIME_ENCODING);</span>
                         );
<span style="color: #A00000">-                        return $media;</span>
<span style="color: #00A000">+                } else {</span>
<span style="color: #00A000">+                        return new MediaBrotha_Media(</span>
<span style="color: #00A000">+                                &#39;ldap:///&#39;,</span>
<span style="color: #00A000">+                                Array(</span>
<span style="color: #00A000">+                                        &#39;display_name&#39; =&gt; $entry[0].&#39;: &#39;.$entry[1],</span>
<span style="color: #00A000">+                                ),</span>
<span style="color: #00A000">+                                &#39;text/directory&#39;</span>
<span style="color: #00A000">+                        );</span>
                 }
         }
 
<span style="color: #800080; font-weight: bold">@@ -73,8 +79,10 @@ class MediaBrotha_Backend_LDAP extends MediaBrotha_Backend {</span>
                 if ($this-&gt;_isHandled($media)) {
                         return Array(
                                 &#39;_default&#39;,
<span style="color: #00A000">+                                &#39;detail&#39;,</span>
                                 &#39;browse&#39;,
                                 &#39;search&#39;,
<span style="color: #00A000">+                                &#39;_search-result&#39;,</span>
                         );
                 } else {
                         return parent::getMediaActions($media);
<span style="color: #800080; font-weight: bold">@@ -92,13 +100,48 @@ class MediaBrotha_Backend_LDAP extends MediaBrotha_Backend {</span>
                                 if ($basedn &amp;&amp; ($basedn{0} = &#39;/&#39;)) {
                                         $basedn = substr($basedn, 1);
                                 }
<span style="color: #A00000">-                                $ldap_search = $this-&gt;_ldap-&gt;search($basedn, NULL,</span>
<span style="color: #A00000">-                                        Array());</span>
<span style="color: #00A000">+                                $ldap_search = $this-&gt;_ldap-&gt;search($basedn, NULL, Array());</span>
                                 return new MediaBrotha_MediaIterator($this, $ldap_search);
<span style="color: #00A000">+                        case &#39;detail&#39;:</span>
<span style="color: #00A000">+                                $uri = $media-&gt;getURI();</span>
<span style="color: #00A000">+                                if (($this::parseLDAPURI($uri, PHP_URL_SCHEME) != &#39;ldap&#39;) || !$this-&gt;isURISafe($uri)) {</span>
<span style="color: #00A000">+                                        return false;</span>
<span style="color: #00A000">+                                }</span>
<span style="color: #00A000">+                                $basedn = $this::parseLDAPURI($uri, PHP_URL_PATH);</span>
<span style="color: #00A000">+                                if ($basedn &amp;&amp; ($basedn{0} = &#39;/&#39;)) {</span>
<span style="color: #00A000">+                                        $basedn = substr($basedn, 1);</span>
<span style="color: #00A000">+                                }</span>
<span style="color: #00A000">+                                $ldap_entry = $this-&gt;_ldap-&gt;getEntry($basedn);</span>
<span style="color: #00A000">+                                $it = new ArrayIterator();</span>
<span style="color: #00A000">+                                foreach ($ldap_entry-&gt;attributes() as $attr) {</span>
<span style="color: #00A000">+                                        foreach($ldap_entry-&gt;getValue($attr, &#39;all&#39;) as $value) {</span>
<span style="color: #00A000">+                                                $it[] = Array($attr, $value);</span>
<span style="color: #00A000">+                                        }</span>
<span style="color: #00A000">+                                }</span>
<span style="color: #00A000">+                                return new MediaBrotha_MediaIterator($this, $it);</span>
                         case &#39;_default&#39;:
                         case &#39;search&#39;:
<span style="color: #00A000">+                        case &#39;_search-result&#39;:</span>
                                 $form =  new MediaBrotha_Form();
                                 $form-&gt;setTitle(&#39;search&#39;);
<span style="color: #00A000">+                                $form-&gt;addField(Array(</span>
<span style="color: #00A000">+                                        &#39;name&#39; =&gt; &#39;backend&#39;,</span>
<span style="color: #00A000">+                                        &#39;value&#39; =&gt; &#39;LDAP&#39;,</span>
<span style="color: #00A000">+                                        &#39;visibility&#39; =&gt; &#39;hidden&#39;,</span>
<span style="color: #00A000">+                                        )</span>
<span style="color: #00A000">+                                );</span>
<span style="color: #00A000">+                                $form-&gt;addField(Array(</span>
<span style="color: #00A000">+                                        &#39;name&#39; =&gt; &#39;action&#39;,</span>
<span style="color: #00A000">+                                        &#39;value&#39; =&gt; &#39;_search-result&#39;,</span>
<span style="color: #00A000">+                                        &#39;visibility&#39; =&gt; &#39;hidden&#39;,</span>
<span style="color: #00A000">+                                        )</span>
<span style="color: #00A000">+                                );</span>
<span style="color: #00A000">+                                $form-&gt;addField(Array(</span>
<span style="color: #00A000">+                                        &#39;name&#39; =&gt; &#39;uri&#39;,</span>
<span style="color: #00A000">+                                        &#39;value&#39; =&gt; &#39;ldap://&#39;,</span>
<span style="color: #00A000">+                                        &#39;visibility&#39; =&gt; &#39;hidden&#39;,</span>
<span style="color: #00A000">+                                        )</span>
<span style="color: #00A000">+                                );</span>
                                 $search_fields = Array(
                                         &#39;sn&#39;              =&gt; Array(&#39;display_name&#39; =&gt; &#39;last name&#39;),
                                         &#39;givenName&#39;       =&gt; Array(&#39;display_name&#39; =&gt; &#39;first name&#39;),
<span style="color: #800080; font-weight: bold">@@ -124,22 +167,15 @@ class MediaBrotha_Backend_LDAP extends MediaBrotha_Backend {</span>
                                         }
                                         $form-&gt;addField($field);
                                 }
<span style="color: #A00000">-                                if (empty($_GET[&#39;ldap_search&#39;])) {</span>
<span style="color: #A00000">-                                        MediaBrotha_Core::addCallback(&#39;MediaBrotha_Backend_LDAP::searchCallback&#39;);</span>
<span style="color: #00A000">+                                if ($action !== &#39;_search-result&#39;) {</span>
                                         return $form;
                                 } else {
<span style="color: #A00000">-                                        $ldap_search = $this-&gt;_ldap-&gt;search(NULL, $filter,</span>
<span style="color: #A00000">-                                                Array(&#39;scope&#39; =&gt; &#39;sub&#39;));</span>
<span style="color: #00A000">+                                        $ldap_search = $this-&gt;_ldap-&gt;search(NULL, $filter, Array(&#39;scope&#39; =&gt; &#39;sub&#39;));</span>
                                         return new MediaBrotha_MediaIterator($this, $ldap_search);
                                 }
                         default:
                                 return parent::doMediaAction($action, $media);
                 }
         }
<span style="color: #A00000">-        static public function searchCallback() {</span>
<span style="color: #A00000">-                $_GET[&#39;backend&#39;] = &#39;LDAP&#39;;</span>
<span style="color: #A00000">-                $_GET[&#39;action&#39;] = &#39;search&#39;;</span>
<span style="color: #A00000">-                $_GET[&#39;ldap_search&#39;] = &#39;1&#39;;</span>
<span style="color: #A00000">-        }</span>
 }
 
</pre></div>
<div class="highlight"><pre>committer: Mathieu Parent
comments: 
MediaBrotha: avoid error on first connection because of unset session

<span style="color: #000080; font-weight: bold">diff --git a/sathieu/cisco-xml/lib/MediaBrotha/Core.php b/sathieu/cisco-xml/lib/MediaBrotha/Core.php</span>
<span style="color: #000080; font-weight: bold">index 9e53e13..7758a55 100644</span>
<span style="color: #A00000">--- a/sathieu/cisco-xml/lib/MediaBrotha/Core.php</span>
<span style="color: #00A000">+++ b/sathieu/cisco-xml/lib/MediaBrotha/Core.php</span>
<span style="color: #800080; font-weight: bold">@@ -202,6 +202,8 @@ class MediaBrotha_Core {</span>
                 if ($v = MediaBrotha_Core::hash2value($h)) {
                         parse_str($v, $output);
                         return $output;
<span style="color: #00A000">+                } else {</span>
<span style="color: #00A000">+                        return Array();</span>
                 }
         }
 
</pre></div>
<div class="highlight"><pre>committer: Mathieu Parent
comments: 
MediaBrotha: add ability to pass params by using hidden fields

<span style="color: #000080; font-weight: bold">diff --git a/sathieu/cisco-xml/lib/MediaBrotha/Form.php b/sathieu/cisco-xml/lib/MediaBrotha/Form.php</span>
<span style="color: #000080; font-weight: bold">index 08dd4c6..509341a 100644</span>
<span style="color: #A00000">--- a/sathieu/cisco-xml/lib/MediaBrotha/Form.php</span>
<span style="color: #00A000">+++ b/sathieu/cisco-xml/lib/MediaBrotha/Form.php</span>
<span style="color: #800080; font-weight: bold">@@ -40,6 +40,7 @@ class MediaBrotha_Field {</span>
 
 class MediaBrotha_Form extends ArrayIterator {
         private $_title;
<span style="color: #00A000">+</span>
         public function getTitle() {
                 return $this-&gt;_title;
         }
<span style="color: #000080; font-weight: bold">diff --git a/sathieu/cisco-xml/lib/MediaBrotha/Frontend/CiscoXML.php b/sathieu/cisco-xml/lib/MediaBrotha/Frontend/CiscoXML.php</span>
<span style="color: #000080; font-weight: bold">index d859829..0f31ee1 100644</span>
<span style="color: #A00000">--- a/sathieu/cisco-xml/lib/MediaBrotha/Frontend/CiscoXML.php</span>
<span style="color: #00A000">+++ b/sathieu/cisco-xml/lib/MediaBrotha/Frontend/CiscoXML.php</span>
<span style="color: #800080; font-weight: bold">@@ -72,11 +72,20 @@ class MediaBrotha_Frontend_CiscoXML extends MediaBrotha_Frontend_HTTP {</span>
         }
 
         public function renderForm(MediaBrotha_Form $form) {
<span style="color: #00A000">+                foreach($form as $field) {</span>
<span style="color: #00A000">+                        if ($field-&gt;get(&#39;visibility&#39;) === &#39;hidden&#39;) {</span>
<span style="color: #00A000">+                                $params[$field-&gt;get(&#39;name&#39;)] = $field-&gt;get(&#39;value&#39;);</span>
<span style="color: #00A000">+                        }</span>
<span style="color: #00A000">+                }</span>
                 $xml = new CiscoIPPhoneInput();
                 $xml-&gt;setCiscoElement(&#39;Title&#39;, $form-&gt;getTitle());
                 //$xml-&gt;setCiscoElement(&#39;Prompt&#39;, ...);
<span style="color: #A00000">-                $xml-&gt;setCiscoElement(&#39;URL&#39;, $this-&gt;rootURL());</span>
<span style="color: #00A000">+                $xml-&gt;setCiscoElement(&#39;URL&#39;, $this-&gt;rootURL().&#39;?&#39;.MediaBrotha_Core::value2hash(http_build_query($params)));</span>
<span style="color: #00A000">+                $params = Array();</span>
                 foreach($form as $field) {
<span style="color: #00A000">+                        if ($field-&gt;get(&#39;visibility&#39;) === &#39;hidden&#39;) {</span>
<span style="color: #00A000">+                                continue;</span>
<span style="color: #00A000">+                        }</span>
                         $flags = &#39;A&#39;;
                         $xml-&gt;setCiscoElement(&#39;InputItem&#39;,
                                 Array(
<span style="color: #800080; font-weight: bold">@@ -88,6 +97,19 @@ class MediaBrotha_Frontend_CiscoXML extends MediaBrotha_Frontend_HTTP {</span>
                         );
                         
                 }
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                $xml-&gt;setCiscoElement(&#39;SoftKeyItem&#39;,</span>
<span style="color: #00A000">+                        Array(&#39;Name&#39; =&gt; &#39;Search&#39;,</span>
<span style="color: #00A000">+                        &#39;URL&#39; =&gt; &#39;SoftKey:Submit&#39;,</span>
<span style="color: #00A000">+                        &#39;Position&#39; =&gt; 1));</span>
<span style="color: #00A000">+                $xml-&gt;setCiscoElement(&#39;SoftKeyItem&#39;,</span>
<span style="color: #00A000">+                        Array(&#39;Name&#39; =&gt; &#39;&lt;&lt;&#39;,</span>
<span style="color: #00A000">+                        &#39;URL&#39; =&gt; &#39;SoftKey:&lt;&lt;&#39;,</span>
<span style="color: #00A000">+                        &#39;Position&#39; =&gt; 2));</span>
<span style="color: #00A000">+                $xml-&gt;setCiscoElement(&#39;SoftKeyItem&#39;,</span>
<span style="color: #00A000">+                        Array(&#39;Name&#39; =&gt; &#39;Exit&#39;,</span>
<span style="color: #00A000">+                        &#39;URL&#39; =&gt; &#39;SoftKey:Exit&#39;,</span>
<span style="color: #00A000">+                        &#39;Position&#39; =&gt; 3));</span>
                 CiscoXMLObject::HttpHeader();
                 print $xml;
         }
<span style="color: #000080; font-weight: bold">diff --git a/sathieu/cisco-xml/lib/MediaBrotha/Frontend/HTML.php b/sathieu/cisco-xml/lib/MediaBrotha/Frontend/HTML.php</span>
<span style="color: #000080; font-weight: bold">index c1ea4df..1c0454a 100644</span>
<span style="color: #A00000">--- a/sathieu/cisco-xml/lib/MediaBrotha/Frontend/HTML.php</span>
<span style="color: #00A000">+++ b/sathieu/cisco-xml/lib/MediaBrotha/Frontend/HTML.php</span>
<span style="color: #800080; font-weight: bold">@@ -56,6 +56,7 @@ class MediaBrotha_Frontend_HTML extends MediaBrotha_Frontend_HTTP {</span>
 
         private function _createHTMLDocument($title) {
                 $this-&gt;_xml = new DOMDocument(&#39;1.0&#39;);
<span style="color: #00A000">+                $this-&gt;_xml-&gt;formatOutput = true;</span>
                 $root = $this-&gt;_xml-&gt;createElement(&#39;html&#39;);
                 $root = $this-&gt;_xml-&gt;appendChild($root);
 
<span style="color: #800080; font-weight: bold">@@ -135,6 +136,9 @@ class MediaBrotha_Frontend_HTML extends MediaBrotha_Frontend_HTTP {</span>
                 $tableElement = $formElement-&gt;appendChild($tableElement);
 
                 foreach($form as $field) {
<span style="color: #00A000">+                        if ($field-&gt;get(&#39;visibility&#39;) === &#39;hidden&#39;) {</span>
<span style="color: #00A000">+                                continue;</span>
<span style="color: #00A000">+                        }</span>
                         $trElement = $this-&gt;_xml-&gt;createElement(&#39;tr&#39;);
                         $trElement = $tableElement-&gt;appendChild($trElement);
 
</pre></div>
<div class="highlight"><pre>committer: Mathieu Parent
comments: 
MediaBrotha: add ability to force Cisco-XML mode

<span style="color: #000080; font-weight: bold">diff --git a/sathieu/cisco-xml/lib/Cisco-XML/Cisco-XML.php b/sathieu/cisco-xml/lib/Cisco-XML/Cisco-XML.php</span>
<span style="color: #000080; font-weight: bold">index 0da1cc3..82226f4 100644</span>
<span style="color: #A00000">--- a/sathieu/cisco-xml/lib/Cisco-XML/Cisco-XML.php</span>
<span style="color: #00A000">+++ b/sathieu/cisco-xml/lib/Cisco-XML/Cisco-XML.php</span>
<span style="color: #800080; font-weight: bold">@@ -26,7 +26,7 @@ This file is part of XML services for Cisco IP Phones.</span>
 class CiscoIPPhone {
         static public function userAgentIsCiscoIPPhone() {
                 if (isset($_SERVER[&#39;HTTP_USER_AGENT&#39;])) {
<span style="color: #A00000">-                        return preg_match(&#39;/^Allegro-Software-WebClient\//&#39;, $_SERVER[&#39;HTTP_USER_AGENT&#39;]);</span>
<span style="color: #00A000">+                        return preg_match(&#39;/^Allegro-Software-WebClient\//&#39;, $_SERVER[&#39;HTTP_USER_AGENT&#39;]) || isset($_GET[&#39;forceciscoxml&#39;]);</span>
                 }
 
         }
</pre></div>
<div class="highlight"><pre>committer: Mathieu Parent
comments: 
MediaBrotha:
<span style="color: #A00000">- do not display the _default action</span>
<span style="color: #A00000">- ensure session arrays are set</span>
<span style="color: #A00000">- limit MenuItem &gt; Name to 64 chars</span>
<span style="color: #A00000">- Cisco IP Phone need a field flag of 1 char</span>

<span style="color: #000080; font-weight: bold">diff --git a/sathieu/cisco-xml/lib/MediaBrotha/Backend.php b/sathieu/cisco-xml/lib/MediaBrotha/Backend.php</span>
<span style="color: #000080; font-weight: bold">index 8e56562..f85b59f 100644</span>
<span style="color: #A00000">--- a/sathieu/cisco-xml/lib/MediaBrotha/Backend.php</span>
<span style="color: #00A000">+++ b/sathieu/cisco-xml/lib/MediaBrotha/Backend.php</span>
<span style="color: #800080; font-weight: bold">@@ -67,6 +67,16 @@ abstract class MediaBrotha_Backend {</span>
         }
 
         // Actions
<span style="color: #00A000">+        final public function getVisibleMediaActions(MediaBrotha_Media $media) {</span>
<span style="color: #00A000">+                $actions = Array();</span>
<span style="color: #00A000">+                foreach ($this-&gt;getMediaActions($media) as $action) {</span>
<span style="color: #00A000">+                        if ($action{0} !== &#39;_&#39;) {</span>
<span style="color: #00A000">+                                $actions[] = $action;</span>
<span style="color: #00A000">+                        }</span>
<span style="color: #00A000">+                }</span>
<span style="color: #00A000">+                return $actions;</span>
<span style="color: #00A000">+        }</span>
<span style="color: #00A000">+</span>
         public function getMediaActions(MediaBrotha_Media $media) {
                 return Array();
         }
<span style="color: #000080; font-weight: bold">diff --git a/sathieu/cisco-xml/lib/MediaBrotha/Core.php b/sathieu/cisco-xml/lib/MediaBrotha/Core.php</span>
<span style="color: #000080; font-weight: bold">index f241c66..9e53e13 100644</span>
<span style="color: #A00000">--- a/sathieu/cisco-xml/lib/MediaBrotha/Core.php</span>
<span style="color: #00A000">+++ b/sathieu/cisco-xml/lib/MediaBrotha/Core.php</span>
<span style="color: #800080; font-weight: bold">@@ -43,6 +43,12 @@ class MediaBrotha_Core {</span>
                         if (!session_start()) {
                                 throw new Exception(&#39;Unable to start session&#39;);
                         }
<span style="color: #00A000">+                        if (!isset($_SESSION[&#39;HASHES&#39;])) {</span>
<span style="color: #00A000">+                                $_SESSION[&#39;HASHES&#39;] = Array();</span>
<span style="color: #00A000">+                        }</span>
<span style="color: #00A000">+                        if (!isset($_SESSION[&#39;CALLBACK&#39;])) {</span>
<span style="color: #00A000">+                                $_SESSION[&#39;CALLBACK&#39;] = Array();</span>
<span style="color: #00A000">+                        }</span>
                         MediaBrotha_Core::_unhashRequest();
                         MediaBrotha_Core::loadBackend(&#39;Root&#39;);
                 } catch (Exception $e) {
<span style="color: #800080; font-weight: bold">@@ -200,9 +206,6 @@ class MediaBrotha_Core {</span>
         }
 
         private static function _unhashRequest() {
<span style="color: #A00000">-                if (!isset($_SESSION[&#39;HASHES&#39;])) {</span>
<span style="color: #A00000">-                        $_SESSION[&#39;HASHES&#39;] = Array();</span>
<span style="color: #A00000">-                }</span>
                 if (isset($_SERVER[&quot;QUERY_STRING&quot;])) {
                         $tmp = explode(&#39;&amp;&#39;, $_SERVER[&quot;QUERY_STRING&quot;]);
                         foreach ($tmp as $h) {
<span style="color: #000080; font-weight: bold">diff --git a/sathieu/cisco-xml/lib/MediaBrotha/Frontend/CiscoXML.php b/sathieu/cisco-xml/lib/MediaBrotha/Frontend/CiscoXML.php</span>
<span style="color: #000080; font-weight: bold">index 1bf85b7..d859829 100644</span>
<span style="color: #A00000">--- a/sathieu/cisco-xml/lib/MediaBrotha/Frontend/CiscoXML.php</span>
<span style="color: #00A000">+++ b/sathieu/cisco-xml/lib/MediaBrotha/Frontend/CiscoXML.php</span>
<span style="color: #800080; font-weight: bold">@@ -43,7 +43,7 @@ class MediaBrotha_Frontend_CiscoXML extends MediaBrotha_Frontend_HTTP {</span>
                                 ($item-&gt;getMimeEncoding() ? (&#39;mime_encoding=&#39;.urlencode($item-&gt;getMimeEncoding()).&#39;&amp;&#39;) : &#39;&#39;).
                                 &#39;uri=&#39;.urlencode($item-&gt;getURI()));
                 $this-&gt;_xml-&gt;setCiscoElement(&#39;MenuItem&#39;,
<span style="color: #A00000">-                        Array(&#39;Name&#39; =&gt; $item-&gt;getDisplayName(), &#39;URL&#39; =&gt; $url));</span>
<span style="color: #00A000">+                        Array(&#39;Name&#39; =&gt; $item-&gt;getDisplayName(64), &#39;URL&#39; =&gt; $url));</span>
         }
         public function finish($item) {
                 $pos = 1;
<span style="color: #800080; font-weight: bold">@@ -52,7 +52,7 @@ class MediaBrotha_Frontend_CiscoXML extends MediaBrotha_Frontend_HTTP {</span>
                         &#39;URL&#39; =&gt; &#39;SoftKey:Select&#39;,
                         &#39;Position&#39; =&gt; $pos++));
                 foreach (MediaBrotha_Core::getBackends() as $backend) {
<span style="color: #A00000">-                        foreach ($backend-&gt;getMediaActions($item) as $action) {</span>
<span style="color: #00A000">+                        foreach ($backend-&gt;getVisibleMediaActions($item) as $action) {</span>
                                 $this-&gt;_xml-&gt;setCiscoElement(&#39;SoftKeyItem&#39;,
                                         Array(&#39;Name&#39; =&gt; $action,
                                         &#39;URL&#39; =&gt; &#39;QueryStringParam:&#39;.MediaBrotha_Core::value2hash(&#39;action=&#39;.$action.&#39;&amp;backend=&#39;.$backend-&gt;getBackendName()),
<span style="color: #800080; font-weight: bold">@@ -77,12 +77,13 @@ class MediaBrotha_Frontend_CiscoXML extends MediaBrotha_Frontend_HTTP {</span>
                 //$xml-&gt;setCiscoElement(&#39;Prompt&#39;, ...);
                 $xml-&gt;setCiscoElement(&#39;URL&#39;, $this-&gt;rootURL());
                 foreach($form as $field) {
<span style="color: #00A000">+                        $flags = &#39;A&#39;;</span>
                         $xml-&gt;setCiscoElement(&#39;InputItem&#39;,
                                 Array(
                                         &#39;DisplayName&#39; =&gt; $field-&gt;get(&#39;display_name&#39;),
                                         &#39;QueryStringParam&#39; =&gt; $field-&gt;get(&#39;name&#39;),
                                         &#39;DefaultValue&#39; =&gt; $field-&gt;get(&#39;value&#39;),
<span style="color: #A00000">-                                        &#39;InputFlags&#39; =&gt; &#39;&#39;,</span>
<span style="color: #00A000">+                                        &#39;InputFlags&#39; =&gt; $flags,</span>
                                 )
                         );
                         
<span style="color: #000080; font-weight: bold">diff --git a/sathieu/cisco-xml/lib/MediaBrotha/Frontend/HTML.php b/sathieu/cisco-xml/lib/MediaBrotha/Frontend/HTML.php</span>
<span style="color: #000080; font-weight: bold">index f6d4015..c1ea4df 100644</span>
<span style="color: #A00000">--- a/sathieu/cisco-xml/lib/MediaBrotha/Frontend/HTML.php</span>
<span style="color: #00A000">+++ b/sathieu/cisco-xml/lib/MediaBrotha/Frontend/HTML.php</span>
<span style="color: #800080; font-weight: bold">@@ -40,7 +40,7 @@ class MediaBrotha_Frontend_HTML extends MediaBrotha_Frontend_HTTP {</span>
                                 &#39;uri=&#39;.urlencode($media-&gt;getURI()));
 
                 foreach (MediaBrotha_Core::getBackends() as $backend) {
<span style="color: #A00000">-                        foreach ($backend-&gt;getMediaActions($media) as $action) {</span>
<span style="color: #00A000">+                        foreach ($backend-&gt;getVisibleMediaActions($media) as $action) {</span>
                                 $tag = $this-&gt;_xml-&gt;createElement($tag_name);
                                 $tag = $parent-&gt;appendChild($tag);
 
</pre></div>
========================================================================<pre>

Summary of changes:
 sathieu/cisco-xml/lib/Cisco-XML/Cisco-XML.php      |    2 +-
 sathieu/cisco-xml/lib/MediaBrotha/Backend.php      |   10 +++
 sathieu/cisco-xml/lib/MediaBrotha/Backend/LDAP.php |   66 +++++++++++++++-----
 sathieu/cisco-xml/lib/MediaBrotha/Core.php         |   11 +++-
 sathieu/cisco-xml/lib/MediaBrotha/Form.php         |    1 +
 .../lib/MediaBrotha/Frontend/CiscoXML.php          |   31 ++++++++-
 .../cisco-xml/lib/MediaBrotha/Frontend/HTML.php    |   41 ++++++++-----
 7 files changed, 123 insertions(+), 39 deletions(-)
</pre>
<p>this email was generated because of /git/your-repo.git/hooks/post-receive by the file /git-core/contrib/hooks/post-receive-email<br />
For more info, see <a href="http://blog.chomperstomp.com/?p=630">http://blog.chomperstomp.com/?p=630</a>
-- <br />
FreeSWITCH user-contributed scripts, etc</p>