aboutsummaryrefslogtreecommitdiffstats
path: root/category.php
diff options
context:
space:
mode:
authorgweltas <gweltas@piwigo.org>2004-03-20 00:52:37 +0000
committergweltas <gweltas@piwigo.org>2004-03-20 00:52:37 +0000
commit4128835db8d7b8e619951d4c31e23bd934758f09 (patch)
tree4fddd9ea03f3ebeeaba73c3a42f7130e29a54b58 /category.php
parent8850aabc34e524e1a7816c363657e3176502a708 (diff)
- Template migration
- Admin Control Panel migration - Language migration git-svn-id: http://piwigo.org/svn/trunk@393 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--category.php24
1 files changed, 12 insertions, 12 deletions
diff --git a/category.php b/category.php
index d837c7445..a4c749e42 100644
--- a/category.php
+++ b/category.php
@@ -54,7 +54,7 @@ function display_category( $category, $indent )
{
global $user,$template,$page;
- $url = './category.php?cat='.$category['id'];
+ $url = PHPWG_ROOT_PATH.'category.php?cat='.$category['id'];
$style = '';
if ( isset( $page['cat'] )
@@ -65,7 +65,7 @@ function display_category( $category, $indent )
}
$name = $category['name'];
- if ( $name == '' ) $name = str_replace( '_', ' ', $category['dir'] );
+ if (empty($name)) $name = str_replace( '_', ' ', $category['dir'] );
$template->assign_block_vars(
'category',
@@ -89,7 +89,7 @@ function display_category( $category, $indent )
}
else
{
- $url = './category.php';
+ $url = PHPWG_ROOT_PATH.'category.php';
if (isset($page['cat']))
{
$url .='?cat='.$page['cat'];
@@ -115,9 +115,10 @@ function display_category( $category, $indent )
// recursive call
if ( $category['expanded'] )
{
- foreach ( $category['subcats'] as $subcat ) {
+ foreach ( $category['subcats'] as $subcat )
+ {
$template->assign_block_vars('category.subcat', array());
- display_category( $subcat, $indent.str_repeat( '&nbsp', 2 ));
+ display_category( $subcat, $indent.str_repeat( '&nbsp;', 2 ));
}
}
}
@@ -243,7 +244,7 @@ $template->assign_vars(array(
'U_FAVORITE' => add_session_id( PHPWG_ROOT_PATH.'category.php?cat=fav' ),
'U_MOST_VISITED'=>add_session_id( PHPWG_ROOT_PATH.'category.php?cat=most_visited' ),
'U_RECENT'=>add_session_id( PHPWG_ROOT_PATH.'category.php?cat=recent' ),
- 'U_LOGOUT' => add_session_id( PHPWG_ROOT_PATH.'category.php?act=logout' ),
+ 'U_LOGOUT' => PHPWG_ROOT_PATH.'category.php?act=logout',
'U_ADMIN'=>add_session_id( PHPWG_ROOT_PATH.'admin.php' ),
'U_PROFILE'=>add_session_id(PHPWG_ROOT_PATH.'profile.php?'.str_replace( '&', '&amp;', $_SERVER['QUERY_STRING'] ))
)
@@ -383,17 +384,16 @@ if ( isset( $page['cat'] ) && $page['cat_nb_images'] != 0 )
'U_IMG_LINK'=>add_session_id( $url_link )
));
-
+
if ( $conf['show_comments'] && $user['show_nb_comments'] )
{
- $vtp->addSession( $handle, 'nb_comments' );
$query = 'SELECT COUNT(*) AS nb_comments';
$query.= ' FROM '.COMMENTS_TABLE.' WHERE image_id = '.$row['id'];
$query.= " AND validated = 'true'";
$query.= ';';
$row = mysql_fetch_array( mysql_query( $query ) );
- $vtp->setVar( $handle, 'nb_comments.nb', $row['nb_comments'] );
- $vtp->closeSession( $handle, 'nb_comments' );
+ $template->assign_block_vars( 'thumbnails.line.thumbnail.nb_comments',
+ array('NB_COMMENTS'=>$row['nb_comments']) );
}
}
}
@@ -446,7 +446,7 @@ else
$thumbnail_title = $lang['hint_category'];
- $url_link = './category.php?cat='.$subcat_id;
+ $url_link = PHPWG_ROOT_PATH.'category.php?cat='.$subcat_id;
$date = $page['plain_structure'][$subcat_id]['date_last'];
@@ -483,7 +483,7 @@ if ( isset ( $page['cat'] ) )
and $conf['upload_available']
and $page['cat_uploadable'] )
{
- $url = './upload.php?cat='.$page['cat'];
+ $url = PHPWG_ROOT_PATH.'upload.php?cat='.$page['cat'];
$template->assign_block_vars('upload',array('U_UPLOAD'=>add_session_id( $url )));
}
}