/[drupal]/contributions/modules/pear/pear.module
ViewVC logotype

Contents of /contributions/modules/pear/pear.module

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


Revision 1.3 - (show annotations) (download) (as text)
Tue May 6 23:06:39 2008 UTC (18 months, 3 weeks ago) by mepcotterell
Branch: MAIN
CVS Tags: DRUPAL-6--1-0, HEAD
Changes since 1.2: +31 -2 lines
File MIME type: text/x-php
preparing fore dev-release
1 <?php
2 // $Id: pear.module,v 1.2 2008/05/02 17:46:20 mepcotterell Exp $
3
4 /**
5 * Perform startup tasks
6 */
7 function pear_init() {
8
9 /**
10 * This is just a test...
11 *
12 */
13 $pear_path = variable_get('pear_pear_path', -1);
14
15 if ($pear_path == -1) {
16 trigger_error(t('The Pear module installation failed!'));
17 } else {
18
19 $include_path = array(
20 $pear_path,
21 get_include_path(),
22 );
23 set_include_path(implode(PATH_SEPARATOR, $include_path));
24
25 include_once 'PEAR.php';
26
27 trigger_error(t('The path to PEAR is @path', array('@path' => $pear_path)));
28 }
29
30 }
31
32 /*
33 * This function sends log messages to watchdog.
34 * The $message parameter must be handled where
35 * the pear_log function is called.
36 */
37 function pear_log($message, $error = FALSE) {
38 watchdog('pear', $message, NULL, ($error) ? WATCHDOG_DEBUG : $error);
39 }
40

  ViewVC Help
Powered by ViewVC 1.1.2