name"; } function create_list_query($order_by, $where, $show_deleted = 0) { $custom_join = $this->custom_fields->getJOIN (); $query = "SELECT "; $query .= " $this->table_name.*, users.user_name as assigned_user_name"; if ($custom_join) { $query .= $custom_join ['select']; } $query .= " FROM ecmcustomlists "; $query .= " LEFT JOIN users ON ecmcustomlists.assigned_user_id=users.id "; if ($custom_join) { $query .= $custom_join ['join']; } $where_auto = '1=1'; if ($show_deleted == 0) { $where_auto = " ecmcustomlists.deleted=0 "; } else if ($show_deleted == 1) { $where_auto = "$this->table_name.deleted=1"; } if ($where != "") $query .= "where $where AND " . $where_auto; else $query .= "where " . $where_auto; if ($order_by != "") $query .= " ORDER BY " . $this->process_order_by ( $order_by, null ); else $query .= " ORDER BY tasks.name"; return $query; } function create_export_query(&$order_by, &$where) { $custom_join = $this->custom_fields->getJOIN ( true, true ); { $query = 'SELECT ecmcustomlists.*'; if ($custom_join) { $query .= $custom_join ['select']; } $query .= ' FROM ecmcustomlists '; $where_auto = "ecmcustomlists.deleted=0"; } if ($custom_join) { $query .= $custom_join ['join']; } if ($where != "") $query .= "where $where AND " . $where_auto; else $query .= "where " . $where_auto; if ($order_by != "") $query .= " ORDER BY " . $this->process_order_by ( $order_by, null ); else $query .= " ORDER BY ecmcustomlists.name"; return $query; } function fill_in_additional_list_fields() { } function fill_in_additional_detail_fields() { parent::fill_in_additional_detail_fields (); global $app_strings; } function get_list_view_data() { global $action, $currentModule, $focus, $current_module_strings, $app_list_strings, $image_path, $timedate; return array (); } function bean_implements($interface) { switch ($interface) { case 'ACL' : return true; } return false; } function listviewACLHelper() { $array_assign = parent::listviewACLHelper (); $is_owner = false; if (! empty ( $this->parent_name )) { if (! empty ( $this->parent_name_owner )) { global $current_user; $is_owner = $current_user->id == $this->parent_name_owner; } } if (! ACLController::moduleSupportsACL ( $this->parent_type ) || ACLController::checkAccess ( $this->parent_type, 'view', $is_owner )) { $array_assign ['PARENT'] = 'a'; } else { $array_assign ['PARENT'] = 'span'; } $is_owner = false; if (! empty ( $this->contact_name )) { if (! empty ( $this->contact_name_owner )) { global $current_user; $is_owner = $current_user->id == $this->contact_name_owner; } } if (ACLController::checkAccess ( 'Contacts', 'view', $is_owner )) { $array_assign ['CONTACT'] = 'a'; } else { $array_assign ['CONTACT'] = 'span'; } return $array_assign; } function save($check_notify = FALSE) { global $current_user; $return_id = parent::save ( $check_notify ); return $return_id; } } ?>