diff --git a/htdocs/core/lib/website.lib.php b/htdocs/core/lib/website.lib.php index ce7c7c0143691..092ded571114c 100644 --- a/htdocs/core/lib/website.lib.php +++ b/htdocs/core/lib/website.lib.php @@ -103,12 +103,13 @@ function dolWebsiteOutput($content) $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 - // Note: This seems never called when page is output inside the website editor (search 'REPLACEMENT OF LINKS When page called by website editor') - if (defined('USEDOLIBARREDITOR')) + if (defined('USEDOLIBARREDITOR')) // REPLACEMENT OF LINKS When page called from Dolibarr editor { - // Do nothing + // We remove the
part of content + $content = preg_replace('/.*<\/head>/ims', '', $content); + } - elseif (defined('USEDOLIBARRSERVER') || defined('USEDOLIBARREDITOR')) // REPLACEMENT OF LINKS When page called from Dolibarr server + elseif (defined('USEDOLIBARRSERVER')) // REPLACEMENT OF LINKS When page called from Dolibarr server { global $website; @@ -142,7 +143,7 @@ function dolWebsiteOutput($content) // action="newpage.php" => action="dolibarr/website/index.php?website=...&pageref=newpage $content = preg_replace('/(action=")\/?([^:\"]*)(\.php\")/', '\1'.DOL_URL_ROOT.'/public/website/index.php?website='.$website->ref.'&pageref=\2"', $content, -1, $nbrep); } - else // REPLACEMENT OF LINKS When page called from virtual host + else // REPLACEMENT OF LINKS When page called from virtual host { $symlinktomediaexists=1; diff --git a/htdocs/install/mysql/migration/8.0.0-9.0.0.sql b/htdocs/install/mysql/migration/8.0.0-9.0.0.sql index bc28ad44aa12b..c52cd90dc1771 100644 --- a/htdocs/install/mysql/migration/8.0.0-9.0.0.sql +++ b/htdocs/install/mysql/migration/8.0.0-9.0.0.sql @@ -74,3 +74,7 @@ ALTER TABLE llx_societe ADD COLUMN twitter varchar(255) after skype; ALTER TABLE llx_societe ADD COLUMN facebook varchar(255) after skype; ALTER TABLE llx_socpeople ADD COLUMN twitter varchar(255) after skype; ALTER TABLE llx_socpeople ADD COLUMN facebook varchar(255) after skype; + + +ALTER TABLE llx_website CHANGE COLUMN fk_user_create fk_user_creat integer; +ALTER TABLE llx_website_page CHANGE COLUMN fk_user_create fk_user_creat integer; diff --git a/htdocs/install/mysql/tables/llx_website.sql b/htdocs/install/mysql/tables/llx_website.sql index dd35116a91f63..5b6a88c88da68 100644 --- a/htdocs/install/mysql/tables/llx_website.sql +++ b/htdocs/install/mysql/tables/llx_website.sql @@ -27,9 +27,9 @@ CREATE TABLE llx_website status integer DEFAULT 1, fk_default_home integer, virtualhost varchar(255), - fk_user_create integer, - fk_user_modif integer, - date_creation datetime, - tms timestamp, - import_key varchar(14) -- import key + fk_user_creat integer, + fk_user_modif integer, + date_creation datetime, + tms timestamp, + import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_website_page.sql b/htdocs/install/mysql/tables/llx_website_page.sql index c795fa254dc59..3c872f00dacb7 100644 --- a/htdocs/install/mysql/tables/llx_website_page.sql +++ b/htdocs/install/mysql/tables/llx_website_page.sql @@ -32,10 +32,10 @@ CREATE TABLE llx_website_page htmlheader text, content mediumtext, -- text is not enough in size status integer DEFAULT 1, - grabbed_from varchar(255), - fk_user_create integer, - fk_user_modif integer, - date_creation datetime, - tms timestamp, - import_key varchar(14) -- import key + grabbed_from varchar(255), + fk_user_creat integer, + fk_user_modif integer, + date_creation datetime, + tms timestamp, + import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/website/class/website.class.php b/htdocs/website/class/website.class.php index 5852f201f1fa3..70926a2ce5c52 100644 --- a/htdocs/website/class/website.class.php +++ b/htdocs/website/class/website.class.php @@ -1,10 +1,9 @@ +/* Copyright (C) 2007-2018 Laurent Destailleur