1
0
mirror of https://github.com/e107inc/e107.git synced 2025-03-14 01:19:44 +01:00

Pref for session time added. Modification of PRFLAN_60 and PRFLAN_61

This commit is contained in:
Cameron 2016-12-28 15:03:06 -08:00
parent bb3a8e824e
commit 8af3a0780a
4 changed files with 28 additions and 10 deletions

View File

@ -1263,7 +1263,11 @@ $text .= "
<col class='col-label' />
<col class='col-control' />
</colgroup>
<tbody>
<tbody>";
if(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') // Only allow if an SSL login has been made.
{
$text .="
<tr>
<td><label for='ssl-enabled'>".PRFLAN_60."</label></td>
@ -1272,10 +1276,9 @@ $text .= "
<div class='field-help'>".PRFLAN_61."</div>
</td>
</tr>
<!-- Secure Image -->
";
";
}
// Secure Image/ Captcha
$secureImage = array('signcode'=>PRFLAN_76, 'logcode'=>PRFLAN_81, "fpwcode"=>PRFLAN_138,'admincode'=>PRFLAN_222);
foreach($secureImage as $key=>$label)
@ -1363,7 +1366,18 @@ $text .= "
<td><label for='cookie-name'>".PRFLAN_55."</label></td>
<td >".$frm->text('cookie_name', $pref['cookie_name'], 20)."
<div class='field-help'>".PRFLAN_263.".</div></td></tr>
<tr>
<td><label for='session-lifetime'>".PRFLAN_272."</label></td>
<td>
".$frm->number('session_lifetime', $pref['session_lifetime'],6)."
<div class='smalltext field-help'>".PRFLAN_273."</div>
</td>
</tr>
<tr>
<td><label for='passwordencoding'>".PRFLAN_188.":</label></td>

View File

@ -243,6 +243,7 @@
</core>
<core name="search_highlight">1</core>
<core name="search_restrict">0</core>
<core name="session_lifetime">86400</core>
<core name="shortdate">%d %b %Y : %H:%M</core>
<core name="signcode">0</core>
<core name="signup_disallow_text"></core>

View File

@ -205,9 +205,9 @@ class e_session
{
$config['SavePath'] = e107::getPref('session_save_path', false); // FIXME - new pref
$config['SaveMethod'] = e107::getPref('session_save_method', 'files'); // FIXME - new pref
$options['lifetime'] = (integer) e107::getPref('session_lifetime', 86400); // FIXME - new pref
$options['lifetime'] = (integer) e107::getPref('session_lifetime', 86400); //
$options['path'] = e107::getPref('session_cookie_path', ''); // FIXME - new pref
$options['secure'] = e107::getPref('ssl_enabled', false); // FIXME - new pref
$options['secure'] = e107::getPref('ssl_enabled', false); //
}
if(defined('SESSION_SAVE_PATH')) // safer than a pref.

View File

@ -58,8 +58,8 @@ define("PRFLAN_55", "Cookie/Session name");
define("PRFLAN_56", "Timezone");
define("PRFLAN_58", "Restrict website to members only");
define("PRFLAN_59", "ticking will restrict all areas apart from the front page and signup page to members only");
define("PRFLAN_60", "Enable SSL");
define("PRFLAN_61", "Only enable SSL if you are sure you know what you are doing!");
define("PRFLAN_60", "Use SSL only");
define("PRFLAN_61", "Redirect all traffic through SSL (https)");
define("PRFLAN_76", "Display CAPTCHA on signup page.");
define("PRFLAN_77", "Admin Display Options ");
define("PRFLAN_78", "Leave blank to disable");
@ -289,3 +289,6 @@ define("PRFLAN_268", "Frontend Inline-Editing");
define("PRFLAN_269", "Admins with this userclass (and the appropriate admin permissions) will be able to edit html directly via the frontend area.");
define("PRFLAN_270", "Contact Form Filtering");
define("PRFLAN_271", "Ignore form submissions containing these words or phrases. One per line.");
define("PRFLAN_272", "Session Lifetime");
define("PRFLAN_273", "Lifetime in seconds. 0 = until the browser is closed. ");