Commit 64caa00e authored by mikeytown2's avatar mikeytown2

#897970: Allow for clean pagers to be cached.

parent d86c69ea
......@@ -585,6 +585,12 @@ function boost_admin_boost_performance_page() {
'#default_value' => BOOST_OVERWRITE_FILE,
'#description' => t('This is useful if crawling a site before it goes live.'),
);
$form['advanced']['boost_pager_clean'] = array(
'#type' => 'checkbox',
'#title' => t('Save ?page=1 as /page/1'),
'#default_value' => BOOST_PAGER_CLEAN,
'#description' => t('See http://drupal.org/node/897970'),
);
$form['advanced']['boost_disable_clean_url'] = array(
'#type' => 'checkbox',
'#title' => t('Turn off clean url\'s for logged in users'),
......
......@@ -36,6 +36,7 @@ define('BOOST_CACHE_JS', variable_get('boost_cache_js', TRUE));
define('BOOST_CACHEABILITY_OPTION', variable_get('boost_cacheability_option', 0));
define('BOOST_CACHEABILITY_PAGES', variable_get('boost_cacheability_pages', ''));
// Views
define('BOOST_VIEWS_LIST_BEHAVIOR', variable_get('boost_views_list_behavior', 0));
......@@ -67,6 +68,7 @@ define('BOOST_ONLY_ASCII_PATH', variable_get('boost_only_ascii_path', TRUE)
define('BOOST_SET_FILE_ENCODING', variable_get('boost_set_file_encoding', ''));
define('BOOST_AGGRESSIVE_COOKIE', variable_get('boost_aggressive_cookie', TRUE));
define('BOOST_ASYNCHRONOUS_OUTPUT', variable_get('boost_asynchronous_output', TRUE));
define('BOOST_PAGER_CLEAN', variable_get('boost_pager_clean', FALSE));
define('BOOST_FLUSH_DIR', variable_get('boost_flush_dir', FALSE));
define('BOOST_FLUSH_CCK_REFERENCES', variable_get('boost_flush_cck_references', TRUE));
define('BOOST_FLUSH_FRONT', variable_get('boost_flush_front', TRUE));
......@@ -490,6 +492,10 @@ function boost_init() {
$GLOBALS['_boost_query'] = BOOST_CHAR;
$query = array();
foreach ($_GET as $key => $val) {
if (BOOST_PAGER_CLEAN && $key == 'page') {
$GLOBALS['_boost_path'] .= '/page/' . $val;
continue;
}
if ($key != 'q' && $key != 'destination') {
$query[$key] = $val;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment