Commit bdf5dc9d authored by Dries's avatar Dries

- Patch #102413 by yched: path node/add/[poll|forum|blog] defined twice.

parent a98fa4c2
......@@ -1451,7 +1451,7 @@ function drupal_get_css($css = NULL) {
}
}
}
if ($is_writable && $preprocess_css) {
$filename = md5(serialize($types)) .'.css';
$preprocess_file = drupal_build_css_cache($types, $filename);
......@@ -1478,7 +1478,7 @@ function drupal_build_css_cache($types, $filename) {
// Create the css/ within the files folder.
$csspath = file_create_path('css');
file_check_directory($csspath, FILE_CREATE_DIRECTORY);
if (!file_exists($csspath .'/'. $filename)) {
// Build aggregate CSS file.
foreach ($types as $type) {
......@@ -1494,20 +1494,20 @@ function drupal_build_css_cache($types, $filename) {
}
}
}
// @import rules must proceed any other style, so we move those to the top.
$regexp = '/@import[^;]+;/i';
preg_match_all($regexp, $data, $matches);
$data = preg_replace($regexp, '', $data);
$data = implode('', $matches[0]) . $data;
// Perform some safe CSS optimizations.
$data = preg_replace('<
\s*([@{}:;\)])\s* | # Remove whitespace around separators.
/\*([^*\\\\]|\*(?!/))+\*/ | # Remove comments that are not CSS hacks.
[\n\r] # Remove line breaks.
>x', '\1', $data);
// Create the CSS file.
file_save_data($data, $csspath .'/'. $filename, FILE_EXISTS_REPLACE);
}
......
......@@ -254,8 +254,6 @@ function blog_menu($may_cache) {
$items = array();
if ($may_cache) {
$items[] = array('path' => 'node/add/blog', 'title' => t('Blog entry'),
'access' => user_access('edit own blog'));
$items[] = array('path' => 'blog', 'title' => t('Blogs'),
'callback' => 'blog_page',
'access' => user_access('access content'),
......
......@@ -35,9 +35,6 @@ function forum_menu($may_cache) {
$items = array();
if ($may_cache) {
$items[] = array('path' => 'node/add/forum',
'title' => t('Forum topic'),
'access' => user_access('create forum topics'));
$items[] = array('path' => 'forum',
'title' => t('Forums'),
'callback' => 'forum_page',
......
......@@ -231,8 +231,6 @@ function poll_menu($may_cache) {
$items = array();
if ($may_cache) {
$items[] = array('path' => 'node/add/poll', 'title' => t('Poll'),
'access' => user_access('create polls'));
$items[] = array('path' => 'poll', 'title' => t('Polls'),
'callback' => 'poll_page',
'access' => user_access('access content'),
......
......@@ -659,7 +659,7 @@ function system_performance_settings() {
'#title' => t('Page cache'),
'#description' => t('Enabling the cache will offer a significant performance boost. Drupal can store and send compressed cached pages requested by <em>anonymous</em> users. By caching a web page, Drupal does not have to construct the page each time someone wants to view it.'),
);
$form['page_cache']['cache'] = array(
'#type' => 'radios',
'#title' => t('Caching mode'),
......@@ -677,15 +677,15 @@ function system_performance_settings() {
'#options' => $period,
'#description' => t('On high-traffic sites it can become necessary to enforce a minimum cache lifetime. The minimum cache lifetime is the minimum amount of time that will go by before the cache is emptied and recreated. A larger minimum cache lifetime offers better performance, but users will not see new content for a longer period of time.')
);
$form['bandwidth_optimizations'] = array(
'#type' => 'fieldset',
'#title' => t('Bandwidth optimizations'),
'#description' => t('These options can help reduce both the size and number of requests made to your website. This can reduce the server load, the bandwidth used, and the average page loading time for your visitors.')
);
$directory = file_directory_path();
$is_writable = is_dir($directory) && is_writable($directory) && (variable_get('file_downloads', FILE_DOWNLOADS_PUBLIC) == FILE_DOWNLOADS_PUBLIC);
$is_writable = is_dir($directory) && is_writable($directory) && (variable_get('file_downloads', FILE_DOWNLOADS_PUBLIC) == FILE_DOWNLOADS_PUBLIC);
$form['bandwidth_optimizations']['preprocess_css'] = array(
'#type' => 'radios',
'#title' => t('Aggregate and compress CSS files'),
......
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