aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2009-08-01 12:39:46 +0000
committerpatdenice <patdenice@piwigo.org>2009-08-01 12:39:46 +0000
commitaa20109ed00f378c403049396c89f3ac70a90443 (patch)
tree24b708dd587ca64170687e1502ee925925db7f9a
parent58681f73d4921a420b0427831ddeb44975a38141 (diff)
merge r3714 from branch 2.0 to trunk
bug 895 : At the end of install, webmaster is automatically connected with two buttons: "Home" and "Admin" git-svn-id: http://piwigo.org/svn/trunk@3715 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r--admin/template/goto/install.tpl4
-rw-r--r--install.php21
2 files changed, 24 insertions, 1 deletions
diff --git a/admin/template/goto/install.tpl b/admin/template/goto/install.tpl
index daf68bd71..1005f4859 100644
--- a/admin/template/goto/install.tpl
+++ b/admin/template/goto/install.tpl
@@ -148,7 +148,8 @@ TD {
{else}
<p>
<br />
- <input type="button" name="identification" value="{'Identification'|@translate}" onClick="window.open('identification.php');"/>
+ <input type="button" name="home" value="{'home'|@translate}" onClick="window.location='index.php';"/>
+ <input type="button" name="admin" value="{'admin'|@translate}" onClick="window.location='admin.php';"/>
</p>
<div class="infos">
@@ -158,6 +159,7 @@ TD {
</div>
<p>
+ <br />
<input type="button" name="subscribe" value="{'Subscribe %s'|@translate|@sprintf:$F_ADMIN_EMAIL}" onClick="window.open('{$SUBSCRIBE_BASE_URL}{$F_ADMIN_EMAIL}');"/>
</p>
{/if}
diff --git a/install.php b/install.php
index 5140cffd7..daf521913 100644
--- a/install.php
+++ b/install.php
@@ -418,6 +418,27 @@ else
{
array_push($errors, $error_copy);
}
+ else
+ {
+ session_set_save_handler('pwg_session_open',
+ 'pwg_session_close',
+ 'pwg_session_read',
+ 'pwg_session_write',
+ 'pwg_session_destroy',
+ 'pwg_session_gc'
+ );
+ if ( function_exists('ini_set') )
+ {
+ ini_set('session.use_cookies', $conf['session_use_cookies']);
+ ini_set('session.use_only_cookies', $conf['session_use_only_cookies']);
+ ini_set('session.use_trans_sid', intval($conf['session_use_trans_sid']));
+ ini_set('session.cookie_httponly', 1);
+ }
+ session_name($conf['session_name']);
+ session_set_cookie_params(0, cookie_path());
+ $user = build_user(1, true);
+ log_user($user['id'], false);
+ }
$template->assign(
'SUBSCRIBE_BASE_URL',