From a9068330419617b71437d0ce54de71205eabb814 Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Tue, 10 Oct 2006 04:48:06 +0200 Subject: [PATCH] Support for README storing --- TODO | 1 - cgi/Git/RepoCGI.pm | 6 ++++++ cgi/p/editproj.cgi | 1 + cgi/regproj.cgi | 1 + clone.sh | 4 ++-- 5 files changed, 10 insertions(+), 3 deletions(-) diff --git a/TODO b/TODO index daa30a3..e69de29 100644 --- a/TODO +++ b/TODO @@ -1 +0,0 @@ -README.html diff --git a/cgi/Git/RepoCGI.pm b/cgi/Git/RepoCGI.pm index 5d4831c..a7720a4 100644 --- a/cgi/Git/RepoCGI.pm +++ b/cgi/Git/RepoCGI.pm @@ -223,6 +223,7 @@ our %propmap = ( url => 'base_url', email => 'owner', desc => 'description', + README => 'README', hp => 'homepage', ); @@ -408,6 +409,10 @@ sub cgi_fill { length($self->{desc}) <= 1024 or $repo->err("Short description length > 1kb!"); + $self->{README} = $repo->wparam('README'); + length($self->{README}) <= 8192 + or $repo->err("README length > 8kb!"); + $self->{hp} = $repo->wparam('hp'); if ($self->{hp}) { valid_web_url($self->{hp}) @@ -427,6 +432,7 @@ sub form_defaults { email => $self->{email}, url => $self->{url}, desc => html_esc($self->{desc}), + README => html_esc($self->{README}), hp => $self->{hp}, users => $self->{users}, ); diff --git a/cgi/p/editproj.cgi b/cgi/p/editproj.cgi index 7be440e..a53a3a7 100755 --- a/cgi/p/editproj.cgi +++ b/cgi/p/editproj.cgi @@ -53,6 +53,7 @@ so perhaps you will need to click a lot.

Repository URL:

Description:

Homepage URL:

+

README (lt 8kb):

Users: