mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fix phpcs
This commit is contained in:
parent
31157931a9
commit
c0821a8ed6
|
|
@ -704,7 +704,7 @@ class BookKeeping extends CommonObject
|
|||
$sql .= ' WHERE 1 = 1';
|
||||
$sql .= " AND entity IN (".getEntity('accountancy').")";
|
||||
if (null !== $ref) {
|
||||
$sql .= ' AND t.ref = '.'\''.$ref.'\'';
|
||||
$sql .= " AND t.ref = '".$this->db->escape($ref)."'";
|
||||
} else {
|
||||
$sql .= ' AND t.rowid = '.$id;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -325,6 +325,22 @@ if ($conf->use_javascript_ajax)
|
|||
if (!empty($menu['langs'])) $langs->load($menu['langs']);
|
||||
$titre = $langs->trans($menu['titre']);
|
||||
|
||||
$entry = '<table class="nobordernopadding centpercent"><tr><td>';
|
||||
$entry .= '<strong> <a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=edit&menuId='.$menu['rowid'].'">'.$titre.'</a></strong>';
|
||||
$entry .= '</td><td class="right">';
|
||||
$entry .= '<a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=edit&menuId='.$menu['rowid'].'">'.img_edit('default', 0, 'class="menuEdit" id="edit'.$menu['rowid'].'"').'</a> ';
|
||||
$entry .= '<a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=create&menuId='.$menu['rowid'].'">'.img_edit_add('default').'</a> ';
|
||||
$entry .= '<a href="index.php?menu_handler='.$menu_handler_to_search.'&action=delete&menuId='.$menu['rowid'].'">'.img_delete('default').'</a> ';
|
||||
$entry .= ' ';
|
||||
$entry .= '<a href="index.php?menu_handler='.$menu_handler_to_search.'&action=up&menuId='.$menu['rowid'].'">'.img_picto("Up", "1uparrow").'</a><a href="index.php?menu_handler='.$menu_handler_to_search.'&action=down&menuId='.$menu['rowid'].'">'.img_picto("Down", "1downarrow").'</a>';
|
||||
$entry .= '</td></tr></table>';
|
||||
|
||||
$buttons = '<a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=edit&menuId='.$menu['rowid'].'">'.img_edit('default', 0, 'class="menuEdit" id="edit'.$menu['rowid'].'"').'</a> ';
|
||||
$buttons .= '<a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=create&menuId='.$menu['rowid'].'">'.img_edit_add('default').'</a> ';
|
||||
$buttons .= '<a href="index.php?menu_handler='.$menu_handler_to_search.'&action=delete&menuId='.$menu['rowid'].'">'.img_delete('default').'</a> ';
|
||||
$buttons .= ' ';
|
||||
$buttons .= '<a href="index.php?menu_handler='.$menu_handler_to_search.'&action=up&menuId='.$menu['rowid'].'">'.img_picto("Up", "1uparrow").'</a><a href="index.php?menu_handler='.$menu_handler_to_search.'&action=down&menuId='.$menu['rowid'].'">'.img_picto("Down", "1downarrow").'</a>';
|
||||
|
||||
$data[] = array(
|
||||
'rowid'=>$menu['rowid'],
|
||||
'module'=>$menu['module'],
|
||||
|
|
@ -335,20 +351,8 @@ if ($conf->use_javascript_ajax)
|
|||
'fk_mainmenu'=>$menu['fk_mainmenu'],
|
||||
'fk_leftmenu'=>$menu['fk_leftmenu'],
|
||||
'position'=>$menu['position'],
|
||||
'entry'=>'<table class="nobordernopadding centpercent"><tr><td>'.
|
||||
'<strong> <a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=edit&menuId='.$menu['rowid'].'">'.$titre.'</a></strong>'.
|
||||
'</td><td class="right">'.
|
||||
'<a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=edit&menuId='.$menu['rowid'].'">'.img_edit('default', 0, 'class="menuEdit" id="edit'.$menu['rowid'].'"').'</a> '.
|
||||
'<a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=create&menuId='.$menu['rowid'].'">'.img_edit_add('default').'</a> '.
|
||||
'<a href="index.php?menu_handler='.$menu_handler_to_search.'&action=delete&menuId='.$menu['rowid'].'">'.img_delete('default').'</a> '.
|
||||
' '.
|
||||
'<a href="index.php?menu_handler='.$menu_handler_to_search.'&action=up&menuId='.$menu['rowid'].'">'.img_picto("Up", "1uparrow").'</a><a href="index.php?menu_handler='.$menu_handler_to_search.'&action=down&menuId='.$menu['rowid'].'">'.img_picto("Down", "1downarrow").'</a>'.
|
||||
'</td></tr></table>',
|
||||
'buttons'=>'<a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=edit&menuId='.$menu['rowid'].'">'.img_edit('default', 0, 'class="menuEdit" id="edit'.$menu['rowid'].'"').'</a> '.
|
||||
'<a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=create&menuId='.$menu['rowid'].'">'.img_edit_add('default').'</a> '.
|
||||
'<a href="index.php?menu_handler='.$menu_handler_to_search.'&action=delete&menuId='.$menu['rowid'].'">'.img_delete('default').'</a> '.
|
||||
' '.
|
||||
'<a href="index.php?menu_handler='.$menu_handler_to_search.'&action=up&menuId='.$menu['rowid'].'">'.img_picto("Up", "1uparrow").'</a><a href="index.php?menu_handler='.$menu_handler_to_search.'&action=down&menuId='.$menu['rowid'].'">'.img_picto("Down", "1downarrow").'</a>'
|
||||
'entry'=>$entry,
|
||||
'buttons'=>$buttons
|
||||
);
|
||||
$i++;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -265,7 +265,7 @@ print '<td>'.$langs->trans("Code").'</td>';
|
|||
print '<td>'.$langs->trans("Label").'</td>';
|
||||
print '<td>'.$langs->trans("FixedEmailTarget").'</td>';
|
||||
print '<td>'.$langs->trans("Threshold").'</td>';
|
||||
print '<td>'.'</td>';
|
||||
print '<td></td>';
|
||||
print "</tr>\n";
|
||||
|
||||
foreach ($listofnotifiedevents as $notifiedevent)
|
||||
|
|
|
|||
|
|
@ -486,9 +486,9 @@ if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) {
|
|||
} elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'date') || ($extrafields->attributes[$elementtype]['type'][$key] == 'datetime')) {
|
||||
print '<table class="nobordernopadding"><tr>';
|
||||
print '<td>'.$langs->trans("AdvTgtStartDt").'</td><td>';
|
||||
print $form->selectDate('', 'options_'.$key.'_st_dt'.'_cnct');
|
||||
print $form->selectDate('', 'options_'.$key.'_st_dt_cnct');
|
||||
print '</td><td>'.$langs->trans("AdvTgtEndDt").'</td><td>';
|
||||
print $form->selectDate('', 'options_'.$key.'_end_dt'.'_cnct');
|
||||
print $form->selectDate('', 'options_'.$key.'_end_dt_cnct');
|
||||
print '</td></tr></table>';
|
||||
print '</td><td>'."\n";
|
||||
print $form->textwithpicto('', $langs->trans("AdvTgtSearchDtHelp"), 1, 'help');
|
||||
|
|
|
|||
|
|
@ -2278,7 +2278,7 @@ elseif ($id || $ref)
|
|||
{
|
||||
print '<tr>';
|
||||
// Qty to ship or shipped
|
||||
print '<td>'.'<input name="qtyl'.$detail_batch->fk_expeditiondet.'_'.$detail_batch->id.'" id="qtyl'.$line_id.'_'.$detail_batch->id.'" type="text" size="4" value="'.$detail_batch->qty.'">'.'</td>';
|
||||
print '<td><input name="qtyl'.$detail_batch->fk_expeditiondet.'_'.$detail_batch->id.'" id="qtyl'.$line_id.'_'.$detail_batch->id.'" type="text" size="4" value="'.$detail_batch->qty.'"></td>';
|
||||
// Batch number managment
|
||||
if ($lines[$i]->entrepot_id == 0)
|
||||
{
|
||||
|
|
@ -2291,7 +2291,7 @@ elseif ($id || $ref)
|
|||
// add a 0 qty lot row to be able to add a lot
|
||||
print '<tr>';
|
||||
// Qty to ship or shipped
|
||||
print '<td>'.'<input name="qtyl'.$line_id.'_0" id="qtyl'.$line_id.'_0" type="text" size="4" value="0">'.'</td>';
|
||||
print '<td><input name="qtyl'.$line_id.'_0" id="qtyl'.$line_id.'_0" type="text" size="4" value="0"></td>';
|
||||
// Batch number managment
|
||||
print '<td>'.$formproduct->selectLotStock('', 'batchl'.$line_id.'_0', '', 1, 0, $lines[$i]->fk_product).'</td>';
|
||||
print '</tr>';
|
||||
|
|
@ -2305,7 +2305,7 @@ elseif ($id || $ref)
|
|||
print '<!-- case edit 2 -->';
|
||||
print '<tr>';
|
||||
// Qty to ship or shipped
|
||||
print '<td>'.'<input name="qtyl'.$line_id.'" id="qtyl'.$line_id.'" type="text" size="4" value="'.$lines[$i]->qty_shipped.'">'.'</td>';
|
||||
print '<td><input name="qtyl'.$line_id.'" id="qtyl'.$line_id.'" type="text" size="4" value="'.$lines[$i]->qty_shipped.'"></td>';
|
||||
// Warehouse source
|
||||
print '<td>'.$formproduct->selectWarehouses($lines[$i]->entrepot_id, 'entl'.$line_id, '', 1, 0, $lines[$i]->fk_product, '', 1).'</td>';
|
||||
// Batch number managment
|
||||
|
|
@ -2319,7 +2319,7 @@ elseif ($id || $ref)
|
|||
{
|
||||
print '<tr>';
|
||||
// Qty to ship or shipped
|
||||
print '<td>'.'<input name="qtyl'.$detail_entrepot->line_id.'" id="qtyl'.$detail_entrepot->line_id.'" type="text" size="4" value="'.$detail_entrepot->qty_shipped.'">'.'</td>';
|
||||
print '<td><input name="qtyl'.$detail_entrepot->line_id.'" id="qtyl'.$detail_entrepot->line_id.'" type="text" size="4" value="'.$detail_entrepot->qty_shipped.'"></td>';
|
||||
// Warehouse source
|
||||
print '<td>'.$formproduct->selectWarehouses($detail_entrepot->entrepot_id, 'entl'.$detail_entrepot->line_id, '', 1, 0, $lines[$i]->fk_product, '', 1).'</td>';
|
||||
// Batch number managment
|
||||
|
|
@ -2338,11 +2338,11 @@ elseif ($id || $ref)
|
|||
print '<!-- case edit 5 -->';
|
||||
print '<tr>';
|
||||
// Qty to ship or shipped
|
||||
print '<td>'.'<input name="qtyl'.$line_id.'" id="qtyl'.$line_id.'" type="text" size="4" value="'.$lines[$i]->qty_shipped.'">'.'</td>';
|
||||
print '<td><input name="qtyl'.$line_id.'" id="qtyl'.$line_id.'" type="text" size="4" value="'.$lines[$i]->qty_shipped.'"></td>';
|
||||
// Warehouse source
|
||||
print '<td>'.'</td>';
|
||||
print '<td></td>';
|
||||
// Batch number managment
|
||||
print '<td>'.'</td>';
|
||||
print '<td></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1263,7 +1263,7 @@ if ($action == 'updatecss')
|
|||
|
||||
$jscontent .= "<?php // BEGIN PHP\n";
|
||||
$jscontent .= '$websitekey=basename(__DIR__);'."\n";
|
||||
$jscontent .= "if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) { require_once __DIR__.'/master.inc.php'; } // Load env if not already loaded"."\n"; // For the css, we need to set path of master using the dirname of css file.
|
||||
$jscontent .= "if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) { require_once __DIR__.'/master.inc.php'; } // Load env if not already loaded\n"; // For the css, we need to set path of master using the dirname of css file.
|
||||
$jscontent .= "require_once DOL_DOCUMENT_ROOT.'/core/lib/website.lib.php';\n";
|
||||
$jscontent .= "require_once DOL_DOCUMENT_ROOT.'/core/website.inc.php';\n";
|
||||
$jscontent .= "ob_start();\n";
|
||||
|
|
@ -1275,7 +1275,7 @@ if ($action == 'updatecss')
|
|||
|
||||
$jscontent .= '<?php // BEGIN PHP'."\n";
|
||||
$jscontent .= '$tmp = ob_get_contents(); ob_end_clean(); dolWebsiteOutput($tmp, "js");'."\n";
|
||||
$jscontent .= "// END PHP ?>"."\n";
|
||||
$jscontent .= "// END PHP ?>\n";
|
||||
|
||||
$result = dolSaveJsFile($filejs, $jscontent);
|
||||
if (!$result)
|
||||
|
|
@ -1329,7 +1329,7 @@ if ($action == 'updatecss')
|
|||
|
||||
$manifestjsoncontent .= "<?php // BEGIN PHP\n";
|
||||
$manifestjsoncontent .= '$websitekey=basename(__DIR__);'."\n";
|
||||
$manifestjsoncontent .= "if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) { require_once __DIR__.'/master.inc.php'; } // Load env if not already loaded"."\n"; // For the css, we need to set path of master using the dirname of css file.
|
||||
$manifestjsoncontent .= "if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) { require_once __DIR__.'/master.inc.php'; } // Load env if not already loaded\n"; // For the css, we need to set path of master using the dirname of css file.
|
||||
$manifestjsoncontent .= "require_once DOL_DOCUMENT_ROOT.'/core/lib/website.lib.php';\n";
|
||||
$manifestjsoncontent .= "require_once DOL_DOCUMENT_ROOT.'/core/website.inc.php';\n";
|
||||
$manifestjsoncontent .= "ob_start();\n";
|
||||
|
|
@ -1341,7 +1341,7 @@ if ($action == 'updatecss')
|
|||
|
||||
$manifestjsoncontent .= '<?php // BEGIN PHP'."\n";
|
||||
$manifestjsoncontent .= '$tmp = ob_get_contents(); ob_end_clean(); dolWebsiteOutput($tmp, "manifest");'."\n";
|
||||
$manifestjsoncontent .= "// END PHP ?>"."\n";
|
||||
$manifestjsoncontent .= "// END PHP ?>\n";
|
||||
|
||||
$result = dolSaveManifestJson($filemanifestjson, $manifestjsoncontent);
|
||||
if (!$result)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user