public static function init($console, &$data, &$fail, &$errno, &$error) { $def = self::getDefaults(); $text = ''; $text .= Design::erstelleVersteckteEingabezeile($console, $data['PLUG']['plug_install_CORE'], 'data[PLUG][plug_install_CORE]', $def['plug_install_CORE'][1], true); $text .= Design::erstelleVersteckteEingabezeile($console, $data['PLUG']['plug_install_OSTEPU-UI'], 'data[PLUG][plug_install_OSTEPU-UI]', $def['plug_install_OSTEPU-UI'][1], true); $text .= Design::erstelleVersteckteEingabezeile($console, $data['PLUG']['plug_install_OSTEPU-DB'], 'data[PLUG][plug_install_OSTEPU-DB]', $def['plug_install_OSTEPU-DB'][1], true); $text .= Design::erstelleVersteckteEingabezeile($console, $data['PLUG']['plug_install_OSTEPU-FS'], 'data[PLUG][plug_install_OSTEPU-FS]', $def['plug_install_OSTEPU-FS'][1], true); $text .= Design::erstelleVersteckteEingabezeile($console, $data['PLUG']['plug_install_OSTEPU-LOGIC'], 'data[PLUG][plug_install_OSTEPU-LOGIC]', $def['plug_install_OSTEPU-LOGIC'][1], true); $text .= Design::erstelleVersteckteEingabezeile($console, $data['PLUG']['plug_install_INSTALL'], 'data[PLUG][plug_install_INSTALL]', $def['plug_install_INSTALL'][1], true); echo $text; self::$initialized = true; }
public static function installiereKomponentenDefinitionen($data, &$fail, &$errno, &$error) { $res = array(); if (!$fail) { $mainPath = dirname(__FILE__) . '/../..'; $components = array(); $componentFiles = array(); $plugins = PlugInsInstallieren::installCheckPlugins($data, $fail, $errno, $error); foreach ($plugins as $input) { // Dateiliste zusammentragen $fileList = array(); $fileListAddress = array(); PlugInsInstallieren::gibPluginDateien($input, $fileList, $fileListAddress, $componentFiles); unset($fileList); unset($fileListAddress); } // Komponentennamen und Orte ermitteln $res['components'] = array(); foreach ($componentFiles as $comFile) { if (!file_exists($comFile) || !is_readable($comFile)) { continue; } $input = file_get_contents($comFile); $input = json_decode($input, true); if ($input == null) { continue; } if (isset($data['PL']['urlExtern'])) { $input['urlExtern'] = $data['PL']['urlExtern']; } if (isset($data['PL']['url'])) { $input['url'] = $data['PL']['url']; } $input['path'] = substr(dirname($comFile), strlen($mainPath) + 1); $input['def'] = array($input['name'], str_replace("\\", "/", realpath($comFile))); if (isset($data['CO']['co_link_type'])) { $input['link_type'] = $data['CO']['co_link_type']; } if (isset($data['CO']['co_link_availability'])) { $input['link_availability'] = $data['CO']['co_link_availability']; } if (isset($input['files'])) { unset($input['files']); } $res['components'][] = $input; } } return $res; }