summaryrefslogtreecommitdiff
path: root/modules/blogapi
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2007-01-24 14:48:36 +0000
committerDries Buytaert <dries@buytaert.net>2007-01-24 14:48:36 +0000
commit03752e35a41992c3d61f2591980020c87af257e7 (patch)
treedd8d9f51a47716785083591d82ca873c201c1057 /modules/blogapi
parentd407de4cec606623a5946805d2d42b580ccb116b (diff)
downloadbrdo-03752e35a41992c3d61f2591980020c87af257e7.tar.gz
brdo-03752e35a41992c3d61f2591980020c87af257e7.tar.bz2
- Patch #34755 by chx et al: faster menu system. HEAD is temporary broken and there is no upgrade path yet.
Diffstat (limited to 'modules/blogapi')
-rw-r--r--modules/blogapi/blogapi.module52
1 files changed, 19 insertions, 33 deletions
diff --git a/modules/blogapi/blogapi.module b/modules/blogapi/blogapi.module
index 85a7cfa6e..f55b54ce3 100644
--- a/modules/blogapi/blogapi.module
+++ b/modules/blogapi/blogapi.module
@@ -551,46 +551,32 @@ function blogapi_admin_settings() {
return system_settings_form($form);
}
-function blogapi_menu($may_cache) {
- $items = array();
+function blogapi_menu() {
+ $items['blogapi/rsd'] = array(
+ 'title' => t('RSD'),
+ 'page callback' => 'blogapi_rsd',
+ 'access arguments' => array('access content'),
+ 'type' => MENU_CALLBACK,
+ );
+ $items['admin/settings/blogapi'] = array(
+ 'title' => t('Blog APIs'),
+ 'description' => t('Configure which content types and engines external blog clients can use.'),
+ 'page callback' => 'drupal_get_form',
+ 'page arguments' => array('blogapi_admin_settings'),
+ 'access arguments' => array('administer site configuration'),
+ 'type' => MENU_NORMAL_ITEM,
+ );
+
+ return $items;
+}
+function blogapi_init() {
if (drupal_is_front_page()) {
drupal_add_link(array('rel' => 'EditURI',
'type' => 'application/rsd+xml',
'title' => t('RSD'),
'href' => url('blogapi/rsd', NULL, NULL, TRUE)));
}
-
- if ($may_cache) {
- $items[] = array(
- 'path' => 'blogapi',
- 'title' => t('RSD'),
- 'callback' => 'blogapi_blogapi',
- 'access' => user_access('access content'),
- 'type' => MENU_CALLBACK);
- $items[] = array(
- 'path' => 'admin/settings/blogapi',
- 'title' => t('Blog APIs'),
- 'description' => t('Configure which content types and engines external blog clients can use.'),
- 'callback' => 'drupal_get_form',
- 'callback arguments' => array('blogapi_admin_settings'),
- 'access' => user_access('administer site configuration'),
- 'type' => MENU_NORMAL_ITEM
- );
- }
-
- return $items;
-}
-
-function blogapi_blogapi() {
- switch (arg(1)) {
- case 'rsd':
- blogapi_rsd();
- break;
- default:
- drupal_not_found();
- break;
- }
}
function blogapi_rsd() {