Notify::success(Config::speak('notify_success_deleted', $speak->shield)); } Weapon::fire('on_shield_update', array($P, $P)); Weapon::fire('on_shield_destruct', array($P, $P)); Guardian::kick($config->manager->slug . '/shield' . ($path ? '/' . $folder : "")); } else { Notify::warning(Config::speak('notify_confirm_delete_', $path ? '<code>' . File::path($path) . '</code>' : '<strong>' . $info['title'] . '</strong>')); } Shield::lot(array('segment' => 'shield', 'the_shield' => $folder, 'the_name' => $path, 'the_info' => $info))->attach('manager', false); }); /** * Shield Attacher * --------------- */ Route::accept($config->manager->slug . '/shield/(attach|eject)/id:(:any)', function ($path = "", $slug = "") use($config, $speak) { $new_config = Get::state_config(); $new_config['shield'] = $path === 'attach' ? $slug : 'normal'; File::serialize($new_config)->saveTo(STATE . DS . 'config.txt', 0600); $G = array('data' => array('id' => $slug, 'action' => $path)); $mode = $path === 'eject' ? 'eject' : 'mount'; Notify::success(Config::speak('notify_success_updated', $speak->shield)); Weapon::fire('on_shield_update', array($G, $G)); Weapon::fire('on_shield_' . $mode, array($G, $G)); Weapon::fire('on_shield_' . md5($slug) . '_update', array($G, $G)); Weapon::fire('on_shield_' . md5($slug) . '_' . $mode, array($G, $G)); foreach (glob(SYSTEM . DS . 'log' . DS . 'asset.*.log', GLOB_NOSORT) as $asset_cache) { File::open($asset_cache)->delete(); } Guardian::kick($config->manager->slug . '/shield/' . $slug); }); /**