$tpl->assign('invalid_waypoints', $result === true ? false : implode(", ", $result)); } 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 {