<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[Freeswitch-trunk][14947] </title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<div id="header">FreeSWITCH Subversion</div>
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://fisheye.freeswitch.org/changelog/FreeSWITCH?cs=14947">14947</a></dd>
<dt>Author</dt> <dd>intralanman</dd>
<dt>Date</dt> <dd>2009-09-21 21:59:03 -0500 (Mon, 21 Sep 2009)</dd>
</dl>
<h3>Log Message</h3>
<pre>start adding db field quoters to actually support multiple DBs</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#freeswitchtrunkcontribintralanmanPHPfs_curlfs_curlphp">freeswitch/trunk/contrib/intralanman/PHP/fs_curl/fs_curl.php</a></li>
<li><a href="#freeswitchtrunkcontribintralanmanPHPfs_curlfs_dialplanphp">freeswitch/trunk/contrib/intralanman/PHP/fs_curl/fs_dialplan.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="freeswitchtrunkcontribintralanmanPHPfs_curlfs_curlphp"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/contrib/intralanman/PHP/fs_curl/fs_curl.php (14946 => 14947)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/contrib/intralanman/PHP/fs_curl/fs_curl.php        2009-09-22 02:55:26 UTC (rev 14946)
+++ freeswitch/trunk/contrib/intralanman/PHP/fs_curl/fs_curl.php        2009-09-22 02:59:03 UTC (rev 14947)
</span><span class="lines">@@ -17,13 +17,13 @@
</span><span class="cx"> * Base class for all curl XML output, contains methods for XML output and
</span><span class="cx"> * connecting to a database
</span><span class="cx"> * @return void
</span><del>-*/
</del><ins>+ */
</ins><span class="cx"> class fs_curl {
</span><del>- /**
- * FS_PDO Object
- * @link http://www.php.net/pdo
- * @var $db FS_PDO
- */
</del><ins>+/**
+ * FS_PDO Object
+ * @link http://www.php.net/pdo
+ * @var $db FS_PDO
+ */
</ins><span class="cx"> public $db;
</span><span class="cx"> /**
</span><span class="cx"> * Array of _REQUEST parameters passed
</span><span class="lines">@@ -49,7 +49,7 @@
</span><span class="cx"> * This method will instantiate the FS_PDO and XMLWriter classes for use
</span><span class="cx"> * in child classes
</span><span class="cx"> * @return void
</span><del>- */
</del><ins>+ */
</ins><span class="cx"> public function fs_curl() {
</span><span class="cx"> openlog('fs_curl', LOG_NDELAY | LOG_PID, LOG_USER);
</span><span class="cx"> header('Content-Type: text/xml');
</span><span class="lines">@@ -59,14 +59,14 @@
</span><span class="cx"> $this -> include_files($inc);
</span><span class="cx"> $this -> connect_db(DEFAULT_DSN, DEFAULT_DSN_LOGIN, DEFAULT_DSN_PASSWORD );
</span><span class="cx"> set_error_handler(array($this, 'error_handler'));
</span><del>- //trigger_error('blah', E_USER_ERROR);
</del><ins>+ //trigger_error('blah', E_USER_ERROR);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * Connect to a database via FS_PDO
</span><span class="cx"> * @param mixed $dsn data source for database connection (array or string)
</span><span class="cx"> * @return void
</span><del>- */
</del><ins>+ */
</ins><span class="cx"> public function connect_db($dsn, $login, $password) {
</span><span class="cx"> try {
</span><span class="cx"> $this -> db = new FS_PDO($dsn, $login, $password);
</span><span class="lines">@@ -74,6 +74,20 @@
</span><span class="cx"> $this -> comment($e->getMessage());
</span><span class="cx"> $this -> file_not_found(); //program terminates in function file_not_found()
</span><span class="cx"> }
</span><ins>+ $driver = $this->db->getAttribute(constant("PDO::ATTR_DRIVER_NAME"));
+ $this->debug("our driver is $driver");
+ switch ($driver) {
+ case 'mysql':
+ $quoter = '`';
+ break;
+ case 'postgres':
+ $quoter = '"';
+ break;
+ default:
+ $quoter = '';
+ break;
+ }
+ define('DB_FIELD_QUOTE', $quoter);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -81,7 +95,7 @@
</span><span class="cx"> * Adds a comment to be displayed in the final XML
</span><span class="cx"> * @param string $comment comment string to be output in XML
</span><span class="cx"> * @return void
</span><del>- */
</del><ins>+ */
</ins><span class="cx"> public function comment($comment) {
</span><span class="cx"> $this -> comments[] = $comment;
</span><span class="cx"> }
</span><span class="lines">@@ -91,10 +105,10 @@
</span><span class="cx"> * Generates an array from the _REQUEST parameters that were passed, keeping
</span><span class="cx"> * all key => value combinations intact
</span><span class="cx"> * @return void
</span><del>- */
</del><ins>+ */
</ins><span class="cx"> private function generate_request_array() {
</span><span class="cx"> while (list($req_key, $req_val) = each($_REQUEST)) {
</span><del>- //$this -> comment("$req_key => $req_val");
</del><ins>+ //$this -> comment("$req_key => $req_val");
</ins><span class="cx"> $this -> request[$req_key] = $req_val;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -103,7 +117,7 @@
</span><span class="cx"> * Actual Instantiation of XMLWriter Object
</span><span class="cx"> * This method creates an XMLWriter Object and sets some needed options
</span><span class="cx"> * @return void
</span><del>- */
</del><ins>+ */
</ins><span class="cx"> private function open_xml() {
</span><span class="cx"> $this -> xmlw = new XMLWriter();
</span><span class="cx"> $this -> xmlw -> openMemory();
</span><span class="lines">@@ -127,7 +141,7 @@
</span><span class="cx"> * in the event that we are unable to generate a valid configuration file
</span><span class="cx"> * from the passed information
</span><span class="cx"> * @return void
</span><del>- */
</del><ins>+ */
</ins><span class="cx"> public function file_not_found() {
</span><span class="cx"> $this -> comment('Include Path = ' . ini_get('include_path'));
</span><span class="cx"> $not_found = new XMLWriter();
</span><span class="lines">@@ -160,7 +174,7 @@
</span><span class="cx"> * @param array $comments [Multi-dementional] Array of comments to be added
</span><span class="cx"> * @param integer $space_pad Number of spaces to indent the comments
</span><span class="cx"> * @return void
</span><del>- */
</del><ins>+ */
</ins><span class="cx"> private function comments2xml($xml_obj, $comments, $space_pad=0) {
</span><span class="cx"> $comment_count = count($comments);
</span><span class="cx"> for ($i = 0; $i < $comment_count; $i++) {
</span><span class="lines">@@ -177,7 +191,7 @@
</span><span class="cx"> /**
</span><span class="cx"> * End open XML elments in XMLWriter object
</span><span class="cx"> * @return void
</span><del>- */
</del><ins>+ */
</ins><span class="cx"> private function close_xml() {
</span><span class="cx"> $this -> xmlw -> endElement();
</span><span class="cx"> $this -> xmlw -> endElement();
</span><span class="lines">@@ -187,15 +201,15 @@
</span><span class="cx"> /**
</span><span class="cx"> * Close and Output XML and stop script execution
</span><span class="cx"> * @return void
</span><del>- */
</del><ins>+ */
</ins><span class="cx"> public function output_xml() {
</span><span class="cx"> $this->comment(
</span><span class="cx"> sprintf('Total # of Queries Run: %d', $this->db->counter)
</span><span class="cx"> );
</span><span class="cx"> $this -> comment(sprintf("Estimated Execution Time Is: %s"
</span><del>- , (preg_replace(
- '/^0\.(\d+) (\d+)$/', '\2.\1', microtime()) - START_TIME)
- ));
</del><ins>+ , (preg_replace(
+ '/^0\.(\d+) (\d+)$/', '\2.\1', microtime()) - START_TIME)
+ ));
</ins><span class="cx">
</span><span class="cx"> $this -> comments2xml($this -> xmlw, $this -> comments);
</span><span class="cx"> $this -> close_xml();
</span><span class="lines">@@ -210,7 +224,7 @@
</span><span class="cx"> /**
</span><span class="cx"> * Recursive method to add an array of comments
</span><span class="cx"> * @return void
</span><del>- */
</del><ins>+ */
</ins><span class="cx"> public function comment_array($array, $spacepad=0) {
</span><span class="cx"> $spaces = str_repeat(' ', $spacepad);
</span><span class="cx"> foreach ($array as $key => $val) {
</span><span class="lines">@@ -231,14 +245,14 @@
</span><span class="cx"> * @param array $file_array associative array of files to include
</span><span class="cx"> * @return void
</span><span class="cx"> * @todo add other types for different levels of errors
</span><del>- */
</del><ins>+ */
</ins><span class="cx"> public function include_files($file_array) {
</span><span class="cx"> $return = FS_CURL_SUCCESS;
</span><span class="cx"> while (list($type, $file) = each($file_array)) {
</span><span class="cx"> $inc = @include_once($file);
</span><span class="cx"> if (!$inc) {
</span><span class="cx"> $comment = sprintf(
</span><del>- 'Unable To Include %s File %s', $type, $file
</del><ins>+ 'Unable To Include %s File %s', $type, $file
</ins><span class="cx"> );
</span><span class="cx"> $this -> comment($comment);
</span><span class="cx"> if ($type == 'required') {
</span><span class="lines">@@ -264,7 +278,7 @@
</span><span class="cx"> * @see RETURN_ON_WARN
</span><span class="cx"> * @return void
</span><span class="cx"> * @todo add other defines that control what, if any, comments gets output
</span><del>- */
</del><ins>+ */
</ins><span class="cx"> public function error_handler($no, $str, $file, $line) {
</span><span class="cx"> if ($no == E_STRICT) {
</span><span class="cx"> return true;
</span><span class="lines">@@ -274,20 +288,20 @@
</span><span class="cx">
</span><span class="cx"> switch ($no) {
</span><span class="cx"> case E_USER_NOTICE:
</span><del>- case E_NOTICE:
</del><ins>+ case E_NOTICE:
+ break;
+ case E_USER_WARNING:
+ case E_WARNING:
+ if (defined('RETURN_ON_WARN') && RETURN_ON_WARN == true) {
</ins><span class="cx"> break;
</span><del>- case E_USER_WARNING:
- case E_WARNING:
- if (defined('RETURN_ON_WARN') && RETURN_ON_WARN == true) {
- break;
- }
- case E_ERROR:
- case E_USER_ERROR:
- default:
- $this -> file_not_found();
- }
- return true;
- }
</del><ins>+ }
+ case E_ERROR:
+ case E_USER_ERROR:
+ default:
+ $this -> file_not_found();
+ }
+ return true;
+ }
</ins><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * Function to print out debugging info
</span><span class="lines">@@ -297,42 +311,42 @@
</span><span class="cx"> * @param integer $debug_level debug if $debug_level <= FS_CURL_DEBUG
</span><span class="cx"> * @param integer $spaces
</span><span class="cx"> */
</span><del>- public function debug($input, $debug_level=0, $spaces=0) {
- if (defined('FS_CURL_DEBUG') && $debug_level <= FS_CURL_DEBUG ) {
- if (is_array($input)) {
- $this -> debug('Array (', $debug_level, $spaces);
- foreach ($input as $key=>$val) {
- if (is_array($val) || is_object($val)) {
- $this -> debug("[$key] => $val", $debug_level, $spaces+4);
- $this -> debug('(', $debug_level, $spaces + 8);
- $this -> debug($val, $debug_level, $spaces + 8);
- } else {
- $this -> debug("[$key] => '$val'", $debug_level, $spaces + 4);
- }
- }
- $this -> debug(")", $debug_level, $spaces);
- } else {
- $debug_str = sprintf("%s%s"
- , str_repeat(' ', $spaces), $input
- );
- switch (FS_DEBUG_TYPE) {
- case 0:
- syslog(LOG_NOTICE, $debug_str);
- break;
- case 1:
- $debug_str = preg_replace('/--/', '- - ', $debug_str);
- $this -> comment($debug_str);
- break;
- case 2:
- $ptr = fopen(FS_DEBUG_FILE, 'a');
- fputs($ptr, "$debug_str\r\n");
- fclose($ptr);
- break;
- default:
- return;
- }
- }
- }
- }
- }
</del><ins>+ public function debug($input, $debug_level=0, $spaces=0) {
+ if (defined('FS_CURL_DEBUG') && $debug_level <= FS_CURL_DEBUG ) {
+ if (is_array($input)) {
+ $this -> debug('Array (', $debug_level, $spaces);
+ foreach ($input as $key=>$val) {
+ if (is_array($val) || is_object($val)) {
+ $this -> debug("[$key] => $val", $debug_level, $spaces+4);
+ $this -> debug('(', $debug_level, $spaces + 8);
+ $this -> debug($val, $debug_level, $spaces + 8);
+ } else {
+ $this -> debug("[$key] => '$val'", $debug_level, $spaces + 4);
+ }
+ }
+ $this -> debug(")", $debug_level, $spaces);
+ } else {
+ $debug_str = sprintf("%s%s"
+ , str_repeat(' ', $spaces), $input
+ );
+ switch (FS_DEBUG_TYPE) {
+ case 0:
+ syslog(LOG_NOTICE, $debug_str);
+ break;
+ case 1:
+ $debug_str = preg_replace('/--/', '- - ', $debug_str);
+ $this -> comment($debug_str);
+ break;
+ case 2:
+ $ptr = fopen(FS_DEBUG_FILE, 'a');
+ fputs($ptr, "$debug_str\r\n");
+ fclose($ptr);
+ break;
+ default:
+ return;
+ }
+ }
+ }
+ }
+}
</ins><span class="cx">
</span></span></pre></div>
<a id="freeswitchtrunkcontribintralanmanPHPfs_curlfs_dialplanphp"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/contrib/intralanman/PHP/fs_curl/fs_dialplan.php (14946 => 14947)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/contrib/intralanman/PHP/fs_curl/fs_dialplan.php        2009-09-22 02:55:26 UTC (rev 14946)
+++ freeswitch/trunk/contrib/intralanman/PHP/fs_curl/fs_dialplan.php        2009-09-22 02:59:03 UTC (rev 14947)
</span><span class="lines">@@ -14,7 +14,7 @@
</span><span class="cx"> * @author Raymond Chandler (intralanman) <intralanman@gmail.com>
</span><span class="cx"> * @version 0.1
</span><span class="cx"> * Class for XML dialplan
</span><del>-*/
</del><ins>+ */
</ins><span class="cx"> class fs_dialplan extends fs_curl {
</span><span class="cx"> private $special_class_file;
</span><span class="cx">
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx">
</span><span class="cx"> public function is_specialized_dialplan($context) {
</span><span class="cx"> $query = sprintf(
</span><del>- "SELECT * FROM dialplan_special WHERE context='%s'", $context
</del><ins>+ "SELECT * FROM dialplan_special WHERE context='%s'", $context
</ins><span class="cx"> );
</span><span class="cx"> $res = $this -> db -> query($query);
</span><span class="cx"> if (FS_PDO::isError($res)) {
</span><span class="lines">@@ -81,23 +81,28 @@
</span><span class="cx"> */
</span><span class="cx"> private function get_dialplan($context) {
</span><span class="cx"> $dp_array = array();
</span><del>-                $dpQuery = sprintf("SELECT
-                        `context`,
-                        `name` as extension,
-                        `application` as application_name,
-                        `data` as application_data,
-                        `field` as condition_field,
-                        `expression` as condition_expression,
-                        `continue` as ext_continue,
-                        `type`
</del><ins>+ $dpQuery = sprintf('SELECT
+                        %1$scontext%1$s,
+                        %1$sname%1$s as extension,
+                        %1$sapplication%1$s as application_name,
+                        %1$sdata%1$s as application_data,
+                        %1$sfield%1$s as condition_field,
+                        %1$sexpression%1$s as condition_expression,
+                        %1$scontinue%1$s as ext_continue,
+                        %1$stype%1$s
</ins><span class="cx">                 FROM dialplan
</span><span class="cx">                         INNER JOIN dialplan_context USING(dialplan_id)
</span><span class="cx">                         INNER JOIN dialplan_extension USING(context_id)
</span><span class="cx">                         INNER JOIN dialplan_condition USING(extension_id)
</span><span class="cx">                         INNER JOIN dialplan_actions USING(condition_id)
</span><del>-                WHERE context = '%s'
-                ORDER BY dialplan_context.weight, dialplan_extension.weight, dialplan_condition.weight, dialplan_actions.weight", $context);
-
</del><ins>+                WHERE context = \'%2$s\'
+                ORDER BY dialplan_context.weight,
+ dialplan_extension.weight,
+ dialplan_condition.weight,
+ dialplan_actions.weight'
+ , DB_FIELD_QUOTE, $context
+ );
+ $this->debug($dpQuery);
</ins><span class="cx"> $res = $this -> db -> query($dpQuery);
</span><span class="cx"> if (FS_PDO::isError($res)) {
</span><span class="cx"> $this -> comment($this -> db -> getMessage());
</span><span class="lines">@@ -117,10 +122,10 @@
</span><span class="cx"> //$rcd = $row['re_cdata'];
</span><span class="cx"> $cc = empty($row['cond_break']) ? '0' : $row['cond_break'];
</span><span class="cx"> $dp_array[$ct]["$et;$ec"]["$cf;$ce;$cc"][] = array(
</span><del>- 'type'=>$type,
- 'application'=>$app,
- 'data'=>$data,
- 'is_cdata'=>(empty($app_cdata) ? '' : $app_cdata)
</del><ins>+ 'type'=>$type,
+ 'application'=>$app,
+ 'data'=>$data,
+ 'is_cdata'=>(empty($app_cdata) ? '' : $app_cdata)
</ins><span class="cx"> );
</span><span class="cx"> }
</span><span class="cx"> return $dp_array;
</span><span class="lines">@@ -134,21 +139,21 @@
</span><span class="cx"> *
</span><span class="cx"> */
</span><span class="cx"> private function writeDialplan($dpArray) {
</span><del>- //print_r($dpArray);
</del><ins>+ //print_r($dpArray);
</ins><span class="cx"> if (is_array($dpArray)) {
</span><span class="cx"> $this -> xmlw -> startElement('section');
</span><span class="cx"> $this -> xmlw -> writeAttribute('name', 'dialplan');
</span><span class="cx"> $this -> xmlw -> writeAttribute('description', 'FreeSWITCH Dialplan');
</span><span class="cx"> //$this -> comment('dpArray is an array');
</span><span class="cx"> foreach ($dpArray as $context => $extensions_array) {
</span><del>- //$this -> comment($context);
- //start the context
</del><ins>+ //$this -> comment($context);
+ //start the context
</ins><span class="cx"> $this -> xmlw -> startElement('context');
</span><span class="cx"> $this -> xmlw -> writeAttribute('name', $context);
</span><span class="cx"> if (is_array($extensions_array)) {
</span><span class="cx"> foreach ($extensions_array as $extension => $conditions) {
</span><del>- //start an extension
- $ex_split = split(';', $extension);
</del><ins>+ //start an extension
+ $ex_split = preg_split('/;/', $extension);
</ins><span class="cx"> $this -> xmlw -> startElement('extension');
</span><span class="cx"> $this -> xmlw -> writeAttribute('name', $ex_split[0]);
</span><span class="cx"> if (strlen($ex_split[1]) > 0) {
</span><span class="lines">@@ -156,50 +161,51 @@
</span><span class="cx"> }
</span><span class="cx"> $this -> debug($conditions);
</span><span class="cx"> foreach ($conditions as $condition => $app_array) {
</span><del>- $c_split = split(';', $condition);
</del><ins>+ $c_split = preg_split('/;/', $condition);
</ins><span class="cx"> $this -> xmlw -> startElement('condition');
</span><span class="cx"> if (!empty($c_split[0])) {
</span><span class="cx"> $this -> xmlw -> writeAttribute('field', $c_split[0]);
</span><span class="cx"> }
</span><span class="cx"> if (!empty($c_split[1])) {
</span><span class="cx"> if (array_key_exists(3, $c_split)
</span><del>- && $c_split[3] == true) {
</del><ins>+ && $c_split[3] == true) {
</ins><span class="cx"> $this -> xmlw -> startElement('expression');
</span><span class="cx"> $this -> xmlw -> writeCdata($c_split[1]);
</span><span class="cx"> $this -> xmlw -> endElement();
</span><span class="cx"> } else {
</span><span class="cx"> $this -> xmlw -> writeAttribute(
</span><del>- 'expression', $c_split[1]
</del><ins>+ 'expression', $c_split[1]
</ins><span class="cx"> );
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> //$this -> debug($c_split[2]);
</span><span class="cx"> if ($c_split[2] != '0') {
</span><span class="cx"> $this -> xmlw -> writeAttribute(
</span><del>- 'break', $c_split[2]
</del><ins>+ 'break', $c_split[2]
</ins><span class="cx"> );
</span><span class="cx"> }
</span><span class="cx"> //$this -> debug($app_array);
</span><span class="cx"> foreach ($app_array as $app) {
</span><span class="cx"> if (empty($app['application'])) {
</span><del>-         continue;
</del><ins>+ continue;
</ins><span class="cx"> }
</span><span class="cx"> $this -> xmlw -> startElement($app['type']);
</span><span class="cx"> $this -> xmlw -> writeAttribute(
</span><del>- 'application', $app['application']
</del><ins>+ 'application', $app['application']
</ins><span class="cx"> );
</span><span class="cx"> if (!empty($app['data'])) {
</span><span class="cx"> if (array_key_exists('is_cdata', $app)
</span><del>- && $app['is_cdata'] == true) {
- //$this -> xmlw -> startElement('data');
</del><ins>+ && $app['is_cdata'] == true) {
</ins><span class="cx"> $this -> xmlw -> writeCdata($app['data']);
</span><del>- //$this -> xmlw -> endElement();
</del><span class="cx"> } else {
</span><span class="cx"> $this -> xmlw -> writeAttribute(
</span><del>- 'data', $app['data']
</del><ins>+ 'data', $app['data']
</ins><span class="cx"> );
</span><span class="cx"> }
</span><span class="cx"> }
</span><ins>+ if ($app['application'] == 'set') {
+ $this->xmlw->writeAttribute('inline', 'true');
+ }
</ins><span class="cx"> $this -> xmlw -> endElement();
</span><span class="cx"> }
</span><span class="cx"> //</condition>
</span></span></pre>
</div>
</div>
<div id="footer">See you at ClueCon</div>
</body>
</html>