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

<h2>branch: master updated</h2>
<pre>
       via: 0cb41713987185aec7f42c9cff174b6d2757e460 (commit)
      from: c2e63f1d8fc269cf17bd85d534c9099af8a454b6 (commit)


</pre>= COMMIT LOG ===========================================================
<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>
========================================================================<pre>

Summary of changes:
 sathieu/cisco-xml/lib/MediaBrotha/Form.php         |    1 +
 .../lib/MediaBrotha/Frontend/CiscoXML.php          |   24 +++++++++++++++++++-
 .../cisco-xml/lib/MediaBrotha/Frontend/HTML.php    |    4 +++
 3 files changed, 28 insertions(+), 1 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>