diff --git a/gulliver/system/class.g.php b/gulliver/system/class.g.php index 0ea0d3bfe..f50e2d80a 100644 --- a/gulliver/system/class.g.php +++ b/gulliver/system/class.g.php @@ -32,7 +32,6 @@ class G /** * is_https - * * @return void */ function is_https() @@ -165,7 +164,6 @@ class G /** * Get the current version of gulliver classes - * * @author Fernando Ontiveros Lira * @access public * @return string @@ -178,7 +176,6 @@ class G /** * getIpAddress - * * @return string $ip */ /*public static*/ function getIpAddress () @@ -197,8 +194,6 @@ class G /** * getMacAddress - * - * * @return string $mac */ function getMacAddress() @@ -215,7 +210,6 @@ class G /** * microtime_float - * * @return array_sum(explode(' ',microtime())) */ /*public static*/ function microtime_float() { @@ -230,27 +224,28 @@ class G * * @return boolean true */ - /*public static*/ function &setFatalErrorHandler( $newFatalErrorHandler = null ) - { - if ( isset ( $newFatalErrorHandler ) ) { - set_error_handler( $newFatalErrorHandler ); - } - else { - ob_start( array ( 'G', 'fatalErrorHandler' ) ); - } - return true; - } + /*public static*/ + function &setFatalErrorHandler( $newFatalErrorHandler = null ) + { + if ( isset ( $newFatalErrorHandler ) ) { + set_error_handler( $newFatalErrorHandler ); + } + else { + ob_start( array ( 'G', 'fatalErrorHandler' ) ); + } + return true; + } /** * setErrorHandler - * * @param string setErrorHandler * @param object $newCustomErrorHandler * * @return boolean true */ - /*public static*/ function setErrorHandler( $newCustomErrorHandler = null ) - { + /*public static*/ + function setErrorHandler( $newCustomErrorHandler = null ) + { if ( isset ( $newCustomErrorHandler ) ) { set_error_handler( $newCustomErrorHandler ); } @@ -258,7 +253,7 @@ class G set_error_handler( array("G", "customErrorHandler")); } return true; - } + } /** * fatalErrorHandler @@ -283,7 +278,7 @@ class G } /** - * customErrorHandler + * customErrorHandler * * @param string $errno * @param string $msg @@ -293,7 +288,8 @@ class G * * @return void */ - /*public static*/ function customErrorHandler ( $errno, $msg, $file, $line, $context) { + /*public static*/ + function customErrorHandler ( $errno, $msg, $file, $line, $context) { switch ($errno) { case E_ERROR: case E_USER_ERROR: @@ -387,7 +383,7 @@ class G } /** - * customErrorLog + * customErrorLog * * @param string $type * @param string $msg @@ -396,8 +392,9 @@ class G * * @return void */ - /*public static*/ function customErrorLog ($type, $msg, $file, $line) - { + /*public static*/ + function customErrorLog ($type, $msg, $file, $line) + { global $HTTP_X_FORWARDED_FOR, $REMOTE_ADDR, $HTTP_USER_AGENT, $REQUEST_URI; $ip_addr = G::getIpAddress(); @@ -414,11 +411,10 @@ class G $REQUEST_URI = getenv ( 'REQUEST_URI' ); $HTTP_USER_AGENT = getenv ( 'HTTP_USER_AGENT' ); error_log ("[$date] [$ip_addr] [$name] $type: $msg [$HTTP_USER_AGENT] URI: $REQUEST_URI", 0); - } - + } /** - * verboseError + * verboseError * * @param string $type * @param string $errno @@ -448,7 +444,6 @@ class G } /*** Encrypt and decrypt functions ****/ - /** * Encrypt string * @@ -459,7 +454,7 @@ class G * @return string */ function encrypt($string, $key) - { + { //print $string; // if ( defined ( 'ENABLE_ENCRYPT' ) && ENABLE_ENCRYPT == 'yes' ) { if (strpos($string, '|', 0) !== false) return $string; @@ -469,7 +464,7 @@ class G $keychar = substr($key, ($i % strlen($key))-1, 1); $char = chr(ord($char)+ord($keychar)); $result .= $char; - } + } //echo $result . '
'; $result = base64_encode($result); $result = str_replace ( '/' , '°' , $result); @@ -479,7 +474,7 @@ class G // $result = $string; return $result; - } + } /** * Decrypt string @@ -533,7 +528,7 @@ class G } /*************** path functions *****************/ - + /*public static*/ function mk_dir( $strPath, $rights = 0777) { $folder_path = array($strPath); @@ -770,6 +765,7 @@ class G /** * Include all model plugin files * + * LoadAllPluginModelClasses * @author Hugo Loza * @access public * @return void @@ -841,7 +837,7 @@ class G require_once( $classfile ); } /** - * Loads a Class. If the class is not defined by the aplication, it + * If the class is not defined by the aplication, it * attempt to load the class from gulliver.system * * @author Fernando Ontiveros Lira , David S. Callizaya @@ -1144,7 +1140,7 @@ class G } /** - * sendHeaders + * sendHeaders * * @param string $filename * @param string $contentType default value '' @@ -1240,7 +1236,6 @@ class G return false; } - /** * Create an encrypted unique identifier based on $id and the selected scope id. * @@ -1260,7 +1255,8 @@ class G /** * (Create an encrypted unique identificator based on $id and the selected scope id.) ^-1 - * + * getUIDName + * * @author David S. Callizaya S. * @access public * @param string $id @@ -1781,7 +1777,7 @@ class G /** * Render message from XML file - * + * * @author Fernando Ontiveros Lira * @access public * @param string $msgID @@ -1909,7 +1905,6 @@ class G } - /** * Function getTranslations * @author Erik Amaru O. @@ -2058,7 +2053,6 @@ class G * toLower * * @param string $sText - * * @return string strtolower($sText) */ function toLower($sText) @@ -2921,19 +2915,7 @@ class G $oJSON = new Services_JSON(); return $oJSON->decode($Json); } - } - - /** - * isHttpRequest - * - * @return boolean true or false - */ - function isHttpRequest(){ - if( isset($_SERVER['SERVER_SOFTWARE']) && strpos(strtolower($_SERVER['SERVER_SOFTWARE']), 'apache') !== false ){ - return true; - } - return false; - } + } /** * Get the type of a variable @@ -3038,20 +3020,6 @@ class G } return $infoUser; } - - function in_array_column($text, $column, $array) - { - if (!empty($array) && is_array($array)) - { - for ($i=0; $i < count($array); $i++) - { - if ($array[$i][$column]==$text || strcmp($array[$i][$column],$text)==0) return true; - } - } - return false; - } - - }; /** diff --git a/gulliver/system/class.xmlform.php b/gulliver/system/class.xmlform.php index 714c9024b..3cd0fd75f 100644 --- a/gulliver/system/class.xmlform.php +++ b/gulliver/system/class.xmlform.php @@ -673,7 +673,7 @@ class XmlForm_Field { * @access public * @dependencies XmlForm_Field */ -class XmlForm_Field_Title extends XmlForm_Field +class XmlForm_Field_Title extends XmlForm_Field { /** * Function render @@ -702,7 +702,7 @@ class XmlForm_Field_Title extends XmlForm_Field * @access public * @dependencies XmlForm_Field */ -class XmlForm_Field_Subtitle extends XmlForm_Field +class XmlForm_Field_Subtitle extends XmlForm_Field { /** * Function render @@ -732,7 +732,7 @@ class XmlForm_Field_Subtitle extends XmlForm_Field * @access public * @dependencies XmlForm_Field */ -class XmlForm_Field_SimpleText extends XmlForm_Field +class XmlForm_Field_SimpleText extends XmlForm_Field { var $size = 15; var $maxLength = ''; @@ -811,7 +811,7 @@ class XmlForm_Field_SimpleText extends XmlForm_Field * @access public * @dependencies XmlForm_Field_SimpleText */ -class XmlForm_Field_Text extends XmlForm_Field_SimpleText +class XmlForm_Field_Text extends XmlForm_Field_SimpleText { var $size = 15; var $maxLength = 64; @@ -1355,7 +1355,7 @@ class XmlForm_Field_Textarea extends XmlForm_Field { if (stristr ( $_SERVER ['HTTP_USER_AGENT'], 'iPhone' )) { //$result[] = '
'.$this->htmlentities( $v , ENT_COMPAT, 'utf-8').'
'; - + $result [] = $this->htmlentities ( $v, ENT_COMPAT, 'utf-8' ); } else { //start add Alvaro $varaux = ''; @@ -1422,31 +1422,8 @@ class XmlForm_Field_Currency extends XmlForm_Field_SimpleText { } else { return $this->htmlentities ( $value, ENT_QUOTES, 'utf-8' ); } + } - -} - //function render( $value = NULL ) -//{ -// return 'htmlentities($value, ENT_QUOTES, 'utf-8') .'\'>'; -//} -//function renderGrid( $values=array() , $owner ) -//{ -// $result=array();$r=1; -// foreach($values as $v) { -// if ($this->mode==='edit') { -// if ($this->readOnly) -// $result[] = 'htmlentities( $v , ENT_COMPAT, 'utf-8').'\' readOnly="readOnly"/>'; -// else -// $result[] = 'htmlentities( $v , ENT_COMPAT, 'utf-8').'\' />'; -// } elseif ($this->mode==='view') { -// $result[] = $this->htmlentities( $value , ENT_COMPAT, 'utf-8'); -// } else { -// $result[] = $this->htmlentities( $value , ENT_COMPAT, 'utf-8'); -// } -// $r++; -// } -// return $result; -//} } /*DEPRECATED*/ @@ -1506,31 +1483,8 @@ class XmlForm_Field_Percentage extends XmlForm_Field_SimpleText { return $this->htmlentities ( $value, ENT_QUOTES, 'utf-8' ); } + } -} - - //function render( $value = NULL ) -//{ -// return ''; -//} -//function renderGrid( $values=array() , $owner ) -//{ -// $result=array();$r=1; -// foreach($values as $v) { -// if ($this->mode==='edit') { -// if ($this->readOnly) -// $result[] = 'htmlentities( $v , ENT_COMPAT, 'utf-8').'\' readOnly="readOnly"/>'; -// else -// $result[] = 'htmlentities( $v , ENT_COMPAT, 'utf-8').'\' />'; -// } elseif ($this->mode==='view') { -// $result[] = $this->htmlentities( $value , ENT_COMPAT, 'utf-8'); -// } else { -// $result[] = $this->htmlentities( $value , ENT_COMPAT, 'utf-8'); -// } -// $r++; -// } -// return $result; -//} } /*DEPRECATED*/ @@ -1765,7 +1719,7 @@ class XmlForm_Field_Date2 extends XmlForm_Field_SimpleText { } /*DEPRECATED*/ -class XmlForm_Field_DateView extends XmlForm_Field +class XmlForm_Field_DateView extends XmlForm_Field { /** * Function render @@ -1786,7 +1740,7 @@ class XmlForm_Field_DateView extends XmlForm_Field * @access public * @dependencies XmlForm_Field */ -class XmlForm_Field_YesNo extends XmlForm_Field +class XmlForm_Field_YesNo extends XmlForm_Field { var $required = false; var $readonly = false; @@ -1959,33 +1913,6 @@ class XmlForm_Field_File extends XmlForm_Field { return $html; } } -/* -//DEPRECATED -class XmlForm_Field_BasicForm extends XmlForm_Field -{ - //Instead of size --> dynaform - var $dynaform=''; - var $times=1; - //Possible values: "[ADD][,DELETE][,EDIT]" - var $configurationgrid2=''; - function render( $value = NULL ) - { - return $this->htmlentities( $value ,ENT_COMPAT,'utf-8').' this is a basicform'; - } -} - -class XmlForm_Field_BasicFormView extends XmlForm_Field -{ - //Instead of size --> dynaform - var $dynaform; - var $times=1; - var $required=false; - function render( $value = NULL ) - { - return $this->htmlentities( $value ,ENT_COMPAT,'utf-8'); - } -} -*/ /*hook, dropdown field for Propel table @By */ class XmlForm_Field_Dropdownpt extends XmlForm_Field { @@ -2067,7 +1994,7 @@ class XmlForm_Field_Checkboxpt extends XmlForm_Field { } } -class XmlForm_Field_Checkbox extends XmlForm_Field +class XmlForm_Field_Checkbox extends XmlForm_Field { var $required = false; var $value = 'on'; @@ -2185,7 +2112,7 @@ class XmlForm_Field_Checkbox2 extends XmlForm_Field { * @access public * @dependencies XmlForm_Field */ -class XmlForm_Field_Button extends XmlForm_Field +class XmlForm_Field_Button extends XmlForm_Field { var $onclick = ''; var $align = 'center'; @@ -2218,7 +2145,7 @@ class XmlForm_Field_Button extends XmlForm_Field * @access public * @dependencies XmlForm_Field */ -class XmlForm_Field_Reset extends XmlForm_Field +class XmlForm_Field_Reset extends XmlForm_Field { /** * Function render @@ -2271,7 +2198,7 @@ class XmlForm_Field_Submit extends XmlForm_Field { * @access public * @dependencies XmlForm_Field */ -class XmlForm_Field_Hidden extends XmlForm_Field +class XmlForm_Field_Hidden extends XmlForm_Field { var $sqlConnection = 0; var $sql = ''; @@ -2405,13 +2332,13 @@ class XmlForm_Field_Dropdown extends XmlForm_Field { } elseif ($this->mode === 'view') { $html = $this->htmlentities ( isset ( $this->options [$value] ) ? $this->options [$value] : '', ENT_COMPAT, 'utf-8' ); $html .= ' - '; + '; } else { $html = ' - '; + '; } } else { $html = "$value"; } - + if($this->hint){ $html .= '' . '' . ''; } - + return $html; } } @@ -3696,7 +3623,7 @@ class XmlForm_Field_Xmlform extends XmlForm_Field { * @access public * @dependencies Xml_document XmlForm_Field xmlformTemplate */ -class XmlForm +class XmlForm { var $tree; var $id = ''; @@ -3740,11 +3667,11 @@ class XmlForm $this->language = $language; $filenameInitial=$filename; $filename = $this->home . $filename; - + //if the xmlform file doesn't exists, then try with the plugins folders if ( !is_file ( $filename ) ) { $aux = explode ( PATH_SEP, $filenameInitial ); - //check if G_PLUGIN_CLASS is defined, because publisher can be called without an environment + //check if G_PLUGIN_CLASS is defined, because publisher can be called without an environment if(count($aux) > 2){//Subfolders $filename=array_pop($aux); $aux0=implode(PATH_SEP,$aux); @@ -3764,10 +3691,10 @@ class XmlForm } } } - + $this->fileName = $filename; $parsedFile = dirname ( $filename ) . PATH_SEP . basename ( $filename, 'xml' ) . $language; - + $parsedFilePath = defined ( 'PATH_C' ) ? ( defined('SYS_SYS') ? PATH_C . 'ws' . PATH_SEP . SYS_SYS . PATH_SEP: PATH_C ) : PATH_DATA; $parsedFilePath .= 'xmlform/' . substr ( $parsedFile, strlen ( $this->home ) ); @@ -3954,7 +3881,7 @@ class XmlForm * @access public * @dependencies Smarty */ -class xmlformTemplate extends Smarty +class xmlformTemplate extends Smarty { var $template; var $templateFile; @@ -4250,4 +4177,4 @@ class XmlForm_Field_Image extends XmlForm_Field (($this->style)?'style="'.$this->style.'"':'') .' alt ="'.htmlentities($value,ENT_QUOTES,'utf-8').'"/>'; } -} +} \ No newline at end of file diff --git a/workflow/engine/classes/model/UsersProperties.php b/workflow/engine/classes/model/UsersProperties.php index 44db872ec..f2d882e3e 100644 --- a/workflow/engine/classes/model/UsersProperties.php +++ b/workflow/engine/classes/model/UsersProperties.php @@ -19,7 +19,6 @@ class UsersProperties extends BaseUsersProperties { try { $oUserProperty = UsersPropertiesPeer::retrieveByPk($sUserUID); if (is_object($oUserProperty) && get_class($oUserProperty) == 'UsersProperties') { - echo"inside"; return true; } else {