function nameToSlug($group_names) { $group_slug = ""; if (!Util::tryEmpty($group_names)) { $slugs = array(); $names = explode(",", $group_names); foreach ($names as $name) { if (Util::tryEmpty($name)) { continue; } // remove single quotes from group names // it is a bit difficult to deal with single quotes and sphinx $name = str_replace("'", "", $name); $slug = \com\indigloo\util\StringUtil::convertNameToKey($name); array_push($slugs, $slug); } $group_slug = implode(Constants::SPACE, $slugs); } return $group_slug; }
function edit($loginId, $listId, $name, $description) { //md5 hash as hex string and bytes $hash = md5($name); $seoName = StringUtil::convertNameToKey($name); $bin_hash = md5($seoName, TRUE); mysql\Lists::edit($loginId, $listId, $name, $seoName, $hash, $bin_hash, $description); }