| [ Index ] |
PHP Cross Reference of Drupal 6 (yi-drupal) |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * @file 5 * The install and update code for the token module. 6 * 7 * @ingroup token 8 */ 9 10 /** 11 * Implements hook_requirements(). 12 */ 13 function token_requirements($phase = 'runtime') { 14 $requirements = array(); 15 $t = get_t(); 16 17 // Check for duplicate tokens. 18 if ($phase == 'runtime') { 19 if ($duplicate_tokens = token_find_duplicate_tokens()) { 20 foreach ($duplicate_tokens as $token => $modules) { 21 $duplicate_tokens[$token] = $t('@token (defined by modules: @modules)', array('@token' => $token, '@modules' => implode(', ', $modules))); 22 } 23 $requirements['token_duplicates'] = array( 24 'title' => $t('Duplicate tokens'), 25 'value' => $t('The following tokens are defined by multiple modules and may cause problems when performing token replacement.'), 26 'severity' => REQUIREMENT_WARNING, 27 'description' => theme('item_list', $duplicate_tokens), 28 ); 29 } 30 } 31 32 return $requirements; 33 } 34 35 function token_install() { 36 db_query("UPDATE {system} SET weight = 10 WHERE name = 'token'"); 37 } 38 39 function token_update_1() { 40 $ret = array(); 41 $ret[] = update_sql("UPDATE {system} SET weight = 10 WHERE name = 'token'"); 42 return $ret; 43 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Mon Jul 9 18:01:44 2012 | Cross-referenced by PHPXref 0.7 |