Skip to content

Commit

Permalink
Use of Dropdown::showFromArray() instead of dropdownArrayValues(). Se…
Browse files Browse the repository at this point in the history
…e release fusioninventory#47
  • Loading branch information
Vincent MAZZONI committed Apr 28, 2010
1 parent 3cdc245 commit 643c3a2
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 13 deletions.
3 changes: 2 additions & 1 deletion hook.php
Original file line number Diff line number Diff line change
Expand Up @@ -1709,7 +1709,8 @@ function plugin_fusioninventory_MassiveActionsFieldsDisplay($type,$table,$field,
$ArrayValues[]= $LANG["choice"][0];
$ArrayValues[]= $LANG["choice"][1];
$ArrayValues[]= $LANG["setup"][137];
dropdownArrayValues('logs',$ArrayValues,$linkfield);
Dropdown::showFromArray('logs', $ArrayValues,
array('value'=>$linkfield));
return true;
break;

Expand Down
3 changes: 2 additions & 1 deletion inc/config.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ function showForm($target,$ID) {
$ArrayValues = array();
$ArrayValues['DB']= $LANG['plugin_fusioninventory']["functionalities"][17];
$ArrayValues['file']= $LANG['plugin_fusioninventory']["functionalities"][18];
dropdownArrayValues('authsnmp', $ArrayValues,$this->getValue('authsnmp'));
Dropdown::showFromArray('authsnmp', $ArrayValues,
array('value'=>$this->getValue('authsnmp')));
echo "</td>";
echo "</tr>";

Expand Down
3 changes: 2 additions & 1 deletion inc/configsnmphistory.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,8 @@ function showForm($target) {
echo "</td>";

echo "<td align='center'>";
dropdownArrayValues($data['ID'], $days,$data['days']);
Dropdown::showFromArray($data['ID'], $days,
array('value'=>$data['days']));
echo "</td>";
echo "</tr>";
}
Expand Down
8 changes: 6 additions & 2 deletions inc/constructdevice.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,9 @@ function manageWalks($target, $ID) {
}
}
}
dropdownArrayValues("links_oid_fields_".$oid_id_before,$types, $type_model."||".$mapping_pre[$type_model][$before],$a_mapping_used); //,$linkoid_used
Dropdown::showFromArray("links_oid_fields_".$oid_id_before, $types,
array('value'=>$type_model."||".$mapping_pre[$type_model][$before],
'used'=>$a_mapping_used)); //,$linkoid_used
}
echo "</th>";
echo "</tr>";
Expand Down Expand Up @@ -448,7 +450,9 @@ function manageWalks($target, $ID) {
}
}
}
dropdownArrayValues("links_oid_fields_".$oid_id_before,$types, $type_model."||".$mapping_pre[$type_model][$before],$a_mapping_used); //,$linkoid_used
Dropdown::showFromArray("links_oid_fields_".$oid_id_before, $types,
array('value'=>$type_model."||".$mapping_pre[$type_model][$before],
'used'=>$a_mapping_used)); //,$linkoid_used
}
echo "</th>";
echo "</tr>";
Expand Down
4 changes: 3 additions & 1 deletion inc/lockable.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ function showForm($p_target) {
$elements[$data[0]]=$data[0];
}
}
$idSelect = 'dropdown_tableSelect'.dropdownArrayValues('tableSelect', $elements, $tableSelect);
$idSelect = 'dropdown_tableSelect'.
Dropdown::showFromArray('tableSelect', $elements,
array('value'=>$tableSelect));
$elements=array();
echo "</td><td class='right'>";

Expand Down
3 changes: 2 additions & 1 deletion inc/mib.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,8 @@ function showForm($target,$ID) {
}
}

dropdownArrayValues("links_oid_fields",$types,'',$linkoid_used);
Dropdown::showFromArray("links_oid_fields",$types,
array('used'=>$linkoid_used));

echo "</td>";

