if (isset($item['target'])) { $target = $item['target']; } $urls[] = array('source' => $item['download_url'], 'target' => $target, 'slug' => $item['slug']); if (preg_match('@wa-apps/([\\w\\d\\-]+)$@', $target, $matches)) { $apps[] = $matches[1]; } } } } $installer_apps = new waInstallerApps(); waInstallerApps::setLocale($t->getLocale()); $installer = new waInstaller(waInstaller::LOG_DEBUG); if ($urls && $installer->update($urls)) { foreach ($apps as $app) { $installer_apps->installWebAsystApp($app); if (!empty($plugins[$app])) { foreach ($plugins[$app] as $plugin) { $installer_apps->updateAppPluginsConfig($app, $plugin); } } } } else { $state = $installer->getState(); if (isset($state['stage_status']) && $state['stage_status'] == waInstaller::STATE_ERROR) { throw new Exception($state['error']); } } $log = parseLog($installer->getFullState('raw'), $t); $next_step = $step + 1; $next = $steps[$step]['next'];