Index: trunk/core/kernel/db/db_tag_processor.php =================================================================== diff -u -r2284 -r2285 --- trunk/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 2284) +++ trunk/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 2285) @@ -1101,14 +1101,15 @@ $object =& $this->Application->recallObject( $this->getPrefixSpecial() ); $field = $params['field']; - $helper = $this->Application->recallObject('InpCustomFieldsHelper'); + $helper =& $this->Application->recallObject('InpCustomFieldsHelper'); $element_type = $object->GetDBField($params['element_type_field']); - if($element_type=='label') $element_type='text'; - $params['name']= $params['blocks_prefix'] . $element_type; + if($element_type == 'label') $element_type = 'text'; + $params['name'] = $params['blocks_prefix'].$element_type; - switch ($element_type){ + switch($element_type) + { case 'select': case 'radio': $field_options = $object->GetFieldOptions($field, 'options'); Index: trunk/admin/config/module_email.php =================================================================== diff -u -r927 -r2285 --- trunk/admin/config/module_email.php (.../module_email.php) (revision 927) +++ trunk/admin/config/module_email.php (.../module_email.php) (revision 2285) @@ -280,6 +280,7 @@ $objListView = new clsListView($objListToolBar); $objListView->CurrentPageVar = $CurrentPageVar; $objListView->PerPageVar = $PerPageVar; +$objListView->extra_env = '&module='.GetVar('module').'§ion='.GetVar('section'); $objEvents->Query_Item($sql, $objListView->GetLimitSQL() ); //$itemcount = TableCount($objEvents->SourceTable, $where, 0); Index: trunk/kernel/units/general/custom_fields.php =================================================================== diff -u -r1566 -r2285 --- trunk/kernel/units/general/custom_fields.php (.../custom_fields.php) (revision 1566) +++ trunk/kernel/units/general/custom_fields.php (.../custom_fields.php) (revision 2285) @@ -1,27 +1,36 @@ ParseConfigSQL($values_list); - $optionValuesTmp=explode(',', $optionValuesStr); - $optionValues=array(); - foreach ($optionValuesTmp as $optionValue){ - list($key, $val) = @explode("=", $optionValue); - - if (substr($val,0,1)=="+") - $val = substr($val, 1); - else - $val = $this->Application->Phrase($val); - - $optionValues[$key]=$val; + $optionValuesTmp = explode(',', $optionValuesStr); + $optionValues = Array(); + foreach($optionValuesTmp as $optionValue) + { + list($key, $val) = explode('=', $optionValue); + $val = (substr($val,0,1) == '+') ? substr($val, 1) : $this->Application->Phrase($val); + $optionValues[$key] = $val; } return $optionValues; } - function ParseConfigSQL($valueString){ - $string = trim(str_replace("",TABLE_PREFIX,$valueString)); + /** + * Replace SQL's in valueList with appropriate queried values + * + * @param string $valueString + * @return string + * @todo Fully rewrite !!! + */ + function ParseConfigSQL($valueString) + { + $string = trim( str_replace('', TABLE_PREFIX, $valueString) ); preg_match_all("|\{(.*)\}|U", $string, $embedded_vars, PREG_SET_ORDER); @@ -32,40 +41,39 @@ Will output: what to output if Hello is set */ - if (sizeof($embedded_vars)>0){ - for ($i=0; $i"); - if(!$end){ + $end = strpos($string, ''); + if(!$end) + { $end = strlen($string); } $len = $end - $start; @@ -82,29 +90,20 @@ $chunk2=substr($string,$end+$skip_length+1); $s = $chunk1.$sql_val.$chunk2; - $string = $s; - $start = strpos($string,"Application->GetADODBConnection(); - - $valArray=$db->Query($sql); - for ($i=0; $iConn->Query($sql); + for($i=0; $iParseConfigSQL($values_list); - $optionValuesTmp=explode(',', $optionValuesStr); - $optionValues=array(); - foreach ($optionValuesTmp as $optionValue){ - list($key, $val) = @explode("=", $optionValue); - - if (substr($val,0,1)=="+") - $val = substr($val, 1); - else - $val = $this->Application->Phrase($val); - - $optionValues[$key]=$val; + $optionValuesTmp = explode(',', $optionValuesStr); + $optionValues = Array(); + foreach($optionValuesTmp as $optionValue) + { + list($key, $val) = explode('=', $optionValue); + $val = (substr($val,0,1) == '+') ? substr($val, 1) : $this->Application->Phrase($val); + $optionValues[$key] = $val; } return $optionValues; } - function ParseConfigSQL($valueString){ - $string = trim(str_replace("",TABLE_PREFIX,$valueString)); + /** + * Replace SQL's in valueList with appropriate queried values + * + * @param string $valueString + * @return string + * @todo Fully rewrite !!! + */ + function ParseConfigSQL($valueString) + { + $string = trim( str_replace('', TABLE_PREFIX, $valueString) ); preg_match_all("|\{(.*)\}|U", $string, $embedded_vars, PREG_SET_ORDER); @@ -32,40 +41,39 @@ Will output: what to output if Hello is set */ - if (sizeof($embedded_vars)>0){ - for ($i=0; $i"); - if(!$end){ + $end = strpos($string, ''); + if(!$end) + { $end = strlen($string); } $len = $end - $start; @@ -82,29 +90,20 @@ $chunk2=substr($string,$end+$skip_length+1); $s = $chunk1.$sql_val.$chunk2; - $string = $s; - $start = strpos($string,"Application->GetADODBConnection(); - - $valArray=$db->Query($sql); - for ($i=0; $iConn->Query($sql); + for($i=0; $iConn =& $this->Application->GetADODBConnection(); + } + + } + class kDBBase extends kBase { /** * Connection to database