Login | Register
My pages Projects Community openCollabNet

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Catacomb] Re: Patch for Catacomb



Hello Marcus,

Thanks for the patch.
It looks good and I committed it into CVS repository.

Feel free to send another patch for Catacomb.

Have a nice day.

--
Sung Kim <hunkim@cse.ucsc.edu>
http://www.cse.ucsc.edu/~hunkim

 "Dreams become reality!"

On Thu, 18 Sep 2003, Marcus Kazmierczak wrote:

>
> Hi Sung Kim,
>
> I've added a very small feature to the repos.c
> file which adds an "up one level" to the web page.
>
> This gives a user the ability to drill down and come
> back up directories in Catacomb.
>
> Here's the patch file. Please let me know if you
> have any questions or comments.  I'm not sure if I
> should submit directly to you or the mail list.
>
> -Marcus
>
>
>
> +++ repos.c     2003-09-18 15:10:17.000000000 -0700
> @@ -641,6 +641,11 @@ static dav_error *dav_repos_set_headers(
>  static dav_error *dav_repos_deliver(const dav_resource * resource,
>                                     ap_filter_t * output)
>  {
> +    char sep = '/';
> +    char ztmp[256];
> +
> +    memset(ztmp, '\0', sizeof(ztmp));
> +
>      apr_pool_t *pool = resource->pool;
>      apr_bucket_brigade *bb;
>      apr_status_t status;
> @@ -671,9 +676,16 @@ static dav_error *dav_repos_deliver(cons
>
>         ap_fprintf(output, bb, "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD
> HTML 3.2 Final//EN\">");
>         ap_fprintf(output, bb, "<html><head><title>Index of
> %s</title></head>\n"
> -                   "<body>\n <h2>Index of %s</h2>\n <ul>\n",
> +                   "<body>\n <h2>Index of %s</h2>\n",
>                    db_r->uri, db_r->uri);
>
> +
> +       /* Add Up One Level */
> +       apr_cpystrn(ztmp, db_r->uri, strrchr(db_r->uri, sep)+1 -
> db_r->uri);
> +       ap_fprintf(output, bb, "<a href=\"%s\"><small>Up One
> Level</small></a>", ztmp);
> +
> +       ap_fprintf(output, bb, "\n<ul>\n");
> +
>         /*
>         ** Lets walk through the results,
>         ** assemble walk resource, and call walker
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
>