-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrender_boost.patch
53 lines (48 loc) · 1.72 KB
/
render_boost.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
diff -ruN --exclude=sites -x info.php -x .htaccess -x .gitignore ./includes/common.inc ../../drupal7/includes/common.inc
--- ./includes/common.inc 2015-08-19 17:20:31.000000000 -0400
+++ ../../drupal7/includes/common.inc 2016-02-07 21:13:42.000000000 -0500
@@ -5846,6 +5846,13 @@
$page['content']['system_main'] = drupal_set_page_content();
}
+ if(module_exists('render_boost')){
+ $config = variable_get('render_boost_settings');
+ if($config['enable']){
+ return render_boost_original_render($page);
+ }
+ }
+
return drupal_render($page);
}
@@ -5937,6 +5944,13 @@
return '';
}
+ if(module_exists('render_boost')){
+ $config = variable_get('render_boost_settings');
+ if($config['enable']){
+ return render_boost_drupal_render($elements);
+ }
+ }
+
// Try to fetch the element's markup from cache and return.
if (isset($elements['#cache'])) {
$cached_output = drupal_render_cache_get($elements);
diff -ruN --exclude=sites -x info.php -x .htaccess -x .gitignore ./includes/form.inc ../../drupal7/includes/form.inc
--- ./includes/form.inc 2015-08-19 17:20:31.000000000 -0400
+++ ../../drupal7/includes/form.inc 2016-02-07 22:01:02.000000000 -0500
@@ -127,7 +127,17 @@
array_shift($args);
$form_state['build_info']['args'] = $args;
- return drupal_build_form($form_id, $form_state);
+ $form = drupal_build_form($form_id, $form_state);
+ if(module_exists('render_boost')){
+ $config = variable_get('render_boost_settings');
+ if($config['enable']){
+ $form_unique_id = render_boost_form_storage($form_id, $form);
+ return array(
+ '#markup' => '<!-- render_boost_form:' . $form_id . ':' . $form_unique_id . ' -->',
+ );
+ }
+ }
+ return $form;
}
/**