if($form = data_submitted()) {
$form->name = strip_tags($form->name); // Strip all tags
- $form->description = clean_text($form->description , $form->format); // Clean up any bad tags
+ //$form->description = clean_text($form->description , $form->format); // Clean up any bad tags
$form->timestart = make_timestamp($form->startyr, $form->startmon, $form->startday, $form->starthr, $form->startmin);
if($form->duration == 1) {
if(!empty($form) && $form->type == 'defined') {
$form->name = strip_tags($form->name); // Strip all tags
- $form->description = clean_text($form->description , $form->format); // Clean up any bad tags
+ //$form->description = clean_text($form->description , $form->format); // Clean up any bad tags
$form->timestart = make_timestamp($form->startyr, $form->startmon, $form->startday, $form->starthr, $form->startmin);
if($form->duration == 1) {
}
else if($users === false) {
// No user at all
- if(!empty($whereclause)) {
- $whereclause .= ' OR';
- }
- $whereclause .= ' 0';
+ // No need to do anything
}
if(is_array($groups) && !empty($groups)) {
// Events from a number of groups
}
else {
// This means NO courses, not that we don't care!
- if(!empty($whereclause)) {
- $whereclause .= ' OR';
- }
- $whereclause .= ' 0';
+ // No need to do anything
}
}
else if(is_numeric($courses)) {
$whereclause = $timeclause;
}
- return $whereclause;
+ return empty($whereclause) ? false : $whereclause;
}
function calendar_top_controls($type, $data) {
// Set printable representation
$eventtime = calendar_get_link_tag($day, CALENDAR_URL.'view.php?view=day'.$morehref.'&', $startdate['mday'], $startdate['mon'], $startdate['year']).' ('.$time.')';
}
-
+
return $eventtime;
}
-
+
if(!function_exists('array_diff_assoc')) {
// PHP < 4.3.0
function array_diff_assoc($source, $diff) {