aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2004-12-20 22:03:04 +0000
committerplegall <plg@piwigo.org>2004-12-20 22:03:04 +0000
commit7543485ba84b14cf928184b5c7de40772fe3c04f (patch)
treefee9d958cbf341aff2a005f10a2db3180804a38e
parentc19f01d77c990962baef1906ac0ed60280324b77 (diff)
- restricted access mode deleted : set all your categories as private
instead git-svn-id: http://piwigo.org/svn/trunk@651 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r--admin/configuration.php8
-rw-r--r--identification.php6
-rw-r--r--include/functions_user.inc.php7
-rw-r--r--index.php11
-rw-r--r--install/config.sql1
-rw-r--r--language/en_UK.iso-8859-1/admin.lang.php3
-rw-r--r--language/fr_FR.iso-8859-1/admin.lang.php4
-rw-r--r--template/default/admin/configuration.tpl5
8 files changed, 4 insertions, 41 deletions
diff --git a/admin/configuration.php b/admin/configuration.php
index 22e331337..5893099f8 100644
--- a/admin/configuration.php
+++ b/admin/configuration.php
@@ -162,8 +162,6 @@ switch ($page['section'])
{
case 'general' :
{
- $access_free = ($conf['access']=='free')?'checked="checked"':'';
- $access_restricted = ($conf['access']=='restricted')?'checked="checked"':'';
$history_yes = ($conf['log']=='true')?'checked="checked"':'';
$history_no = ($conf['log']=='false')?'checked="checked"':'';
$notif_yes = ($conf['mail_notification']=='true')?'checked="checked"':'';
@@ -177,10 +175,6 @@ switch ($page['section'])
'L_CONF_MAIL_INFO'=>$lang['conf_mail_webmaster_info'],
'L_CONF_TN_PREFIX'=>$lang['conf_prefix'],
'L_CONF_TN_PREFIX_INFO'=>$lang['conf_prefix_info'],
- 'L_CONF_ACCESS'=>$lang['conf_access'],
- 'L_CONF_ACCESS_INFO'=>$lang['conf_access_info'],
- 'L_CONF_ACCESS_FREE'=>$lang['free'],
- 'L_CONF_ACCESS_RESTRICTED'=>$lang['restricted'],
'L_CONF_HISTORY'=>$lang['history'],
'L_CONF_HISTORY_INFO'=>$lang['conf_log_info'],
'L_CONF_NOTIFICATION'=>$lang['conf_notification'],
@@ -188,8 +182,6 @@ switch ($page['section'])
'ADMIN_MAIL'=>$conf['mail_webmaster'],
'THUMBNAIL_PREFIX'=>$conf['prefix_thumbnail'],
- 'ACCESS_FREE'=>$access_free,
- 'ACCESS_RESTRICTED'=>$access_restricted,
'HISTORY_YES'=>$history_yes,
'HISTORY_NO'=>$history_no,
'NOTIFICATION_YES'=>$notif_yes,
diff --git a/identification.php b/identification.php
index 8fd140a91..a395e72ca 100644
--- a/identification.php
+++ b/identification.php
@@ -95,12 +95,8 @@ if ( sizeof( $errors ) != 0 )
$template->assign_block_vars('errors.error',array('ERROR'=>$errors[$i]));
}
}
-
//-------------------------------------------------------------- visit as guest
-if ( $conf['access'] == 'free' )
-{
- $template->assign_block_vars('free_access',array());
-}
+$template->assign_block_vars('free_access',array());
//----------------------------------------------------------- html code display
$template->pparse('identification');
include(PHPWG_ROOT_PATH.'include/page_tail.php');
diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php
index 8b71cf660..97087827f 100644
--- a/include/functions_user.inc.php
+++ b/include/functions_user.inc.php
@@ -158,17 +158,14 @@ function update_user( $user_id, $mail_address, $status,
function check_login_authorization($guest_allowed = true)
{
- global $user,$lang,$conf,$page;
+ global $user,$lang;
- if ( $user['is_the_guest'])
- {
- if ( $conf['access'] == 'restricted' || !$guest_allowed )
+ if ($user['is_the_guest'] and !$guest_allowed)
{
echo '<div style="text-align:center;">'.$lang['only_members'].'<br />';
echo '<a href="./identification.php">'.$lang['ident_title'].'</a></div>';
exit();
}
- }
}
function setup_style($style)
diff --git a/index.php b/index.php
index 8a94b9d18..426ed0513 100644
--- a/index.php
+++ b/index.php
@@ -25,16 +25,7 @@
// | USA. |
// +-----------------------------------------------------------------------+
-//----------------------------------------------------------- include
define('PHPWG_ROOT_PATH','./');
include_once( PHPWG_ROOT_PATH.'include/common.inc.php' );
-if ( $conf['access'] == 'restricted' )
-{
- if ( isset( $_COOKIE['id'] ) ) $url = 'category';
- else $url = 'identification';
-}
-else $url = 'category';
-// redirection
-$url.= '.php';
-redirect( $url );
+redirect('category.php');
?>
diff --git a/install/config.sql b/install/config.sql
index 62fabe6f6..512a35c1a 100644
--- a/install/config.sql
+++ b/install/config.sql
@@ -6,7 +6,6 @@ INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('default_language
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('default_template','default','Default gallery style');
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('default_maxwidth','','maximum width authorized for displaying images');
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('default_maxheight','','maximum height authorized for the displaying images');
-INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('access','free','access type to your gallery (free|restricted)');
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('nb_comment_page','10','number of comments to display on each page');
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('upload_maxfilesize','150','maximum filesize for the uploaded pictures');
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('upload_maxwidth','800','maximum width authorized for the uploaded images');
diff --git a/language/en_UK.iso-8859-1/admin.lang.php b/language/en_UK.iso-8859-1/admin.lang.php
index dac80109e..971f155e6 100644
--- a/language/en_UK.iso-8859-1/admin.lang.php
+++ b/language/en_UK.iso-8859-1/admin.lang.php
@@ -41,8 +41,6 @@ $lang['storage'] = 'Directory';
$lang['edit'] = 'Edit';
$lang['authorized'] = 'Authorized';
$lang['forbidden'] = 'Forbidden';
-$lang['free'] = 'Free';
-$lang['restricted'] = 'Restricted';
$lang['public'] = 'public';
$lang['private'] = 'private';
$lang['metadata']='Metadata';
@@ -152,7 +150,6 @@ $lang['conf_prefix'] = 'Thumbnail prefix';
$lang['conf_prefix_info'] = 'Thumbnails use this prefix. Do not fill if your not sure.';
$lang['conf_prefix_error'] = 'Thumbnail\'s prefix must only contain characters among : a to z (case insensitive), "-" or "_"';
$lang['conf_access'] = 'Access type';
-$lang['conf_access_info'] = '- free : anyone can enter the site, any visitor can create an account in order to customize the appareance of the website<br />- restricted : the webmaster create accounts. Only registered users can enter the site';
$lang['conf_log_info'] = 'Keep an history of visits on your website ? Visits will be shown in the history section of the administration panel';
$lang['conf_notification'] = 'Mail notification';
$lang['conf_notification_info'] = 'Automated mail notification for adminsitrators (and only for them) when a user add a comment or upload a picture.';
diff --git a/language/fr_FR.iso-8859-1/admin.lang.php b/language/fr_FR.iso-8859-1/admin.lang.php
index 36ec3b6f3..93c8a4148 100644
--- a/language/fr_FR.iso-8859-1/admin.lang.php
+++ b/language/fr_FR.iso-8859-1/admin.lang.php
@@ -41,8 +41,6 @@ $lang['update'] = 'Synchroniser';
$lang['edit'] = 'Editer';
$lang['authorized'] = 'Autorisé';
$lang['forbidden'] = 'Interdit';
-$lang['free'] = 'Libre';
-$lang['restricted'] = 'Restreint';
$lang['public'] = 'Publique';
$lang['private'] = 'Privée';
$lang['metadata']='Métadonnées';
@@ -153,8 +151,6 @@ $lang['conf_prefix'] = 'Préfixe thumbnail';
$lang['conf_prefix_info'] = 'Les noms des fichiers miniatures en sont préfixé. Laissez vide en cas de doute.';
$lang['conf_prefix_thumbnail_error'] = 'Le préfixe doit être uniquement composé des caractères suivant : a-z, "-" ou "_"';
$lang['conf_access'] = 'Type d\'acces';
-$lang['conf_access_info'] = '- libre : n\'importe qui peut accéder à vos photos, tous les visiteurs peuvent se créer un compte pour pouvoir personnaliser l\'affichage<br />
-- restreint : l\'administrateur s\'occupe de créer des comptes, seuls les personnes membres peuvent accéder au site';
$lang['conf_log_info'] = 'historiser les visites sur le site ? Les visites seront visibles dans l\'historique de l\'administration';
$lang['conf_notification'] = 'Notification par mail';
$lang['conf_notification_info'] = 'Notification automatique par mail des administrateurs (seuls les administrateurs) lors de l\'ajout d\'un commentaire, ou lors de l\'ajout d\'une image.';
diff --git a/template/default/admin/configuration.tpl b/template/default/admin/configuration.tpl
index e53723ab4..0585d70a9 100644
--- a/template/default/admin/configuration.tpl
+++ b/template/default/admin/configuration.tpl
@@ -28,11 +28,6 @@
<td class="row1"><input type="text" size="10" maxlength="10" name="prefix_thumbnail" value="{general.THUMBNAIL_PREFIX}" /></td>
</tr>
<tr>
- <td><strong>{general.L_CONF_ACCESS}&nbsp;:</strong><br /><span class="small">{general.L_CONF_ACCESS_INFO}</span></td>
- <td class="row1"><input type="radio" class="radio" name="access" value="free" {general.ACCESS_FREE} />{general.L_CONF_ACCESS_FREE}&nbsp;&nbsp;
- <input type="radio" class="radio" name="access" value="restricted" {general.ACCESS_RESTRICTED} />{general.L_CONF_ACCESS_RESTRICTED}</td>
- </tr>
- <tr>
<td><strong>{general.L_CONF_HISTORY}&nbsp;:</strong><br /><span class="small">{general.L_CONF_HISTORY_INFO}</span></td>
<td class="row1"><input type="radio" class="radio" name="log" value="true" {general.HISTORY_YES} />{L_YES}&nbsp;&nbsp;
<input type="radio" class="radio" name="log" value="false" {general.HISTORY_NO} />{L_NO}</td>