Temporary version add() that just dumps out the values for now.

This commit is contained in:
Bharat Mediratta
2009-07-02 17:54:48 -07:00
parent 9eee3b07a8
commit 1a5fe42b55
@@ -81,6 +81,29 @@ class Server_Add_Controller extends Controller {
print $tree;
}
public function add() {
if (!user::active()->admin) {
access::forbidden();
}
access::verify_csrf();
$authorized_paths = unserialize(module::get_var("server_add", "authorized_paths"));
// The paths we receive are full pathnames. Convert that into a tree structure to save space
// in our task.
foreach (Input::instance()->post("path") as $path) {
if (is_dir($path)) {
$dirs[$path] = array();
} else if (is_file($path)) {
$dir = dirname($path);
$file = basename($path);
$dirs[$dir][] = $file;
}
}
Kohana::log("alert",print_r($dirs,1));
}
/* ================================================================================ */
function start($id) {