diff options
author | plegall <plg@piwigo.org> | 2007-02-15 21:20:52 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2007-02-15 21:20:52 +0000 |
commit | bbc2dc24191681c863badea1e04b08cf44e46dc5 (patch) | |
tree | 37eac6c95e61be81b59eb4af48d145191474f9ec /picture.php | |
parent | db013a59a9f8ea47f3d24501d238aac384b3243f (diff) |
Code refactoring.
git-svn-id: http://piwigo.org/svn/trunk@1825 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | picture.php | 56 |
1 files changed, 31 insertions, 25 deletions
diff --git a/picture.php b/picture.php index 2abb4bc5d..7df5113b3 100644 --- a/picture.php +++ b/picture.php @@ -605,13 +605,14 @@ SELECT COUNT(*) AS nb_fav $template->assign_block_vars( 'favorite', array( - 'FAVORITE_IMG' => get_root_url().get_themeconf('icon_dir').'/favorite.png', + 'FAVORITE_IMG' => + get_root_url().get_themeconf('icon_dir').'/favorite.png', 'FAVORITE_HINT' => $lang['add_favorites_hint'], 'FAVORITE_ALT' => $lang['add_favorites_alt'], 'U_FAVORITE' => add_url_params( - $url_self, - array('action'=>'add_to_favorites') - ), + $url_self, + array('action'=>'add_to_favorites') + ), ) ); } @@ -620,13 +621,14 @@ SELECT COUNT(*) AS nb_fav $template->assign_block_vars( 'favorite', array( - 'FAVORITE_IMG' => get_root_url().get_themeconf('icon_dir').'/del_favorite.png', + 'FAVORITE_IMG' => + get_root_url().get_themeconf('icon_dir').'/del_favorite.png', 'FAVORITE_HINT' => $lang['del_favorites_hint'], 'FAVORITE_ALT' => $lang['del_favorites_alt'], 'U_FAVORITE' => add_url_params( - $url_self, - array('action'=>'remove_from_favorites') - ) + $url_self, + array('action'=>'remove_from_favorites') + ), ) ); } @@ -657,9 +659,9 @@ $infos = array(); if (!empty($picture['current']['author'])) { $infos['INFO_AUTHOR'] = - // 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 +// 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 // '<a href="'. // PHPWG_ROOT_PATH.'category.php?cat=search'. // '&search=author:'.$picture['current']['author'] @@ -677,14 +679,15 @@ if (!empty($picture['current']['date_creation'])) { $val = format_date($picture['current']['date_creation']); $url = make_index_url( - array( - 'chronology_field'=>'created', - 'chronology_style'=>'monthly', - 'chronology_view'=>'list', - 'chronology_date' => explode('-', $picture['current']['date_creation']) - ) - ); - $infos['INFO_CREATION_DATE'] = '<a href="'.$url.'" rel="nofollow">'.$val.'</a>'; + array( + 'chronology_field'=>'created', + 'chronology_style'=>'monthly', + 'chronology_view'=>'list', + 'chronology_date' => explode('-', $picture['current']['date_creation']) + ) + ); + $infos['INFO_CREATION_DATE'] = + '<a href="'.$url.'" rel="nofollow">'.$val.'</a>'; } else { @@ -694,13 +697,16 @@ else // date of availability $val = format_date($picture['current']['date_available'], 'mysql_datetime'); $url = make_index_url( - array( - 'chronology_field'=>'posted', - 'chronology_style'=>'monthly', - 'chronology_view'=>'list', - 'chronology_date'=>explode('-', substr($picture['current']['date_available'],0,10)) + array( + 'chronology_field'=>'posted', + 'chronology_style'=>'monthly', + 'chronology_view'=>'list', + 'chronology_date' => explode( + '-', + substr($picture['current']['date_available'], 0, 10) ) - ); + ) + ); $infos['INFO_POSTED_DATE'] = '<a href="'.$url.'" rel="nofollow">'.$val.'</a>'; // size in pixels |