Debug module website

This commit is contained in:
Laurent Destailleur 2017-07-09 22:30:19 +02:00
parent a92effa622
commit fd89535037
4 changed files with 8 additions and 15 deletions

View File

@ -63,9 +63,6 @@ $pagenext = $page + 1;
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('admin'));
// This page is a generic page to edit dictionaries
// Put here declaration of dictionaries properties
// Name of SQL tables of dictionaries
$tabname=array();
$tabname[1] = MAIN_DB_PREFIX."website";
@ -341,7 +338,7 @@ if ($action == 'delete')
//var_dump($elementList);
/*
* Show a dictionary
* Show website list
*/
if ($id)
{
@ -447,8 +444,7 @@ if ($id)
// List of available values in database
dol_syslog("htdocs/admin/dict", LOG_DEBUG);
// List of websites in database
$resql=$db->query($sql);
if ($resql)
{
@ -465,14 +461,6 @@ if ($id)
print '<table class="noborder" width="100%">';
// There is several pages
if ($num > $listlimit)
{
print '<tr class="none"><td align="right" colspan="'.(3+count($fieldlist)).'">';
print_fleche_navigation($page, $_SERVER["PHP_SELF"], '', ($num > $listlimit), '<li class="pagination"><span>'.$langs->trans("Page").' '.($page+1).'</span></li>');
print '</td></tr>';
}
// Title of lines
print '<tr class="liste_titre">';
foreach ($fieldlist as $field => $value)

View File

@ -15,6 +15,7 @@ CKEDITOR.editorConfig = function( config )
//config.height = '300px';
//config.resize_dir = 'vertical'; // horizontal, vertical, both
config.removePlugins = 'elementspath,save'; // config.removePlugins = 'elementspath,save,font';
//config.extraPlugins = 'docprops,scayt,showprotected';
config.removeDialogTabs = 'flash:advanced'; // config.removeDialogTabs = 'flash:advanced;image:Link';
config.protectedSource.push( /<\?[\s\S]*?\?>/g ); // Prevent PHP Code to be formatted
//config.menu_groups = 'clipboard,table,anchor,link,image'; // for context menu 'clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea'

View File

@ -15,6 +15,7 @@ CKEDITOR.editorConfig = function( config )
//config.height = '300px';
//config.resize_dir = 'vertical'; // horizontal, vertical, both
config.removePlugins = 'elementspath,save'; // config.removePlugins = 'elementspath,save,font';
//config.extraPlugins = 'docprops,scayt,showprotected';
config.removeDialogTabs = 'flash:advanced'; // config.removeDialogTabs = 'flash:advanced;image:Link';
config.protectedSource.push( /<\?[\s\S]*?\?>/g ); // Prevent PHP Code to be formatted
//config.menu_groups = 'clipboard,table,anchor,link,image'; // for context menu 'clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea'

View File

@ -1090,7 +1090,10 @@ if ($action == 'preview')
$out.=$csscontent;
$out.='</style>'."\n";
$out.=$objectpage->content."\n";
// Replace php code
$content = preg_replace('/<\?php.*\?>/ims', '<span style="background: #ddd; border: 1px solid #ccc; border-radius: 4px;">...php...</span>', $objectpage->content);
$out.=$content."\n";
$out.='</div>';