function ewiki_print_calendar_title(&$html, $id, $data, $action, $split = EWIKI_SPLIT_TITLE) { global $ewiki_title; if (ewiki_isCalendarId($id)) { $html = str_replace(">{$ewiki_title}<", ">" . ewiki_calendar_page_title($id, $split) . "<", $html); } }
function calendar_exists($always = false) { if ($always) { return true; } $result = ($id = $GLOBALS["ewiki_id"]) && ($Qresult = ewiki_db::SEARCH("id", $id . CALENDAR_NAME_SEP)) && $Qresult->count(); if (!$result || $id == EWIKI_PAGE_CALENDAR || $id == EWIKI_PAGE_YEAR_CALENDAR || !empty($_REQUEST["year"])) { return false; } while ($row = $Qresult->get(0, 0x1037)) { if (ewiki_isCalendarId($row["id"])) { return true; } } return false; }
function ewiki_action_calendar_list($id, $data, $action) { $pages = ewiki_subpage_list($id, CALENDAR_NAME_SEP); foreach ($pages as $pageId => $uu) { if (!ewiki_isCalendarId($pageId)) { unset($pages[$pageId]); } } if (0 == count($pages)) { return ewiki_t("NOCALENDAR"); } else { //ksort($pages); $o = '<div class="calendar_list"><small>' . ewiki_t('CALENDERFOR') . " {$id}:</small><br />"; $o .= ewiki_list_pages($pages) . "</div>\n"; } return $o; }