diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-03-07 07:44:18 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-03-07 07:44:18 +0000 |
commit | 3205a26755ecf71b4d8503359c2ff1910254f322 (patch) | |
tree | 347bdfc3befa2879e8a62b6eed205dc911b9259c /modules/node/node.module | |
parent | a2232c40eed8afee0a9b38b587e4895cc11c26da (diff) | |
download | brdo-3205a26755ecf71b4d8503359c2ff1910254f322.tar.gz brdo-3205a26755ecf71b4d8503359c2ff1910254f322.tar.bz2 |
#282191 follow-up by plach: Remove ambitious parts of translatable fields UI from core that are no longer relevant, given what made it into Drupal 7.
Diffstat (limited to 'modules/node/node.module')
-rw-r--r-- | modules/node/node.module | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/modules/node/node.module b/modules/node/node.module index 2d7464872..63908a3ce 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -1291,52 +1291,6 @@ function node_build_content($node, $view_mode = 'full') { } /** - * Implements hook_language_negotiation_info(). - */ -function node_language_negotiation_info() { - $providers = array(); - - $providers['node-language'] = array( - 'types' => array(LANGUAGE_TYPE_CONTENT), - 'callbacks' => array('language' => 'node_language_provider'), - 'file' => drupal_get_path('module', 'node') . '/node.module', - 'name' => t('Content'), - 'description' => t('Use the language of the displayed content.'), - ); - - return $providers; -} - -/** - * Return the language of the current node. - * - * @param $languages - * An array of valid language objects. - * - * @return - * A valid language code on success, FALSE otherwise. - */ -function node_language_provider($languages) { - require_once DRUPAL_ROOT . '/' . variable_get('path_inc', 'includes/path.inc'); - - $path = isset($_GET['q']) ? $_GET['q'] : ''; - list($language, $path) = language_url_split_prefix($path, $languages); - $language = $language ? $language : language_default(); - $path = drupal_get_normal_path($path, $language->language); - - // We cannot use args now. - $path = explode('/', $path); - // Act only if we are in a node page. - if (isset($path[0]) && isset($path[1]) && $path[0] == 'node' && $nid = intval($path[1])) { - // We cannot perform a node load here. - $result = db_query('SELECT n.language FROM {node} n WHERE n.nid = :nid', array(':nid' => $nid))->fetchAssoc(); - return $result['language']; - } - - return FALSE; -} - -/** * Generate an array which displays a node detail page. * * @param $node |