Пример #1
0
Файл: Group.php Проект: rjha/sc
 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;
 }
Пример #2
0
Файл: Lists.php Проект: rjha/sc
 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);
 }