Author: cfinck
Date: Sun May 25 17:08:12 2008
New Revision: 33704
URL:
http://svn.reactos.org/svn/reactos?rev=33704&view=rev
Log:
Last minute fixes for phpBB:
- Update the session expiration time if the user enabled a session with timeout
- Change the DB name for "subsys_phpbb.php"
Modified:
trunk/web/reactos.org/htdocs/forum/includes/auth/auth_roscms.php
trunk/web/reactos.org/htdocs/roscms/inc/subsys_phpbb.php
Modified:
trunk/web/reactos.org/htdocs/forum/includes/auth/auth_roscms.php
URL:
http://svn.reactos.org/svn/reactos/trunk/web/reactos.org/htdocs/forum/inclu…
==============================================================================
---
trunk/web/reactos.org/htdocs/forum/includes/auth/auth_roscms.php [iso-8859-1]
(original)
+++
trunk/web/reactos.org/htdocs/forum/includes/auth/auth_roscms.php [iso-8859-1] Sun May
25 17:08:12 2008
@@ -91,10 +91,24 @@
function validate_session_roscms(&$user)
{
- if($user["user_id"] == ANONYMOUS && $_COOKIE["roscmsusrkey"]
!= "")
+ global $db;
+
+ if($_COOKIE["roscmsusrkey"])
{
- // The user is logged in in RosCMS, but not yet in phpBB. Do that now
- login_box();
+ if($user["user_id"] == ANONYMOUS)
+ {
+ // The user is logged in in RosCMS, but not yet in phpBB. Do that now
+ login_box();
+ }
+ else
+ {
+ // Update the session expiration time
+ $sql = "UPDATE " . ROSCMS_DB_NAME . ".user_sessions " .
+ "SET usersession_expires = DATE_ADD(NOW(), INTERVAL 30 MINUTE) " .
+ "WHERE usersession_id = '" .
$db->sql_escape($_COOKIE["roscmsusrkey"]) . "' " .
+ "AND usersession_expires IS NOT NULL";
+ $db->sql_query($sql);
+ }
}
return true;
Modified:
trunk/web/reactos.org/htdocs/roscms/inc/subsys_phpbb.php
URL:
http://svn.reactos.org/svn/reactos/trunk/web/reactos.org/htdocs/roscms/inc/…
==============================================================================
---
trunk/web/reactos.org/htdocs/roscms/inc/subsys_phpbb.php [iso-8859-1] (original)
+++
trunk/web/reactos.org/htdocs/roscms/inc/subsys_phpbb.php [iso-8859-1] Sun May 25
17:08:12 2008
@@ -34,7 +34,7 @@
require_once("subsys_utils.php");
-define('SUBSYS_PHPBB_DBNAME', "publish");
+define('SUBSYS_PHPBB_DBNAME', "forum");
function subsys_phpbb_info_check()
{