mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-27 19:59:56 +03:00
bug:2152 no special parameter for updated comment validation
git-svn-id: http://piwigo.org/svn/trunk@10122 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
f63153073f
commit
2f344407a9
9 changed files with 83 additions and 56 deletions
|
@ -63,7 +63,6 @@ $history_checkboxes = array(
|
|||
$comments_checkboxes = array(
|
||||
'comments_forall',
|
||||
'comments_validation',
|
||||
'comments_update_validation',
|
||||
'email_admin_on_comment',
|
||||
'email_admin_on_comment_validation',
|
||||
'user_can_delete_comment',
|
||||
|
|
|
@ -144,13 +144,6 @@
|
|||
</label>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label>
|
||||
<span class="property">{'Update Validation'|@translate}</span>
|
||||
<input type="checkbox" name="comments_update_validation" {if ($comments.comments_update_validation)}checked="checked"{/if}>
|
||||
</label>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label>
|
||||
<span class="property">{'Email admins when a valid comment is entered'|@translate}</span>
|
||||
|
|
|
@ -265,7 +265,7 @@ function update_user_comment($comment, $post_key)
|
|||
}
|
||||
|
||||
// should the updated comment must be validated
|
||||
if (!$conf['comments_update_validation'] or is_admin())
|
||||
if (!$conf['comments_validation'] or is_admin())
|
||||
{
|
||||
$comment_action='validate'; //one of validate, moderate, reject
|
||||
}
|
||||
|
|
|
@ -38,10 +38,8 @@ foreach ($related_categories as $category)
|
|||
}
|
||||
}
|
||||
|
||||
if (!isset($comment_action))
|
||||
if ( $page['show_comments'] and isset( $_POST['content'] ) )
|
||||
{
|
||||
if ( $page['show_comments'] and isset( $_POST['content'] ) )
|
||||
{
|
||||
if ( is_a_guest() and !$conf['comments_forall'] )
|
||||
{
|
||||
die ('Session expired');
|
||||
|
@ -81,12 +79,11 @@ if (!isset($comment_action))
|
|||
trigger_action( 'user_comment_insertion',
|
||||
array_merge($comm, array('action'=>$comment_action) )
|
||||
);
|
||||
}
|
||||
elseif ( isset($_POST['content']) )
|
||||
{
|
||||
}
|
||||
elseif ( isset($_POST['content']) )
|
||||
{
|
||||
set_status_header(403);
|
||||
die('ugly spammer');
|
||||
}
|
||||
}
|
||||
|
||||
if ($page['show_comments'])
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
INSERT INTO piwigo_config (param,value,comment) VALUES ('nb_comment_page','10','number of comments to display on each page');
|
||||
INSERT INTO piwigo_config (param,value,comment) VALUES ('log','true','keep an history of visits on your website');
|
||||
INSERT INTO piwigo_config (param,value,comment) VALUES ('comments_validation','false','administrators validate users comments before becoming visible');
|
||||
INSERT INTO piwigo_config (param,value,comment) VALUES ('comments_update_validation','false','administrators validate users updated comments before becoming visible');
|
||||
INSERT INTO piwigo_config (param,value,comment) VALUES ('comments_forall','false','even guest not registered can post comments');
|
||||
INSERT INTO piwigo_config (param,value,comment) VALUES ('user_can_delete_comment','false','administrators can allow user delete their own comments');
|
||||
INSERT INTO piwigo_config (param,value,comment) VALUES ('user_can_edit_comment','false','administrators can allow user edit their own comments');
|
||||
|
|
40
install/db/99-database.php
Normal file
40
install/db/99-database.php
Normal file
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | Piwigo - a PHP based photo gallery |
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | Copyright(C) 2008-2011 Piwigo Team http://piwigo.org |
|
||||
// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
|
||||
// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | This program is free software; you can redistribute it and/or modify |
|
||||
// | it under the terms of the GNU General Public License as published by |
|
||||
// | the Free Software Foundation |
|
||||
// | |
|
||||
// | This program is distributed in the hope that it will be useful, but |
|
||||
// | WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
||||
// | General Public License for more details. |
|
||||
// | |
|
||||
// | You should have received a copy of the GNU General Public License |
|
||||
// | along with this program; if not, write to the Free Software |
|
||||
// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
|
||||
// | USA. |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
if (!defined('PHPWG_ROOT_PATH'))
|
||||
{
|
||||
die('Hacking attempt!');
|
||||
}
|
||||
|
||||
$upgrade_description = 'delete the config parameter comments_update_validation';
|
||||
|
||||
$query = 'DELETE FROM '.CONFIG_TABLE.' WHERE param = \'comments_update_validation\';';
|
||||
|
||||
pwg_query($query);
|
||||
|
||||
echo
|
||||
"\n"
|
||||
. $upgrade_description
|
||||
."\n"
|
||||
;
|
||||
?>
|
|
@ -729,7 +729,6 @@ $lang['user_status_normal'] = "User";
|
|||
$lang['user_status_webmaster'] = "Webmaster";
|
||||
$lang['Validate'] = "Validate";
|
||||
$lang['Validation'] = "Validation";
|
||||
$lang['Update Validation'] = "Validation when a comment is modified";
|
||||
$lang['Version of create_listing_file.php on the remote site and Piwigo must be the same'] = "Versions of create_listing_file.php on the remote site and Piwigo must be the same";
|
||||
$lang['Version'] = "Version";
|
||||
$lang['Virtual album added'] = "Virtual album added";
|
||||
|
|
|
@ -169,7 +169,6 @@ $lang['User comments validation'] = "Validation des commentaires d'utilisateurs"
|
|||
$lang['Users'] = "Utilisateurs";
|
||||
$lang['Validate'] = "Valider";
|
||||
$lang['Validation'] = "Validation";
|
||||
$lang['Update Validation'] = "Validation quand un commentaire est modifié";
|
||||
$lang['Version'] = "Version";
|
||||
$lang['Virtual albums to move'] = 'Albums virtuels à déplacer';
|
||||
$lang['Virtual album name'] = 'Nom de l\'album virtuel';
|
||||
|
|
|
@ -362,6 +362,7 @@ UPDATE '.USER_CACHE_CATEGORIES_TABLE.'
|
|||
$infos
|
||||
);
|
||||
|
||||
unset($_POST['content']);
|
||||
break;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue