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

<h2>branch: master updated</h2>
<pre>
       via: ee436d35144c7d85629d2c7356db64d5f392d1ff (commit)
      from: abd1a5786ac8079d735ede53515dbaedd8324acd (commit)


</pre>= COMMIT LOG ===========================================================
<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/MediaBrotha/Backend.php      |   10 ++++++++++
 sathieu/cisco-xml/lib/MediaBrotha/Core.php         |    9 ++++++---
 .../lib/MediaBrotha/Frontend/CiscoXML.php          |    7 ++++---
 .../cisco-xml/lib/MediaBrotha/Frontend/HTML.php    |    2 +-
 4 files changed, 21 insertions(+), 7 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>