Passing calling __LINE__ through getlangsidsarr and getlangsid the right way
This commit is contained in:
parent
87fbbbd2f9
commit
fa97078fe4
1 changed files with 4 additions and 4 deletions
|
@ -640,7 +640,7 @@ if ($instanswered && isset($idata['languages']) && is_array($idata['languages'])
|
||||||
eecho(1,'«'.$opts['hostname'].'»: declared languages: '.implode(', ',$idata['languages']).N);
|
eecho(1,'«'.$opts['hostname'].'»: declared languages: '.implode(', ',$idata['languages']).N);
|
||||||
if (!$opts['dryrun']) {
|
if (!$opts['dryrun']) {
|
||||||
myq($link,'DELETE FROM InstLangs WHERE InstID='.$instid,__LINE__);
|
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;
|
$pos=0;
|
||||||
foreach ($langids as $langid) {
|
foreach ($langids as $langid) {
|
||||||
$pos++;
|
$pos++;
|
||||||
|
@ -663,7 +663,7 @@ if ($instanswered && isset($idata['languages']) && is_array($idata['languages'])
|
||||||
}
|
}
|
||||||
if (!$opts['dryrun']) {
|
if (!$opts['dryrun']) {
|
||||||
myq($link,'DELETE FROM InstOurLangs WHERE InstID='.$instid,__LINE__);
|
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;
|
$pos=0;
|
||||||
foreach ($idata['ourlanguages'] as $lang) {
|
foreach ($idata['ourlanguages'] as $lang) {
|
||||||
$pos++;
|
$pos++;
|
||||||
|
@ -1245,10 +1245,10 @@ function getlangid(&$link,$lang,$hostname,$dryrun,$line) {
|
||||||
return($langid);
|
return($langid);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getlangsidsarr(&$langs,&$link,$hostname,$dryrun) {
|
function getlangsidsarr(&$langs,&$link,$hostname,$dryrun,$line) {
|
||||||
$langids=[];
|
$langids=[];
|
||||||
foreach ($langs as $lang) {
|
foreach ($langs as $lang) {
|
||||||
$langid=getlangid($link,$lang,$hostname,$dryrun,__LINE__);
|
$langid=getlangid($link,$lang,$hostname,$dryrun,$line);
|
||||||
$langids[]=$langid;
|
$langids[]=$langid;
|
||||||
}
|
}
|
||||||
$langids=array_unique($langids);
|
$langids=array_unique($langids);
|
||||||
|
|
Loading…
Reference in a new issue