Fixed the dashboard to allow offline work

This commit is contained in:
2022-07-09 22:37:56 +02:00
parent f81f05936a
commit d4ffc3addc
13 changed files with 206 additions and 124 deletions

View File

@ -35,6 +35,7 @@ class ComponentbuilderControllerAjax extends BaseController
$this->registerTask('getComponentDetails', 'ajax');
$this->registerTask('getCronPath', 'ajax');
$this->registerTask('getWiki', 'ajax');
$this->registerTask('getVersion', 'ajax');
$this->registerTask('getJCBpackageInfo', 'ajax');
$this->registerTask('getCrowdinDetails', 'ajax');
$this->registerTask('getModuleCode', 'ajax');
@ -295,6 +296,47 @@ class ComponentbuilderControllerAjax extends BaseController
}
}
break;
case 'getVersion':
try
{
$versionValue = $jinput->get('version', NULL, 'INT');
if($versionValue && $user->id != 0)
{
$result = $this->getModel('ajax')->getVersion($versionValue);
}
else
{
$result = false;
}
if($callback)
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
{
if($callback)
{
echo $callback."(".json_encode($e).");";
}
elseif($returnRaw)
{
echo json_encode($e);
}
else
{
echo "(".json_encode($e).");";
}
}
break;
case 'getJCBpackageInfo':
try
{