Skip to content
Snippets Groups Projects
Commit 0b2c242b authored by Mingsong Hu's avatar Mingsong Hu
Browse files

Remove the hardcode parent and depth from the url

parent c9c61082
No related branches found
No related tags found
No related merge requests found
......@@ -54,11 +54,11 @@ class HmOverviewTerms extends OverviewTerms {
// Get current language.
$language = \Drupal::languageManager()->getCurrentLanguage();
if ($language->isDefault()) {
$source_url = $base_path . 'admin/hierarchy_manager/taxonomy/json/' . $vid . '?parent=0&depth=1&token=' . $token;
$source_url = $base_path . 'admin/hierarchy_manager/taxonomy/json/' . $vid . '?token=' . $token;
$update_url = $base_path . 'admin/hierarchy_manager/taxonomy/update/' . $vid . '?token=' . $token;
}
else {
$source_url = $base_path . $language->getId() . '/admin/hierarchy_manager/taxonomy/json/' . $vid . '?parent=0&depth=1&token=' . $token;
$source_url = $base_path . $language->getId() . '/admin/hierarchy_manager/taxonomy/json/' . $vid . '?token=' . $token;
$update_url = $base_path . $language->getId() . '/admin/hierarchy_manager/taxonomy/update/' . $vid . '?token=' . $token;
}
return $instance->getForm($source_url, $update_url);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment