Mercurial > defr > drupal > core
annotate index.php @ 20:e3d20ebd63d1 tip
Added tag 6.9 for changeset 3edae6ecd6c6
author | Franck Deroche <franck@defr.org> |
---|---|
date | Thu, 15 Jan 2009 10:16:10 +0100 |
parents | c1f4ac30525a |
children |
rev | line source |
---|---|
webmaster@1 | 1 <?php |
webmaster@1 | 2 // $Id: index.php,v 1.94 2007/12/26 08:46:48 dries Exp $ |
webmaster@1 | 3 |
webmaster@1 | 4 /** |
webmaster@1 | 5 * @file |
webmaster@1 | 6 * The PHP page that serves all page requests on a Drupal installation. |
webmaster@1 | 7 * |
webmaster@1 | 8 * The routines here dispatch control to the appropriate handler, which then |
webmaster@1 | 9 * prints the appropriate page. |
webmaster@1 | 10 * |
webmaster@1 | 11 * All Drupal code is released under the GNU General Public License. |
webmaster@1 | 12 * See COPYRIGHT.txt and LICENSE.txt. |
webmaster@1 | 13 */ |
webmaster@1 | 14 |
webmaster@1 | 15 require_once './includes/bootstrap.inc'; |
webmaster@1 | 16 drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); |
webmaster@1 | 17 |
webmaster@1 | 18 $return = menu_execute_active_handler(); |
webmaster@1 | 19 |
webmaster@1 | 20 // Menu status constants are integers; page content is a string. |
webmaster@1 | 21 if (is_int($return)) { |
webmaster@1 | 22 switch ($return) { |
webmaster@1 | 23 case MENU_NOT_FOUND: |
webmaster@1 | 24 drupal_not_found(); |
webmaster@1 | 25 break; |
webmaster@1 | 26 case MENU_ACCESS_DENIED: |
webmaster@1 | 27 drupal_access_denied(); |
webmaster@1 | 28 break; |
webmaster@1 | 29 case MENU_SITE_OFFLINE: |
webmaster@1 | 30 drupal_site_offline(); |
webmaster@1 | 31 break; |
webmaster@1 | 32 } |
webmaster@1 | 33 } |
webmaster@1 | 34 elseif (isset($return)) { |
webmaster@1 | 35 // Print any value (including an empty string) except NULL or undefined: |
webmaster@1 | 36 print theme('page', $return); |
webmaster@1 | 37 } |
webmaster@1 | 38 |
webmaster@1 | 39 drupal_page_footer(); |