/[drupal]/contributions/modules/pathcache/pathcache.install
ViewVC logotype

Contents of /contributions/modules/pathcache/pathcache.install

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


Revision 1.1 - (show annotations) (download) (as text)
Wed Dec 3 21:29:46 2008 UTC (11 months, 3 weeks ago) by jvandyk
Branch: MAIN
CVS Tags: DRUPAL-6--1-0, HEAD
Branch point for: DRUPAL-5, DRUPAL-6--1
File MIME type: text/x-php
Stores url aliases in a cache, such as memcache.
1 <?php
2 // $Id$
3
4 /**
5 * @file
6 * .install file for pathcache module.
7 */
8
9 /**
10 * Implementation of hook_requirements().
11 */
12 function pathcache_requirements($phase) {
13 // Ensure translations don't break at install time.
14 $t = get_t();
15
16 $aliases_exist = (int)db_result(db_query('SELECT pid FROM {url_alias} LIMIT 1'));
17 $requirements['pathcache'] = array(
18 'title' => $t('Path Cache'),
19 'value' => $aliases_exist ? t('URL aliases present') : t('No URL aliases exist'),
20 'severity' => $aliases_exist ? REQUIREMENT_OK : REQUIREMENT_ERROR,
21 'description' => $aliases_exist ? '' : $t('The path cache module expects to have URL aliases in your url_aliases database table. Currently that table is empty. If you are not using path aliases (by using the Path module, for example) the Path Cache module will actually slow down your site instead of speeding it up.'),
22 );
23
24 return $requirements;
25 }

  ViewVC Help
Powered by ViewVC 1.1.2