diff --git a/ls_answ/ls_answ.module b/ls_answ/ls_answ.module index 99a5192..64415f7 100644 --- a/ls_answ/ls_answ.module +++ b/ls_answ/ls_answ.module @@ -1418,7 +1418,7 @@ function ls_answ_admin_paths() { if (variable_get('node_admin_theme')) { $paths = array( 'node/*/options' => TRUE, - 'node/*/import' => TRUE, + 'node/*/ls_import' => TRUE, 'node/*/answ' => TRUE, ); return $paths; diff --git a/ls_survey/ls_survey.module b/ls_survey/ls_survey.module index a9a2731..8d8ebbd 100644 --- a/ls_survey/ls_survey.module +++ b/ls_survey/ls_survey.module @@ -143,7 +143,7 @@ function ls_survey_menu() { ); // Link to force synchronization for a specific answer. For admin purpose. - $items['node/%node/import'] = array( + $items['node/%node/ls_import'] = array( 'title' => 'Synchronization', 'page callback' => 'drupal_get_form', 'page arguments' => array('ls_survey_import', 1), diff --git a/ls_survey/ls_survey.type.inc b/ls_survey/ls_survey.type.inc index b038eb2..04b5e68 100644 --- a/ls_survey/ls_survey.type.inc +++ b/ls_survey/ls_survey.type.inc @@ -473,7 +473,7 @@ function ls_survey_answ_options($form) { '#collapsible' => 1, '#collapsed' => 1, ); - $auto_import_description = ($node_type->module != 'ls_survey') ? t('Or import answers manually on the survey synchronization page.', array('@url' => url('node/' . $node_survey->nid . '/import'))) : t('Or import answers manually on the survey synchronization page.'); + $auto_import_description = ($node_type->module != 'ls_survey') ? t('Or import answers manually on the survey synchronization page.', array('@url' => url('node/' . $node_survey->nid . '/ls_import'))) : t('Or import answers manually on the survey synchronization page.'); $form['ls_answers_options']['sync_options']['ls_auto_import'] = array( '#type' => 'checkbox', '#title' => t('Automatic import answer after completion'), @@ -1067,12 +1067,13 @@ function ls_survey_answ_options_submit($form, &$form_state) { 'ls_fields', ); + $url_import = url('node/' . $node_survey->nid . '/ls_import'); if (array_intersect_key($diff_settings, array_flip($options_needing_resync)) != array()) { $time = REQUEST_TIME; $new_settings['ls_options_last_import'] = $time; if ($node_type->module == 'ls_answ') { // All answers need to be resynchronized. - drupal_set_message(t('You should resynchronize all existing answers in order to apply changes concerning the display page options', array('@url' => url('node/' . $node_survey->nid . '/import'))), 'warning'); + drupal_set_message(t('You should resynchronize all existing answers in order to apply changes concerning the display page options', array('@url' => $url_import)), 'warning'); } } @@ -1085,12 +1086,12 @@ function ls_survey_answ_options_submit($form, &$form_state) { // And delete answer entries on the LimeSurvey site if needed. if ($node_type->module == 'ls_answ') { if ($old_settings['ls_keep_revisions'] && !$new_settings['ls_keep_revisions'] && module_exists('ls_answ')) { - drupal_set_message(t('You must resynchronize all existing answers in order to delete the obsolet revisions entries on your LimeSurvey site', array('@url' => url('node/' . $node_survey->nid . '/import'))), 'warning'); + drupal_set_message(t('You must resynchronize all existing answers in order to delete the obsolet revisions entries on your LimeSurvey site', array('@url' => $url_import)), 'warning'); } // And delete exported user entries on the LimeSurvey site if needed. if ($old_settings['ls_export_token'] && !$new_settings['ls_export_token'] && module_exists('ls_answ')) { - drupal_set_message(t('You must resynchronize all existing answers in order to delete the exported users informations entries on your LimeSurvey site', array('@url' => url('node/' . $node_survey->nid . '/import'))), 'warning'); + drupal_set_message(t('You must resynchronize all existing answers in order to delete the exported users informations entries on your LimeSurvey site', array('@url' => $url_import)), 'warning'); // Processed to the test and updates. module_load_include('inc', 'ls_answ', 'ls_answ'); $on = array("n.type = '%s'" => $form_state['values']['old_type']);