Debug website module
This commit is contained in:
parent
4e940ebaf1
commit
ffaff4dc7f
@ -212,6 +212,10 @@ function dolWebsiteOutput($content)
|
|||||||
$content=preg_replace('/(<img[^>]*src=")[^\"]*viewimage\.php([^\"]*)modulepart=medias([^\"]*)file=([^\"]*)("[^>]*>)/', '\1/wrapper.php\2modulepart=medias\3file=\4\5', $content, -1, $nbrep);
|
$content=preg_replace('/(<img[^>]*src=")[^\"]*viewimage\.php([^\"]*)modulepart=medias([^\"]*)file=([^\"]*)("[^>]*>)/', '\1/wrapper.php\2modulepart=medias\3file=\4\5', $content, -1, $nbrep);
|
||||||
$content=preg_replace('/(url\(["\']?)[^\)]*viewimage\.php([^\)]*)modulepart=medias([^\)]*)file=([^\)]*)(["\']?\))/', '\1/wrapper.php\2modulepart=medias\3file=\4\5', $content, -1, $nbrep);
|
$content=preg_replace('/(url\(["\']?)[^\)]*viewimage\.php([^\)]*)modulepart=medias([^\)]*)file=([^\)]*)(["\']?\))/', '\1/wrapper.php\2modulepart=medias\3file=\4\5', $content, -1, $nbrep);
|
||||||
|
|
||||||
|
$content=preg_replace('/(<a[^>]*href=")[^\"]*viewimage\.php([^\"]*)hashp=([^\"]*)("[^>]*>)/', '\1/wrapper.php\2hashp=\3\4', $content, -1, $nbrep);
|
||||||
|
$content=preg_replace('/(<img[^>]*src=")[^\"]*viewimage\.php([^\"]*)hashp=([^\"]*)("[^>]*>)/', '\1/wrapper.php\2hashp=\3\4', $content, -1, $nbrep);
|
||||||
|
$content=preg_replace('/(url\(["\']?)[^\)]*viewimage\.php([^\)]*)hashp=([^\)]*)(["\']?\))/', '\1/wrapper.php\2hashp\3\4', $content, -1, $nbrep);
|
||||||
|
|
||||||
$content=preg_replace('/(<img[^>]*src=")[^\"]*viewimage\.php([^\"]*)modulepart=mycompany([^\"]*)file=([^\"]*)("[^>]*>)/', '\1/wrapper.php\2modulepart=mycompany\3file=\4\5', $content, -1, $nbrep);
|
$content=preg_replace('/(<img[^>]*src=")[^\"]*viewimage\.php([^\"]*)modulepart=mycompany([^\"]*)file=([^\"]*)("[^>]*>)/', '\1/wrapper.php\2modulepart=mycompany\3file=\4\5', $content, -1, $nbrep);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -222,6 +226,10 @@ function dolWebsiteOutput($content)
|
|||||||
$content=preg_replace('/(<img[^>]*src=")[^\"]*viewimage\.php([^\"]*)modulepart=medias([^\"]*)file=([^\"]*)("[^>]*>)/', '\1medias/\4\5', $content, -1, $nbrep);
|
$content=preg_replace('/(<img[^>]*src=")[^\"]*viewimage\.php([^\"]*)modulepart=medias([^\"]*)file=([^\"]*)("[^>]*>)/', '\1medias/\4\5', $content, -1, $nbrep);
|
||||||
$content=preg_replace('/(url\(["\']?)[^\)]*viewimage\.php([^\)]*)modulepart=medias([^\)]*)file=([^\)]*)(["\']?\))/', '\1medias/\4\5', $content, -1, $nbrep);
|
$content=preg_replace('/(url\(["\']?)[^\)]*viewimage\.php([^\)]*)modulepart=medias([^\)]*)file=([^\)]*)(["\']?\))/', '\1medias/\4\5', $content, -1, $nbrep);
|
||||||
|
|
||||||
|
$content=preg_replace('/(<a[^>]*href=")[^\"]*viewimage\.php([^\"]*)hashp=([^\"]*)("[^>]*>)/', '\1/wrapper.php\2hashp=\3\4', $content, -1, $nbrep);
|
||||||
|
$content=preg_replace('/(<img[^>]*src=")[^\"]*viewimage\.php([^\"]*)hashp=([^\"]*)("[^>]*>)/', '\1/wrapper.php\2hashp=\3\4', $content, -1, $nbrep);
|
||||||
|
$content=preg_replace('/(url\(["\']?)[^\)]*viewimage\.php([^\)]*)hashp=([^\)]*)(["\']?\))/', '\1/wrapper.php\2hashp=\3\4', $content, -1, $nbrep);
|
||||||
|
|
||||||
$content=preg_replace('/(<img[^>]*src=")[^\"]*viewimage\.php([^\"]*)modulepart=mycompany([^\"]*)file=([^\"]*)("[^>]*>)/', '\1/wrapper.php\2modulepart=mycompany\3file=\4\5', $content, -1, $nbrep);
|
$content=preg_replace('/(<img[^>]*src=")[^\"]*viewimage\.php([^\"]*)modulepart=mycompany([^\"]*)file=([^\"]*)("[^>]*>)/', '\1/wrapper.php\2modulepart=mycompany\3file=\4\5', $content, -1, $nbrep);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
@ -93,3 +93,4 @@ ShowSubcontainers=Include dynamic content
|
|||||||
InternalURLOfPage=Internal URL of page
|
InternalURLOfPage=Internal URL of page
|
||||||
ThisPageIsTranslationOf=This page/container is translation of
|
ThisPageIsTranslationOf=This page/container is translation of
|
||||||
ThisPageHasTranslationPages=This page/container has translation
|
ThisPageHasTranslationPages=This page/container has translation
|
||||||
|
NoWebSiteCreateOneFirst=No website created yet. Create on first.
|
||||||
@ -1472,8 +1472,15 @@ if (($action == 'updatesource' || $action == 'updatecontent' || $action == 'conf
|
|||||||
{
|
{
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
setEventMessages($langs->trans("NoPageYet"), null, 'warnings');
|
if (empty($websitekey) || $websitekey == '-1')
|
||||||
setEventMessages($langs->trans("YouCanCreatePageOrImportTemplate"), null, 'warnings');
|
{
|
||||||
|
setEventMessages($langs->trans("NoWebSiteCreateOneFirst"), null, 'warnings');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setEventMessages($langs->trans("NoPageYet"), null, 'warnings');
|
||||||
|
setEventMessages($langs->trans("YouCanCreatePageOrImportTemplate"), null, 'warnings');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1666,11 +1673,10 @@ if ($action != 'preview' && $action != 'editcontent' && $action != 'editsource')
|
|||||||
|
|
||||||
if (! GETPOST('hide_websitemenu'))
|
if (! GETPOST('hide_websitemenu'))
|
||||||
{
|
{
|
||||||
//var_dump($objectpage);exit;
|
//var_dump($objectpage);exit;
|
||||||
print '<div class="centpercent websitebar">';
|
print '<div class="centpercent websitebar">';
|
||||||
|
|
||||||
|
|
||||||
if (count($object->records) > 0) // There is at least one web site
|
|
||||||
{
|
|
||||||
// ***** Part for web sites
|
// ***** Part for web sites
|
||||||
print '<!-- Bar for website -->';
|
print '<!-- Bar for website -->';
|
||||||
print '<div class="websiteselection hideonsmartphoneimp minwidth100 tdoverflowmax100">';
|
print '<div class="websiteselection hideonsmartphoneimp minwidth100 tdoverflowmax100">';
|
||||||
@ -1713,12 +1719,15 @@ if (count($object->records) > 0) // There is at least one web site
|
|||||||
if (! empty($object->virtualhost)) $virtualurl=$object->virtualhost;
|
if (! empty($object->virtualhost)) $virtualurl=$object->virtualhost;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$array=array();
|
||||||
$array=$objectpage->fetchAll($object->id, 'ASC,ASC', 'type_container,pageurl');
|
if ($object->id > 0)
|
||||||
|
{
|
||||||
|
$array=$objectpage->fetchAll($object->id, 'ASC,ASC', 'type_container,pageurl');
|
||||||
|
}
|
||||||
if (! is_array($array) && $array < 0) dol_print_error('', $objectpage->error, $objectpage->errors);
|
if (! is_array($array) && $array < 0) dol_print_error('', $objectpage->error, $objectpage->errors);
|
||||||
$atleastonepage=(is_array($array) && count($array) > 0);
|
$atleastonepage=(is_array($array) && count($array) > 0);
|
||||||
|
|
||||||
if ($websitekey && ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone'))
|
if ($websitekey && $websitekey != '-1' && ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone'))
|
||||||
{
|
{
|
||||||
$disabled='';
|
$disabled='';
|
||||||
if (empty($user->rights->website->write)) $disabled=' disabled="disabled"';
|
if (empty($user->rights->website->write)) $disabled=' disabled="disabled"';
|
||||||
@ -1828,7 +1837,7 @@ if (count($object->records) > 0) // There is at least one web site
|
|||||||
|
|
||||||
// Toolbar for pages
|
// Toolbar for pages
|
||||||
|
|
||||||
if ($websitekey && ! in_array($action, array('editcss','editmenu','importsite')))
|
if ($websitekey && $websitekey != '-1' && ! in_array($action, array('editcss','editmenu','importsite')))
|
||||||
{
|
{
|
||||||
print '</div>'; // Close current websitebar to open a new one
|
print '</div>'; // Close current websitebar to open a new one
|
||||||
|
|
||||||
@ -2125,17 +2134,8 @@ if (count($object->records) > 0) // There is at least one web site
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<div class="websiteselection">';
|
|
||||||
$langs->load("errors");
|
|
||||||
print $langs->trans("ErrorModuleSetupNotComplete");
|
|
||||||
print '<div>';
|
|
||||||
$action='';
|
|
||||||
}
|
|
||||||
|
|
||||||
print '</div>'; // end current websitebar
|
print '</div>'; // end current websitebar
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2743,7 +2743,8 @@ if ($action == 'editsource')
|
|||||||
$doleditor->Create(0, '', false);
|
$doleditor->Create(0, '', false);
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
print "</div>\n</form>\n";
|
print "</div>\n";
|
||||||
|
print "</form>\n";
|
||||||
|
|
||||||
|
|
||||||
if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone')
|
if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone')
|
||||||
@ -2874,8 +2875,16 @@ if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpa
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<br><br><div class="center">'.$langs->trans("PreviewOfSiteNotYetAvailable", $object->ref).'</center><br><br><br>';
|
if (empty($websitekey) || $websitekey == '-1')
|
||||||
print '<div class="center"><div class="logo_setup"></div></div>';
|
{
|
||||||
|
print '<br><br><div class="center">'.$langs->trans("NoWebSiteCreateOneFirst").'</center><br><br><br>';
|
||||||
|
print '<div class="center"><div class="logo_setup"></div></div>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<br><br><div class="center">'.$langs->trans("PreviewOfSiteNotYetAvailable", $object->ref).'</center><br><br><br>';
|
||||||
|
print '<div class="center"><div class="logo_setup"></div></div>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user