aboutsummaryrefslogtreecommitdiffstats
path: root/picture.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2006-03-22 01:01:47 +0000
committerrvelices <rv-github@modusoptimus.com>2006-03-22 01:01:47 +0000
commit0971ce48d217b7cc8081ae70c4b041ab23fdf29c (patch)
tree841bd14e9c2a19c207fb8479b1a086112795d04a /picture.php
parent3609c224c74f50a9049524ebedc996ddd1187108 (diff)
URL rewriting: capable of fully working with urls without ?
URL rewriting: works with image file instead of image id (change make_picture_url to generate urls with file name instead of image id) URL rewriting: completely works with category/best_rated and picture/best_rated/534 (change 'category.php?' to 'category' in make_index_url and 'picture.php?' to 'picture' in make_picture_url to see it) fix: picture category display in upper bar fix: function rate_picture variables and use of the new user type fix: caddie icon appears now on category page fix: admin element_set sql query was using storage_category_id column (column has moved to #image_categories) fix: replaced some old $_GET[xxx] with $page[xxx] fix: pictures have metadata url (use ? parameter - might change later) git-svn-id: http://piwigo.org/svn/trunk@1092 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'picture.php')
-rw-r--r--picture.php23
1 files changed, 9 insertions, 14 deletions
diff --git a/picture.php b/picture.php
index 19ca06dd9..09353aa39 100644
--- a/picture.php
+++ b/picture.php
@@ -168,7 +168,7 @@ UPDATE '.CATEGORIES_TABLE.'
}
case 'rate' :
{
- rate_picture($user['id'], $page['image_id'], $_GET['rate']);
+ rate_picture($page['image_id'], $_GET['rate']);
redirect($url_self);
}
case 'delete_comment' :
@@ -370,14 +370,14 @@ if ( isset( $_GET['slideshow'] ) and isset($page['next_item']) )
}
$title_img = $picture['current']['name'];
-if ( isset( $page['cat'] ) )
+if ( isset( $page['category'] ) )
{
- if (is_numeric( $page['cat'] ))
+ if (is_numeric( $page['category'] ))
{
$title_img = replace_space(get_cat_display_name($page['cat_name']));
}
else if ( $page['cat'] == 'search' )
- {
+ { // ??? TODO -remove or change some remainings from old variables
$title_img = replace_search( $title_img, $_GET['search'] );
}
}
@@ -404,25 +404,20 @@ $picture_size = get_picture_size(
);
// metadata
+$url_metadata = duplicate_picture_URL();
if ($conf['show_exif'] or $conf['show_iptc'])
{
$metadata_showable = true;
+ if ( !isset($_GET['metadata']) )
+ {
+ $url_metadata = add_url_param( $url_metadata, 'metadata' );
+ }
}
else
{
$metadata_showable = false;
}
-// $url_metadata = PHPWG_ROOT_PATH.'picture.php';
-// $url_metadata .= get_query_string_diff(array('add_fav', 'slideshow', 'show_metadata'));
-// if ($metadata_showable and !isset($_GET['show_metadata']))
-// {
-// $url_metadata.= '&amp;show_metadata=1';
-// }
-
-// TODO: rewrite metadata display to toggle on/off user_infos.show_metadata
-$url_metadata = duplicate_picture_URL();
-
$page['body_id'] = 'thePicturePage';
//------------------------------------------------------- navigation management
foreach ( array('first','previous','next','last') as $which_image )