diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-12-07 20:57:45 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-12-07 20:57:45 +0000 |
commit | 94d6b9abf046278d87640eadce2fa45591968778 (patch) | |
tree | a558c7b7530f0f6721d29b0cbf8ebf3b08da0d4d /modules/node.module | |
parent | 9e007c11aaf9cb39a566bc2215f7d373de8828ad (diff) | |
download | brdo-94d6b9abf046278d87640eadce2fa45591968778.tar.gz brdo-94d6b9abf046278d87640eadce2fa45591968778.tar.bz2 |
- Patch #29326 by Morbus: optimized performance of URL aliasing for newly installed sites.
There are a number of small optimizations we could add; like, we should never do more lookup queries than the number of unique URL aliases in the database. When the size of the static cache equals the number of unique URL aliases in the database, we can stop doing lookups. I think this could be implemented with a 2-line change. Takers?
Diffstat (limited to 'modules/node.module')
-rw-r--r-- | modules/node.module | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/modules/node.module b/modules/node.module index 33e1721d0..d119f6c90 100644 --- a/modules/node.module +++ b/modules/node.module @@ -886,6 +886,10 @@ function node_menu($may_cache) { 'access' => user_access('access content'), 'type' => MENU_ITEM_GROUPING, 'weight' => 1); + $items[] = array('path' => 'rss.xml', 'title' => t('rss feed'), + 'callback' => 'node_feed', + 'access' => user_access('access content'), + 'type' => MENU_CALLBACK); } else { if (arg(0) == 'node' && is_numeric(arg(1))) { @@ -1375,7 +1379,7 @@ function node_block($op = 'list', $delta = 0) { } else if ($op == 'view') { $block['subject'] = t('Syndicate'); - $block['content'] = theme('xml_icon', url('node/feed')); + $block['content'] = theme('xml_icon', url('rss.xml')); return $block; } @@ -1916,7 +1920,7 @@ function node_page_default() { drupal_add_link(array('rel' => 'alternate', 'type' => 'application/rss+xml', 'title' => t('RSS'), - 'href' => url('node/feed', NULL, NULL, TRUE))); + 'href' => url('rss.xml', NULL, NULL, TRUE))); $output = ''; while ($node = db_fetch_object($result)) { @@ -1947,9 +1951,6 @@ function node_page() { } switch ($op) { - case 'feed': - node_feed(); - return; case 'view': if (is_numeric(arg(1))) { $node = node_load(arg(1), $_GET['revision']); |