diff --git a/admin/cat_modify.php b/admin/cat_modify.php index 7cf9fc2ba..4c88147fd 100644 --- a/admin/cat_modify.php +++ b/admin/cat_modify.php @@ -83,6 +83,22 @@ SELECT galleries_url return $row['galleries_url']; } +function get_min_local_dir($local_dir) +{ + $full_dir = explode('/', $local_dir); + if (count($full_dir) <= 3) + { + return $local_dir; + } + else + { + $start = $full_dir[0] . '/' . $full_dir[1]; + $end = end($full_dir); + $concat = $start . '/…/' . $end; + return $concat; + } +} + // +-----------------------------------------------------------------------+ // | Check Access and exit when user status is not ok | // +-----------------------------------------------------------------------+ @@ -315,11 +331,14 @@ $template->assign(array( if (!$category['is_virtual']) { $category['cat_full_dir'] = get_complete_dir($_GET['cat_id']); + $category_full_dir = preg_replace('/\/$/', '', $category['cat_full_dir']); $template->assign( array( - 'CAT_FULL_DIR' => preg_replace('/\/$/', '', $category['cat_full_dir']) + 'CAT_FULL_DIR' => $category_full_dir ) ); + $template->assign('CAT_DIR_NAME', basename($category_full_dir)); + $template->assign('CAT_MIN_DIR', get_min_local_dir($category_full_dir)); if ($conf['enable_synchronization']) { diff --git a/admin/themes/default/template/cat_modify.tpl b/admin/themes/default/template/cat_modify.tpl index c9280cac2..28fe01f17 100644 --- a/admin/themes/default/template/cat_modify.tpl +++ b/admin/themes/default/template/cat_modify.tpl @@ -104,7 +104,8 @@ str_root = '{'Root'|@translate}'; {if isset($U_SYNC) }