本文整理汇总了PHP中iaSanitize::convertStr方法的典型用法代码示例。如果您正苦于以下问题:PHP iaSanitize::convertStr方法的具体用法?PHP iaSanitize::convertStr怎么用?PHP iaSanitize::convertStr使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类iaSanitize
的用法示例。
在下文中一共展示了iaSanitize::convertStr方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: utf8_to_ascii
} else {
$data['member_id'] = $member_id;
}
} else {
$data['member_id'] = iaUsers::getIdentity()->id;
}
if (!defined('IA_NOUTF')) {
iaUtf8::loadUTF8Core();
iaUtf8::loadUTF8Util('ascii', 'validation', 'bad', 'utf8_to_ascii');
}
// validate title_alias
$data['title_alias'] = !empty($_POST['title_alias']) ? $_POST['title_alias'] : $_POST['title'];
if (!utf8_is_ascii($data['title_alias'])) {
$data['title_alias'] = utf8_to_ascii($data['title_alias']);
}
$data['title_alias'] = iaSanitize::convertStr($data['title_alias']);
// check for duplicate title_alias in case a new album is added or title_alias has been updated
if (!isset($item['title_alias']) || isset($item['title_alias']) && $data['title_alias'] != $item['title_alias']) {
if ($iaAlbum->existsAlias($data['title_alias'])) {
$error = true;
$messages[] = iaLanguage::get('album_already_exists');
}
}
if (!$error) {
$iaCore->startHook("phpAdminBeforeAlbumSubmit");
if (!empty($_POST['artist'])) {
$artist_info = $iaArtist->getArtistByTitle($_POST['artist']);
$data['id_artist'] = $artist_info['id'];
$data['artist_alias'] = $artist_info['title_alias'];
}
$data['status'] = check_post('status');