HotFix: Other version not works

This commit is contained in:
José Luis Garrido Labrador
2018-10-21 22:54:34 +02:00
parent cf2882a0f7
commit 584c2ae58f
2 changed files with 7 additions and 3 deletions

View File

@@ -364,9 +364,13 @@ function updateCode(Request $request,$idc,$lang,$version,$user){
$app->get('/code/{lang}-{idc}', function(Request $request, $lang, $idc) use($app){
$user = getUser($app);
$idu=0;
if($user != null){
$idu=$app['data']->loadIDU($user['nick'],'nick');
}
$array = $app['data']->loadOtherVersion($idc,$lang);
$other = otherVersionToArray($array,$app['supported']);
$other = otherVersionToArray($array,$app['supported'],$app['data'],$idu);
$name = $other[0]['name'];
$page = array(

View File

@@ -97,6 +97,6 @@ function savedToArray($query,$supported){
return $saved;
}
function otherVersionToArray(&$query,$supported){
return lastToArray($query,$supported);
function otherVersionToArray(&$query,$supported,$db,$idu){
return lastToArray($query,$supported,$db,$idu);
}