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

<h2>branch: master updated</h2>
<pre>
       via: d9ed290a32fd5dfd4401b02652e07c892126d7c6 (commit)
      from: 078d663ef932223e27db8166e074cc4f4542a339 (commit)


</pre>= COMMIT LOG ===========================================================
<div class="highlight"><pre>committer: Mathieu Parent
comments: 
MediaBrotha: LDAP search form
And more:
<span style="color: #A00000">- callback</span>
<span style="color: #A00000">- rework of actions</span>
<span style="color: #A00000">- exceptions handling</span>
<span style="color: #A00000">- forms</span>

<span style="color: #000080; font-weight: bold">diff --git a/sathieu/cisco-xml/browser/index.php b/sathieu/cisco-xml/browser/index.php</span>
<span style="color: #000080; font-weight: bold">index 137b409..c3286fa 100644</span>
<span style="color: #A00000">--- a/sathieu/cisco-xml/browser/index.php</span>
<span style="color: #00A000">+++ b/sathieu/cisco-xml/browser/index.php</span>
<span style="color: #800080; font-weight: bold">@@ -25,7 +25,7 @@ This file is part of XML services for Cisco IP Phones.</span>
  */
 
 //* Debug
<span style="color: #A00000">-ini_set(&#39;error_reporting&#39;, E_ALL | E_STRUCT);</span>
<span style="color: #00A000">+ini_set(&#39;error_reporting&#39;, E_ALL);</span>
 ini_set(&#39;display_errors&#39;, 1);
 // */
 
<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 216aad6..0da1cc3 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">@@ -25,7 +25,9 @@ This file is part of XML services for Cisco IP Phones.</span>
  */
 class CiscoIPPhone {
         static public function userAgentIsCiscoIPPhone() {
<span style="color: #A00000">-                return preg_match(&#39;/^Allegro-Software-WebClient\//&#39;, $_SERVER[&#39;HTTP_USER_AGENT&#39;]);</span>
<span style="color: #00A000">+                if (isset($_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;]);</span>
<span style="color: #00A000">+                }</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 28a8441..8e56562 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">@@ -26,8 +26,8 @@ This file is part of MediaBrotha.</span>
 
 require_once(&#39;MediaBrotha/Media.php&#39;);
 
<span style="color: #A00000">-class MediaBrotha_Backend {</span>
<span style="color: #A00000">-        protected $_params = NULL;</span>
<span style="color: #00A000">+abstract class MediaBrotha_Backend {</span>
<span style="color: #00A000">+        private $_params = NULL;</span>
 
         public function __construct($params = NULL) {
                 $this-&gt;setParam($params);
<span style="color: #800080; font-weight: bold">@@ -35,7 +35,7 @@ class MediaBrotha_Backend {</span>
         }
 
         /* params */
<span style="color: #A00000">-        public function getParam($name = NULL) {</span>
<span style="color: #00A000">+        final public function getParam($name = NULL) {</span>
                 if ($name === NULL) {
                         return $this-&gt;_params;
                 } elseif (isset($this-&gt;_params[$name])) {
<span style="color: #800080; font-weight: bold">@@ -44,7 +44,7 @@ class MediaBrotha_Backend {</span>
                         return NULL;
                 }
         }
<span style="color: #A00000">-        public function setParam($name, $value = NULL) {</span>
<span style="color: #00A000">+        final public function setParam($name, $value = NULL) {</span>
                 if (is_array($name)) {
                         $this-&gt;_params = $name;
                 } else {
<span style="color: #800080; font-weight: bold">@@ -66,10 +66,6 @@ class MediaBrotha_Backend {</span>
                 return $item;
         }
 
<span style="color: #A00000">-        public function fetch(MediaBrotha_Media $media) {</span>
<span style="color: #A00000">-                return false;</span>
<span style="color: #A00000">-        }</span>
<span style="color: #A00000">-</span>
         // Actions
         public function getMediaActions(MediaBrotha_Media $media) {
                 return Array();
<span style="color: #000080; font-weight: bold">diff --git a/sathieu/cisco-xml/lib/MediaBrotha/Backend/FileSystem.php b/sathieu/cisco-xml/lib/MediaBrotha/Backend/FileSystem.php</span>
<span style="color: #000080; font-weight: bold">index 006814b..c23a86f 100644</span>
<span style="color: #A00000">--- a/sathieu/cisco-xml/lib/MediaBrotha/Backend/FileSystem.php</span>
<span style="color: #00A000">+++ b/sathieu/cisco-xml/lib/MediaBrotha/Backend/FileSystem.php</span>
<span style="color: #800080; font-weight: bold">@@ -61,19 +61,6 @@ class MediaBrotha_Backend_FileSystem extends MediaBrotha_Backend {</span>
                 }
         }
 
<span style="color: #A00000">-        public function fetch(MediaBrotha_Media $media) {</span>
<span style="color: #A00000">-                $uri = $media-&gt;getURI();</span>
<span style="color: #A00000">-                if ((parse_url($uri, PHP_URL_SCHEME) != &#39;file&#39;) || !$this-&gt;isURISafe($uri)) {</span>
<span style="color: #A00000">-                        $uri = &#39;file://&#39;.$this-&gt;getParam(&#39;base_path&#39;);</span>
<span style="color: #A00000">-                }</span>
<span style="color: #A00000">-                $path = parse_url($uri, PHP_URL_PATH);</span>
<span style="color: #A00000">-                if (is_dir($path)) {</span>
<span style="color: #A00000">-                        return new MediaBrotha_MediaIterator($this, $media, new DirectoryIterator($path));</span>
<span style="color: #A00000">-                } else {</span>
<span style="color: #A00000">-                        return false;</span>
<span style="color: #A00000">-                }</span>
<span style="color: #A00000">-        }</span>
<span style="color: #A00000">-</span>
         // Actions
         protected function _isHandled(MediaBrotha_Media $media) {
                 return ($media-&gt;getMimeType() === &#39;application/x-directory&#39;)
<span style="color: #800080; font-weight: bold">@@ -83,6 +70,7 @@ class MediaBrotha_Backend_FileSystem extends MediaBrotha_Backend {</span>
         public function getMediaActions(MediaBrotha_Media $media) {
                 if ($this-&gt;_isHandled($media)) {
                         return Array(
<span style="color: #00A000">+                                &#39;_default&#39;,</span>
                                 &#39;browse&#39;,
                         );
                 } else {
<span style="color: #800080; font-weight: bold">@@ -90,6 +78,25 @@ class MediaBrotha_Backend_FileSystem extends MediaBrotha_Backend {</span>
                 }
         }
 
<span style="color: #00A000">+        public function doMediaAction($action, MediaBrotha_Media $media) {</span>
<span style="color: #00A000">+                switch($action) {</span>
<span style="color: #00A000">+                        case &#39;_default&#39;:</span>
<span style="color: #00A000">+                        case &#39;browse&#39;:</span>
<span style="color: #00A000">+                                $uri = $media-&gt;getURI();</span>
<span style="color: #00A000">+                                if ((parse_url($uri, PHP_URL_SCHEME) != &#39;file&#39;) || !$this-&gt;isURISafe($uri)) {</span>
<span style="color: #00A000">+                                        $uri = &#39;file://&#39;.$this-&gt;getParam(&#39;base_path&#39;);</span>
<span style="color: #00A000">+                                }</span>
<span style="color: #00A000">+                                $path = parse_url($uri, PHP_URL_PATH);</span>
<span style="color: #00A000">+                                if (is_dir($path)) {</span>
<span style="color: #00A000">+                                        return new MediaBrotha_MediaIterator($this, new DirectoryIterator($path));</span>
<span style="color: #00A000">+                                } else {</span>
<span style="color: #00A000">+                                        return false;</span>
<span style="color: #00A000">+                                }</span>
<span style="color: #00A000">+                        default:</span>
<span style="color: #00A000">+                                return parent::doMediaAction($action, $media);</span>
<span style="color: #00A000">+                }</span>
<span style="color: #00A000">+        }</span>
<span style="color: #00A000">+</span>
         // Populate
         public function populateMedia(MediaBrotha_Media $media) {
                 if ($this-&gt;_isHandled($media)) {
<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 365e78e..2b04351 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">@@ -63,21 +63,6 @@ class MediaBrotha_Backend_LDAP extends MediaBrotha_Backend {</span>
                 }
         }
 
<span style="color: #A00000">-        public function fetch(MediaBrotha_Media $media) {</span>
<span style="color: #A00000">-                $uri = $media-&gt;getURI();</span>
<span style="color: #A00000">-                if (($this::parseLDAPURI($uri, PHP_URL_SCHEME) != &#39;ldap&#39;) || !$this-&gt;isURISafe($uri)) {</span>
<span style="color: #A00000">-                        $ldap_connect_config = $this-&gt;getParam(&#39;ldap_connect_config&#39;);</span>
<span style="color: #A00000">-                        $uri = &#39;ldap:///&#39;.$ldap_connect_config[&#39;basedn&#39;];</span>
<span style="color: #A00000">-                }</span>
<span style="color: #A00000">-                $basedn = $this::parseLDAPURI($uri, PHP_URL_PATH);</span>
<span style="color: #A00000">-                if ($basedn &amp;&amp; ($basedn{0} = &#39;/&#39;)) {</span>
<span style="color: #A00000">-                        $basedn = substr($basedn, 1);</span>
<span style="color: #A00000">-                }</span>
<span style="color: #A00000">-                $ldap_search = $this-&gt;_ldap-&gt;search($basedn, NULL,</span>
<span style="color: #A00000">-                        Array());</span>
<span style="color: #A00000">-                return new MediaBrotha_MediaIterator($this, $media, $ldap_search);</span>
<span style="color: #A00000">-                return true;</span>
<span style="color: #A00000">-        }</span>
         // Actions
         protected function _isHandled(MediaBrotha_Media $media) {
                 return ($media-&gt;getMimeType() === &#39;text/directory&#39;)
<span style="color: #800080; font-weight: bold">@@ -87,12 +72,74 @@ class MediaBrotha_Backend_LDAP extends MediaBrotha_Backend {</span>
         public function getMediaActions(MediaBrotha_Media $media) {
                 if ($this-&gt;_isHandled($media)) {
                         return Array(
<span style="color: #00A000">+                                &#39;_default&#39;,</span>
                                 &#39;browse&#39;,
<span style="color: #00A000">+                                &#39;search&#39;,</span>
                         );
                 } else {
                         return parent::getMediaActions($media);
                 }
         }
<span style="color: #A00000">-</span>
<span style="color: #00A000">+        public function doMediaAction($action, MediaBrotha_Media $media) {</span>
<span style="color: #00A000">+                switch($action) {</span>
<span style="color: #00A000">+                        case &#39;browse&#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">+                                        $ldap_connect_config = $this-&gt;getParam(&#39;ldap_connect_config&#39;);</span>
<span style="color: #00A000">+                                        $uri = &#39;ldap:///&#39;.$ldap_connect_config[&#39;basedn&#39;];</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_search = $this-&gt;_ldap-&gt;search($basedn, NULL,</span>
<span style="color: #00A000">+                                        Array());</span>
<span style="color: #00A000">+                                return new MediaBrotha_MediaIterator($this, $ldap_search);</span>
<span style="color: #00A000">+                        case &#39;_default&#39;:</span>
<span style="color: #00A000">+                        case &#39;search&#39;:</span>
<span style="color: #00A000">+                                $form =  new MediaBrotha_Form();</span>
<span style="color: #00A000">+                                $form-&gt;setTitle(&#39;search&#39;);</span>
<span style="color: #00A000">+                                $search_fields = Array(</span>
<span style="color: #00A000">+                                        &#39;sn&#39;              =&gt; Array(&#39;display_name&#39; =&gt; &#39;last name&#39;),</span>
<span style="color: #00A000">+                                        &#39;givenName&#39;       =&gt; Array(&#39;display_name&#39; =&gt; &#39;first name&#39;),</span>
<span style="color: #00A000">+                                        &#39;telephoneNumber&#39; =&gt; Array(&#39;display_name&#39; =&gt; &#39;phone&#39;, &#39;filter&#39; =&gt; &#39;(telephoneNumber=*%s*)&#39;),</span>
<span style="color: #00A000">+                                        //&#39;o&#39;               =&gt; Array(&#39;display_name&#39; =&gt; &#39;organization&#39;),</span>
<span style="color: #00A000">+                                        //&#39;mobile&#39;          =&gt; Array(&#39;display_name&#39; =&gt; &#39;mobile&#39;),</span>
<span style="color: #00A000">+                                        //&#39;facsimileTelephoneNumber&#39; =&gt; Array(&#39;display_name&#39; =&gt; &#39;fax&#39;),</span>
<span style="color: #00A000">+                                        //&#39;l&#39;               =&gt; Array(&#39;display_name&#39; =&gt; &#39;location&#39;),</span>
<span style="color: #00A000">+                                        //&#39;st&#39;              =&gt; Array(&#39;display_name&#39; =&gt; &#39;department&#39;),</span>
<span style="color: #00A000">+                                        //&#39;roomNumber&#39;      =&gt; Array(&#39;display_name&#39; =&gt; &#39;room number&#39;),</span>
<span style="color: #00A000">+                                );</span>
<span style="color: #00A000">+                                $ldap_connect_config = $this-&gt;getParam(&#39;ldap_connect_config&#39;);</span>
<span style="color: #00A000">+                                $filter = $ldap_connect_config[&#39;filter&#39;];</span>
<span style="color: #00A000">+                                foreach ($search_fields as $attribute_name =&gt; $field) {</span>
<span style="color: #00A000">+                                        $field[&#39;name&#39;] = $attribute_name;</span>
<span style="color: #00A000">+                                        if (!empty($_GET[$attribute_name])) {</span>
<span style="color: #00A000">+                                                $field[&#39;value&#39;] = $_GET[$attribute_name];</span>
<span style="color: #00A000">+                                                if(empty($infos[&#39;filter&#39;])) {</span>
<span style="color: #00A000">+                                                        $filter=&quot;(&amp;$filter($attribute_name=&quot;.$_GET[$attribute_name].&quot;*))&quot;;</span>
<span style="color: #00A000">+                                                } else {</span>
<span style="color: #00A000">+                                                        $filter=&quot;(&amp;$filter&quot;.sprintf($infos[&#39;filter&#39;], $_GET[$attribute_name]).&quot;)&quot;;</span>
<span style="color: #00A000">+                                                }</span>
<span style="color: #00A000">+                                        }</span>
<span style="color: #00A000">+                                        $form-&gt;addField($field);</span>
<span style="color: #00A000">+                                }</span>
<span style="color: #00A000">+                                if (empty($_GET[&#39;ldap_search&#39;])) {</span>
<span style="color: #00A000">+                                        MediaBrotha_Core::addCallback(&#39;MediaBrotha_Backend_LDAP::searchCallback&#39;);</span>
<span style="color: #00A000">+                                        return $form;</span>
<span style="color: #00A000">+                                } else {</span>
<span style="color: #00A000">+                                        $ldap_search = $this-&gt;_ldap-&gt;search(NULL, $filter,</span>
<span style="color: #00A000">+                                                Array(&#39;scope&#39; =&gt; &#39;sub&#39;));</span>
<span style="color: #00A000">+                                        return new MediaBrotha_MediaIterator($this, $ldap_search);</span>
<span style="color: #00A000">+                                }</span>
<span style="color: #00A000">+                        default:</span>
<span style="color: #00A000">+                                return parent::doMediaAction($action, $media);</span>
<span style="color: #00A000">+                }</span>
<span style="color: #00A000">+        }</span>
<span style="color: #00A000">+        static public function searchCallback() {</span>
<span style="color: #00A000">+                $_GET[&#39;backend&#39;] = &#39;LDAP&#39;;</span>
<span style="color: #00A000">+                $_GET[&#39;action&#39;] = &#39;search&#39;;</span>
<span style="color: #00A000">+                $_GET[&#39;ldap_search&#39;] = &#39;1&#39;;</span>
<span style="color: #00A000">+        }</span>
 }
 
<span style="color: #000080; font-weight: bold">diff --git a/sathieu/cisco-xml/lib/MediaBrotha/Backend/Root.php b/sathieu/cisco-xml/lib/MediaBrotha/Backend/Root.php</span>
<span style="color: #000080; font-weight: bold">index 9616be8..613ce17 100644</span>
<span style="color: #A00000">--- a/sathieu/cisco-xml/lib/MediaBrotha/Backend/Root.php</span>
<span style="color: #00A000">+++ b/sathieu/cisco-xml/lib/MediaBrotha/Backend/Root.php</span>
<span style="color: #800080; font-weight: bold">@@ -35,7 +35,7 @@ class MediaBrotha_Backend_Root extends MediaBrotha_Backend {</span>
                                 &#39;display_name&#39; =&gt; &#39;Root&#39;,
                         )
                 );
<span style="color: #A00000">-                $this-&gt;_media_iterator = new MediaBrotha_MediaIterator($this, $this-&gt;_media);</span>
<span style="color: #00A000">+                $this-&gt;_media_iterator = new MediaBrotha_MediaIterator($this);</span>
         }
 
         public function addRootMedia($URI, array $metadata = Array(), $mime_type = NULL, $mime_encoding = NULL) {
<span style="color: #800080; font-weight: bold">@@ -45,9 +45,15 @@ class MediaBrotha_Backend_Root extends MediaBrotha_Backend {</span>
                 $this-&gt;_media_iterator-&gt;bufferAdd($media);
         }
 
<span style="color: #A00000">-        // Browsing</span>
<span style="color: #A00000">-        public function fetch(MediaBrotha_Media $media) {</span>
<span style="color: #A00000">-                return $this-&gt;_media_iterator;</span>
<span style="color: #00A000">+        // Actions</span>
<span style="color: #00A000">+        public function doMediaAction($action, MediaBrotha_Media $media) {</span>
<span style="color: #00A000">+                switch($action) {</span>
<span style="color: #00A000">+                        case &#39;_default&#39;:</span>
<span style="color: #00A000">+                        case &#39;browse&#39;:</span>
<span style="color: #00A000">+                                return $this-&gt;_media_iterator;</span>
<span style="color: #00A000">+                        default:</span>
<span style="color: #00A000">+                                return parent::doMediaAction($action, $media);</span>
<span style="color: #00A000">+                }</span>
         }
 }
 
<span style="color: #000080; font-weight: bold">diff --git a/sathieu/cisco-xml/lib/MediaBrotha/Backend/VLC.php b/sathieu/cisco-xml/lib/MediaBrotha/Backend/VLC.php</span>
<span style="color: #000080; font-weight: bold">index 8c3208e..d881850 100644</span>
<span style="color: #A00000">--- a/sathieu/cisco-xml/lib/MediaBrotha/Backend/VLC.php</span>
<span style="color: #00A000">+++ b/sathieu/cisco-xml/lib/MediaBrotha/Backend/VLC.php</span>
<span style="color: #800080; font-weight: bold">@@ -43,12 +43,6 @@ class MediaBrotha_Backend_VLC extends MediaBrotha_Backend {</span>
                 print $output.&#39;&lt;!--&#39;.$url.&quot;--&gt;\n&quot;;
         }
 
<span style="color: #A00000">-        // Browsing</span>
<span style="color: #A00000">-        public function fetch(MediaBrotha_Media $media) {</span>
<span style="color: #A00000">-                $this-&gt;_buffer[] = $media;</span>
<span style="color: #A00000">-                return true;</span>
<span style="color: #A00000">-        }</span>
<span style="color: #A00000">-</span>
         // Actions
         protected function _isHandled(MediaBrotha_Media $media) {
                 return in_array($media-&gt;getMimeType(), Array($this::$_supported_mime_types))
<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 8997a7c..f241c66 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">@@ -28,6 +28,7 @@ require_once(&#39;MediaBrotha/Backend.php&#39;);</span>
 require_once(&#39;MediaBrotha/Frontend.php&#39;);
 require_once(&#39;MediaBrotha/Media.php&#39;);
 require_once(&#39;MediaBrotha/MediaIterator.php&#39;);
<span style="color: #00A000">+require_once(&#39;MediaBrotha/Form.php&#39;);</span>
 
 class MediaBrotha_Core {
         private static $_frontend = NULL;
<span style="color: #800080; font-weight: bold">@@ -38,20 +39,26 @@ class MediaBrotha_Core {</span>
          * Core
          */
         public static function init() {
<span style="color: #A00000">-                if (!session_start()) {</span>
<span style="color: #A00000">-                        die(&#39;Unable to start session&#39;);</span>
<span style="color: #00A000">+                try {</span>
<span style="color: #00A000">+                        if (!session_start()) {</span>
<span style="color: #00A000">+                                throw new Exception(&#39;Unable to start session&#39;);</span>
<span style="color: #00A000">+                        }</span>
<span style="color: #00A000">+                        MediaBrotha_Core::_unhashRequest();</span>
<span style="color: #00A000">+                        MediaBrotha_Core::loadBackend(&#39;Root&#39;);</span>
<span style="color: #00A000">+                } catch (Exception $e) {</span>
<span style="color: #00A000">+                        die($e);</span>
                 }
<span style="color: #A00000">-                MediaBrotha_Core::_unhashRequest();</span>
<span style="color: #A00000">-                MediaBrotha_Core::loadBackend(&#39;Root&#39;);</span>
         }
 
         public static function go() {
<span style="color: #A00000">-                $current_backend = MediaBrotha_Core::getCurrentBackend();</span>
<span style="color: #A00000">-                $current_media = MediaBrotha_Core::getCurrentMedia();</span>
<span style="color: #A00000">-                if (MediaBrotha_Core::getAction() == &#39;browse&#39;) {</span>
<span style="color: #A00000">-                        if ($media_iterator = $current_backend-&gt;fetch($current_media)) {</span>
<span style="color: #00A000">+                try {</span>
<span style="color: #00A000">+                        MediaBrotha_Core::runCallback();</span>
<span style="color: #00A000">+                        $current_backend = MediaBrotha_Core::getCurrentBackend();</span>
<span style="color: #00A000">+                        $current_media = MediaBrotha_Core::getCurrentMedia();</span>
<span style="color: #00A000">+                        $result = $current_backend-&gt;doMediaAction(MediaBrotha_Core::getAction(), $current_media);</span>
<span style="color: #00A000">+                        if (is_a($result, &#39;MediaBrotha_MediaIterator&#39;)) {</span>
                                 MediaBrotha_Core::$_frontend-&gt;begin($current_media);
<span style="color: #A00000">-                                foreach ($media_iterator as $item) {</span>
<span style="color: #00A000">+                                foreach ($result as $item) {</span>
                                         if (($item === NULL) || $item-&gt;isHidden()) {
                                                 continue;
                                         }
<span style="color: #800080; font-weight: bold">@@ -59,17 +66,32 @@ class MediaBrotha_Core {</span>
                                 }
                                 MediaBrotha_Core::$_frontend-&gt;finish($current_media);
                                 MediaBrotha_Core::$_frontend-&gt;render($current_media);
<span style="color: #00A000">+                        } elseif (is_a($result, &#39;MediaBrotha_Form&#39;)) {</span>
<span style="color: #00A000">+                                MediaBrotha_Core::$_frontend-&gt;renderForm($result);</span>
<span style="color: #00A000">+                        } elseif (is_a($result, &#39;Exception&#39;)) {</span>
<span style="color: #00A000">+                                throw $result;</span>
                         } else {
<span style="color: #00A000">+                                throw new Exception(&quot;Got unexpected result &#39;$result&#39;.&quot;);</span>
                         }
<span style="color: #A00000">-                } else {</span>
<span style="color: #A00000">-                        $current_backend-&gt;doMediaAction(MediaBrotha_Core::getAction(), $current_media);</span>
<span style="color: #00A000">+                } catch (Exception $e) {</span>
<span style="color: #00A000">+                        MediaBrotha_Core::$_frontend-&gt;renderException($e);</span>
                 }
         }
 
<span style="color: #A00000">-        public function addRootMedia($URI, array $metadata = Array(), $mime_type = NULL, $mime_encoding = NULL) {</span>
<span style="color: #00A000">+        public static function addRootMedia($URI, array $metadata = Array(), $mime_type = NULL, $mime_encoding = NULL) {</span>
                 MediaBrotha_Core::$_backends[&#39;Root&#39;]-&gt;addRootMedia($URI, $metadata, $mime_type, $mime_encoding);
         }
 
<span style="color: #00A000">+        public static function addCallback($callback, $arg = NULL) {</span>
<span style="color: #00A000">+                $_SESSION[&#39;CALLBACK&#39;][] = Array($callback, $arg);</span>
<span style="color: #00A000">+        }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        public static function runCallback() {</span>
<span style="color: #00A000">+                while($callback_info = array_shift($_SESSION[&#39;CALLBACK&#39;])) {</span>
<span style="color: #00A000">+                        call_user_func($callback_info[0],$callback_info[1]);</span>
<span style="color: #00A000">+                }</span>
<span style="color: #00A000">+        }</span>
<span style="color: #00A000">+</span>
         /*
          * Backends
          */
<span style="color: #800080; font-weight: bold">@@ -129,7 +151,7 @@ class MediaBrotha_Core {</span>
                 if (!empty($_GET[&#39;action&#39;])) {
                         return $_GET[&#39;action&#39;];
                 } else {
<span style="color: #A00000">-                        return &#39;browse&#39;;</span>
<span style="color: #00A000">+                        return &#39;_default&#39;;</span>
                 }
         }
 
<span style="color: #000080; font-weight: bold">diff --git a/sathieu/cisco-xml/lib/MediaBrotha/Frontend.php b/sathieu/cisco-xml/lib/MediaBrotha/Form.php</span>
similarity index 60%
copy from sathieu/cisco-xml/lib/MediaBrotha/Frontend.php
copy to sathieu/cisco-xml/lib/MediaBrotha/Form.php
<span style="color: #000080; font-weight: bold">index 2cc6060..08dd4c6 100644</span>
<span style="color: #A00000">--- a/sathieu/cisco-xml/lib/MediaBrotha/Frontend.php</span>
<span style="color: #00A000">+++ b/sathieu/cisco-xml/lib/MediaBrotha/Form.php</span>
<span style="color: #800080; font-weight: bold">@@ -24,11 +24,31 @@ This file is part of MediaBrotha.</span>
  * @author Mathieu Parent
  */
 
<span style="color: #A00000">-class MediaBrotha_Frontend {</span>
<span style="color: #A00000">-        protected $_infos = NULL;</span>
<span style="color: #00A000">+class MediaBrotha_Field {</span>
<span style="color: #00A000">+        private $_attrs;</span>
 
<span style="color: #A00000">-        public function __construct(array $args = Array()) {</span>
<span style="color: #A00000">-                $this-&gt;_infos = $args;</span>
<span style="color: #00A000">+        public function __construct(array $attrs) {</span>
<span style="color: #00A000">+                $this-&gt;_attrs = $attrs;</span>
<span style="color: #00A000">+        }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        public function get($name) {</span>
<span style="color: #00A000">+                if (isset($this-&gt;_attrs[$name])) {</span>
<span style="color: #00A000">+                        return $this-&gt;_attrs[$name];</span>
<span style="color: #00A000">+                }        </span>
         }
 }
 
<span style="color: #00A000">+class MediaBrotha_Form extends ArrayIterator {</span>
<span style="color: #00A000">+        private $_title;</span>
<span style="color: #00A000">+        public function getTitle() {</span>
<span style="color: #00A000">+                return $this-&gt;_title;</span>
<span style="color: #00A000">+        }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        public function setTitle($title) {</span>
<span style="color: #00A000">+                $this-&gt;_title = $title;</span>
<span style="color: #00A000">+        }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        public function addField(array $args) {</span>
<span style="color: #00A000">+                $this[] = new MediaBrotha_Field($args);</span>
<span style="color: #00A000">+        }</span>
<span style="color: #00A000">+}</span>
<span style="color: #000080; font-weight: bold">diff --git a/sathieu/cisco-xml/lib/MediaBrotha/Frontend.php b/sathieu/cisco-xml/lib/MediaBrotha/Frontend.php</span>
<span style="color: #000080; font-weight: bold">index 2cc6060..be427fa 100644</span>
<span style="color: #A00000">--- a/sathieu/cisco-xml/lib/MediaBrotha/Frontend.php</span>
<span style="color: #00A000">+++ b/sathieu/cisco-xml/lib/MediaBrotha/Frontend.php</span>
<span style="color: #800080; font-weight: bold">@@ -24,11 +24,19 @@ This file is part of MediaBrotha.</span>
  * @author Mathieu Parent
  */
 
<span style="color: #A00000">-class MediaBrotha_Frontend {</span>
<span style="color: #00A000">+abstract class MediaBrotha_Frontend {</span>
         protected $_infos = NULL;
 
         public function __construct(array $args = Array()) {
                 $this-&gt;_infos = $args;
         }
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        public function renderException(Exception $e) {</span>
<span style="color: #00A000">+                print $e;</span>
<span style="color: #00A000">+        }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        public function renderForm(MediaBrotha_Form $form) {</span>
<span style="color: #00A000">+                throw new Exception(__FUNCTION__ .&#39; not implemented in class &quot;&#39;.get_class($this).&#39;&quot;&#39;);</span>
<span style="color: #00A000">+        }</span>
 }
 
<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 914e6ee..1bf85b7 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">@@ -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(MediaBrotha_Core::getCurrentMedia()) as $action) {</span>
<span style="color: #00A000">+                        foreach ($backend-&gt;getMediaActions($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">@@ -70,5 +70,25 @@ class MediaBrotha_Frontend_CiscoXML extends MediaBrotha_Frontend_HTTP {</span>
                         print $this-&gt;_xml-&gt;execute($this-&gt;_infos[&#39;push_url&#39;]);
                 }
         }
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        public function renderForm(MediaBrotha_Form $form) {</span>
<span style="color: #00A000">+                $xml = new CiscoIPPhoneInput();</span>
<span style="color: #00A000">+                $xml-&gt;setCiscoElement(&#39;Title&#39;, $form-&gt;getTitle());</span>
<span style="color: #00A000">+                //$xml-&gt;setCiscoElement(&#39;Prompt&#39;, ...);</span>
<span style="color: #00A000">+                $xml-&gt;setCiscoElement(&#39;URL&#39;, $this-&gt;rootURL());</span>
<span style="color: #00A000">+                foreach($form as $field) {</span>
<span style="color: #00A000">+                        $xml-&gt;setCiscoElement(&#39;InputItem&#39;,</span>
<span style="color: #00A000">+                                Array(</span>
<span style="color: #00A000">+                                        &#39;DisplayName&#39; =&gt; $field-&gt;get(&#39;display_name&#39;),</span>
<span style="color: #00A000">+                                        &#39;QueryStringParam&#39; =&gt; $field-&gt;get(&#39;name&#39;),</span>
<span style="color: #00A000">+                                        &#39;DefaultValue&#39; =&gt; $field-&gt;get(&#39;value&#39;),</span>
<span style="color: #00A000">+                                        &#39;InputFlags&#39; =&gt; &#39;&#39;,</span>
<span style="color: #00A000">+                                )</span>
<span style="color: #00A000">+                        );</span>
<span style="color: #00A000">+                        </span>
<span style="color: #00A000">+                }</span>
<span style="color: #00A000">+                CiscoXMLObject::HttpHeader();</span>
<span style="color: #00A000">+                print $xml;</span>
<span style="color: #00A000">+        }</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 6d09e1b..f6d4015 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">@@ -54,7 +54,7 @@ class MediaBrotha_Frontend_HTML extends MediaBrotha_Frontend_HTTP {</span>
                 }
         }
 
<span style="color: #A00000">-        public function begin($item) {</span>
<span style="color: #00A000">+        private function _createHTMLDocument($title) {</span>
                 $this-&gt;_xml = new DOMDocument(&#39;1.0&#39;);
                 $root = $this-&gt;_xml-&gt;createElement(&#39;html&#39;);
                 $root = $this-&gt;_xml-&gt;appendChild($root);
<span style="color: #800080; font-weight: bold">@@ -62,11 +62,10 @@ class MediaBrotha_Frontend_HTML extends MediaBrotha_Frontend_HTTP {</span>
                 $head = $this-&gt;_xml-&gt;createElement(&#39;head&#39;);
                 $head = $root-&gt;appendChild($head);
 
<span style="color: #A00000">-                $title = $this-&gt;_xml-&gt;createElement(&#39;title&#39;);</span>
<span style="color: #A00000">-                $title = $head-&gt;appendChild($title);</span>
<span style="color: #A00000">-</span>
<span style="color: #A00000">-                $text = $this-&gt;_xml-&gt;createTextNode($item-&gt;getDisplayName());</span>
<span style="color: #A00000">-                $text = $title-&gt;appendChild($text);</span>
<span style="color: #00A000">+                $titleElement = $this-&gt;_xml-&gt;createElement(&#39;title&#39;);</span>
<span style="color: #00A000">+                $titleElement = $head-&gt;appendChild($titleElement);</span>
<span style="color: #00A000">+                $text = $this-&gt;_xml-&gt;createTextNode($title);</span>
<span style="color: #00A000">+                $text = $titleElement-&gt;appendChild($text);</span>
 
                 $style = $this-&gt;_xml-&gt;createElement(&#39;link&#39;);
                 $style = $head-&gt;appendChild($style);
<span style="color: #800080; font-weight: bold">@@ -82,7 +81,10 @@ class MediaBrotha_Frontend_HTML extends MediaBrotha_Frontend_HTTP {</span>
                 $this-&gt;_body = $this-&gt;_xml-&gt;createElement(&#39;body&#39;);
                 $this-&gt;_body = $root-&gt;appendChild($this-&gt;_body);
                 $this-&gt;_body-&gt;setAttribute(&#39;onload&#39;, &#39;bodyLoaded();&#39;);
<span style="color: #00A000">+        }</span>
 
<span style="color: #00A000">+        public function begin($item) {</span>
<span style="color: #00A000">+                $this-&gt;_createHTMLDocument($item-&gt;getDisplayName());</span>
                 $this-&gt;_mediaListElement = $this-&gt;_xml-&gt;createElement(&#39;ul&#39;);
                 $this-&gt;_mediaListElement = $this-&gt;_body-&gt;appendChild($this-&gt;_mediaListElement);
                 $this-&gt;_mediaListElement-&gt;setAttribute(&#39;id&#39;, &#39;mediaListElement&#39;);
<span style="color: #800080; font-weight: bold">@@ -123,5 +125,60 @@ class MediaBrotha_Frontend_HTML extends MediaBrotha_Frontend_HTTP {</span>
         public function render() {
                 print $this-&gt;_xml-&gt;saveHTML();
         }
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        public function renderForm(MediaBrotha_Form $form) {</span>
<span style="color: #00A000">+                $this-&gt;_createHTMLDocument($form-&gt;getTitle());</span>
<span style="color: #00A000">+                $formElement = $this-&gt;_xml-&gt;createElement(&#39;form&#39;);</span>
<span style="color: #00A000">+                $formElement = $this-&gt;_body-&gt;appendChild($formElement);</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                $tableElement = $this-&gt;_xml-&gt;createElement(&#39;table&#39;);</span>
<span style="color: #00A000">+                $tableElement = $formElement-&gt;appendChild($tableElement);</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                foreach($form as $field) {</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: #00A000">+                }</span>
<span style="color: #00A000">+</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">+                $tdElement = $this-&gt;_xml-&gt;createElement(&#39;td&#39;);</span>
<span style="color: #00A000">+                $tdElement = $trElement-&gt;appendChild($tdElement);</span>
<span style="color: #00A000">+                $tdElement-&gt;setAttribute(&#39;colspan&#39;, 2);</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 = $tdElement-&gt;appendChild($inputElement);</span>
<span style="color: #00A000">+                $inputElement-&gt;setAttribute(&#39;type&#39;, &#39;submit&#39;);</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                print $this-&gt;_xml-&gt;saveHTML();</span>
<span style="color: #00A000">+        }</span>
<span style="color: #00A000">+        public function renderException(Exception $e) {</span>
<span style="color: #00A000">+                $this-&gt;_createHTMLDocument(&#39;Error&#39;);</span>
<span style="color: #00A000">+                $divElement = $this-&gt;_xml-&gt;createElement(&#39;pre&#39;);</span>
<span style="color: #00A000">+                $divElement = $this-&gt;_body-&gt;appendChild($divElement);</span>
<span style="color: #00A000">+                $text = $this-&gt;_xml-&gt;createTextNode($e-&gt;getMessage());</span>
<span style="color: #00A000">+                $text = $divElement-&gt;appendChild($text);</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                $divElement = $this-&gt;_xml-&gt;createElement(&#39;pre&#39;);</span>
<span style="color: #00A000">+                $divElement = $this-&gt;_body-&gt;appendChild($divElement);</span>
<span style="color: #00A000">+                $text = $this-&gt;_xml-&gt;createTextNode($e-&gt;getTraceAsString());</span>
<span style="color: #00A000">+                $text = $divElement-&gt;appendChild($text);</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                print $this-&gt;_xml-&gt;saveHTML();</span>
<span style="color: #00A000">+        }</span>
<span style="color: #00A000">+</span>
 }
 
<span style="color: #000080; font-weight: bold">diff --git a/sathieu/cisco-xml/lib/MediaBrotha/Frontend/HTTP.php b/sathieu/cisco-xml/lib/MediaBrotha/Frontend/HTTP.php</span>
<span style="color: #000080; font-weight: bold">index de19bf7..f225175 100644</span>
<span style="color: #A00000">--- a/sathieu/cisco-xml/lib/MediaBrotha/Frontend/HTTP.php</span>
<span style="color: #00A000">+++ b/sathieu/cisco-xml/lib/MediaBrotha/Frontend/HTTP.php</span>
<span style="color: #800080; font-weight: bold">@@ -24,10 +24,14 @@ This file is part of MediaBrotha.</span>
  * @author Mathieu Parent
  */
 
<span style="color: #A00000">-class MediaBrotha_Frontend_HTTP extends MediaBrotha_Frontend {</span>
<span style="color: #00A000">+abstract class MediaBrotha_Frontend_HTTP extends MediaBrotha_Frontend {</span>
         public function rootURL() {
<span style="color: #A00000">-                $url = &#39;http://&#39;.$_SERVER[&#39;SERVER_NAME&#39;].$_SERVER[&#39;SCRIPT_NAME&#39;];</span>
<span style="color: #A00000">-                $url = preg_replace(&#39;/index\.php$/&#39;, &#39;&#39;, $url);</span>
<span style="color: #00A000">+                if (isset($_SERVER[&#39;SERVER_NAME&#39;])) {</span>
<span style="color: #00A000">+                        $url = &#39;http://&#39;.$_SERVER[&#39;SERVER_NAME&#39;].$_SERVER[&#39;SCRIPT_NAME&#39;];</span>
<span style="color: #00A000">+                        $url = preg_replace(&#39;/index\.php$/&#39;, &#39;&#39;, $url);</span>
<span style="color: #00A000">+                } else {</span>
<span style="color: #00A000">+                        $url = $_SERVER[&#39;SCRIPT_NAME&#39;];</span>
<span style="color: #00A000">+                }</span>
                 return $url;
         }
 }
<span style="color: #000080; font-weight: bold">diff --git a/sathieu/cisco-xml/lib/MediaBrotha/Media.php b/sathieu/cisco-xml/lib/MediaBrotha/Media.php</span>
<span style="color: #000080; font-weight: bold">index 7964473..d32ee48 100644</span>
<span style="color: #A00000">--- a/sathieu/cisco-xml/lib/MediaBrotha/Media.php</span>
<span style="color: #00A000">+++ b/sathieu/cisco-xml/lib/MediaBrotha/Media.php</span>
<span style="color: #800080; font-weight: bold">@@ -24,7 +24,7 @@ This file is part of MediaBrotha.</span>
  * @author Mathieu Parent
  */
 
<span style="color: #A00000">-class MediaBrotha_Media {</span>
<span style="color: #00A000">+final class MediaBrotha_Media {</span>
         private $_URI = NULL;
         private $_metadata = Array();
         private $_mimeType = NULL;
<span style="color: #000080; font-weight: bold">diff --git a/sathieu/cisco-xml/lib/MediaBrotha/MediaIterator.php b/sathieu/cisco-xml/lib/MediaBrotha/MediaIterator.php</span>
<span style="color: #000080; font-weight: bold">index 096759a..e862661 100644</span>
<span style="color: #A00000">--- a/sathieu/cisco-xml/lib/MediaBrotha/MediaIterator.php</span>
<span style="color: #00A000">+++ b/sathieu/cisco-xml/lib/MediaBrotha/MediaIterator.php</span>
<span style="color: #800080; font-weight: bold">@@ -28,13 +28,11 @@ require_once(&#39;MediaBrotha/Media.php&#39;);</span>
 
 class MediaBrotha_MediaIterator implements Iterator {
         private $_backend = NULL;
<span style="color: #A00000">-        private $_media = NULL;</span>
         private $_handle = NULL;
         protected $_buffer = NULL;
 
<span style="color: #A00000">-        public function __construct(MediaBrotha_Backend $backend, MediaBrotha_Media $media, $buffer = NULL) {</span>
<span style="color: #00A000">+        public function __construct(MediaBrotha_Backend $backend, $buffer = NULL) {</span>
                 $this-&gt;_backend = $backend;
<span style="color: #A00000">-                $this-&gt;_media = $media;</span>
                 if ($buffer) {
                         $this-&gt;_buffer = $buffer;
                 } else {
</pre></div>
========================================================================<pre>

Summary of changes:
 sathieu/cisco-xml/browser/index.php                |    2 +-
 sathieu/cisco-xml/lib/Cisco-XML/Cisco-XML.php      |    4 +-
 sathieu/cisco-xml/lib/MediaBrotha/Backend.php      |   12 +--
 .../lib/MediaBrotha/Backend/FileSystem.php         |   33 +++++---
 sathieu/cisco-xml/lib/MediaBrotha/Backend/LDAP.php |   79 ++++++++++++++++----
 sathieu/cisco-xml/lib/MediaBrotha/Backend/Root.php |   14 +++-
 sathieu/cisco-xml/lib/MediaBrotha/Backend/VLC.php  |    6 --
 sathieu/cisco-xml/lib/MediaBrotha/Core.php         |   48 +++++++++---
 .../lib/MediaBrotha/{Frontend.php => Form.php}     |   28 ++++++-
 sathieu/cisco-xml/lib/MediaBrotha/Frontend.php     |   10 ++-
 .../lib/MediaBrotha/Frontend/CiscoXML.php          |   22 +++++-
 .../cisco-xml/lib/MediaBrotha/Frontend/HTML.php    |   69 ++++++++++++++++--
 .../cisco-xml/lib/MediaBrotha/Frontend/HTTP.php    |   10 ++-
 sathieu/cisco-xml/lib/MediaBrotha/Media.php        |    2 +-
 .../cisco-xml/lib/MediaBrotha/MediaIterator.php    |    4 +-
 15 files changed, 262 insertions(+), 81 deletions(-)
 copy sathieu/cisco-xml/lib/MediaBrotha/{Frontend.php => Form.php} (60%)
</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>