security updates

have to check views and entityreference for custom patches
This commit is contained in:
Bachir Soussi Chiadmi
2015-04-19 20:45:16 +02:00
parent 802ec0c6f3
commit b3221c71e2
516 changed files with 14267 additions and 7349 deletions

View File

@@ -199,7 +199,14 @@ function i18n_taxonomy_translation_term_overview($term) {
$path = 'taxonomy/term/' . $translation_term->tid;
$title = l($translation_term->name, $path);
$options[] = l(t('edit'), $path . '/edit');
$options['edit'] = array(
'#type' => 'link',
'#title' => t('edit'),
'#href' => $path . '/edit',
'#options' => array(
'query' => drupal_get_destination(),
),
);
if ($translation_term->tid == $i18n_tsid) {
$language_name = t('<strong>@language_name</strong> (source)', array('@language_name' => $language_name));
@@ -208,14 +215,25 @@ function i18n_taxonomy_translation_term_overview($term) {
else {
// No such translation in the set yet: help user to create it.
$title = t('n/a');
$options[] = l(t('add translation'), 'admin/structure/taxonomy/' . $term->vocabulary_machine_name . '/add', array('query' => array('translation' => $term->tid, 'target' => $langcode) + drupal_get_destination()));
$options['add'] = array(
'#type' => 'link',
'#title' => t('add translation'),
'#href' => 'admin/structure/taxonomy/' . $term->vocabulary_machine_name . '/add',
'#options' => array(
'query' => array('translation' => $term->tid, 'target' => $langcode) + drupal_get_destination()
),
);
}
$rows[] = array($language_name, $title, implode(" | ", $options));
$rows[$langcode] = array(
'language' => $language_name,
'title' => $title,
'operations' => array('data' => $options),
);
}
drupal_set_title(t('Translations of term %title', array('%title' => $term->name)), PASS_THROUGH);
$build['translation_node_overview'] = array(
$build['translation_overview'] = array(
'#theme' => 'table',
'#header' => $header,
'#rows' => $rows,

View File

@@ -11,9 +11,9 @@ files[] = i18n_taxonomy.pages.inc
files[] = i18n_taxonomy.admin.inc
files[] = i18n_taxonomy.test
; Information added by drupal.org packaging script on 2013-08-21
version = "7.x-1.10"
; Information added by Drupal.org packaging script on 2015-01-26
version = "7.x-1.12"
core = "7.x"
project = "i18n"
datestamp = "1377069696"
datestamp = "1422286982"

View File

@@ -12,7 +12,7 @@
*/
function i18n_taxonomy_install() {
module_load_install('i18n');
i18n_install_create_fields('taxonomy_vocabulary', array('language', 'i18n_mode'));
i18n_install_create_fields('taxonomy_vocabulary', array('language', 'i18n_mode'), TRUE);
i18n_install_create_fields('taxonomy_term_data', array('language', 'i18n_tsid'));
// Set module weight for it to run after core modules, but before views.
db_query("UPDATE {system} SET weight = 5 WHERE name = 'i18n_taxonomy' AND type = 'module'");

View File

@@ -452,17 +452,6 @@ function i18n_taxonomy_translate_path($path, $path_prefix = 'taxonomy/term/') {
return $links;
}
}
/**
* Implements hook_theme().
*/
function i18n_taxonomy_theme() {
return array(
'i18n_taxonomy_term_page' => array(
'arguments' => array('tids' => array(), 'result' => NULL),
'file' => 'i18n_taxonomy.pages.inc',
),
);
}
/**
* Get localized term name unfiltered.
@@ -1231,6 +1220,9 @@ function i18n_taxonomy_entity_info_alter(&$entity_info) {
// Core doesn't provide a label callback for taxonomy terms. By setting one
// we can use it to return the correct localized term name.
$entity_info['taxonomy_term']['label callback'] = 'i18n_taxonomy_taxonomy_term_label';
// Also let core know terms have languages, now.
$entity_info['taxonomy_term']['entity keys']['language'] = 'language';
}
}

View File

@@ -62,37 +62,6 @@ function i18n_taxonomy_term_page($term) {
return $build;
}
/**
* Render a taxonomy term page HTML output.
*
* @param $tids
* An array of term ids.
* @param $result
* A pager_query() result, such as that performed by taxonomy_select_nodes().
*
* @ingroup themeable
*/
function theme_i18n_taxonomy_term_page($tids, $result) {
drupal_add_css(drupal_get_path('module', 'taxonomy') . '/taxonomy.css');
$output = '';
// Only display the description if we have a single term, to avoid clutter and confusion.
if (count($tids) == 1) {
$term = i18n_taxonomy_localize_terms(taxonomy_term_load($tids[0]));
// Check that a description is set.
if (!empty($term->description)) {
$output .= '<div class="taxonomy-term-description">';
$output .= filter_xss_admin($term->description);
$output .= '</div>';
}
}
$output .= taxonomy_render_nodes($result);
return $output;
}
/**
* Helper function for autocompletion. Replacement for taxonomy_autocomplete
*/