Expand Down
8 changes: 5 additions & 3 deletions inc/snmp.printers.classes.php
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,8 @@ function showFormPrinter_graph($p_target, $p_ID) {
'pages_n_b_copy'=>$FUSIONINVENTORY_MAPPING[PRINTER_TYPE]['pagecounterblackpages_copy']['shortname'],
'pages_color_copy'=>$FUSIONINVENTORY_MAPPING[PRINTER_TYPE]['pagecountercolorpages_copy']['shortname'],
'pages_total_fax'=>$FUSIONINVENTORY_MAPPING[PRINTER_TYPE]['pagecountertotalpages_fax']['shortname']);
dropdownArrayValues('graph_graphField', $elementsField, $graphField);
Dropdown::showFromArray('graph_graphField', $elementsField,
array('value'=>$graphField));
echo "</td></tr>\n";
echo "<tr class='tab_bg_1'><td class='left'>".$LANG['search'][8]."&nbsp;:</td>
<td class='left' colspan='2'>";
Expand All @@ -1005,7 +1006,8 @@ function showFormPrinter_graph($p_target, $p_ID) {
'week'=>$LANG['plugin_fusioninventory']["prt_history"][35],
'month'=>$LANG['plugin_fusioninventory']["prt_history"][36],
'year'=>$LANG['plugin_fusioninventory']["prt_history"][37]);
dropdownArrayValues('graph_timeUnit', $elementsTime, $timeUnit);
Dropdown::showFromArray('graph_timeUnit', $elementsTime,
array('value'=>$timeUnit));
echo "</td></tr>\n";
echo "<tr class='tab_bg_1'><td class='left'>".$LANG['Menu'][2]."&nbsp;:</td>
<td class='left' colspan='2'>";
Expand All @@ -1027,7 +1029,7 @@ function showFormPrinter_graph($p_target, $p_ID) {
$printersTmp = $printersView;
$printersTmp[0] = "-----";
asort($printersTmp);
dropdownArrayValues('graph_printerCompRemove', $printersTmp);
Dropdown::showFromArray('graph_printerCompRemove', $printersTmp);
echo "</td><td class='left'>\n";
echo "<input type='submit' value=\"".$LANG['buttons'][6]."\" class='submit' name='graph_plugin_fusioninventory_printer_remove'>";
echo "</td></tr>\n";
Expand Down
2 changes: 1 addition & 1 deletion inc/task.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ function RemoteStateAgent($target, $ID, $type, $a_modules = array()) {
// $array_actions["SNMPQUERY"] = $LANG['plugin_fusioninventory']['config'][7];
// }

$rand = dropdownArrayValues("agentaction",$array_actions);
$rand = Dropdown::showFromArray("agentaction",$array_actions);
echo "</td>";
echo "</tr>";
if (!isset($on_device)) {
Expand Down
3 changes: 2 additions & 1 deletion report/plugin_fusioninventory.ports_date_connections.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ function displaySearchForm() {
$_GET["contains"][1] = "LIKE '".$_GET["dropdown_calendar"]."%'";
}
}
dropdownArrayValues("dropdown_sup_inf",$values,(isset($_GET["dropdown_sup_inf"])?$_GET["dropdown_sup_inf"]:"sup"));
Dropdown::showFromArray("dropdown_sup_inf", $values,
array('value'=>(isset($_GET["dropdown_sup_inf"])?$_GET["dropdown_sup_inf"]:"sup")));
echo "</td>
<td width='120'>";
showDateFormItem("dropdown_calendar",(isset($_GET["dropdown_calendar"])?$_GET["dropdown_calendar"]:0));
Expand Down
3 changes: 2 additions & 1 deletion report/plugin_fusioninventory.switch_ports.history.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ function displaySearchForm($FK_port) {
if (isset($_GET['Field'])) {
$default = $_GET['Field'];
}
dropdownArrayValues("Field",$types,$default);
Dropdown::showFromArray("Field", $types,
array('value'=>$default));

echo "</td>";
echo "</tr>";
Expand Down

0 comments on commit 643c3a2

Please sign in to comment.