$result = File::delete($data['mapsDirectoryPath'] . $map); if ($result !== true) { AdminServ::error(Utils::t('Unable to delete the map') . ' : ' . $map . ' (' . $result . ')'); break; } else { AdminServLogs::add('action', 'Delete map: ' . $map); } } Utils::redirection(false, '?p=' . USER_PAGE . $hasDirectory); } } } } } } } // Save MatchSettings if ((isset($_POST['addMap']) || isset($_POST['insertMap'])) && SERVER_MATCHSET) { if (isset($_POST['SaveCurrentMatchSettings']) && array_key_exists('SaveCurrentMatchSettings', $_POST)) { if (!$client->query('SaveMatchSettings', $data['mapsDirectoryPath'] . SERVER_MATCHSET)) { AdminServ::error(); } } } // MAPLIST $sort = null; if (isset($_GET['sort']) && $_GET['sort'] != null) { $sort = addslashes($_GET['sort']); } $data['maps'] = AdminServ::getLocalMapList($data['currentDir'], $args['directory'], $sort);
$operation = null; } if (isset($_GET['select'])) { $selection = $_GET['select']; } else { $selection = null; } // DATA $out = null; if (AdminServ::initialize() && $path != null) { // Maps if ($path == 'currentServerSelection') { $mapsImport = AdminServ::getMapList(); } else { $currentDir = Folder::read($path, AdminServConfig::$MATCHSET_HIDDEN_FOLDERS, AdminServConfig::$MATCHSET_EXTENSION, intval(AdminServConfig::RECENT_STATUS_PERIOD * 3600)); $mapsImport = AdminServ::getLocalMapList($currentDir, $directory); } // Faire une sélection if ($operation == 'setSelection') { // On supprime les maps non sélectionnées if ($selection != null && count($selection) > 0) { foreach ($mapsImport['lst'] as $id => $values) { if (!in_array($id, $selection)) { unset($mapsImport['lst'][$id]); } } } else { foreach ($mapsImport['lst'] as $id => $values) { unset($mapsImport['lst'][$id]); } }