Révision 73ab1d0a
Ajouté par Assos Assos il y a plus de 7 ans
drupal7/sites/all/modules/rules/includes/rules.core.inc | ||
---|---|---|
1805 | 1805 |
} |
1806 | 1806 |
|
1807 | 1807 |
protected function getFileName($function, $includes) { |
1808 |
$reflector = new ReflectionFunction($function); |
|
1809 |
// On windows the path contains backslashes instead of slashes, fix that. |
|
1810 |
$file = str_replace('\\', '/', $reflector->getFileName()); |
|
1811 |
foreach ($includes as $include) { |
|
1812 |
$pos = strpos($file, $include . '.inc'); |
|
1813 |
// Test whether the file ends with the given filename.inc. |
|
1814 |
if ($pos !== FALSE && strlen($file) - $pos == strlen($include) + 4) { |
|
1815 |
return $include; |
|
1808 |
static $filenames; |
|
1809 |
if (!isset($filenames) || !array_key_exists($function, $filenames)) { |
|
1810 |
$filenames[$function] = NULL; |
|
1811 |
$reflector = new ReflectionFunction($function); |
|
1812 |
// On windows the path contains backslashes instead of slashes, fix that. |
|
1813 |
$file = str_replace('\\', '/', $reflector->getFileName()); |
|
1814 |
foreach ($includes as $include) { |
|
1815 |
$pos = strpos($file, $include . '.inc'); |
|
1816 |
// Test whether the file ends with the given filename.inc. |
|
1817 |
if ($pos !== FALSE && strlen($file) - $pos == strlen($include) + 4) { |
|
1818 |
$filenames[$function] = $include; |
|
1819 |
return $include; |
|
1820 |
} |
|
1816 | 1821 |
} |
1817 | 1822 |
} |
1823 |
return $filenames[$function]; |
|
1818 | 1824 |
} |
1819 | 1825 |
} |
1820 | 1826 |
|
drupal7/sites/all/modules/rules/rules.info | ||
---|---|---|
22 | 22 |
dependencies[] = entity_token |
23 | 23 |
dependencies[] = entity |
24 | 24 |
|
25 |
; Information added by Drupal.org packaging script on 2015-03-16
|
|
26 |
version = "7.x-2.9"
|
|
25 |
; Information added by Drupal.org packaging script on 2017-04-20
|
|
26 |
version = "7.x-2.10"
|
|
27 | 27 |
core = "7.x" |
28 | 28 |
project = "rules" |
29 |
datestamp = "1426527210"
|
|
29 |
datestamp = "1492697958"
|
|
30 | 30 |
|
drupal7/sites/all/modules/rules/rules.install | ||
---|---|---|
122 | 122 |
'name' => array('name'), |
123 | 123 |
), |
124 | 124 |
'indexes' => array( |
125 |
'plugin' => array('plugin'), |
|
125 |
'plugin' => array('plugin', 'active'),
|
|
126 | 126 |
), |
127 | 127 |
); |
128 | 128 |
$schema['rules_trigger'] = array( |
... | ... | |
526 | 526 |
_rules_rebuild_component_cache(); |
527 | 527 |
RulesEventSet::rebuildEventCache(); |
528 | 528 |
} |
529 |
|
|
530 |
/** |
|
531 |
* Add an index for retrieving active config of a certain plugin. |
|
532 |
*/ |
|
533 |
function rules_update_7215() { |
|
534 |
if (db_index_exists('rules_config', 'plugin')) { |
|
535 |
db_drop_index('rules_config', 'plugin'); |
|
536 |
} |
|
537 |
db_add_index('rules_config', 'plugin', array('plugin', 'active')); |
|
538 |
} |
drupal7/sites/all/modules/rules/rules.module | ||
---|---|---|
366 | 366 |
// Prevent stampeding by ensuring the cache is rebuilt just once at the |
367 | 367 |
// same time. |
368 | 368 |
while (!lock_acquire(__FUNCTION__ . $cid . $cid_suffix, 60)) { |
369 |
rules_log('Cache rebuild lock hit: !cid', array('!cid' => $cid), RulesLog::WARN); |
|
370 | 369 |
// Now wait until the lock is released. |
371 |
lock_wait(__FUNCTION__ . $cid . $cid_suffix, 10);
|
|
370 |
lock_wait(__FUNCTION__ . $cid . $cid_suffix, 30);
|
|
372 | 371 |
// If the lock is released it's likely the cache was rebuild. Thus check |
373 | 372 |
// again if we can fetch it from the persistent cache. |
374 | 373 |
if ($get = cache_get($cid . $cid_suffix, 'cache_rules')) { |
drupal7/sites/all/modules/rules/rules.rules.inc | ||
---|---|---|
20 | 20 |
* for providing some general stuff. |
21 | 21 |
*/ |
22 | 22 |
function rules_core_modules() { |
23 |
$return = array('data', 'entity', 'node', 'system', 'user', 'rules_core'); |
|
24 |
foreach (array('comment', 'taxonomy', 'php', 'path') as $module) { |
|
25 |
if (module_exists($module)) { |
|
26 |
$return[] = $module; |
|
23 |
// Make use of the fast, advanced drupal static pattern. |
|
24 |
static $drupal_static_fast; |
|
25 |
if (!isset($drupal_static_fast)) { |
|
26 |
$drupal_static_fast = &drupal_static(__FUNCTION__); |
|
27 |
} |
|
28 |
$modules = &$drupal_static_fast; |
|
29 |
|
|
30 |
if (!isset($modules)) { |
|
31 |
$modules = array('data', 'entity', 'node', 'system', 'user', 'rules_core'); |
|
32 |
foreach (array('comment', 'taxonomy', 'php', 'path') as $module) { |
|
33 |
if (module_exists($module)) { |
|
34 |
$modules[] = $module; |
|
35 |
} |
|
27 | 36 |
} |
28 | 37 |
} |
29 |
return $return;
|
|
38 |
return $modules;
|
|
30 | 39 |
} |
31 | 40 |
|
32 | 41 |
/** |
... | ... | |
46 | 55 |
* Implements hook_rules_file_info(). |
47 | 56 |
*/ |
48 | 57 |
function rules_rules_file_info() { |
49 |
$items = array(); |
|
50 |
foreach (rules_core_modules() as $module) { |
|
51 |
if (function_exists($function = "rules_{$module}_file_info")) { |
|
52 |
$items = array_merge($items, (array)$function()); |
|
53 |
// Automatically add "$module.rules.inc" for each module. |
|
54 |
$items[] = 'modules/' . $module . '.rules'; |
|
58 |
// Make use of the fast, advanced drupal static pattern. |
|
59 |
static $drupal_static_fast; |
|
60 |
if (!isset($drupal_static_fast)) { |
|
61 |
$drupal_static_fast = &drupal_static(__FUNCTION__); |
|
62 |
} |
|
63 |
$items = &$drupal_static_fast; |
|
64 |
if (!isset($items)) { |
|
65 |
$items = array(); |
|
66 |
foreach (rules_core_modules() as $module) { |
|
67 |
if (function_exists($function = "rules_{$module}_file_info")) { |
|
68 |
$items = array_merge($items, (array) $function()); |
|
69 |
// Automatically add "$module.rules.inc" for each module. |
|
70 |
$items[] = 'modules/' . $module . '.rules'; |
|
71 |
} |
|
55 | 72 |
} |
56 | 73 |
} |
57 | 74 |
return $items; |
drupal7/sites/all/modules/rules/rules_admin/rules_admin.info | ||
---|---|---|
6 | 6 |
files[] = rules_admin.inc |
7 | 7 |
dependencies[] = rules |
8 | 8 |
|
9 |
; Information added by Drupal.org packaging script on 2015-03-16
|
|
10 |
version = "7.x-2.9"
|
|
9 |
; Information added by Drupal.org packaging script on 2017-04-20
|
|
10 |
version = "7.x-2.10"
|
|
11 | 11 |
core = "7.x" |
12 | 12 |
project = "rules" |
13 |
datestamp = "1426527210"
|
|
13 |
datestamp = "1492697958"
|
|
14 | 14 |
|
drupal7/sites/all/modules/rules/rules_i18n/rules_i18n.info | ||
---|---|---|
7 | 7 |
files[] = rules_i18n.i18n.inc |
8 | 8 |
files[] = rules_i18n.rules.inc |
9 | 9 |
files[] = rules_i18n.test |
10 |
; Information added by Drupal.org packaging script on 2015-03-16
|
|
11 |
version = "7.x-2.9"
|
|
10 |
; Information added by Drupal.org packaging script on 2017-04-20
|
|
11 |
version = "7.x-2.10"
|
|
12 | 12 |
core = "7.x" |
13 | 13 |
project = "rules" |
14 |
datestamp = "1426527210"
|
|
14 |
datestamp = "1492697958"
|
|
15 | 15 |
|
drupal7/sites/all/modules/rules/rules_scheduler/rules_scheduler.info | ||
---|---|---|
13 | 13 |
files[] = includes/rules_scheduler.views.inc |
14 | 14 |
files[] = includes/rules_scheduler_views_filter.inc |
15 | 15 |
|
16 |
; Information added by Drupal.org packaging script on 2015-03-16
|
|
17 |
version = "7.x-2.9"
|
|
16 |
; Information added by Drupal.org packaging script on 2017-04-20
|
|
17 |
version = "7.x-2.10"
|
|
18 | 18 |
core = "7.x" |
19 | 19 |
project = "rules" |
20 |
datestamp = "1426527210"
|
|
20 |
datestamp = "1492697958"
|
|
21 | 21 |
|
drupal7/sites/all/modules/rules/rules_scheduler/tests/rules_scheduler_test.info | ||
---|---|---|
5 | 5 |
files[] = rules_scheduler_test.inc |
6 | 6 |
hidden = TRUE |
7 | 7 |
|
8 |
; Information added by Drupal.org packaging script on 2015-03-16
|
|
9 |
version = "7.x-2.9"
|
|
8 |
; Information added by Drupal.org packaging script on 2017-04-20
|
|
9 |
version = "7.x-2.10"
|
|
10 | 10 |
core = "7.x" |
11 | 11 |
project = "rules" |
12 |
datestamp = "1426527210"
|
|
12 |
datestamp = "1492697958"
|
|
13 | 13 |
|
drupal7/sites/all/modules/rules/tests/rules_test.info | ||
---|---|---|
6 | 6 |
files[] = rules_test.rules_defaults.inc |
7 | 7 |
hidden = TRUE |
8 | 8 |
|
9 |
; Information added by Drupal.org packaging script on 2015-03-16
|
|
10 |
version = "7.x-2.9"
|
|
9 |
; Information added by Drupal.org packaging script on 2017-04-20
|
|
10 |
version = "7.x-2.10"
|
|
11 | 11 |
core = "7.x" |
12 | 12 |
project = "rules" |
13 |
datestamp = "1426527210"
|
|
13 |
datestamp = "1492697958"
|
|
14 | 14 |
|
drupal7/sites/all/modules/rules/tests/rules_test_invocation.info | ||
---|---|---|
4 | 4 |
core = 7.x |
5 | 5 |
hidden = TRUE |
6 | 6 |
|
7 |
; Information added by Drupal.org packaging script on 2015-03-16
|
|
8 |
version = "7.x-2.9"
|
|
7 |
; Information added by Drupal.org packaging script on 2017-04-20
|
|
8 |
version = "7.x-2.10"
|
|
9 | 9 |
core = "7.x" |
10 | 10 |
project = "rules" |
11 |
datestamp = "1426527210"
|
|
11 |
datestamp = "1492697958"
|
|
12 | 12 |
|
Formats disponibles : Unified diff
Weekly update of contrib modules