Merge pull request #11037 from frederic34/patch-2
Update myobject_list.php
This commit is contained in:
commit
7ed50fa84c
@ -2496,7 +2496,7 @@ function autoOrManual($automaticmanual, $case = 1, $color = 0)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert links to local wrapper to medias files into a string into a public external URL readable on internet
|
* Convert links to local wrapper to medias files into a string into a public external URL readable on internet
|
||||||
*
|
*
|
||||||
* @param string $notetoshow Text to convert
|
* @param string $notetoshow Text to convert
|
||||||
* @return string String
|
* @return string String
|
||||||
*/
|
*/
|
||||||
@ -2504,7 +2504,7 @@ function convertBackOfficeMediasLinksToPublicLinks($notetoshow)
|
|||||||
{
|
{
|
||||||
global $dolibarr_main_url_root;
|
global $dolibarr_main_url_root;
|
||||||
// Define $urlwithroot
|
// Define $urlwithroot
|
||||||
$urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i', '', trim($dolibarr_main_url_root));
|
$urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root));
|
||||||
$urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
|
$urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
|
||||||
//$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current
|
//$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current
|
||||||
$notetoshow=preg_replace('/src="[a-zA-Z0-9_\/\-\.]*(viewimage\.php\?modulepart=medias[^"]*)"/', 'src="'.$urlwithroot.'/\1"', $notetoshow);
|
$notetoshow=preg_replace('/src="[a-zA-Z0-9_\/\-\.]*(viewimage\.php\?modulepart=medias[^"]*)"/', 'src="'.$urlwithroot.'/\1"', $notetoshow);
|
||||||
|
|||||||
@ -59,7 +59,12 @@ if (! $res) die("Include of main fails");
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||||
dol_include_once('/mymodule/class/myobject.class.php');
|
|
||||||
|
// load mymodule libraries
|
||||||
|
require_once __DIR__ . '/class/myobject.class.php';
|
||||||
|
|
||||||
|
// for other modules
|
||||||
|
//dol_include_once('/othermodule/class/otherobject.class.php');
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("mymodule@mymodule","other"));
|
$langs->loadLangs(array("mymodule@mymodule","other"));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user