You are here

function _ec_get_name in Elysia Cron 7

Same name and namespace in other branches
  1. 5.2 elysia_cron.module \_ec_get_name()
  2. 5 elysia_cron.module \_ec_get_name()
  3. 6.2 elysia_cron.module \_ec_get_name()
  4. 6 elysia_cron.module \_ec_get_name()
  5. 7.2 elysia_cron.module \_ec_get_name()
1 call to _ec_get_name()
elysia_cron_check_version_update in ./elysia_cron_update.php

File

./elysia_cron.module, line 341

Code

function _ec_get_name($name) {
  $maxlen = EC_DRUPAL_VERSION >= 6 ? 120 : 40;
  if (strlen($name) < $maxlen) {
    return $name;
  }
  $border = ($maxlen - 32) / 2;
  return substr($name, 0, $border) . md5($name) . substr($name, -$border);
}