aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2004-12-30 08:36:48 +0000
committerplegall <plg@piwigo.org>2004-12-30 08:36:48 +0000
commit96f24f3ddcdf3122ca1e0e21cac45fa309640d0b (patch)
treecf5ee12b337a94f36393f092ec3bcb63f407123e
parente57538219f07b8d7d8766560dce846fc4a1bff12 (diff)
- bug fixed on setting commentable property for a single category (bug in
template and in query generation) - bug on determining whether an element is commentable or not depending on categories it belongs to git-svn-id: http://piwigo.org/svn/trunk@668 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r--admin/cat_modify.php3
-rw-r--r--picture.php2
-rw-r--r--template/default/admin/cat_modify.tpl4
3 files changed, 6 insertions, 3 deletions
diff --git a/admin/cat_modify.php b/admin/cat_modify.php
index 201592e30..02c9b12dd 100644
--- a/admin/cat_modify.php
+++ b/admin/cat_modify.php
@@ -63,6 +63,9 @@ if ( isset( $_POST['submit'] ) )
if ( isset( $_POST['uploadable'] ) )
$query.= ", uploadable = '".$_POST['uploadable']."'";
+ if ( isset( $_POST['commentable'] ) )
+ $query.= ", commentable = '".$_POST['commentable']."'";
+
if ( isset( $_POST['associate'] ) )
{
$query.= ', id_uppercat = ';
diff --git a/picture.php b/picture.php
index 6e4a73709..c4dd73154 100644
--- a/picture.php
+++ b/picture.php
@@ -784,7 +784,7 @@ foreach ($cat_array as $category)
}
// the picture is commentable if it belongs at least to one category which
// is commentable
- if ($category['commentable'])
+ if ($category['commentable'] == 'true')
{
$page['show_comments'] = true;
}
diff --git a/template/default/admin/cat_modify.tpl b/template/default/admin/cat_modify.tpl
index 04c48112a..bd25ac1b6 100644
--- a/template/default/admin/cat_modify.tpl
+++ b/template/default/admin/cat_modify.tpl
@@ -61,8 +61,8 @@
<tr>
<td><strong>{L_EDIT_COMMENTABLE}&nbsp;:</strong><br /><span class="small">{L_EDIT_COMMENTABLE_INFO}</span></td>
<td class="row1">
- <input type="radio" class="radio" name="commentable" value="false" {COMMENTABLE_TRUE} />{L_YES}&nbsp;&nbsp;
- <input type="radio" class="radio" name="commentable" value="true" {COMMENTABLE_FALSE} />{L_NO}
+ <input type="radio" class="radio" name="commentable" value="true" {COMMENTABLE_TRUE} />{L_YES}&nbsp;&nbsp;
+ <input type="radio" class="radio" name="commentable" value="false" {COMMENTABLE_FALSE} />{L_NO}
</td>
</tr>
<!-- BEGIN upload -->