/** * * Generates an HTML <OPTION>-List that contains all toplevel boards. * * @param Integer $selectedUid The UID of the forum that is to be marked as * preselected * @return String HTML content */ function getForumSelectOptionList($selectedUid = NULL) { $content = ''; $res = $this->databaseHandle->exec_SELECTquery('*', 'tx_mmforum_forums', 'deleted=0 AND parentID=0 ' . $this->p->getStoragePIDQuery(), '', 'sorting ASC'); while ($arr = $this->databaseHandle->sql_fetch_assoc($res)) { $selected = $arr['uid'] == $selectedUid; $content .= '<option value="' . $arr['uid'] . '" ' . ($selected ? 'selected="selected"' : '') . '>' . $this->validator->specialChars($arr['forum_name']) . '</option>'; } return $content; }
/** * Wraps a string to make it safe for outputting to the browser * * @param string $string the uncertain variable * @return string a string ready to output */ function escape($string) { return $this->validator->specialChars(strval($string)); }