* You should always use this instead of instantiating the object directly
*
* @param int $doc_id The ID of the document - required
- * @param int $group_id Group ID of the project - required
+ * @param int|bool $group_id Group ID of the project - required
* @param int|bool $res The result set handle ("SELECT * FROM docdata_vw WHERE docid=$1")
* @return Document a document object or false on failure
*/
* @param int $offset The number of rows to skip.
* @param string $style The style of forum, whether it's nested, ultimate, etc.
* @param int $max_rows The maximum number of rows to return.
- * @param int $set Whether to set these prefs into the database - use "custom".
+ * @param string $set Whether to set these prefs into the database - use "custom".
*/
function setup($offset = 0, $style = 'ultimate', $max_rows = 25, $set = 'no') {
//echo "<br />offset: $offset| style: $style|max_rows: $max_rows|set: $set+";
/**
* ls - lists a specified directory and returns an array of files
- * @param string $dir the path of the directory to list
- * @param bool $filter whether to filter out directories and illegal filenames
- * @param string $regex filter filename based on this regex
- * @return array array of file names.
+ * @param string $dir the path of the directory to list
+ * @param bool $filter whether to filter out directories and illegal filenames
+ * @param string|bool $regex filter filename based on this regex
+ * @return array array of file names.
*/
function &ls($dir, $filter = false, $regex = false) {
$out = array();
* @param array $vals
* @param array $texts Text to be displayed
* @param string $name id of the items selected
- * @param string $checked_array The item that should be checked
+ * @param array $checked_array The item that should be checked
* @param int $size The size of this box
* @param bool $show_100 Whether or not to show the '100 row'
* @param string $text_100 What to call the '100 row' defaults to none.
if ($withGroup && $vals[$i]!='100' && $optgroup[$i]!=$currentGroup) {
if ($currentGroup!='' && $groupOpen) {
$return .= html_ac(html_ap() - 1);
- $groupOpen = false;
+ $groupOpen = false; // @fixme see $groupOpen below
}
$return .= html_ao('optgroup', array('label'=>$optgroup[$i]));
$groupOpen = true;
* @param array $checked
* @param bool $checkall
* @param bool $show_100
+ * @param string $text_100
+ * @param bool $allowed
+ * @param array $attrs
+ * @param array $checkbox_attrs
+ * @param array $attrs_100
* @return string html code for checkbox control
*/
function html_build_checkboxes_from_array($vals, $check_name, $checked=array(), $checkall=false, $show_100=true, $text_100='none', $allowed=false, $attrs=array(), $checkbox_attrs=array(), $attrs_100=array()) {
* showResult - Get Result from Survey and Question. Pass the result to Show Result HTML class
*
* @param object $SurveyHTML a survey object
- * @param object $Question a question object
- * @param int whether print out export(csv) format
+ * @param object $Survey
+ * @param object $Question a question object
+ * @param int $show_comment whether print out export(csv) format
+ * @param string $q_num
+ * @param int $graph
*/
function showResult(&$SurveyHTML, &$Survey, &$Question, $show_comment=0, $q_num="", $graph=0) {
/* Get results */
$srf = new SurveyResponseFactory($Survey, $Question);
if (!$srf || !is_object($srf)) {
echo $HTML->error_msg(_('Error'). ' ' . _('Cannot get Survey Response Factory'));
- } elseif ( $srf->isError()) {
+ } elseif ($srf->isError()) {
echo $HTML->error_msg(_('Error'). $srf->getErrorMessage());
} else {
/* Show result in HTML*/