2010-04-19 Junichi Satoh <junichi@rworks.jp>
* godmode/agentes/module_manager.php, godmode/modules/manage_network_components.php, godmode/modules/manage_network_templates_form.php: Changed the substr() to mb_strimwidth(). Strings should be truncated with displayed length, not number of characters. * godmode/include/functions.php: Added wrapper mb_strimwidth(). git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2574 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
00d08bcdd6
commit
a28c2a8843
|
@ -1,3 +1,13 @@
|
|||
2010-04-19 Junichi Satoh <junichi@rworks.jp>
|
||||
|
||||
* godmode/agentes/module_manager.php,
|
||||
godmode/modules/manage_network_components.php,
|
||||
godmode/modules/manage_network_templates_form.php: Changed the substr()
|
||||
to mb_strimwidth(). Strings should be truncated with displayed length,
|
||||
not number of characters.
|
||||
|
||||
* godmode/include/functions.php: Added wrapper mb_strimwidth().
|
||||
|
||||
2010-04-16 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* operation/users/user.php: Modified the users that
|
||||
|
|
|
@ -241,7 +241,7 @@ foreach ($modules as $module) {
|
|||
$data[4] = $agent_interval;
|
||||
}
|
||||
|
||||
$data[5] = substr ($module['descripcion'], 0, 30);
|
||||
$data[5] = mb_strimwidth ($module['descripcion'], 0, 30, "...");
|
||||
|
||||
// MAX / MIN values
|
||||
$data[6] = $module["max"] ? $module["max"] : __('N/A');
|
||||
|
|
|
@ -313,7 +313,7 @@ foreach ($components as $component) {
|
|||
$data[0] .= '</a>';
|
||||
$data[1] = print_moduletype_icon ($component['type'], true);
|
||||
$data[2] = $component['module_interval'] ? $component['module_interval'] : __('N/A ');
|
||||
$data[3] = substr ($component['description'], 0, 30);
|
||||
$data[3] = mb_strimwidth ($component['description'], 0, 30, "...");
|
||||
$data[4] = get_network_component_group_name ($component['id_group']);
|
||||
$data[5] = $component['max']." / ".$component['min'];
|
||||
|
||||
|
|
|
@ -158,7 +158,7 @@ if ($id_np > 0) {
|
|||
$data = array ();
|
||||
$data[0] = $row["name"];
|
||||
$data[1] = '<img src="images/'.show_icon_type($row["type"]).'" border="0" />';
|
||||
$data[2] = substr($row["description"],0,30);
|
||||
$data[2] = mb_strimwidth($row["description"],0,30,"...");
|
||||
$data[3] = get_network_component_group_name ($row["group"]);
|
||||
$data[4] = print_checkbox ("components[]", $row["component_id"], false, true);
|
||||
array_push ($table->data, $data);
|
||||
|
|
|
@ -905,6 +905,13 @@ if (!function_exists ("mb_strtoupper")) {
|
|||
function mb_strlen ($string, $encoding = false) {
|
||||
return strlen ($string);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
function mb_strimwidth ($string, $start, $length, $trimmarker = false, $encoding = false) {
|
||||
return substr ($string, $start, $length);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue