Feature proposal #1438 ยป 1438.patch
administrator/components/com_comprofiler/admin.comprofiler.html.php | ||
---|---|---|
$sortfields[] = $randomSort;
|
||
}
|
||
// this query is for listing filterable fields
|
||
$_CB_database->setQuery( "SELECT f.title, f.name"
|
||
$_CB_database->setQuery( "SELECT f.title, f.name, f.tablecolumns"
|
||
. "\n FROM #__comprofiler_fields f"
|
||
. "\n INNER JOIN #__comprofiler_plugin AS p ON (f.pluginid = p.id)"
|
||
. "\n WHERE f.published = 1"
|
||
... | ... | |
$filterlistpart=array();
|
||
$filterlistpart=explode(" ",$filterlist);
|
||
$filterparts[$i]['field']=str_replace("`","",$filterlistpart[0]);
|
||
$_CB_database->setQuery("SELECT title FROM #__comprofiler_fields WHERE name='".$filterparts[$i]['field']."' LIMIT 1");
|
||
$filtertitle=$_CB_database->loadResult();
|
||
$_CB_database->setQuery("SELECT title, name FROM #__comprofiler_fields WHERE tablecolumns LIKE '%".$filterparts[$i]['field']."%' LIMIT 1");
|
||
$filtertitle=null;
|
||
$_CB_database->loadObject($filtertitle);
|
||
$filterparts[$i]['value']=$filterlist;
|
||
$filterparts[$i]['title']=str_replace(array("'","`"),"",str_replace($filterparts[$i]['field'],getLangDefinition($filtertitle),$filterlist));
|
||
$filtername=getLangDefinition($filtertitle->title);
|
||
if ($filterparts[$i]['field']!=$filtertitle->name) {
|
||
$filtername.=' ('.$filterparts[$i]['field'].')';
|
||
}
|
||
$filterparts[$i]['title'] = str_replace(array("'","`"),"",str_replace($filterparts[$i]['field'],$filtername,$filterlist));
|
||
|
||
$i++;
|
||
}
|
||
... | ... | |
<div id="simFilter" name="simFilter" style="<?php echo $simStyle; ?>" >
|
||
<select name="filterfieldlist">
|
||
<?php
|
||
foreach ($filterfields AS $filterfield) {
|
||
echo "<option value=\"`".$filterfield->name."`\">". htmlspecialchars( getLangDefinition($filterfield->title) ) ."\n";
|
||
foreach ( $filterfields AS $filterfield ) {
|
||
$filter_cols = explode( ',', $filterfield->tablecolumns );
|
||
|
||
if ( count( $filter_cols ) > 1 ) {
|
||
foreach ( $filter_cols as $filter_col ) {
|
||
echo "<option value=\"`" . $filter_col . "`\">". htmlspecialchars( getLangDefinition( $filterfield->title ) . ' (' . $filter_col . ')' ) ."\n";
|
||
}
|
||
} else {
|
||
echo "<option value=\"`" . $filterfield->name . "`\">". htmlspecialchars( getLangDefinition( $filterfield->title ) ) ."\n";
|
||
}
|
||
}
|
||
|
||
?>
|
||
</select>
|