diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-10-24 05:28:16 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-10-24 05:28:16 +0000 |
commit | 7c08cff12e46b4a7623224694d87f7f88ac53b76 (patch) | |
tree | dc77b1e1fb841d7bd60d024815ca27e6af2ecfc0 | |
parent | e4c4f1f1ce9f70ea309e390c351053419dc62812 (diff) | |
download | brdo-7c08cff12e46b4a7623224694d87f7f88ac53b76.tar.gz brdo-7c08cff12e46b4a7623224694d87f7f88ac53b76.tar.bz2 |
#320331 follow-up by Dave Reid: Remove documentation for no-longer-existing custom_url_rewrite functions.
-rw-r--r-- | modules/system/system.api.php | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/modules/system/system.api.php b/modules/system/system.api.php index 02c69ee36..bcb9ec572 100644 --- a/modules/system/system.api.php +++ b/modules/system/system.api.php @@ -1298,64 +1298,6 @@ function hook_modules_uninstalled($modules) { } /** - * custom_url_rewrite_outbound is not a hook, it's a function you can add to - * settings.php to alter all links generated by Drupal. This function is called from url(). - * This function is called very frequently (100+ times per page) so performance is - * critical. - * - * This function should change the value of $path and $options by reference. - * - * @param $path - * The alias of the $original_path as defined in the database. - * If there is no match in the database it'll be the same as $original_path - * @param $options - * An array of link attributes such as querystring and fragment. See url(). - * @param $original_path - * The unaliased Drupal path that is being linked to. - */ -function custom_url_rewrite_outbound(&$path, &$options, $original_path) { - global $user; - - // Change all 'node' to 'article'. - if (preg_match('|^node(/.*)|', $path, $matches)) { - $path = 'article' . $matches[1]; - } - // Create a path called 'e' which lands the user on her profile edit page. - if ($path == 'user/' . $user->uid . '/edit') { - $path = 'e'; - } - -} - -/** - * custom_url_rewrite_inbound is not a hook, it's a function you can add to - * settings.php to alter incoming requests so they map to a Drupal path. - * This function is called before modules are loaded and - * the menu system is initialized and it changes $_GET['q']. - * - * This function should change the value of $result by reference. - * - * @param $result - * The Drupal path based on the database. If there is no match in the database it'll be the same as $path. - * @param $path - * The path to be rewritten. - * @param $path_language - * An optional language code to rewrite the path into. - */ -function custom_url_rewrite_inbound(&$result, $path, $path_language) { - global $user; - - // Change all article/x requests to node/x - if (preg_match('|^article(/.*)|', $path, $matches)) { - $result = 'node' . $matches[1]; - } - // Redirect a path called 'e' to the user's profile edit page. - if ($path == 'e') { - $result = 'user/' . $user->uid . '/edit'; - } -} - -/** * Registers PHP stream wrapper implementations associated with a module. * * Provide a facility for managing and querying user-defined stream wrappers |