aboutsummaryrefslogtreecommitdiffstats
path: root/picture.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--picture.php58
1 files changed, 33 insertions, 25 deletions
diff --git a/picture.php b/picture.php
index e1ed3891c..18133095a 100644
--- a/picture.php
+++ b/picture.php
@@ -362,7 +362,15 @@ while ($row = mysql_fetch_array($result))
.'&image_id='.$row['id'];
}
-$url_up = PHPWG_ROOT_PATH.'category.php?cat='.$page['cat'];
+$url_up = PHPWG_ROOT_PATH.'category.php?';
+if ( isset($page['cat']) )
+{
+ $url_up .= 'cat='.$page['cat'];
+}
+elseif ( isset($_GET['calendar']) )
+{
+ $url_up .= 'calendar='.$_GET['calendar'];
+}
$url_up_start = floor( $page['current_rank'] / $user['nb_image_page'] );
$url_up_start *= $user['nb_image_page'];
@@ -373,11 +381,11 @@ if ($url_up_start>0)
if ( $page['cat'] == 'search' )
{
- $url_up.= "&search=".$_GET['search'];
+ $url_up.= '&search='.$_GET['search'];
}
if ( $page['cat'] == 'list' )
{
- $url_up.= "&list=".$_GET['list'];
+ $url_up.= '&list='.$_GET['list'];
}
$url_admin =
@@ -777,15 +785,17 @@ else
// creation date
if (!empty($picture['current']['date_creation']))
{
- $infos['INFO_CREATION_DATE'] =
- // FIXME because of search engine partial rewrite, giving the author
- // name threw GET is not supported anymore. This feature should come
- // back later, with a better design (calendar view).
-// '<a href="'.
-// PHPWG_ROOT_PATH.'category.php?cat=search'.
-// '&amp;search=date_creation:'.$picture['current']['date_creation']
-// .'">'.format_date($picture['current']['date_creation']).'</a>';
- format_date($picture['current']['date_creation']);
+ $val = format_date($picture['current']['date_creation']);
+ if ( $conf['calendar_datefield'] == 'date_creation' )
+ {
+ $infos['INFO_CREATION_DATE'] = '<a href="'.
+ PHPWG_ROOT_PATH.'category.php?calendar=c-'.
+ $picture['current']['date_creation'].'">'.$val.'</a>';
+ }
+ else
+ {
+ $infos['INFO_CREATION_DATE'] = $val;
+ }
}
else
{
@@ -793,19 +803,17 @@ else
}
// date of availability
-$infos['INFO_AVAILABILITY_DATE'] =
-// FIXME because of search engine partial rewrite, giving the author
-// name threw GET is not supported anymore. This feature should come
-// back later, with a better design (calendar view).
-//
-// '<a href="'.
-// PHPWG_ROOT_PATH.'category.php?cat=search'.
-// '&amp;search=date_available:'.
-// substr($picture['current']['date_available'], 0, 10)
-// .'">'.
-// format_date($picture['current']['date_available'], 'mysql_datetime').
-// '</a>';
-format_date($picture['current']['date_available'], 'mysql_datetime');
+$val = format_date($picture['current']['date_available'], 'mysql_datetime');
+if ( $conf['calendar_datefield'] == 'date_available' )
+{
+ $infos['INFO_AVAILABILITY_DATE'] = '<a href="'.
+ PHPWG_ROOT_PATH.'category.php?calendar=c-'.
+ substr($picture['current']['date_available'],0,10).'">'.$val.'</a>';
+}
+else
+{
+ $infos['INFO_AVAILABILITY_DATE'] = $val;
+}
// size in pixels
if ($picture['current']['is_picture'])