mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-02 04:15:05 +02:00
Issue 578
User guest must be real user Step 1: guest is a real user On next commit, I finish installation and use of guest of user list and group git-svn-id: http://piwigo.org/svn/trunk@1926 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -1,19 +1,9 @@
|
||||
-- initial configuration for PhpWebGallery
|
||||
|
||||
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('default_language','en_UK.iso-8859-1','Default gallery language');
|
||||
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('default_template','yoga/clear','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 ('nb_comment_page','10','number of comments to display on each page');
|
||||
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('log','false','keep an history of visits on your website');
|
||||
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('comments_validation','false','administrators validate users comments before becoming visible');
|
||||
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('comments_forall','false','even guest not registered can post comments');
|
||||
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('nb_image_line','5','Number of images displayed per row');
|
||||
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('nb_line_page','3','Number of rows displayed per page');
|
||||
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('recent_period','7','Period within which pictures are displayed as new (in days)');
|
||||
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('auto_expand','false','Auto expand of the category tree');
|
||||
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('show_nb_comments','false','Show the number of comments under the thumbnails');
|
||||
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('show_nb_hits', 'false', 'Show hits count under thumbnails');
|
||||
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('gallery_locked','false','Lock your gallery temporary for non admin users');
|
||||
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('gallery_title','PhpWebGallery demonstration site','Title at top of each page and for RSS feed');
|
||||
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('gallery_url','http://demo.phpwebgallery.net','URL given in RSS feed');
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
|
||||
// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | file : $Id: 58-database.php 1912 2007-03-16 06:30:07Z rub $
|
||||
// | last update : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
|
||||
// | last modifier : $Author: rub $
|
||||
// | revision : $Revision: 1912 $
|
||||
// | 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 |
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
<?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 = 'Change default value on #user_infos for guest';
|
||||
|
||||
include_once(PHPWG_ROOT_PATH.'include/constants.php');
|
||||
include(PHPWG_ROOT_PATH . 'include/config_default.inc.php');
|
||||
@include(PHPWG_ROOT_PATH. 'include/config_local.inc.php');
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | Upgrade content |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
load_conf_from_db();
|
||||
|
||||
$query = "
|
||||
update ".USER_INFOS_TABLE."
|
||||
set
|
||||
template = '".$conf['default_template']."',
|
||||
nb_image_line = ".$conf['nb_image_line'].",
|
||||
nb_line_page = ".$conf['nb_line_page'].",
|
||||
language = '".$conf['default_language']."',
|
||||
maxwidth = ".(empty($conf['default_maxwidth']) ? "null" : $conf['default_maxwidth']).",
|
||||
maxheight = ".(empty($conf['default_maxheight']) ? "null" : $conf['default_maxheight']).",
|
||||
recent_period = ".$conf['recent_period'].",
|
||||
expand = '".boolean_to_string($conf['auto_expand'])."',
|
||||
show_nb_comments = '".boolean_to_string($conf['show_nb_comments'])."',
|
||||
show_nb_hits = '".boolean_to_string($conf['show_nb_hits'])."',
|
||||
enabled_high = '".boolean_to_string(
|
||||
(isset($conf['newuser_default_enabled_high']) ?
|
||||
$conf['newuser_default_enabled_high'] : true))."'
|
||||
where
|
||||
user_id = ".$conf['default_user_id'].";";
|
||||
pwg_query($query);
|
||||
|
||||
|
||||
$query = "
|
||||
delete from ".CONFIG_TABLE."
|
||||
where
|
||||
param in
|
||||
(
|
||||
'default_template',
|
||||
'nb_image_line',
|
||||
'nb_line_page',
|
||||
'default_language',
|
||||
'default_maxwidth',
|
||||
'default_maxheight',
|
||||
'recent_period',
|
||||
'auto_expand',
|
||||
'show_nb_comments',
|
||||
'show_nb_hits'
|
||||
);";
|
||||
pwg_query($query);
|
||||
|
||||
echo
|
||||
"\n"
|
||||
.'"'.$upgrade_description.'"'.' ended'
|
||||
."\n"
|
||||
;
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user