コード例 #1
0
 /**
  *
  * 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;
 }
コード例 #2
0
 /**
  * Wraps a URL to make it safe for outputting to the browser
  *
  * @param   string $url the uncertain variable
  * @return  string  a string ready to output
  */
 function escapeURL($url)
 {
     return $this->validator->specialChars_URL(strval($url));
 }