관리자로 수정시 공지 분류가 제대로 표시되지 않던 오류 해결
This commit is contained in:
@ -816,9 +816,9 @@ function is_admin($mb_id)
|
|||||||
// 4.00 에서는 카테고리 테이블을 없애고 보드테이블에 있는 내용으로 대체
|
// 4.00 에서는 카테고리 테이블을 없애고 보드테이블에 있는 내용으로 대체
|
||||||
function get_category_option($bo_table='', $ca_name='')
|
function get_category_option($bo_table='', $ca_name='')
|
||||||
{
|
{
|
||||||
global $g4, $board;
|
global $g4, $board, $is_admin;
|
||||||
|
|
||||||
$categories = explode("|", $board['bo_category_list']); // 구분자가 , 로 되어 있음
|
$categories = explode("|", $board['bo_category_list'].($is_admin?"|공지":"")); // 구분자가 , 로 되어 있음
|
||||||
$str = "";
|
$str = "";
|
||||||
for ($i=0; $i<count($categories); $i++) {
|
for ($i=0; $i<count($categories); $i++) {
|
||||||
$category = trim($categories[$i]);
|
$category = trim($categories[$i]);
|
||||||
|
|||||||
@ -153,19 +153,6 @@ echo $option_hidden;
|
|||||||
</form>
|
</form>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
<?php
|
|
||||||
// 관리자라면 분류 선택에 '공지' 옵션을 추가함
|
|
||||||
if ($is_admin)
|
|
||||||
{
|
|
||||||
echo '
|
|
||||||
if (ca_name_select = document.getElementById("ca_name")) {
|
|
||||||
ca_name_select.options.length += 1;
|
|
||||||
ca_name_select.options[ca_name_select.options.length-1].value = "공지";
|
|
||||||
ca_name_select.options[ca_name_select.options.length-1].text = "공지";
|
|
||||||
}';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
function html_auto_br(obj)
|
function html_auto_br(obj)
|
||||||
{
|
{
|
||||||
if (obj.checked) {
|
if (obj.checked) {
|
||||||
|
|||||||
Reference in New Issue
Block a user