Project

General

Profile

Bug #3108 » 3108-pt2.patch

krileon, 02 February 2012 17:06

View differences:

administrator/components/com_comprofiler/admin.comprofiler.html.php
for ($i=0, $n=count( $col1fields ); $i < $n; $i++) {
$col1field = $col1fields[$i];
if(trim($col1field)!='' && trim($col1field)!=null) {
$text = array_search($col1field,$fields);
if ( is_string( $text ) ) {
$col1options .= "<option value=\"".$col1field."\">". htmlspecialchars( getLangDefinition($text) ) ."\n";
$exists = array_key_exists($col1field,$fields);
if ( $exists ) {
$col1options .= "<option value=\"".$col1field."\">". htmlspecialchars( getLangDefinition($fields[$col1field]) ) ."\n";
$fieldids[] = $col1field;
} else {
$notFoundFielIds[] = $col1field;
......
for ($i=0, $n=count( $col2fields ); $i < $n; $i++) {
$col2field = $col2fields[$i];
if(trim($col2field)!='' && trim($col2field)!=null) {
$text = array_search($col2field,$fields);
if ( is_string( $text ) ) {
$col2options .= "<option value=\"".$col2field."\">". htmlspecialchars( getLangDefinition($text) ) ."\n";
$exists = array_key_exists($col2field,$fields);
if ( $exists ) {
$col2options .= "<option value=\"".$col2field."\">". htmlspecialchars( getLangDefinition($fields[$col2field]) ) ."\n";
$fieldids[] = $col2field;
} else {
$notFoundFielIds[] = $col2field;
......
for ($i=0, $n=count( $col3fields ); $i < $n; $i++) {
$col3field = $col3fields[$i];
if(trim($col3field)!='' && trim($col3field)!=null) {
$text = array_search($col3field,$fields);
if ( is_string( $text ) ) {
$col3options .= "<option value=\"".$col3field."\">". htmlspecialchars( getLangDefinition($text) ) ."\n";
$exists = array_key_exists($col3field,$fields);
if ( $exists ) {
$col3options .= "<option value=\"".$col3field."\">". htmlspecialchars( getLangDefinition($fields[$col3field]) ) ."\n";
$fieldids[] = $col3field;
} else {
$notFoundFielIds[] = $col3field;
......
for ($i=0, $n=count( $col4fields ); $i < $n; $i++) {
$col4field = $col4fields[$i];
if(trim($col4field)!='' && trim($col4field)!=null) {
$text = array_search($col4field,$fields);
if ( is_string( $text ) ) {
$col4options .= "<option value=\"".$col4field."\">". htmlspecialchars( getLangDefinition($text) ) ."\n";
$exists = array_key_exists($col4field,$fields);
if ( $exists ) {
$col4options .= "<option value=\"".$col4field."\">". htmlspecialchars( getLangDefinition($fields[$col4field]) ) ."\n";
$fieldids[] = $col4field;
} else {
$notFoundFielIds[] = $col4field;
......
}
// this query is for listing displayable fields which are not yet in a column:
$fieldsRemaining = array_diff( $fields, $fieldids );
$fieldsRemaining = array_diff( array_keys( $fields ), $fieldids );
if ( count( $fieldsRemaining ) > 0 ) {
$_CB_database->setQuery( "SELECT f.fieldid, f.title, f.name"
. "\n FROM #__comprofiler_fields f"
(2-2/2)