Commit 3ce6808b authored by Dries's avatar Dries

- Patch #318887 by Dave Reid: clean-up some array shifting code.

parent 9b33d54e
......@@ -34,8 +34,7 @@ function path_admin_overview($keys = NULL) {
array('data' => t('Operations'), 'colspan' => '2')
);
if ($multilanguage) {
$header[3] = $header[2];
$header[2] = array('data' => t('Language'), 'field' => 'language');
array_splice($header, 2, 0, array(array('data' => t('Language'), 'field' => 'language')));
}
$sql .= tablesort_sql($header);
$result = pager_query($sql, 50, 0 , NULL, $args);
......@@ -45,9 +44,7 @@ function path_admin_overview($keys = NULL) {
while ($data = db_fetch_object($result)) {
$row = array(check_plain($data->dst), check_plain($data->src), l(t('edit'), "admin/build/path/edit/$data->pid", array('query' => $destination)), l(t('delete'), "admin/build/path/delete/$data->pid", array('query' => $destination)));
if ($multilanguage) {
$row[4] = $row[3];
$row[3] = $row[2];
$row[2] = module_invoke('locale', 'language_name', $data->language);
array_splice($row, 2, 0, module_invoke('locale', 'language_name', $data->language));
}
$rows[] = $row;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment