Changeset 1621
- Timestamp:
- Dec 1, 2006, 12:46:12 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/branch-1_6/include/picture_comment.inc.php
r1504 r1621 31 31 */ 32 32 33 // the picture is commentable if it belongs at least to one category which 34 // is commentable 35 $page['show_comments'] = false; 36 foreach ($related_categories as $category) 37 { 38 if ($category['commentable'] == 'true') 39 { 40 $page['show_comments'] = true; 41 } 42 } 43 33 44 if ( isset( $_POST['content'] ) and !empty($_POST['content']) ) 34 45 { 46 if (!$page['show_comments']) 47 { 48 header('HTTP/1.1 403 Forbidden'); 49 header('Status: 403 Forbidden'); 50 die('Hacking attempt!'); 51 } 52 35 53 $register_comment = true; 36 54 $author = !empty($_POST['author'])?$_POST['author']:$lang['guest']; … … 106 124 array('INFORMATION'=>$lang['comment_anti-flood'])); 107 125 } 108 }109 }110 111 // the picture is commentable if it belongs at least to one category which112 // is commentable113 $page['show_comments'] = false;114 foreach ($related_categories as $category)115 {116 if ($category['commentable'] == 'true')117 {118 $page['show_comments'] = true;119 126 } 120 127 }
Note: See TracChangeset
for help on using the changeset viewer.