aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2007-02-27 01:56:16 +0000
committerrvelices <rv-github@modusoptimus.com>2007-02-27 01:56:16 +0000
commit47512ce6a64fa356214c162a8313480c6aed41d2 (patch)
treea0e35e2f89ef789f380adc5b8951444c189de4e7 /admin
parentbfb4b15d2f75835033d9bbb865edd77dcb282bb6 (diff)
- refactoring page['category'] before 1.7 release
page['category'] is not an id anymore, but an associative array of category info all of page['cat_xxx'] or page['uppercats'] merged into one simplifies calls to make_index_url give plugins a clean start for page variables for version 1.7 git-svn-id: http://piwigo.org/svn/trunk@1861 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin')
-rw-r--r--admin/cat_list.php14
-rw-r--r--admin/cat_modify.php8
-rw-r--r--admin/element_set.php10
-rw-r--r--admin/picture_modify.php8
-rw-r--r--admin/waiting.php7
5 files changed, 19 insertions, 28 deletions
diff --git a/admin/cat_list.php b/admin/cat_list.php
index 82a272639..c34754f87 100644
--- a/admin/cat_list.php
+++ b/admin/cat_list.php
@@ -2,10 +2,9 @@
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery |
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
-// | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
-// | branch : BSF (Best So Far)
-// | file : $RCSfile$
+// | file : $Id$
// | last update : $Date$
// | last modifier : $Author$
// | revision : $Revision$
@@ -172,10 +171,8 @@ 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'],
+ $navigation.= get_cat_display_name_from_id(
+ $_GET['parent_id'],
$base_url.'&amp;parent_id=',
false
);
@@ -277,8 +274,7 @@ foreach ($categories as $category)
'U_JUMPTO' => make_index_url(
array(
- 'category' => $category['id'],
- 'cat_name' => $category['name'],
+ 'category' => $category
)
),
diff --git a/admin/cat_modify.php b/admin/cat_modify.php
index e87a6aee5..065983070 100644
--- a/admin/cat_modify.php
+++ b/admin/cat_modify.php
@@ -2,10 +2,9 @@
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery |
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
-// | Copyright (C) 2003-2006 PhpWebGallery Team - http://phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
-// | branch : BSF (Best So Far)
-// | file : $RCSfile$
+// | file : $Id$
// | last update : $Date$
// | last modifier : $Author$
// | revision : $Revision$
@@ -279,8 +278,7 @@ $template->assign_vars(
'U_JUMPTO' => make_index_url(
array(
- 'category' => $category['id'],
- 'cat_name' => $category['name'],
+ 'category' => $category
)
),
diff --git a/admin/element_set.php b/admin/element_set.php
index ee9884e31..fe005ee44 100644
--- a/admin/element_set.php
+++ b/admin/element_set.php
@@ -2,10 +2,9 @@
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery |
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
-// | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
-// | branch : BSF (Best So Far)
-// | file : $RCSfile$
+// | file : $Id$
// | last update : $Date$
// | last modifier : $Author$
// | revision : $Revision$
@@ -109,10 +108,9 @@ DELETE
if (is_numeric($_GET['cat']))
{
- $cat_infos = get_cat_info($_GET['cat']);
$page['title'] =
- get_cat_display_name(
- $cat_infos['name'],
+ get_cat_display_name_from_id(
+ $_GET['cat'],
PHPWG_ROOT_PATH.'admin.php?page=cat_modify&amp;cat_id=',
false
);
diff --git a/admin/picture_modify.php b/admin/picture_modify.php
index 9f6877167..0dd6a237b 100644
--- a/admin/picture_modify.php
+++ b/admin/picture_modify.php
@@ -253,8 +253,8 @@ $template->assign_vars(
'TAG_SELECTION' => $tag_selection,
'DESCRIPTION' =>
- isset($_POST['description']) ?
- stripslashes($_POST['description']) : @$row['comment'],
+ htmlspecialchars( isset($_POST['description']) ?
+ stripslashes($_POST['description']) : @$row['comment'] ),
'F_ACTION' =>
PHPWG_ROOT_PATH.'admin.php'
@@ -347,7 +347,7 @@ if (isset($_GET['cat_id'])
array(
'image_id' => $_GET['image_id'],
'image_file' => $image_file,
- 'category' => $_GET['cat_id'],
+ 'category' => $cache['cat_names'][ $_GET['cat_id'] ],
)
);
}
@@ -359,7 +359,7 @@ else
array(
'image_id' => $_GET['image_id'],
'image_file' => $image_file,
- 'category' => $category,
+ 'category' => $cache['cat_names'][ $category ],
)
);
break;
diff --git a/admin/waiting.php b/admin/waiting.php
index 8a63ac17a..30bd6f37c 100644
--- a/admin/waiting.php
+++ b/admin/waiting.php
@@ -2,10 +2,9 @@
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery |
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
-// | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
-// | branch : BSF (Best So Far)
-// | file : $RCSfile$
+// | file : $Id$
// | last update : $Date$
// | last modifier : $Author$
// | revision : $Revision$
@@ -161,7 +160,7 @@ while ( $row = mysql_fetch_array( $result ) )
$cat_names[$row['storage_category_id']]['dir'] =
PHPWG_ROOT_PATH.get_complete_dir( $row['storage_category_id'] );
$cat_names[$row['storage_category_id']]['display_name'] =
- get_cat_display_name($cat['name']);
+ get_cat_display_name($cat['upper_names']);
}
$preview_url = PHPWG_ROOT_PATH.$cat_names[$row['storage_category_id']]['dir'].$row['file'];
$class='row1';