예제 #1
0
파일: mylists.php 프로젝트: 4Vs/oc-server3
            }
            if ($watch) {
                $list->watch(true);
            }
        }
    }
}
// open an 'edit list' form
if (isset($_REQUEST['edit'])) {
    $list = new cachelist($_REQUEST['edit'] + 0);
    if ($list->exist() && $list->getUserId() == $login->userid) {
        $edit_list = true;
        $list_name = $list->getName();
        $list_visibility = $list->getVisibility();
        $watch = $list->isWatchedByMe();
        $desctext = $list->getDescription();
        $descMode = $list->getDescHtmledit() ? 3 : 2;
        $list_caches = '';
    }
}
// switch between HTML and Wysiwyg editor mode
if ($switchDescMode) {
    if (isset($_REQUEST['listid'])) {
        // switching editor mode while editing existing list
        $list = new cachelist($_REQUEST['listid'] + 0);
        if ($list->exist() && $list->getUserId() == $login->userid) {
            $edit_list = true;
            $tpl->assign('show_editor', true);
        }
    } else {
        // switching desc mode while creating new list