_locale_import_shorten_comments

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

includes/locale.inc, строка 1638

Версии
5 – 6
_locale_import_shorten_comments($comment)

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

Параметры

$comment An array of strings containing a comment

Возвращаемое значение

Short one string version of the comment

Связанные темы

Код

<?php
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 substr($comm, 0, -2);
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему