bugfix: the slice page was broken when nobody is in slice
[plewww.git] / planetlab / includes / plc_drupal.php
1 <?php
2 //
3 // Drupal compatibility
4 //
5 // Mark Huang <mlhuang@cs.princeton.edu>
6 // Copyright (C) 2006 The Trustees of Princeton University
7 //
8 // $Id$ $
9 //
10
11 if (!function_exists('drupal_set_title')) {
12   function drupal_set_title($title = NULL)
13   {
14     static $stored_title;
15
16     if (isset($title)) {
17       $stored_title = $title;
18     }
19     return $stored_title;
20   }
21 }
22
23 if (!function_exists('drupal_get_title')) {
24   function drupal_get_title()
25   {
26     return drupal_set_title();
27   }
28 }
29
30 if (!function_exists('drupal_set_html_head')) {
31   function drupal_set_html_head($data = NULL)
32   {
33     static $stored_head = '';
34
35     if (!is_null($data)) {
36       $stored_head .= $data ."\n";
37     }
38     return $stored_head;
39   }
40 }
41
42 if (!function_exists('drupal_get_html_head')) {
43   function drupal_get_html_head()
44   {
45     $output = "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n";
46     // XXX Insert CSS link here
47     return $output . drupal_set_html_head();
48   }
49 }
50
51 ?>