aboutsummaryrefslogtreecommitdiffstats
path: root/picture.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2006-02-23 02:30:19 +0000
committerrvelices <rv-github@modusoptimus.com>2006-02-23 02:30:19 +0000
commit34538a62f4ac8bc6db41580058fdd040abaa3183 (patch)
treefdde1ecefd0ec41f20d3d5e2d1bcc87357d3e493 /picture.php
parentfe8fbac3cf9af0464d2b0990c88631ff9fd803ac (diff)
new calendar completely integrated
git-svn-id: http://piwigo.org/svn/trunk@1051 68402e56-0260-453c-a942-63ccdbb3a9ee
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))
.'&amp;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.= "&amp;search=".$_GET['search'];
+ $url_up.= '&amp;search='.$_GET['search'];
}
if ( $page['cat'] == 'list' )
{
- $url_up.= "&amp;list=".$_GET['list'];
+ $url_up.= '&amp;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'])