Fix: The agenda export is a public url (with no permission) so it must be into htdocs/public directory.
This commit is contained in:
parent
d9211b1665
commit
26c1c294ea
@ -17,9 +17,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/admin/agenda.php
|
* \file htdocs/admin/agenda_xcal.php
|
||||||
* \ingroup agenda
|
* \ingroup agenda
|
||||||
* \brief Page de configuration du module agenda
|
* \brief Page to setup miscellaneous options of agenda module
|
||||||
* \version $Id$
|
* \version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -121,13 +121,13 @@ print "<br>";
|
|||||||
// Show message
|
// Show message
|
||||||
$message='';
|
$message='';
|
||||||
$urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',$dolibarr_main_url_root);
|
$urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',$dolibarr_main_url_root);
|
||||||
$urlvcal='<a href="'.DOL_URL_ROOT.'/comm/action/agendaexport.php?format=vcal&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY):'...').'" target="_blank">'.$urlwithouturlroot.DOL_URL_ROOT.'/comm/action/agendaexport.php?format=vcal&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY):'KEYNOTDEFINED').'</a>';
|
$urlvcal='<a href="'.DOL_URL_ROOT.'/public/agenda/agendaexport.php?format=vcal&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY):'...').'" target="_blank">'.$urlwithouturlroot.DOL_URL_ROOT.'/comm/action/agendaexport.php?format=vcal&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY):'KEYNOTDEFINED').'</a>';
|
||||||
$message.=$langs->trans("WebCalUrlForVCalExport",'vcal',$urlvcal);
|
$message.=$langs->trans("WebCalUrlForVCalExport",'vcal',$urlvcal);
|
||||||
$message.='<br>';
|
$message.='<br>';
|
||||||
$urlical='<a href="'.DOL_URL_ROOT.'/comm/action/agendaexport.php?format=ical&type=event&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY):'...').'" target="_blank">'.$urlwithouturlroot.DOL_URL_ROOT.'/comm/action/agendaexport.php?format=ical&type=event&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY):'KEYNOTDEFINED').'</a>';
|
$urlical='<a href="'.DOL_URL_ROOT.'/public/agenda/agendaexport.php?format=ical&type=event&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY):'...').'" target="_blank">'.$urlwithouturlroot.DOL_URL_ROOT.'/comm/action/agendaexport.php?format=ical&type=event&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY):'KEYNOTDEFINED').'</a>';
|
||||||
$message.=$langs->trans("WebCalUrlForVCalExport",'ical',$urlical);
|
$message.=$langs->trans("WebCalUrlForVCalExport",'ical',$urlical);
|
||||||
$message.='<br>';
|
$message.='<br>';
|
||||||
$urlrss='<a href="'.DOL_URL_ROOT.'/comm/action/agendaexport.php?format=rss&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY):'...').'" target="_blank">'.$urlwithouturlroot.DOL_URL_ROOT.'/comm/action/agendaexport.php?format=rss&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY):'KEYNOTDEFINED').'</a>';
|
$urlrss='<a href="'.DOL_URL_ROOT.'/public/agenda/agendaexport.php?format=rss&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY):'...').'" target="_blank">'.$urlwithouturlroot.DOL_URL_ROOT.'/comm/action/agendaexport.php?format=rss&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY):'KEYNOTDEFINED').'</a>';
|
||||||
$message.=$langs->trans("WebCalUrlForVCalExport",'rss',$urlrss);
|
$message.=$langs->trans("WebCalUrlForVCalExport",'rss',$urlrss);
|
||||||
$message.='<br>';
|
$message.='<br>';
|
||||||
$message.='<br>';
|
$message.='<br>';
|
||||||
|
|||||||
@ -261,7 +261,7 @@ function build_rssfile($format='rss',$title,$desc,$events_array,$outputfile,$fil
|
|||||||
|
|
||||||
$url=$dolibarr_main_url_root;
|
$url=$dolibarr_main_url_root;
|
||||||
if (! preg_match('/\/$/',$url)) $url.='/';
|
if (! preg_match('/\/$/',$url)) $url.='/';
|
||||||
$url.='comm/action/agendaexport.php?format=rss&exportkey='.urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY);
|
$url.='public/agenda/agendaexport.php?format=rss&exportkey='.urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY);
|
||||||
$html.='<link><![CDATA['.$url.']]></link>'."\n";
|
$html.='<link><![CDATA['.$url.']]></link>'."\n";
|
||||||
// '<managingEditor>editor@example.com</managingEditor>'."\n"
|
// '<managingEditor>editor@example.com</managingEditor>'."\n"
|
||||||
// '<webMaster>webmaster@example.com</webMaster>'."\n"
|
// '<webMaster>webmaster@example.com</webMaster>'."\n"
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2008-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -16,12 +16,12 @@
|
|||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** \file htdocs/comm/action/agendaexport.php
|
/** \file htdocs/public/agenda/agendaexport.php
|
||||||
\ingroup agenda
|
* \ingroup agenda
|
||||||
\brief Page export agenda
|
* \brief Page to export agenda
|
||||||
http://127.0.0.1/dolibarr/comm/action/agendaexport.php?format=rss&exportkey=cle&filter=mine
|
* http://127.0.0.1/dolibarr/public/agenda/agendaexport.php?format=rss&exportkey=cle&filter=mine
|
||||||
\version $Id$
|
* \version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// This is to make Dolibarr working with Plesk
|
// This is to make Dolibarr working with Plesk
|
||||||
set_include_path($_SERVER['DOCUMENT_ROOT'].'/htdocs');
|
set_include_path($_SERVER['DOCUMENT_ROOT'].'/htdocs');
|
||||||
@ -1,5 +1,5 @@
|
|||||||
User-agent: *
|
User-agent: *
|
||||||
Allow: /comm/action/agendaexport.php
|
Allow: /public/agenda/agendaexport.php
|
||||||
Allow: /public/demo/
|
Allow: /public/demo/
|
||||||
Allow: /index.php
|
Allow: /index.php
|
||||||
Disallow: /
|
Disallow: /
|
||||||
Loading…
Reference in New Issue
Block a user