Installation procedure update
git-svn-id: http://piwigo.org/svn/trunk@463 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
4cec52cc3c
commit
52a3531e7e
5 changed files with 11 additions and 8 deletions
|
|
@ -25,6 +25,9 @@
|
||||||
// | USA. |
|
// | USA. |
|
||||||
// +-----------------------------------------------------------------------+
|
// +-----------------------------------------------------------------------+
|
||||||
|
|
||||||
|
// Default Language
|
||||||
|
define('DEFAULT_LANGUAGE', 'en_UK.iso-8859-1');
|
||||||
|
|
||||||
// Debug Level
|
// Debug Level
|
||||||
define('DEBUG', 1); // Debugging on
|
define('DEBUG', 1); // Debugging on
|
||||||
//define('DEBUG', 0); // Debugging off
|
//define('DEBUG', 0); // Debugging off
|
||||||
|
|
|
||||||
|
|
@ -218,7 +218,7 @@ function init_userprefs($userdata)
|
||||||
|
|
||||||
if ( !file_exists(@realpath(PHPWG_ROOT_PATH . 'language/' . $language . '/common.lang.php')) )
|
if ( !file_exists(@realpath(PHPWG_ROOT_PATH . 'language/' . $language . '/common.lang.php')) )
|
||||||
{
|
{
|
||||||
$language = 'en_EN';
|
$language = DEFAULT_LANGUAGE;
|
||||||
}
|
}
|
||||||
include_once(PHPWG_ROOT_PATH . 'language/' . $language . '/common.lang.php');
|
include_once(PHPWG_ROOT_PATH . 'language/' . $language . '/common.lang.php');
|
||||||
|
|
||||||
|
|
@ -227,7 +227,7 @@ function init_userprefs($userdata)
|
||||||
{
|
{
|
||||||
if ( !file_exists(@realpath(PHPWG_ROOT_PATH . 'language/' . $language. '/admin.lang.php')) )
|
if ( !file_exists(@realpath(PHPWG_ROOT_PATH . 'language/' . $language. '/admin.lang.php')) )
|
||||||
{
|
{
|
||||||
$language = 'en_EN';
|
$language = DEFAULT_LANGUAGE;
|
||||||
}
|
}
|
||||||
include_once(PHPWG_ROOT_PATH . 'language/' . $language . '/admin.lang.php');
|
include_once(PHPWG_ROOT_PATH . 'language/' . $language . '/admin.lang.php');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,8 +35,7 @@ $infos = array( 'id', 'username', 'mail_address', 'nb_image_line',
|
||||||
'maxheight', 'expand', 'show_nb_comments', 'recent_period',
|
'maxheight', 'expand', 'show_nb_comments', 'recent_period',
|
||||||
'template', 'forbidden_categories' );
|
'template', 'forbidden_categories' );
|
||||||
|
|
||||||
$query_user = 'SELECT '.implode( ',', $infos );
|
$query_user = 'SELECT * FROM '.USERS_TABLE;
|
||||||
$query_user.= ' FROM '.USERS_TABLE;
|
|
||||||
$query_done = false;
|
$query_done = false;
|
||||||
$user['is_the_guest'] = false;
|
$user['is_the_guest'] = false;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ define('PHPWG_ROOT_PATH','./');
|
||||||
// Guess an initial language ...
|
// Guess an initial language ...
|
||||||
function guess_lang()
|
function guess_lang()
|
||||||
{
|
{
|
||||||
|
return 'en_UK.iso-8859-1';
|
||||||
global $_SERVER;
|
global $_SERVER;
|
||||||
$languages = array();
|
$languages = array();
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
@ -255,11 +256,11 @@ if ( isset( $_POST['install'] ))
|
||||||
@fclose($fp);
|
@fclose($fp);
|
||||||
|
|
||||||
// tables creation, based on phpwebgallery_structure.sql
|
// tables creation, based on phpwebgallery_structure.sql
|
||||||
execute_sqlfile( './install/phpwebgallery_structure.sql'
|
execute_sqlfile( PHPWG_ROOT_PATH.'install/phpwebgallery_structure.sql'
|
||||||
, 'phpwebgallery_'
|
, 'phpwebgallery_'
|
||||||
, $table_prefix );
|
, $table_prefix );
|
||||||
// We fill the tables with basic informations
|
// We fill the tables with basic informations
|
||||||
execute_sqlfile( './install/config.sql'
|
execute_sqlfile( PHPWG_ROOT_PATH.'install/config.sql'
|
||||||
, 'phpwebgallery_'
|
, 'phpwebgallery_'
|
||||||
, $table_prefix );
|
, $table_prefix );
|
||||||
|
|
||||||
|
|
@ -282,7 +283,7 @@ if ( isset( $_POST['install'] ))
|
||||||
mysql_query( $query );
|
mysql_query( $query );
|
||||||
|
|
||||||
$query = 'INSERT INTO '.SITES_TABLE;
|
$query = 'INSERT INTO '.SITES_TABLE;
|
||||||
$query.= " (id,galleries_url) VALUES (1, './galleries/');";
|
$query.= " (id,galleries_url) VALUES (1, ".PHPWG_ROOT_PATH."'galleries/');";
|
||||||
mysql_query( $query );
|
mysql_query( $query );
|
||||||
|
|
||||||
// webmaster admin user
|
// webmaster admin user
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('prefix_thumbnail','TN-','thumbnails filename prefix');
|
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('prefix_thumbnail','TN-','thumbnails filename prefix');
|
||||||
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('webmaster','','webmaster login');
|
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('webmaster','','webmaster login');
|
||||||
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('mail_webmaster','','webmaster mail');
|
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('mail_webmaster','','webmaster mail');
|
||||||
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('default_lang','en_EN','Default gallery language');
|
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('default_lang','en_UK.iso-8859-1','Default gallery language');
|
||||||
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('default_style','default','Default gallery style');
|
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('default_style','default','Default gallery style');
|
||||||
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 ('access','free','access type to your gallery (free|restricted)');
|
||||||
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('session_id_size','4','length of session identifiers');
|
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('session_id_size','4','length of session identifiers');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue