~catch-drupal/+junk/pressflow-content-cache-variable

« back to all changes in this revision

Viewing changes to includes/path.inc

  • Committer: David Strauss
  • Date: 2010-06-18 17:01:06 UTC
  • mfrom: (82.1.2 merge-drupal-6.17)
  • Revision ID: david@fourkitchens.com-20100618170106-eveqf9sepqonszf9
Drupal 6.17 (via testing branch)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?php
2
 
// $Id: path.inc,v 1.19.2.3 2010/03/01 09:19:15 goba Exp $
 
2
// $Id: path.inc,v 1.19.2.4 2010/05/28 15:12:04 goba Exp $
3
3
 
4
4
/**
5
5
 * @file
262
262
 *   Boolean value: TRUE if the current page is the front page; FALSE if otherwise.
263
263
 */
264
264
function drupal_is_front_page() {
265
 
  // As drupal_init_path updates $_GET['q'] with the 'site_frontpage' path,
266
 
  // we can check it against the 'site_frontpage' variable.
267
 
  return $_GET['q'] == drupal_get_normal_path(variable_get('site_frontpage', 'node'));
 
265
  static $is_front_page;
 
266
 
 
267
  if (!isset($is_front_page)) {
 
268
    // As drupal_init_path updates $_GET['q'] with the 'site_frontpage' path,
 
269
    // we can check it against the 'site_frontpage' variable.
 
270
    $is_front_page = ($_GET['q'] == drupal_get_normal_path(variable_get('site_frontpage', 'node')));
 
271
  }
 
272
 
 
273
  return $is_front_page;
268
274
}
269
275
 
270
276
/**