mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-05-07 00:25:50 +03:00
Resolved issue 0000489: Mail address obligatory
git-svn-id: http://piwigo.org/svn/trunk@2032 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
3fbc92f61e
commit
e8c396c06b
9 changed files with 80 additions and 14 deletions
|
@ -49,10 +49,11 @@ else
|
|||
}
|
||||
|
||||
$main_checkboxes = array(
|
||||
'allow_user_registration',
|
||||
'obligatory_user_mail_address',
|
||||
'rate',
|
||||
'rate_anonymous',
|
||||
'email_admin_on_new_user',
|
||||
'allow_user_registration',
|
||||
'email_admin_on_picture_uploaded',
|
||||
);
|
||||
|
||||
|
|
|
@ -31,9 +31,10 @@
|
|||
// If the mail address doesn't correspond, an error message is returned.
|
||||
function validate_mail_address( $mail_address )
|
||||
{
|
||||
global $lang;
|
||||
global $lang, $conf;
|
||||
|
||||
if ( $mail_address == '' )
|
||||
if (empty($mail_address) and
|
||||
!($conf['obligatory_user_mail_address'] and in_array(script_basename(), array('register', 'profile'))))
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
|
|
@ -23,3 +23,4 @@ INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('email_admin_on_n
|
|||
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('email_admin_on_comment','false','Send an email to the administrators when a valid comment is entered');
|
||||
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('email_admin_on_comment_validation','false','Send an email to the administrators when a comment requires validation');
|
||||
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('email_admin_on_picture_uploaded','false','Send an email to the administrators when a picture is uploaded');
|
||||
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('obligatory_user_mail_address','false','Mail address is obligatory for users');
|
||||
|
|
51
install/db/62-database.php
Normal file
51
install/db/62-database.php
Normal file
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | PhpWebGallery - a PHP based picture gallery |
|
||||
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
|
||||
// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | file : $Id$
|
||||
// | last update : $Date$
|
||||
// | last modifier : $Author$
|
||||
// | revision : $Revision$
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | 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 = 'Add obligatory_user_mail config';
|
||||
|
||||
include_once(PHPWG_ROOT_PATH.'include/constants.php');
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | Upgrade content |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
$query = "
|
||||
INSERT INTO ".CONFIG_TABLE." (param,value,comment) VALUES ('obligatory_user_mail_address','false','Mail address is obligatory for users');
|
||||
";
|
||||
pwg_query($query);
|
||||
|
||||
echo
|
||||
"\n"
|
||||
.'"'.$upgrade_description.'"'.' ended'
|
||||
."\n"
|
||||
;
|
||||
|
||||
?>
|
|
@ -616,4 +616,5 @@ $lang['display_thumbnail_hoverbox'] = 'Hoverbox display';
|
|||
$lang['Thumbnails'] = 'Thumbnails';
|
||||
$lang['Guest cannot be deleted'] = 'Guest cannot be deleted';
|
||||
$lang['Default user cannot be deleted'] = 'Default user cannot be deleted';
|
||||
$lang['obligatory_user_mail_address'] = 'Mail address is obligatory for all users';
|
||||
?>
|
||||
|
|
|
@ -24,6 +24,10 @@ page.</li>
|
|||
maintenance. Only administrator users will be able to reach the
|
||||
gallery.</li>
|
||||
|
||||
<li><strong>Allow user registration</strong>: Registration is free for all.</li>
|
||||
|
||||
<li><strong>Mail address is obligatory for all users</strong>: Mail address will checked on registration or profile update except if the action is done on administration part.</li>
|
||||
|
||||
<li><strong>Rating</strong>: Picture rating feature is enabled.</li>
|
||||
|
||||
<li><strong>Rating by guests</strong>: Even non registered users can
|
||||
|
@ -31,8 +35,6 @@ rate images.</li>
|
|||
|
||||
<li><strong>Email admins when a new user registers</strong>: Administrators will be received mail for each registration.</li>
|
||||
|
||||
<li><strong>Allow user registration</strong>: Registration is free for all.</li>
|
||||
|
||||
<li><strong>Email adminis when a picture is uploaded</strong>: Administrators will be received mail for each picture uploaded by a user.</li>
|
||||
|
||||
</ul>
|
||||
|
|
|
@ -617,4 +617,5 @@ $lang['display_thumbnail_hoverbox'] = 'Affichage lors du survol';
|
|||
$lang['Thumbnails'] = 'Miniatures';
|
||||
$lang['Guest cannot be deleted'] = 'L\'invité ne peut pas être supprimé';
|
||||
$lang['Default user cannot be deleted'] = 'L\'utilisateur par défaut ne peut pas être supprimé';
|
||||
$lang['obligatory_user_mail_address'] = 'L\'adresse mail est obligatoire pour tous les utilisateurs';
|
||||
?>
|
||||
|
|
|
@ -24,6 +24,10 @@ pages.</li>
|
|||
galerie pour maintenance. Seul les administrateurs pourront accéder à la
|
||||
galerie.</li>
|
||||
|
||||
<li><strong>Permettre l'enregistrement des utilisateurs</strong>: L'inscription est libre pour tous.</li>
|
||||
|
||||
<li><strong>L'adresse mail est obligatoire pour tous les utilisateurs</strong>: L'adresse mail sera vérifié lors des inscriptions ou de la mise à jour des profils sauf si l'action est effectuée dans la partie administration.</li>
|
||||
|
||||
<li><strong>Notation</strong>: La notation des photos est possible.</li>
|
||||
|
||||
<li><strong>Notation par les visiteurs</strong>: Même les utilisateurs
|
||||
|
@ -31,8 +35,6 @@ non enregistr
|
|||
|
||||
<li><strong>Notifier les administrateurs lors de l'inscription d'un utilisateur</strong>: Les administrateurs recevront un courriel à chaque inscription.</li>
|
||||
|
||||
<li><strong>Permettre l'enregistrement des utilisateurs</strong>: L'inscription est libre pour tous.</li>
|
||||
|
||||
<li><strong>Notifier les administrateurs quand une image est téléchargée</strong>: Les administrateurs recevront un courriel à chaque image mis à disposition par un utilisateur.</li>
|
||||
|
||||
</ul>
|
||||
|
|
|
@ -43,6 +43,19 @@
|
|||
|
||||
<fieldset id="mainConfCheck">
|
||||
<ul>
|
||||
<li>
|
||||
<label for="allow_user_registration">
|
||||
<span class="property">{lang:Allow user registration}</span>
|
||||
<input type="checkbox" name="allow_user_registration" id="allow_user_registration" {main.ALLOW_USER_REGISTRATION} />
|
||||
</label>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label for="obligatory_user_mail_address">
|
||||
<span class="property">{lang:obligatory_user_mail_address}</span>
|
||||
<input type="checkbox" name="obligatory_user_mail_address" id="obligatory_user_mail_address" {main.OBLIGATORY_USER_MAIL_ADDRESS} />
|
||||
</label>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<span class="property">{lang:Rating}</span>
|
||||
|
@ -54,13 +67,6 @@
|
|||
<input type="checkbox" name="rate_anonymous" {main.RATE_ANONYMOUS} />
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label for="allow_user_registration">
|
||||
<span class="property">{lang:Allow user registration}</span>
|
||||
<input type="checkbox" name="allow_user_registration" id="allow_user_registration" {main.ALLOW_USER_REGISTRATION} />
|
||||
</label>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label>
|
||||
<span class="property">{lang:Email administrators when a new user registers}</span>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue