1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/emailpoubelle_ynh.git synced 2024-09-03 18:26:29 +02:00

Compatibilite urlrewriting

This commit is contained in:
David 2013-11-20 12:10:23 +01:00
parent 6fed9943f8
commit 7ca7ea150c
3 changed files with 12 additions and 9 deletions

2
.gitignore vendored
View file

@ -4,4 +4,4 @@ virtual.db
checkupdate checkupdate
conf.php conf.php
test* test*
var/database.sdb var/database*

View file

@ -14,7 +14,6 @@ define('INC', '../lib');
// include function // include function
include_once(INC.'/ep_function.php'); include_once(INC.'/ep_function.php');
include_once(INC.'/ep_admin.php');
define('DEBUG', false); define('DEBUG', false);
@ -30,6 +29,8 @@ define('DOMAIN', 'exemple.fr');
// Exemple pour Sqlite : // Exemple pour Sqlite :
// define('DB', 'sqlite:./data/emailPoubelle.sqlite'); // define('DB', 'sqlite:./data/emailPoubelle.sqlite');
define('DB', 'sqlite:'.DATA.'/database.sdb'); define('DB', 'sqlite:'.DATA.'/database.sdb');
// table prefix
define('DBTABLEPREFIX', 'ep_');
// Use cron (true/false) for life expire email (recomanded) // Use cron (true/false) for life expire email (recomanded)
// If use true add in crontab : // If use true add in crontab :
@ -65,12 +66,14 @@ if (CHECKMX) {
// A indiquer si vous utiliser les URL's rewriting // A indiquer si vous utiliser les URL's rewriting
// Exemple avec un htaccess // Exemple avec un htaccess
// RewriteRule ^EmailPoubell-([0-9]+)\.html$ folder/emailPoubelle.php?&Validemail=$1 [L] // RewriteRule ^ep-([a-z]+)-([a-zA-Z0-9+/=]+)\.html$ switch.php?page=emailPoubelle&act=$1&value=$2 [L]
//define('URLREWRITE_DEBUT', 'http://www.zici.fr/EmailPoubell-'); //define('URLREWRITE_START', 'http://poubelle.zici.fr/ep-');
//define('URLREWRITE_FIN', '.html'); //define('URLREWRITE_MIDDLE', '-');
//define('URLREWRITE_END', '.html');
// Désactiver // Désactiver
define('URLREWRITE_DEBUT', false); define('URLREWRITE_START', false);
define('URLREWRITE_FIN', false); define('URLREWRITE_MIDDLE', false);
define('URLREWRITE_END', false);
// check update : // check update :
// enable : in seconds // enable : in seconds

View file

@ -265,8 +265,8 @@ function SendEmail($recipient, $sujet, $message) {
function urlGen($act,$id,$alias_full) { function urlGen($act,$id,$alias_full) {
$idUrl=base64_encode($id.';'.$alias_full); $idUrl=base64_encode($id.';'.$alias_full);
if (URLREWRITE_DEBUT && URLREWRITE_FIN) { if (URLREWRITE_START && URLREWRITE_MIDDLE && URLREWRITE_END) {
return URLREWRITE_DEBUT.$idUrl.URLREWRITE_FIN; return URLREWRITE_START.$act.URLREWRITE_MIDDLE.$idUrl.URLREWRITE_END;
} else { } else {
return URLPAGE."?act=".$act."&value=".$idUrl; return URLPAGE."?act=".$act."&value=".$idUrl;
} }