Now all modules are in core modules folder

This commit is contained in:
Manuel Cillero 2017-08-08 12:14:45 +02:00
parent 5ba1cdfa0b
commit 05b6a91b0c
1907 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,43 @@
<?php
/**
* @file
* The install and update code for the token module.
*
* @ingroup token
*/
/**
* Implements hook_requirements().
*/
function token_requirements($phase = 'runtime') {
$requirements = array();
$t = get_t();
// Check for duplicate tokens.
if ($phase == 'runtime') {
if ($duplicate_tokens = token_find_duplicate_tokens()) {
foreach ($duplicate_tokens as $token => $modules) {
$duplicate_tokens[$token] = $t('@token (defined by modules: @modules)', array('@token' => $token, '@modules' => implode(', ', $modules)));
}
$requirements['token_duplicates'] = array(
'title' => $t('Duplicate tokens'),
'value' => $t('The following tokens are defined by multiple modules and may cause problems when performing token replacement.'),
'severity' => REQUIREMENT_WARNING,
'description' => theme('item_list', $duplicate_tokens),
);
}
}
return $requirements;
}
function token_install() {
db_query("UPDATE {system} SET weight = 10 WHERE name = 'token'");
}
function token_update_1() {
$ret = array();
$ret[] = update_sql("UPDATE {system} SET weight = 10 WHERE name = 'token'");
return $ret;
}