public function save() { access::verify_csrf(); $form = $this->_get_import_form(); if ($form->validate()) { $albums_path = $form->configure_g1_import->albums_path->value; if (!is_file($albums_path) && file_exists("{$albums_path}/albums.php")) { $albums_path = "{$albums_path}/albums.php"; } if (($g1_init_error = g1_import::is_valid_albums_path($albums_path)) == 'ok') { message::success(t('Gallery 1 path saved')); module::set_var('g1_import', 'albums_path', $albums_path); url::redirect('admin/g1_import'); } else { $form->configure_g1_import->albums_path->add_error($g1_init_error, 1); } } $view = new Admin_View('admin.html'); $view->content = new View('admin_g1_import.html'); $view->content->form = $form; print $view; }