aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorz0rglub <z0rglub@piwigo.org>2003-07-25 21:33:41 +0000
committerz0rglub <z0rglub@piwigo.org>2003-07-25 21:33:41 +0000
commit963e1ef71418bdad2e81e78b983f57633dbf3c18 (patch)
tree53a64ea75ff14228f3a16da3f07ca5b996f15d4c /include
parent1400807269662dfe7e4bc015c5d1385113c50418 (diff)
Adding support of independant uploadable categories
git-svn-id: http://piwigo.org/svn/trunk@38 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/functions_category.inc.php18
1 files changed, 10 insertions, 8 deletions
diff --git a/include/functions_category.inc.php b/include/functions_category.inc.php
index f0b825381..f2ec5652a 100644
--- a/include/functions_category.inc.php
+++ b/include/functions_category.inc.php
@@ -282,7 +282,7 @@ function get_cat_info( $id )
$cat['name'] = array();
$query = 'SELECT nb_images,id_uppercat,comment,site_id,galleries_url,dir';
- $query.= ',date_last';
+ $query.= ',date_last,uploadable';
$query.= ' FROM '.PREFIX_TABLE.'categories AS a';
$query.= ', '.PREFIX_TABLE.'sites AS b';
$query.= ' WHERE a.id = '.$id;
@@ -294,8 +294,9 @@ function get_cat_info( $id )
$cat['nb_images'] = $row['nb_images'];
$cat['last_dir'] = $row['dir'];
$cat['date_last'] = $row['date_last'];
+ $cat['uploadable'] = get_boolean( $row['uploadable'] );
$galleries_url = $row['galleries_url'];
-
+
$cat['dir'] = "";
$i = 0;
$is_root = false;
@@ -379,7 +380,7 @@ function get_cat_display_name( $array_cat_names, $separation, $style )
function initialize_category( $calling_page = 'category' )
{
global $page,$lang,$user,$conf;
-
+
if ( isset( $page['cat'] ) )
{
// $page['nb_image_page'] is the number of picture to display on this page
@@ -391,11 +392,12 @@ function initialize_category( $calling_page = 'category' )
if ( is_numeric( $page['cat'] ) )
{
$result = get_cat_info( $page['cat'] );
- $page['comment'] = $result['comment'];
- $page['cat_dir'] = $result['dir'];
- $page['cat_name'] = $result['name'];
- $page['cat_nb_images'] = $result['nb_images'];
- $page['cat_site_id'] = $result['site_id'];
+ $page['comment'] = $result['comment'];
+ $page['cat_dir'] = $result['dir'];
+ $page['cat_name'] = $result['name'];
+ $page['cat_nb_images'] = $result['nb_images'];
+ $page['cat_site_id'] = $result['site_id'];
+ $page['cat_uploadable'] = $result['uploadable'];
$page['title'] = get_cat_display_name( $page['cat_name'], ' - ', '' );
$page['where'] = ' WHERE cat_id = '.$page['cat'];
}