From fa97078fe41248fee1c96f157c2d24edc269cf0f Mon Sep 17 00:00:00 2001 From: pezcurrel Date: Sun, 1 Jan 2023 19:26:39 +0100 Subject: [PATCH] Passing calling __LINE__ through getlangsidsarr and getlangsid the right way --- web/clitools/getinstinfo.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/web/clitools/getinstinfo.php b/web/clitools/getinstinfo.php index fc964ab..92ab7bc 100755 --- a/web/clitools/getinstinfo.php +++ b/web/clitools/getinstinfo.php @@ -640,7 +640,7 @@ if ($instanswered && isset($idata['languages']) && is_array($idata['languages']) eecho(1,'«'.$opts['hostname'].'»: declared languages: '.implode(', ',$idata['languages']).N); if (!$opts['dryrun']) { myq($link,'DELETE FROM InstLangs WHERE InstID='.$instid,__LINE__); - $langids=getlangsidsarr($idata['languages'],$link,$opts['hostname'],$opts['dryrun']); + $langids=getlangsidsarr($idata['languages'],$link,$opts['hostname'],$opts['dryrun'],__LINE__); $pos=0; foreach ($langids as $langid) { $pos++; @@ -663,7 +663,7 @@ if ($instanswered && isset($idata['languages']) && is_array($idata['languages']) } if (!$opts['dryrun']) { myq($link,'DELETE FROM InstOurLangs WHERE InstID='.$instid,__LINE__); - $langids=getlangsidsarr($idata['languages'],$link,$opts['hostname'],$opts['dryrun']); + $langids=getlangsidsarr($idata['languages'],$link,$opts['hostname'],$opts['dryrun'],__LINE__); $pos=0; foreach ($idata['ourlanguages'] as $lang) { $pos++; @@ -1245,10 +1245,10 @@ function getlangid(&$link,$lang,$hostname,$dryrun,$line) { return($langid); } -function getlangsidsarr(&$langs,&$link,$hostname,$dryrun) { +function getlangsidsarr(&$langs,&$link,$hostname,$dryrun,$line) { $langids=[]; foreach ($langs as $lang) { - $langid=getlangid($link,$lang,$hostname,$dryrun,__LINE__); + $langid=getlangid($link,$lang,$hostname,$dryrun,$line); $langids[]=$langid; } $langids=array_unique($langids);