Ejemplo n.º 1
0
    if (!empty($_GET['name1']) && !empty($_GET['name2'])) {
        $depth = 2;
    } else {
        if (!empty($_GET['name1']) && empty($_GET['name2'])) {
            $depth = 1;
        } else {
            $depth = 0;
        }
    }
}
if (empty($_GET['entries']) || $_GET['entries'] == 0) {
    $entries = 0;
} else {
    $entries = $_GET['entries'];
}
if (!empty($_POST['newCategory']) && Utils_Misc::isSpace($_POST['newCategory']) || !empty($_POST['modifyCategoryName']) && Utils_Misc::isSpace($_POST['modifyCategoryName'])) {
    $history = '';
    $errorMessage = _t('공백문자는 카테고리 이름으로 사용할 수 없습니다');
} elseif (!empty($_POST['newCategory']) && strpos($_POST['newCategory'], '/') !== false || !empty($_POST['modifyCategoryName']) && strpos($_POST['modifyCategoryName'], '/') !== false) {
    $history = '';
    $errorMessage = _t('슬래시가 들어간 카테고리 이름은 사용할 수 없습니다');
    /*} elseif ((!empty($_POST['newCategory']) && strpos($_POST['newCategory'], '&') !== false) || (!empty($_POST['modifyCategoryName']) && strpos($_POST['modifyCategoryName'], '&') !== false)) {
    	$history = '';
    	$errorMessage = _t('앰퍼샌드(&)가 들어간 카테고리 이름은 사용할 수 없습니다');*/
} elseif (!empty($_POST['newCategory']) && strpos($_POST['newCategory'], '?') !== false || !empty($_POST['modifyCategoryName']) && strpos($_POST['modifyCategoryName'], '?') !== false) {
    $history = '';
    $errorMessage = _t('물음표가 들어간 카테고리 이름은 사용할 수 없습니다');
} elseif (!empty($_POST['newCategory'])) {
    $history = addCategory($blogid, $selected == 0 ? null : $_POST['id'], trim($_POST['newCategory'])) ? 'document.getElementById("newCategory").select();' : '';
    if (empty($history)) {
        $errorMessage = _t('같은 이름의 카테고리가 이미 존재합니다');