mirror of
https://gitlab.com/CodeSolutionsProject/CodeShare.git
synced 2026-02-17 18:41:36 +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){
|
$app->get('/code/{lang}-{idc}', function(Request $request, $lang, $idc) use($app){
|
||||||
|
|
||||||
$user = getUser($app);
|
$user = getUser($app);
|
||||||
|
$idu=0;
|
||||||
|
if($user != null){
|
||||||
|
$idu=$app['data']->loadIDU($user['nick'],'nick');
|
||||||
|
}
|
||||||
|
|
||||||
$array = $app['data']->loadOtherVersion($idc,$lang);
|
$array = $app['data']->loadOtherVersion($idc,$lang);
|
||||||
$other = otherVersionToArray($array,$app['supported']);
|
$other = otherVersionToArray($array,$app['supported'],$app['data'],$idu);
|
||||||
$name = $other[0]['name'];
|
$name = $other[0]['name'];
|
||||||
|
|
||||||
$page = array(
|
$page = array(
|
||||||
|
|||||||
@@ -97,6 +97,6 @@ function savedToArray($query,$supported){
|
|||||||
return $saved;
|
return $saved;
|
||||||
}
|
}
|
||||||
|
|
||||||
function otherVersionToArray(&$query,$supported){
|
function otherVersionToArray(&$query,$supported,$db,$idu){
|
||||||
return lastToArray($query,$supported);
|
return lastToArray($query,$supported,$db,$idu);
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user