Exemplo n.º 1
0
                    Session::set('recent_item_update', (array) $name);
                });
                $P = array('data' => $_FILES);
                Weapon::fire(array('on_asset_update', 'on_asset_construct'), array($P, $P));
            }
            if (!Notify::errors()) {
                Guardian::kick($config->manager->slug . '/asset/' . $offset . str_replace('&', '&', HTTP::query('path', $p)));
            } else {
                $tab_id = 'tab-content-3';
                include __DIR__ . DS . 'task.js.tab.php';
            }
        }
    }
    $filter = Request::get('q', "");
    $filter = $filter ? Text::parse($filter, '->safe_file_name') : "";
    $files = Get::closestFiles($d, "", 'ASC', 'path', $filter);
    $files_chunk = Mecha::eat($files)->chunk($offset, $config->per_page * 2)->vomit();
    Config::set(array('page_title' => $speak->assets . $config->title_separator . $config->manager->title, 'offset' => $offset, 'pagination' => Navigator::extract($files, $offset, $config->per_page * 2, $config->manager->slug . '/asset'), 'cargo' => 'cargo.asset.php'));
    Shield::lot(array('segment' => 'asset', 'files' => $files_chunk ? Mecha::O($files_chunk) : false))->attach('manager');
});
/**
 * Asset Repairer
 * --------------
 */
Route::accept($config->manager->slug . '/asset/repair/(file|files):(:all)', function ($path = "", $old = "") use($config, $speak) {
    if (!Guardian::happy(1)) {
        Shield::abort();
    }
    $old = File::path($old);
    $p = Request::get('path', false);
    if (!($file = File::exist(ASSET . DS . $old))) {