|
|
|
oh yes, this would be really nice!
I checked all the string functions that contain constant arguments (except 0) so:
in modules/projectdesigner/projectdesigner.class.php:
line 375, replace :
| Code: | | $alt = strlen($a['task_description']) > 80 ? substr($a['task_description'], 0, 80) . '...' : $a['task_description']; |
by :
| Code: | | $alt = w2PUTF8strlen($a['task_description']) > 80 ? w2PUTF8substr($a['task_description'], 0, 80) . '...' : $a['task_description']; |
in modules/projectdesigner/vw_actions.php:
line 216, replace :
| Code: | | $task_data['task_name'] = strlen($task_data[1]) > 45 ? substr($task_data['task_name'], 0, 45) . "..." : $task_data['task_name']; |
by :
| Code: | | $task_data['task_name'] = w2PUTF8strlen($task_data[1]) > 45 ? w2PUTF8substr($task_data['task_name'], 0, 45) . "..." : $task_data['task_name']; |
in modules/projectimporter/imports/msproject.php:
line 306, replace :
| Code: | | if (strlen($r['NAME']) < w2PgetConfig('username_min_len')) { |
by :
| Code: | | if (w2PUTF8strlen($r['name']) < w2PgetConfig('username_min_len')) { |
modules/projectimporter/imports/wbs.php:
line 268, replace :
| Code: | | if (strlen($r['name']) < w2PgetConfig('username_min_len')) { |
by :
| Code: | if (w2PUTF8strlen($r['name']) <w2PgetConfig>project_short_name) > 10) {
$this->project_short_name = substr($this->project_short_name, 0, 10); |
by :
| Code: | if (w2PUTF8strlen($this->project_short_name) > 10) {
$this->project_short_name = w2PUTF8substr($this->project_short_name, 0, 10); |
in modules/projects/vw_sub_projects_gantt.php:
line 405, replace :
| Code: | | $bar2 = new GanttBar($row++, array((strlen($advance . $t['task_name']) > 35 ? substr($advance . $t['task_name'], 0, 33) . '...' : $advance . $t['task_name']), $tStartObj->format($df), $tEndObj->format($df), ' '), $tStart, $tEnd, ' ', $t['task_dynamic'] == 1 ? 0.1 : 0.6); |
by :
| Code: | | $bar2 = new GanttBar($row++, array((w2PUTF8strlen($advance . $t['task_name']) > 35 ? w2PUTF8substr($advance . $t['task_name'], 0, 33) . '...' : $advance . $t['task_name']), $tStartObj->format($df), $tEndObj->format($df), ' '), $tStart, $tEnd, ' ', $t['task_dynamic'] == 1 ? 0.1 : 0.6); |
in modules/system/translate.php:
line 112, replace :
| Code: | | if (strlen($langs['english']) < 40) { |
by :
| Code: | | if (w2PUTF8strlen($langs['english']) < 40) { |
line 115, replace :
| Code: | | $rows = round(strlen($langs['english'] / 35)) + 1; |
by :
| Code: | | $rows = round(w2PUTF8strlen($langs['english'] / 35)) + 1; |
line 125, replace :
| Code: | | if (strlen($langs['lang']) < 40) { |
by :
| Code: | if (w2PUTF8strlen($langs['lang']) <40> 30) {
$dept_info['dept_name'] = substr($dept_info['dept_name'], 0, 28) . '...'; |
by :
| Code: | if (w2PUTF8strlen($dept_info['dept_name']) > 30) {
$dept_info['dept_name'] = w2PUTF8substr($dept_info['dept_name'], 0, 28) . '...'; |
where w2PUTF8strlen and w2PUTF8substr are :
| Code: | function w2PUTF8strlen($str) {
global $locale_char_set;
if (!$locale_char_set) {
$locale_char_set = 'utf-8';
}
return $locale_char_set == 'utf-8' ? strlen(utf8_decode($str)) : strlen($str);
}
function w2PUTF8substr($str, $start, $length = null) {
global $locale_char_set;
if (!$locale_char_set) {
$locale_char_set = 'utf-8';
}
if ($locale_char_set == 'utf-8') {
return ($length === null) ?
utf8_encode(substr(utf8_decode($str), $start)) :
utf8_encode(substr(utf8_decode($str), $start, $length));
}
else {
return ($length === null) ?
substr($str, $start) :
substr($str, $start, $length);
}
} |
these functions are to be added in main_functions.php
|
|