/[drupal]/contributions/modules/ubercart/ca/ca.inc
ViewVC logotype

Contents of /contributions/modules/ubercart/ca/ca.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Thu Jul 10 12:40:55 2008 UTC (16 months, 2 weeks ago) by islandusurper
Branch: MAIN
CVS Tags: HEAD
Branch point for: DRUPAL-6--2
File MIME type: text/x-php
Begin the Ubercart 6.x-2.x branch.
1 <?php
2 // $Id$
3
4 /**
5 * @file: This files includes some test conditions and actions.
6 */
7
8 // Display a message to the user.
9 function ca_action_drupal_set_message($settings) {
10 // Get the specified input format or use the default.
11 /*if (!empty($settings['message_format'])) {
12 $format = $settings['message_format'];
13 }
14 else {
15 $format = FILTER_FORMAT_DEFAULT;
16 }*/
17
18 // Filter the text using the format.
19 // $message = check_markup($settings['message_text'], $format, FALSE);
20 $message = check_plain($settings['message_text']);
21
22 // Return if there's nothing to display.
23 if (empty($message)) {
24 return;
25 }
26
27 // Make sure we have a valid message type.
28 if ($settings['message_type'] == 'error') {
29 $type = $settings['message_type'];
30 }
31 else {
32 $type = 'status';
33 }
34
35 // Output the message using the Drupal message API.
36 drupal_set_message($message, $type);
37 }
38

  ViewVC Help
Powered by ViewVC 1.1.2