Skip to content

Commit d96a465

Browse files
author
LWT Project
committed
Version 1.5.5 (21-Jun-2013 12:50)
1 parent 41dd778 commit d96a465

5 files changed

Lines changed: 25 additions & 17 deletions

File tree

‎connect_wordpress.inc.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
***************************************************************/
1313

1414
/**************************************************************
15-
DB variables when integrated with WordPress
15+
DB variables when LWT is integrated with WordPress
1616
***************************************************************/
1717

1818
$server = "...."; // database server

‎index.php‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,14 @@
118118
<li><a href="settings.php">Settings/Preferences</a>
119119

120120
<?php
121+
// ********* WORDPRESS LOGOUT *********
121122
if (isset($_COOKIE['LWT-WP-User'])) {
122123
?>
123124
<br /><br /></li>
124-
<li><a href="../lwtstop.php"><span style="font-size:120%; font-weight:bold; color:red;">LOGOUT</span> (from WordPress and LWT)</a>
125+
<li><a href="../lwtstop.php"><span style="font-size:120%; font-weight:bold; color:red;">LOGOUT</span></a> (from WordPress and LWT)
125126
<?php
126127
}
128+
// ********* WORDPRESS LOGOUT *********
127129
?>
128130

129131
<br /><br /></li>

‎wordpress/lwtstart.php‎

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,18 @@
1313

1414
/**************************************************************
1515
lwtstart.php
16-
This script must be installed into WP main directory.
17-
To login:
18-
http://..../wp-login.php?redirect_to=./lwtstart.php
16+
------------
17+
This script must be installed into the WordPress main directory.
18+
To start LWT (and to login into WordPress), use this URL:
19+
http://...path-to-wp-blog.../lwtstart.php
1920
Cookies must be enabled.
2021
The lwt installation must be in sub directory "lwt" under
2122
the WP main drectory.
22-
In "lwt", "connect.inc.php" must validate $_COOKIE['wpuser'] and
23-
set $tbpref from $_COOKIE['wpuser']
23+
In the "lwt" directory, "connect.inc.php" must contain
24+
include "wp_logincheck.inc.php";
25+
at the end!
26+
To properly logout from both WordPress and LWT, use:
27+
http://...path-to-wp-blog.../lwtstop.php
2428
***************************************************************/
2529

2630
require_once( 'wp-load.php' );
@@ -32,13 +36,13 @@
3236
$wpuser = $current_user->ID;
3337

3438
setcookie('LWT-WP-User', $wpuser, time() + 60*60*18, '/');
35-
header("Location: ./lwt/index.php");
36-
exit;
39+
header("Location: ./lwt/index.php");
40+
exit;
3741
}
3842
else {
3943
setcookie('LWT-WP-User', $wpuser, time() - 1000, '/');
40-
header("Location: ./wp-login.php?redirect_to=./lwtstart.php");
41-
exit;
44+
header("Location: ./wp-login.php?redirect_to=./lwtstart.php");
45+
exit;
4246
}
4347

4448
?>

‎wordpress/lwtstop.php‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@
1313

1414
/**************************************************************
1515
lwtstop.php
16+
-----------
1617
This script must be installed into the WordPress main directory.
17-
To logout from WordPress and LWT:
18-
../lwtstop.php (called from index.php within LWT)
18+
To properly logout from both WordPress and LWT, use:
19+
http://...path-to-wp-blog.../lwtstop.php
20+
(link also provided on LWT main page)
1921
***************************************************************/
2022

2123
require_once( 'wp-load.php' );

‎wp_logincheck.inc.php‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
To be inserted in "connect.inc.php" when used with WordPress
1717
***************************************************************/
1818

19-
if (! isset($_COOKIE['LWT-WP-User'])) {
20-
header("Location: ../wp-login.php?redirect_to=./lwtstart.php");
21-
exit;
22-
} else {
19+
if (isset($_COOKIE['LWT-WP-User'])) {
2320
$tbpref = $_COOKIE['LWT-WP-User'];
21+
} else {
22+
header("Location: ../lwtstart.php");
23+
exit;
2424
}
2525

2626
?>

0 commit comments

Comments
 (0)