} elseif (eZHTTPTool::getDataByURL($remoteRequest)) { $remoteRequestUrl = rtrim($remoteRequest, '/') . '/classtools/definition/'; } if ($remoteRequestUrl) { $remoteRequestSuffix = '?remote=' . $remoteRequest; } } $remote = null; try { if ($module->isCurrentAction('Install')) { $tools = new OCClassTools($id, true, array(), $remoteRequestUrl); $tools->sync(); return $module->redirectTo('/classtools/compare/' . $id . $remoteRequestSuffix); } $tools = new OCClassTools($id, false, array(), $remoteRequestUrl); $remote = $tools->getRemote(); $locale = $tools->getLocale(); if ($remote === null) { throw new Exception('Impossibile trovare la classe remota'); } if ($module->isCurrentAction('Sync')) { $force = false; $removeExtra = false; if ($http->hasPostVariable('ForceSync')) { $force = $http->postVariable('ForceSync') == 1; } if ($http->hasPostVariable('RemoveExtra')) { $removeExtra = $http->postVariable('RemoveExtra') == 1; } $tools->sync($force, $removeExtra); return $module->redirectTo('/classtools/compare/' . $id . $remoteRequestSuffix);