You are here

function _locale_import_shorten_comments in Drupal 6

Same name and namespace in other branches
  1. 4 includes/locale.inc \_locale_import_shorten_comments()
  2. 5 includes/locale.inc \_locale_import_shorten_comments()
  3. 7 includes/locale.inc \_locale_import_shorten_comments()

Generate a short, one string version of the passed comment array

Parameters

$comment: An array of strings containing a comment

Return value

Short one string version of the comment

Related topics

1 call to _locale_import_shorten_comments()
_locale_import_one_string in includes/locale.inc
Imports a string into the database

File

includes/locale.inc, line 1660
Administration functions for locale.module.

Code

function _locale_import_shorten_comments($comment) {
  $comm = '';
  while (count($comment)) {
    $test = $comm . substr(array_shift($comment), 1) . ', ';
    if (strlen($comm) < 130) {
      $comm = $test;
    }
    else {
      break;
    }
  }
  return trim(substr($comm, 0, -2));
}