Move $selectedlines to parameter

This commit is contained in:
Maxime Kohlhaas 2019-07-27 18:13:44 +02:00
parent 5c2763d0dd
commit 4bd806ea65
2 changed files with 8 additions and 6 deletions

View File

@ -1880,7 +1880,7 @@ if ($action == 'create' && $user->rights->commande->creer)
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
$objectsrc->printOriginLinesList(); $objectsrc->printOriginLinesList('', $selectedLines);
print '</table>'; print '</table>';
} }

View File

@ -4142,9 +4142,10 @@ abstract class CommonObject
* But for the moment we don't know if it's possible, so we keep the method available on overloaded objects. * But for the moment we don't know if it's possible, so we keep the method available on overloaded objects.
* *
* @param string $restrictlist ''=All lines, 'services'=Restrict to services only * @param string $restrictlist ''=All lines, 'services'=Restrict to services only
* @param array $selectedLines Array of lines id for selected lines
* @return void * @return void
*/ */
public function printOriginLinesList($restrictlist = '') public function printOriginLinesList($restrictlist = '', $selectedLines = array())
{ {
global $langs, $hookmanager, $conf, $form; global $langs, $hookmanager, $conf, $form;
@ -4180,7 +4181,7 @@ abstract class CommonObject
} }
else else
{ {
$this->printOriginLine($line, $var, $restrictlist); $this->printOriginLine($line, $var, $restrictlist, '/core/tpl', $selectedLines);
} }
$i++; $i++;
@ -4198,11 +4199,12 @@ abstract class CommonObject
* @param string $var Var * @param string $var Var
* @param string $restrictlist ''=All lines, 'services'=Restrict to services only (strike line if not) * @param string $restrictlist ''=All lines, 'services'=Restrict to services only (strike line if not)
* @param string $defaulttpldir Directory where to find the template * @param string $defaulttpldir Directory where to find the template
* @param array $selectedLines Array of lines id for selected lines
* @return void * @return void
*/ */
public function printOriginLine($line, $var, $restrictlist = '', $defaulttpldir = '/core/tpl') public function printOriginLine($line, $var, $restrictlist = '', $defaulttpldir = '/core/tpl', $selectedLines = array())
{ {
global $langs, $conf, $selectedLines; global $langs, $conf;
//var_dump($line); //var_dump($line);
if (!empty($line->date_start)) if (!empty($line->date_start))
@ -5030,7 +5032,7 @@ abstract class CommonObject
//dol_syslog("attributeLabel=".$attributeLabel, LOG_DEBUG); //dol_syslog("attributeLabel=".$attributeLabel, LOG_DEBUG);
//dol_syslog("attributeType=".$attributeType, LOG_DEBUG); //dol_syslog("attributeType=".$attributeType, LOG_DEBUG);
if (!empty($attrfieldcomputed)) if (!empty($attrfieldcomputed))
{ {
if (!empty($conf->global->MAIN_STORE_COMPUTED_EXTRAFIELDS)) if (!empty($conf->global->MAIN_STORE_COMPUTED_EXTRAFIELDS))