mirror of
https://gitlab.com/CodeSolutionsProject/CodeShare.git
synced 2026-02-14 09:01:33 +01:00
HotFix: Other version not works
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user