diff --git a/gulliver/system/class.dynaformhandler.php b/gulliver/system/class.dynaformhandler.php index 8bed6efc0..287adc7bb 100755 --- a/gulliver/system/class.dynaformhandler.php +++ b/gulliver/system/class.dynaformhandler.php @@ -84,13 +84,10 @@ class dynaFormHandler * @return void */ function __cloneEmpty() - { - //$cloneObj = clone $this; - //$cloneObj->xmlfile = '__Clone__' . $cloneObj->xmlfile; + { $xPath = new DOMXPath($this->dom); $nodeList = $xPath->query('/dynaForm/*'); foreach ($nodeList as $domElement){ - //echo $domElement->nodeName.'
'; $elements[] = $domElement->nodeName; } $this->remove($elements); @@ -134,14 +131,6 @@ class dynaFormHandler return $newnode; } - /* - $child_childs = Array( - Array(name=>'option', value=>'uno', 'attributes'=>Array('name'=>1)), - Array(name=>'option', value=>'dos', 'attributes'=>Array('name'=>2)), - Array(name=>'option', value=>'tres', 'attributes'=>Array('name'=>3)), - ) - */ - /** * Add Function * @param string $name @@ -233,7 +222,6 @@ class dynaFormHandler $this->xmlfile = $fname; $this->dom->save($this->xmlfile); } - //$this->fixXmlFile(); } /** @@ -501,14 +489,6 @@ class dynaFormHandler $xnode = $this->dom->createElement($childNode->nodeName); $xnode->appendChild($this->dom->createCDATASection($child_text)); - /*if( $childNode->hasChildNodes() ) { - foreach ($childNode->childNodes as $domElement){ - $domNode = $domElement->cloneNode(true); - if( $domNode->nodeType != 4 ) { - $xnode->appendChild($domNode); - } - } - }*/ $element->replaceChild($xnode, $childNode); $childNode = $element->getElementsByTagName($child_name)->item(0); } @@ -521,7 +501,6 @@ class dynaFormHandler foreach($cc['attributes'] as $cc_att_name => $cc_att_value) { $ccnode->setAttribute($cc_att_name, $cc_att_value); } - //$this->addOrUpdateChild($childNode, $cc['name'], $cc['value'], $cc['attributes']); } } } @@ -533,10 +512,7 @@ class dynaFormHandler } - function addOrUpdateChild($xnode, $childName, $childValue, $childAttributes){ - //$element = $this->root->getElementsByTagName($nodeName)->item(0); - //$childNode = $element->getElementsByTagName($childName)->item(0); - + function addOrUpdateChild($xnode, $childName, $childValue, $childAttributes){ $newNode = $this->dom->createElement($childName); $newNode->appendChild($this->dom->createCDATASection($childValue)); @@ -588,28 +564,3 @@ class dynaFormHandler return $array; } } - -//examples........... -//$o = new dynaFormHandler('xxx.xml'); -//attributes (String node-name, Array attributes(atribute-name =>attribute-value, ..., ...), Array childs(child-name=>child-content), Array Child-childs()) -/*$child_childs = Array( - Array('name'=>'option', 'value'=>'uno2', 'attributes'=>Array('name'=>1112)), - Array('name'=>'option', 'value'=>'dos', 'attributes'=>Array('name'=>222)), - Array('name'=>'option', 'value'=>'tres', 'attributes'=>Array('name'=>333)), -);*/ -//$o->add('erik', Array('att1'=>1, 'att2'=>'dos'), Array('en'=>'hello'), $child_childs); -//$o->addChilds('neyek', Array('en'=>'deutch'), $child_childs); -//print_r($o->getFieldNames()); - -/* for($i=1; $i<=5; $i++){ - $o->add('lastnamex'.$i, Array('type'=>'text', 'defaultvalue'=>'Ortiz'), Array('es'=>'Apellido')); -}*/ -/* -$child_childs = Array( - Array('name'=>'option', 'value'=>'uno', 'attributes'=>Array('name'=>111)), - Array('name'=>'option', 'value'=>'tres', 'attributes'=>Array('name'=>333)), -); -$o->replace('antiguedad', 'antiguedad_replaced', Array('type'=>'dropdown', 'required'=>'0'), Array('es'=>'Antiguedad !!'), $child_childs); -*/ -//$o->remove('usr_email'); -//$o->replace('usr_uid', 'usr_uid222', Array('type'=>'text', 'defaultvalue'=>'111'), Array('es'=>'fucking id')); \ No newline at end of file diff --git a/gulliver/system/class.pagedTable.php b/gulliver/system/class.pagedTable.php index 53ab90301..a2377d0c4 100644 --- a/gulliver/system/class.pagedTable.php +++ b/gulliver/system/class.pagedTable.php @@ -372,130 +372,130 @@ class pagedTable * @parameter string table * @return string */ - function setupFromTable($table) - { -// var_dump2($table); - //Config - $this->rowsPerPage=25; - if (isset($_GET['page'])) - $this->currentPage = $_GET['page']; - else - $this->currentPage = 1; - if (isset($_GET['order'])) - $this->orderBy = urldecode($_GET['order']); - else - $this->orderBy = ""; - if (isset($_GET['filter'])) - $this->filter = urldecode($_GET['filter']); - else - $this->filter = ""; - $xmlPopup=''; - $this->xmlFormFile=""; -/* if ($table->Action) - $this->ajaxServer=G::encryptLink($table->Action); - else*/ - $this->ajaxServer=G::encryptLink('../gulliver/pagedTableAjax'); - $this->popupPage = $this->ajaxServer . '?function=printForm&filename=' . urlencode($xmlPopup); - $this->ownerPage=G::encryptLink(SYS_CURRENT_URI); - $this->sqlConnection=''; - if (isset($table->_source)) - $this->sqlSelect=$table->_source; - if (isset($table->WhereClause)){ - if (strpos(strtoupper($table->WhereClause),'GROUP BY')!==FALSE) - preg_match("/(.+)(GROUP BY)(.*)/",$table->WhereClause,$matches); - else{ - $matches[1]=$table->WhereClause;$matches[2]=''; - } - $this->sqlWhere=$matches[1]; - if (strcasecmp($matches[2],'GROUP BY')==0) - $this->sqlGroupBy=' GROUP BY '.$matches[3]; - } - if (strpos(strtoupper($this->sqlSelect),'WHERE')!==FALSE){ - preg_match("/SELECT(.+)FROM(.+)WHERE(.+)/",$this->sqlSelect,$matches); - $this->sqlSelect='SELECT '.$matches[1].' FROM '.$matches[2]; - $this->sqlWhere=$matches[3]; - } - // DBConnection - // $this->prepareQuery(); - //Prepare the fields - if ($table->show_nummbers=='YES'){ - $r=-1; - $this->fields[$r]['Name']='numberlabel'; - $this->fields[$r]['Type']='numberlabel'; - $this->fields[$r]['Label']='#'; - } - foreach ($table->Columns as $r => $value){ - $this->fields[$r]['Name']=$value['Name']; - $this->fields[$r]['Type']=$value['Type']; - $this->fields[$r]['Label']=((isset($table->Labels[$r]))?$table->Labels[$r]:''); - //Default values for Label if it was empty - if ($this->fields[$r]['Label']=='') - switch($table->Columns[$r]['Type']){ - case 'image': - case 'image-text': - case 'jslink': - //var_dump2($table->Columns[$r]); - $this->fields[$r]['Label']=$value['Name']; - } - //Print the type of the field - //$this->fields[$r]['Label'].='('.$this->fields[$r]['Type'].')'; - $r++; - } - //Add a delete column if sqlDelete is established - /* if ($this->sqlDelete!='') - { - $this->fields[$r]['Name']=''; - $this->fields[$r]['Type']='linknew'; - $this->fields[$r]['Label']=G::LoadXml('labels','ID_DELETE'); - }*/ - //Set the default settings - $this->defaultStyle(); - /* if ($this->sqlDelete!='') - { - $this->style[$r]['href']="#"; - $this->style[$r]['onclick']="document.getElementById('pagedTable').outerHTML=ajax_function('{$this->ajaxServer}','delete','".$this->fieldDataList."');"; - }*/ - //Prepare the columns's properties - if ($table->show_nummbers=='YES'){ - $r=-1; - $this->style[$r]['data']='@@_row__'; - $this->style[$r]['colWidth']=30; - } - $this->gridWidth=''; - $this->gridFields=''; - foreach ($table->Columns as $r => $value){ - //var_dump($value['Width']); - $this->style[$r]['colWidth']=$value['Width']; - $this->style[$r]['titleAlign']=$value['Align']; - $this->style[$r]['href']=$value['Target']; - // Add the row reference - switch ($this->fields[$r]['Type']){ - case 'image-text': - case 'textimage': - case 'image': - case 'link': - //$this->style[$r]['href'].='/@@_row__.html'; // No - if (substr($value['Content'],0,1)=='&') - $this->style[$r]['href'].='/@@_'.substr($value['Content'],1).'.html'; - } - // Extra events for each field - $this->style[$r]['event']=$value['Extra']; - if ($this->fields[$r]['Label']==''){ - $this->style[$r]['titleVisibility']='0'; - $this->fields[$r]['Label']=$this->fields[$r]['Name']; - } - //if ($value['orderByThis']===true) $this->orderBy=$value['Name']; - //Needed for javascript - //only the visible columns's width and name are stored - if ($this->style[$r]['showInTable']!='0'){ - $this->gridWidth.=','.$this->style[$r]['colWidth']; - $this->gridFields.=',"form['.$this->fields[$r]['Name'].']"'; - } - $r++; - } - echo('
'); -// var_dump2($this); - } +// function setupFromTable($table) +// { +//// var_dump2($table); +// //Config +// $this->rowsPerPage=25; +// if (isset($_GET['page'])) +// $this->currentPage = $_GET['page']; +// else +// $this->currentPage = 1; +// if (isset($_GET['order'])) +// $this->orderBy = urldecode($_GET['order']); +// else +// $this->orderBy = ""; +// if (isset($_GET['filter'])) +// $this->filter = urldecode($_GET['filter']); +// else +// $this->filter = ""; +// $xmlPopup=''; +// $this->xmlFormFile=""; +///* if ($table->Action) +// $this->ajaxServer=G::encryptLink($table->Action); +// else*/ +// $this->ajaxServer=G::encryptLink('../gulliver/pagedTableAjax'); +// $this->popupPage = $this->ajaxServer . '?function=printForm&filename=' . urlencode($xmlPopup); +// $this->ownerPage=G::encryptLink(SYS_CURRENT_URI); +// $this->sqlConnection=''; +// if (isset($table->_source)) +// $this->sqlSelect=$table->_source; +// if (isset($table->WhereClause)){ +// if (strpos(strtoupper($table->WhereClause),'GROUP BY')!==FALSE) +// preg_match("/(.+)(GROUP BY)(.*)/",$table->WhereClause,$matches); +// else{ +// $matches[1]=$table->WhereClause;$matches[2]=''; +// } +// $this->sqlWhere=$matches[1]; +// if (strcasecmp($matches[2],'GROUP BY')==0) +// $this->sqlGroupBy=' GROUP BY '.$matches[3]; +// } +// if (strpos(strtoupper($this->sqlSelect),'WHERE')!==FALSE){ +// preg_match("/SELECT(.+)FROM(.+)WHERE(.+)/",$this->sqlSelect,$matches); +// $this->sqlSelect='SELECT '.$matches[1].' FROM '.$matches[2]; +// $this->sqlWhere=$matches[3]; +// } +// // DBConnection +// // $this->prepareQuery(); +// //Prepare the fields +// if ($table->show_nummbers=='YES'){ +// $r=-1; +// $this->fields[$r]['Name']='numberlabel'; +// $this->fields[$r]['Type']='numberlabel'; +// $this->fields[$r]['Label']='#'; +// } +// foreach ($table->Columns as $r => $value){ +// $this->fields[$r]['Name']=$value['Name']; +// $this->fields[$r]['Type']=$value['Type']; +// $this->fields[$r]['Label']=((isset($table->Labels[$r]))?$table->Labels[$r]:''); +// //Default values for Label if it was empty +// if ($this->fields[$r]['Label']=='') +// switch($table->Columns[$r]['Type']){ +// case 'image': +// case 'image-text': +// case 'jslink': +// //var_dump2($table->Columns[$r]); +// $this->fields[$r]['Label']=$value['Name']; +// } +// //Print the type of the field +// //$this->fields[$r]['Label'].='('.$this->fields[$r]['Type'].')'; +// $r++; +// } +// //Add a delete column if sqlDelete is established +// /* if ($this->sqlDelete!='') +// { +// $this->fields[$r]['Name']=''; +// $this->fields[$r]['Type']='linknew'; +// $this->fields[$r]['Label']=G::LoadXml('labels','ID_DELETE'); +// }*/ +// //Set the default settings +// $this->defaultStyle(); +// /* if ($this->sqlDelete!='') +// { +// $this->style[$r]['href']="#"; +// $this->style[$r]['onclick']="document.getElementById('pagedTable').outerHTML=ajax_function('{$this->ajaxServer}','delete','".$this->fieldDataList."');"; +// }*/ +// //Prepare the columns's properties +// if ($table->show_nummbers=='YES'){ +// $r=-1; +// $this->style[$r]['data']='@@_row__'; +// $this->style[$r]['colWidth']=30; +// } +// $this->gridWidth=''; +// $this->gridFields=''; +// foreach ($table->Columns as $r => $value){ +// //var_dump($value['Width']); +// $this->style[$r]['colWidth']=$value['Width']; +// $this->style[$r]['titleAlign']=$value['Align']; +// $this->style[$r]['href']=$value['Target']; +// // Add the row reference +// switch ($this->fields[$r]['Type']){ +// case 'image-text': +// case 'textimage': +// case 'image': +// case 'link': +// //$this->style[$r]['href'].='/@@_row__.html'; // No +// if (substr($value['Content'],0,1)=='&') +// $this->style[$r]['href'].='/@@_'.substr($value['Content'],1).'.html'; +// } +// // Extra events for each field +// $this->style[$r]['event']=$value['Extra']; +// if ($this->fields[$r]['Label']==''){ +// $this->style[$r]['titleVisibility']='0'; +// $this->fields[$r]['Label']=$this->fields[$r]['Name']; +// } +// //if ($value['orderByThis']===true) $this->orderBy=$value['Name']; +// //Needed for javascript +// //only the visible columns's width and name are stored +// if ($this->style[$r]['showInTable']!='0'){ +// $this->gridWidth.=','.$this->style[$r]['colWidth']; +// $this->gridFields.=',"form['.$this->fields[$r]['Name'].']"'; +// } +// $r++; +// } +// echo('
'); +//// var_dump2($this); +// } /** * Function count diff --git a/gulliver/system/class.rbac.php b/gulliver/system/class.rbac.php index 5a1effec2..6623ff558 100644 --- a/gulliver/system/class.rbac.php +++ b/gulliver/system/class.rbac.php @@ -498,9 +498,9 @@ class RBAC * @param string $sCode * @return void */ - function loadPermissionByCode($sCode) { - return $this->permissionsObj->loadByCode($sCode); - } +// function loadPermissionByCode($sCode) { +// return $this->permissionsObj->loadByCode($sCode); +// } /** * create permission @@ -524,9 +524,9 @@ class RBAC * @param string $sCode * @return void */ - function loadRoleByCode($sCode) { - return $this->rolesObj->loadByCode($sCode); - } +// function loadRoleByCode($sCode) { +// return $this->rolesObj->loadByCode($sCode); +// } /** * list all roles diff --git a/gulliver/system/class.table.php b/gulliver/system/class.table.php index 61449fd5c..a0a9d6df6 100644 --- a/gulliver/system/class.table.php +++ b/gulliver/system/class.table.php @@ -541,27 +541,13 @@ class Table $res = " 0) $res .= " width=\"" . $col["Width"] . "\""; $res .= ">"; - /*if($HTTP_SESSION_VARS['OrderBy'] == $this->Columns[$intPos]['Name'] ){ - if($HTTP_SESSION_VARS['OrderDir'] == 'DESC') - $res .= "
"; - }*/ + //$res .= "" . $this->Labels[$intPos] . ""; - /*if($HTTP_SESSION_VARS['OrderBy'] == $this->Columns[$intPos]['Name'] ){ - if($HTTP_SESSION_VARS['OrderDir'] == 'ASC') - $res .= "
"; - }*/ - /* - if($HTTP_SESSION_VARS['OrderBy'] == $this->Columns[$intPos]['Name'] ){ - $img_dir = 'asc'; - if($HTTP_SESSION_VARS['OrderDir'] == 'DESC') - $img_dir = 'desc'; - $res .= "
"; - } - */ + $res .= "\n";//echo $res;die; } else { @@ -593,12 +579,7 @@ class Table $res = " 0) $res .= " width=\"" . $col["Width"] . "\""; $res .= ">"; - /* - if($HTTP_SESSION_VARS['OrderBy'] == $this->Columns[$intPos]['Name'] ){ - if($HTTP_SESSION_VARS['OrderDir'] == 'DESC') - $res .= "
"; - } - */ + //$res .= "Columns[$intPos]['Name']; @@ -611,18 +592,7 @@ class Table else $res .= " "; } - /*if($HTTP_SESSION_VARS['OrderBy'] == $this->Columns[$intPos]['Name'] ){ - if($HTTP_SESSION_VARS['OrderDir'] == 'ASC') - $res .= "
"; - }*/ -/* - if($HTTP_SESSION_VARS['OrderBy'] == $this->Columns[$intPos]['Name'] ){ - $img_dir = 'asc'; - if($HTTP_SESSION_VARS['OrderDir'] == 'DESC') - $img_dir = 'desc'; - $res .= "
"; - } -*/ + $res .= "\n";//echo $res;die; } else { @@ -670,28 +640,14 @@ class Table $res .= " 0) $res .= " width=\"" . $col["Width"] . "\""; $res .= "> "; - /*if($HTTP_SESSION_VARS['OrderBy'] == $this->Columns[$intPos]['Name'] ){ - if($HTTP_SESSION_VARS['OrderDir'] == 'DESC') - $res .= "
"; - }*/ + $res .= "
Columns[$intPos]['Name']."&page=".$pa."&label=true"; $res .= "javascript:bsearch('$direccion')"; //$res .= $target . "?".$fil."order=" . $this->Columns[$intPos]['Name']."&page=".$pa."&label=true"; $res .= "\">" . $this->Labels[$intPos] . ""; - /*if($HTTP_SESSION_VARS['OrderBy'] == $this->Columns[$intPos]['Name'] ){ - if($HTTP_SESSION_VARS['OrderDir'] == 'ASC') - $res .= "
"; - }*/ - /* - if($HTTP_SESSION_VARS['OrderBy'] == $this->Columns[$intPos]['Name'] ){ - $img_dir = 'asc'; - if($HTTP_SESSION_VARS['OrderDir'] == 'DESC') - $img_dir = 'desc'; - $res .= "
"; - } - */ + $res .= "\n"; } else { @@ -737,7 +693,6 @@ class Table break; default: $fieldname = $col['Name']; - //$val = utf8_encode($this->_row_values[$fieldname]); $val = isset ( $this->_row_values[$fieldname] ) ? $this->_row_values[$fieldname] : '' ; } @@ -824,28 +779,7 @@ class Table break; case 'LITERAL' :$res .= formatDate('$M $d $Y',$val); break; - } - /* - if ($G_DATE_FORMAT == 'DD/MM/AAAA') { - $dateFormat = $aux[2] . "/" . $aux[1] . "/" . $aux[0]; - $res .= htmlentities( $dateFormat ) . ' ' . $part[1] . ($G_DATE_FORMAT == 'MM/DD/AAAA' ? ' ' : '',ENT_QUOTES,'utf-8'); - } - - if ($G_DATE_FORMAT == 'MM/DD/AAAA') { - $dateFormat = $aux[1] . "-" . $aux[2] . "-" . $aux[0]; - $res .= htmlentities( $dateFormat ,ENT_QUOTES,'utf-8') . ' ' . $part[1] . ($G_DATE_FORMAT == 'MM/DD/AAAA' ? ' EST' : ''); - } - - if ($G_DATE_FORMAT == 'AAAA/MM/DD') { - $dateFormat = $aux[0] . "-" . $aux[1] . "-" . $aux[2]; - $res .= htmlentities( $dateFormat ,ENT_QUOTES,'utf-8') . ' ' . $part[1] . ($G_DATE_FORMAT == 'MM/DD/AAAA' ? ' ' : ''); - } - - if ($G_TABLE_DATE_FORMAT == 'LITERAL') { - // mejorar esto porque solo funciona hasta el 2038 - $dateFormat = date ( 'M d, Y', mktime (0,0,0, $aux[1], $aux[2], $aux[0]) ); - } -/**/ + } } else @@ -907,7 +841,7 @@ class Table break; case "image": - //print_r ($this->_row_values); + if (is_array($col["Condition"])) //By JHL to enable Condition to display a image -- New parameter Condition in Addrawcolumn { $field_compare=$col["Condition"]['field']; @@ -935,7 +869,7 @@ class Table // Hay mas de un valor para el link $values = $col['Content']; $n = count($values); - //$res .= "contexto)) { $this->contexto[0][] = $contexto; $this->contexto[1][] = $nombre; - // array_push($this->contexto[0], $contexto); - // array_push($this->contexto[1], $nombre); + } else { $this->contexto = array(); $this->contexto[0][] = $contexto; @@ -1321,7 +1253,6 @@ class Table While ($i<=$len and $i <= $number){ $car=substr($value,$i,1); $br = strtoupper(substr($value,$i,4)); - //print "
".$car." ".$i; if ($car == '<'){ $Flag = 0; } diff --git a/gulliver/system/class.templatePower.php b/gulliver/system/class.templatePower.php index dda28c4bb..a7355bcfd 100644 --- a/gulliver/system/class.templatePower.php +++ b/gulliver/system/class.templatePower.php @@ -384,7 +384,6 @@ class TemplatePowerParser } } - /** * class TemplatePower * @@ -421,7 +420,6 @@ class TemplatePower extends TemplatePowerParser * @param string $stpl_file * @param string $tplvar * @return void - * * @access private */ function __deSerializeTPL( $stpl_file, $type ) @@ -443,7 +441,6 @@ class TemplatePower extends TemplatePowerParser * TemplatePower::__makeContentRoot() * * @return void - * * @access private */ function __makeContentRoot() @@ -482,7 +479,6 @@ class TemplatePower extends TemplatePowerParser * @param string $varname * @param string $value * @return void - * * @access private */ function __assignGlobal( $varname, $value ) @@ -496,7 +492,6 @@ class TemplatePower extends TemplatePowerParser * * @param string $blockname * @return void - * * @access private */ function __outputContent( $blockname ) @@ -555,7 +550,6 @@ class TemplatePower extends TemplatePowerParser * function __printVars * * @return void - * * @access public */ function __printVars() @@ -588,7 +582,6 @@ class TemplatePower extends TemplatePowerParser * * @param $state * @return void - * * @access public */ function showUnAssigned( $state = true ) @@ -600,7 +593,6 @@ class TemplatePower extends TemplatePowerParser * TemplatePower::prepare() * * @return void - * * @access public */ function prepare() @@ -618,7 +610,6 @@ class TemplatePower extends TemplatePowerParser * * @param string $blockname * @return void - * * @access public */ function newBlock( $blockname ) @@ -666,7 +657,6 @@ class TemplatePower extends TemplatePowerParser } } - /** * TemplatePower::assign() * @@ -733,7 +723,6 @@ class TemplatePower extends TemplatePowerParser * TemplatePower::printToScreen() * * @return void - * * @access public */ function printToScreen() @@ -750,7 +739,6 @@ class TemplatePower extends TemplatePowerParser * TemplatePower::getOutputContent() * * @return void - * * @access public */ function getOutputContent() diff --git a/workflow/engine/classes/class.Installer_mssql.php b/workflow/engine/classes/class.Installer_mssql.php index 86413a460..fcefefbc0 100755 --- a/workflow/engine/classes/class.Installer_mssql.php +++ b/workflow/engine/classes/class.Installer_mssql.php @@ -167,13 +167,7 @@ class Installer if($test['created']===true) { $local = Array('localhost','127.0.0.1'); - -// $this->wf_site_name = $wf = "wf_".$this->options['name']; - $this->wf_site_name = $wf = $this->options['advanced']['ao_db_wf']; - -// $this->rbac_site_name = $rb = "rbac_".$this->options['name']; - $this->rbac_site_name = $rb = $this->options['advanced']['ao_db_rb']; $this->report_site_name = $rp = $this->options['advanced']['ao_db_rp']; @@ -241,21 +235,6 @@ class Installer $qwv = $this->query_sql_file(PATH_WORKFLOW_MSSQL_DATA.$values,$this->connection_database); $this->log($qwv); -/* - // No funciona correctamente en 2000 - $bulk_country = "BULK INSERT ISO_COUNTRY FROM '" . PATH_WORKFLOW_MSSQL_DATA . "ISO_COUNTRY.txt' " . - " WITH ( FIELDTERMINATOR ='|', ROWTERMINATOR ='\n' ); "; - - $bulk_location = " BULK INSERT ISO_LOCATION FROM '" . PATH_WORKFLOW_MSSQL_DATA . "ISO_LOCATION.txt' " . - " WITH ( FIELDTERMINATOR ='|', ROWTERMINATOR ='\n' ); "; - $bulk_subdivision = " BULK INSERT ISO_SUBDIVISION FROM '" . PATH_WORKFLOW_MSSQL_DATA . "ISO_SUBDIVISION.txt' " . - " WITH ( FIELDTERMINATOR ='|', ROWTERMINATOR ='\n' ); "; - - $bulk = @mssql_query($bulk_country, $this->connection_database); - $bulk = @mssql_query($bulk_location, $this->connection_database); - $bulk = @mssql_query($bulk_subdivision, $this->connection_database); -*/ - /* Dump schema rbac && data */ $pws = PATH_RBAC_MSSQL_DATA.$schema; mssql_select_db($rb,$this->connection_database); @@ -297,13 +276,8 @@ class Installer $ff = @fputs( $fp, $db_text, strlen($db_text)); $this->log("Write: ".$db_file." => ".((!$ff)?$ff:"OK")."\n"); - fclose( $fp ); - - // Added reading and writing roles. - ///-- $this->setRolesPrivileges($wf, (($this->cc_status==1)?$wf:$this->options['database']['username']), (($this->cc_status==1)?$this->options['password']:$this->options['database']['password']) ); - ///-- $this->setRolesPrivileges($rb, (($this->cc_status==1)?$rb:$this->options['database']['username']), (($this->cc_status==1)?$this->options['password']:$this->options['database']['password']) ); - ///-- $this->setRolesPrivileges($rp, (($this->cc_status==1)?$rp:$this->options['database']['username']), (($this->cc_status==1)?$this->options['password']:$this->options['database']['password']) ); - + fclose( $fp ); + $this->set_admin(); } return $test; @@ -334,33 +308,6 @@ class Installer return true; } - - - function setRolesPrivileges($psDB, $psUser, $psPassword ) - { - mssql_select_db($psDB); - - $sAddRoleDataReader = "sp_addrolemember 'db_datareader', '" . $psUser . "';"; - $ac = @mssql_query($sAddRoleDataReader , $this->connection_database); - $this->log($sAddRoleDataReader.": => ".((!$ac)? "Failed to set read permissions" :"OK")."\n"); - - ///-- mssql_select_db($psDB); - $sAddRoleDataWriter = "sp_addrolemember 'db_datawriter', '" . $psUser . "';"; - $ac = @mssql_query($sAddRoleDataWriter , $this->connection_database); - $this->log($sAddRoleDataWriter .": => ".((!$ac)? "Failed to set write permissions" :"OK")."\n"); - - ///-- mssql_select_db($psDB); - $sAddRoleDDLAdmin = "sp_addrolemember 'db_ddladmin', '" . $psUser . "';"; - $ac = @mssql_query($sAddRoleDDLAdmin , $this->connection_database); - $this->log($sAddRoleDDLAdmin .": => ".((!$ac)? "Failed to set DLL permissions" :"OK")."\n"); - - ///-- mssql_select_db($psDB); - $sAddRoleDDLAdmin = "sp_addrolemember 'db_owner', '" . $psUser . "';"; - $ac = @mssql_query($sAddRoleDDLAdmin , $this->connection_database); - $this->log($sAddRoleDDLAdmin .": => ".((!$ac)? "Failed to set DLL permissions" :"OK")."\n"); - - return true; - } /** * set_admin @@ -393,33 +340,7 @@ class Installer 'SQL_FILE' => $file, 'errors' => array(), 'querys' => 0 - ); - /** Deprecated - * new routines written for this process.... - * evaluating its performance..... So, that why this deprecated code was not deleted yet.. - * the problem with this code is the \n dependence,.. in insert.sql always not ending with \n - * - * ........................................................... - $content = @fread(@fopen($file,"rt"),@filesize($file)); - if(!$content) - { - $report['errors']="Error reading SQL"; - return $report; - } - $ret = array(); - for ($i=0 ; $i < strlen($content)-1; $i++) - { - if ( $content[$i] == ";" ) - { - if ( $content[$i+1] == "\n" ) - { - $ret[] = substr($content, 0, $i); - $content = substr($content, $i + 1); - $i = 0; - } - } - } - */ + ); #<-- if( !is_file($file) ) { @@ -440,8 +361,7 @@ class Installer } } return $report; - } - + } /** * check_path @@ -555,17 +475,7 @@ class Installer if(! @mssql_select_db($dbName,$this->connection_database) && $this->cc_status!=1) { return Array('status' => false, 'message' => 'Unable to establish connection (2)'); } - else { - -/* var_dump($this->options['advanced']['ao_db_drop'],$this->cc_status,$this->check_db_empty($dbName)); - if(($this->options['advanced']['ao_db_drop']===false && $this->cc_status!=1 && !$this->check_db_empty($dbName)) ) - { - return Array('status'=>false,'message'=>'Database is not empty'); - } - else - { - return Array('status'=>true,'message'=>'OK'); - }*/ + else { if($this->options['advanced']['ao_db_drop']===true || $this->check_db_empty($dbName)) { return Array('status' => true, 'message' => 'PASSED'); diff --git a/workflow/engine/classes/class.xpdl.php b/workflow/engine/classes/class.xpdl.php index 375ba0a97..75f6b1518 100644 --- a/workflow/engine/classes/class.xpdl.php +++ b/workflow/engine/classes/class.xpdl.php @@ -121,16 +121,16 @@ class Xpdl extends processes * @param array $fields * @return boolean */ - function updateDynaformsPmxml($uid,$fields) - { - $oData->dynaforms = $this->getDynaformRows ( $uid); - $count = sizeof($oData->dynaforms); - foreach ($fields as $val => $id){ - $oData->dynaforms[$count]= $id; - $count = $count + 1 ; - } - $this->createDynaformRows ($oData->dynaforms ); - } +// function updateDynaformsPmxml($uid,$fields) +// { +// $oData->dynaforms = $this->getDynaformRows ( $uid); +// $count = sizeof($oData->dynaforms); +// foreach ($fields as $val => $id){ +// $oData->dynaforms[$count]= $id; +// $count = $count + 1 ; +// } +// $this->createDynaformRows ($oData->dynaforms ); +// } /** * This function create the subProcess from data @@ -780,37 +780,7 @@ class Xpdl extends processes $idTasks['YM'] = $coordinateYM; $idTasks['PORT'] = $port; $arrayTasks[] = $idTasks; - } - /* $dataTasks .=' - - '.$description.' - - - - - - - - - '.$description.' - - - - - - - false - '; - $transitions.=' - - - - - - - - - ';*/ + } } } $idTasks = array();