Commit 5680bd3d authored by  JosephK's avatar JosephK

[recovery] mail url

parent d99f86f6
<?php
// remplacer http par https
define('URL_BASE', str_replace($_SERVER['DOCUMENT_ROOT'], isset($_SERVER['HTTPS']) ? 'https' : 'http').'://'.$_SERVER['HTTP_HOST'], dirname($_SERVER['SCRIPT_FILENAME']) );
define('URL_BASE', (isset($_SERVER['HTTPS']) ? 'https' : 'http').'://'.$_SERVER['HTTP_HOST'].str_replace($_SERVER['DOCUMENT_ROOT'], '', dirname($_SERVER['SCRIPT_FILENAME'])));
define('TITLE', 'MyFrama');
/**
......
<?php
$ShaarliRoot = dirname(dirname(dirname($_SERVER['SCRIPT_FILENAME'])));
$ShaarliURL = (isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://'.$_SERVER['HTTP_HOST'].dirname(strtok($_SERVER['REQUEST_URI'],'?'));
// I18n
if(!in_array('i18n',$GLOBALS['config']['ENABLED_PLUGINS']) && !function_exists(t)) {
function t($txt) { return $txt; }
......@@ -15,7 +14,10 @@ function hook_recovery_render_header($data)
if ( isset($_GET['recover'])) {
/* Step 1 : check email */
if( isset($_POST['email']) && isset($_POST['token']) && tokenOk($_POST['token']) ) {
unset($_SESSION['tokens'][$_POST['token']]);
$ShaarliURL = (isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://'.$_SERVER['HTTP_HOST'].dirname(strtok($_SERVER['REQUEST_URI'],'?'));
$c = $GLOBALS;
if($GLOBALS['config']['RECOVERY']['attempt'] >= 10) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment