aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2006-04-06 02:23:54 +0000
committerrvelices <rv-github@modusoptimus.com>2006-04-06 02:23:54 +0000
commitd700a5917233fb8049589a9e0aef3d94e87fb320 (patch)
tree81f8c53ccf908e900638abd117f3dc8719ca67a1 /admin
parentb9a37cd6f06a19fd48d4a8e546b10c8fb3ff5b33 (diff)
improvement: urls for tags can contain now only the tag or the id and tag
improvement: urls for category can be now id and category names (instead of only id) improvement: added 2 indexes (#image_tag.tag_id and #tags.url_name) improvement: identification, register, search pages automatically set focus on first form input improvement: focus, nofocus css class now valid for all forms fix: category comment is tag stripped in category_subcats.inc.php (otherwise issues with html/scripts inside category comment) git-svn-id: http://piwigo.org/svn/trunk@1131 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin')
-rw-r--r--admin/cat_list.php19
-rw-r--r--admin/cat_modify.php29
2 files changed, 25 insertions, 23 deletions
diff --git a/admin/cat_list.php b/admin/cat_list.php
index 7917b0a6a..2c659ee3f 100644
--- a/admin/cat_list.php
+++ b/admin/cat_list.php
@@ -173,7 +173,7 @@ if (isset($_GET['parent_id']))
$navigation.= $conf['level_separator'];
$current_category = get_cat_info($_GET['parent_id']);
-
+
$navigation.= get_cat_display_name(
$current_category['name'],
$base_url.'&amp;parent_id=',
@@ -194,7 +194,7 @@ if (isset($_GET['parent_id']))
$template->assign_vars(array(
'CATEGORIES_NAV'=>$navigation,
'F_ACTION'=>$form_action,
-
+
'L_ADD_VIRTUAL'=>$lang['cat_add'],
'L_SUBMIT'=>$lang['submit'],
'L_STORAGE'=>$lang['storage'],
@@ -203,7 +203,7 @@ $template->assign_vars(array(
'L_EDIT'=>$lang['edit'],
'L_DELETE'=>$lang['delete'],
));
-
+
$tpl = array('cat_first','cat_last');
// +-----------------------------------------------------------------------+
// | Categories display |
@@ -256,10 +256,10 @@ foreach ($categories as $category)
// TODO : not used anymore ?
//$images_folder = PHPWG_ROOT_PATH.'template/';
//$images_folder.= $user['template'].'/admin/images';
-
+
$base_url = PHPWG_ROOT_PATH.'admin.php?page=';
$cat_list_url = $base_url.'cat_list';
-
+
$self_url = $cat_list_url;
if (isset($_GET['parent_id']))
{
@@ -276,14 +276,15 @@ foreach ($categories as $category)
'U_JUMPTO' => make_index_url(
array(
'category' => $category['id'],
+ 'cat_name' => $category['name'],
)
),
-
- 'U_CHILDREN' => $cat_list_url.'&amp;parent_id='.$category['id'],
+
+ 'U_CHILDREN' => $cat_list_url.'&amp;parent_id='.$category['id'],
'U_EDIT' => $base_url.'cat_modify&amp;cat_id='.$category['id'],
)
);
-
+
if (empty($category['dir']))
{
$template->assign_block_vars(
@@ -293,7 +294,7 @@ foreach ($categories as $category)
)
);
}
-
+
if ($category['nb_images'] > 0)
{
$template->assign_block_vars(
diff --git a/admin/cat_modify.php b/admin/cat_modify.php
index 4f4617224..9bfa257dd 100644
--- a/admin/cat_modify.php
+++ b/admin/cat_modify.php
@@ -68,7 +68,7 @@ if (isset($_POST['submit']))
),
array($data)
);
-
+
set_cat_visible(array($_GET['cat_id']), $_POST['visible']);
set_cat_status(array($_GET['cat_id']), $_POST['status']);
@@ -101,7 +101,7 @@ else if (isset($_POST['submitAdd']))
$_POST['virtual_name'],
(0 == $_POST['parent'] ? null : $_POST['parent'])
);
-
+
if (isset($output_create['error']))
{
array_push($page['errors'], $output_create['error']);
@@ -112,7 +112,7 @@ else if (isset($_POST['submitAdd']))
//
// Add the information in the information list
array_push($page['infos'], $output_create['info']);
-
+
// Link the new category to the current category
associate_categories_to_categories(
array($_GET['cat_id']),
@@ -184,7 +184,7 @@ $navigation = get_cat_display_name_cache(
);
$form_action = PHPWG_ROOT_PATH.'admin.php?page=cat_modify&amp;cat_id='.$_GET['cat_id'];
-$status = ($category['status']=='public')?'STATUS_PUBLIC':'STATUS_PRIVATE';
+$status = ($category['status']=='public')?'STATUS_PUBLIC':'STATUS_PRIVATE';
$lock = ($category['visible']=='true')?'UNLOCKED':'LOCKED';
if ($category['commentable'] == 'true')
@@ -208,7 +208,7 @@ else
$base_url = PHPWG_ROOT_PATH.'admin.php?page=';
$cat_list_url = $base_url.'cat_list';
-
+
$self_url = $cat_list_url;
if (!empty($category['id_uppercat']))
{
@@ -216,16 +216,16 @@ if (!empty($category['id_uppercat']))
}
$template->assign_vars(
- array(
+ array(
'CATEGORIES_NAV' => $navigation,
'CAT_NAME' => $category['name'],
'CAT_COMMENT' => $category['comment'],
-
+
$status => 'checked="checked"',
$lock => 'checked="checked"',
$commentable => 'checked="checked"',
$uploadable => 'checked="checked"',
-
+
'L_EDIT_NAME' => $lang['name'],
'L_STORAGE' => $lang['storage'],
'L_REMOTE_SITE' => $lang['remote_site'],
@@ -244,12 +244,13 @@ $template->assign_vars(
'U_JUMPTO' => make_index_url(
array(
'category' => $category['id'],
+ 'cat_name' => $category['name'],
)
),
-
+
'U_CHILDREN' => $cat_list_url.'&amp;parent_id='.$category['id'],
'U_HELP' => PHPWG_ROOT_PATH.'/popuphelp.php?page=cat_modify',
-
+
'F_ACTION' => $form_action,
)
);
@@ -295,7 +296,7 @@ SELECT tn_ext,path
$src = get_thumbnail_src($row['path'], @$row['tn_ext']);
$url = PHPWG_ROOT_PATH.'admin.php?page=picture_modify';
$url.= '&amp;image_id='.$category['representative_picture_id'];
-
+
$template->assign_block_vars(
'representant.picture',
array(
@@ -349,7 +350,7 @@ else
// the category can be moved in any category but in itself, in any
// sub-category
$unmovables = get_subcat_ids(array($category['id']));
-
+
$blockname = 'move.parent_option';
$template->assign_block_vars(
@@ -361,13 +362,13 @@ else
'OPTION' => '------------'
)
);
-
+
$query = '
SELECT id,name,uppercats,global_rank
FROM '.CATEGORIES_TABLE.'
WHERE id NOT IN ('.implode(',', $unmovables).')
;';
-
+
display_select_cat_wrapper(
$query,
empty($category['id_uppercat']) ? array() : array($category['id_uppercat']),