Subversion Repositories Applications.papyrus

Rev

Rev 1037 | Rev 1083 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1037 Rev 1045
Line 19... Line 19...
19
// | You should have received a copy of the GNU Lesser General Public                                     |
19
// | You should have received a copy of the GNU Lesser General Public                                     |
20
// | License along with this library; if not, write to the Free Software                                  |
20
// | License along with this library; if not, write to the Free Software                                  |
21
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
21
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
22
// |                                                                                                      |
22
// |                                                                                                      |
23
// +------------------------------------------------------------------------------------------------------+
23
// +------------------------------------------------------------------------------------------------------+
24
// CVS : $Id: pap_initialise_info.inc.php,v 1.26 2006-10-18 10:18:05 jp_milcent Exp $
24
// CVS : $Id: pap_initialise_info.inc.php,v 1.27 2006-11-07 18:43:54 jp_milcent Exp $
25
/**
25
/**
26
*Initialisation de Papyrus : vérification et récupération de paramètres généraux.
26
*Initialisation de Papyrus : vérification et récupération de paramètres généraux.
27
*
27
*
28
* La page contient le code initialisant l'éxecution du rendu d'une page par Papyrus.
28
* La page contient le code initialisant l'éxecution du rendu d'une page par Papyrus.
29
* Nous y trouvons la recherche des informations disponibles sur :
29
* Nous y trouvons la recherche des informations disponibles sur :
Line 39... Line 39...
39
*@author            Jean-Pascal MILCENT <jpm@tela-botanica.org>
39
*@author            Jean-Pascal MILCENT <jpm@tela-botanica.org>
40
//Autres auteurs :
40
//Autres auteurs :
41
*@author            Alexandre GRANIER <alex@tela-botanica.org>
41
*@author            Alexandre GRANIER <alex@tela-botanica.org>
42
*@author            Laurent COUDOUNEAU <laurent.coudouneau@ema.fr>
42
*@author            Laurent COUDOUNEAU <laurent.coudouneau@ema.fr>
43
*@copyright         Tela-Botanica 2000-2004
43
*@copyright         Tela-Botanica 2000-2004
44
*@version           $Revision: 1.26 $ $Date: 2006-10-18 10:18:05 $
44
*@version           $Revision: 1.27 $ $Date: 2006-11-07 18:43:54 $
45
// +------------------------------------------------------------------------------------------------------+
45
// +------------------------------------------------------------------------------------------------------+
46
*/
46
*/
Line 47... Line 47...
47
 
47
 
48
// +------------------------------------------------------------------------------------------------------+
48
// +------------------------------------------------------------------------------------------------------+
Line 66... Line 66...
66
// Gestion de la réecriture d'url et des url erreur 404
66
// Gestion de la réecriture d'url et des url erreur 404
67
if ((defined('PAP_URL_REECRITURE') AND PAP_URL_REECRITURE == '1' && (! isset($_GET[GEN_URL_CLE_SITE]) || empty($_GET[GEN_URL_CLE_SITE])) && (! isset($_GET[GEN_URL_CLE_MENU]) || empty($_GET[GEN_URL_CLE_MENU]))) ) {
67
if ((defined('PAP_URL_REECRITURE') AND PAP_URL_REECRITURE == '1' && (! isset($_GET[GEN_URL_CLE_SITE]) || empty($_GET[GEN_URL_CLE_SITE])) && (! isset($_GET[GEN_URL_CLE_MENU]) || empty($_GET[GEN_URL_CLE_MENU]))) ) {
68
	$tab_type_reecriture = array('MENU', 'SITE');
68
	$tab_type_reecriture = array('MENU', 'SITE');
69
	foreach ($tab_type_reecriture as $reecriture) {
69
	foreach ($tab_type_reecriture as $reecriture) {
70
		if (PAP_URL_REECRITURE_SEP == '/') {
70
		if (PAP_URL_REECRITURE_SEP == '/') {
71
			$masque_reecriture = '/^(\/.*?)'.constant('PAP_URL_REECRITURE_'.$reecriture).'\\'.PAP_URL_REECRITURE_SEP.'([^\/]+?)(?:\?(.*)|)$/';
71
			$masque_reecriture = '/^(\/.*?)'.constant('PAP_URL_REECRITURE_'.$reecriture).'\\'.PAP_URL_REECRITURE_SEP.'([^?]+?)(?:\?(.*)|)$/';
72
		} else {
72
		} else {
73
			$masque_reecriture = '/^(\/.*?)'.constant('PAP_URL_REECRITURE_'.$reecriture).PAP_URL_REECRITURE_SEP.'([^\/]+?)(?:\?(.*)|)$/';
73
			$masque_reecriture = '/^(\/.*?)'.constant('PAP_URL_REECRITURE_'.$reecriture).PAP_URL_REECRITURE_SEP.'([^?]+?)(?:\?(.*)|)$/';
74
		}
74
		}
75
		if (preg_match($masque_reecriture, rawurldecode($_SERVER['REQUEST_URI']), $tab_raccourci)) {		
75
		if (preg_match($masque_reecriture, rawurldecode($_SERVER['REQUEST_URI']), $tab_raccourci)) {		
76
			$chemin_vers_papyrus = $tab_raccourci[1];
76
			$chemin_vers_papyrus = $tab_raccourci[1];
77
			$raccourci = $tab_raccourci[2];
77
			$raccourci = $tab_raccourci[2];
78
			$parametres = '';
78
			$parametres = '';
Line 480... Line 480...
480
    $_GEN_commun['url']->addQueryString(GEN_URL_CLE_FORMAT, $_GEN_commun['url_format']);
480
    $_GEN_commun['url']->addQueryString(GEN_URL_CLE_FORMAT, $_GEN_commun['url_format']);
481
}
481
}
Line 482... Line 482...
482
 
482
 
483
/* +--Fin du code ---------------------------------------------------------------------------------------+
483
/* +--Fin du code ---------------------------------------------------------------------------------------+
-
 
484
* $Log: not supported by cvs2svn $
-
 
485
* Revision 1.26  2006/10/18 10:18:05  jp_milcent
-
 
486
* Gestion des erreurs HTTP par Papyrus.
484
* $Log: not supported by cvs2svn $
487
*
485
* Revision 1.25  2006/10/11 18:04:11  jp_milcent
488
* Revision 1.25  2006/10/11 18:04:11  jp_milcent
486
* Gestion avancée de la réecriture d'URL.
489
* Gestion avancée de la réecriture d'URL.
487
*
490
*
488
* Revision 1.24  2006/03/02 10:49:49  ddelon
491
* Revision 1.24  2006/03/02 10:49:49  ddelon