richter 2003/01/08 21:59:02
Modified:eg/web messages.pl
eg/web/db add.epl content.epl epwebapp.pl login.epl
loginform.epl
Log:
website updates
Revision ChangesPath
1.7 +1 -1 embperl/eg/web/messages.pl
Index: messages.pl
===
RCS file: /home/cvs/embperl/eg/web/messages.pl,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- messages.pl 3 Jan 2003 05:49:38 - 1.6
+++ messages.pl 9 Jan 2003 05:59:01 - 1.7
@@ -143,7 +143,7 @@
'login_head'=> q{Here you can logon to the Embperl-Site.
This allows you to enter information about Embperl
like news,
sites using Embperl, publications, examples etc.
- You may also edit and delte the information you have
enterd before},
+ You may also edit and delete the information you have
enterd before},
'loginnew' => 'You will receive your new password via e-mail. Please
enter it in the form below and click on "Login".',
'login1'=> q{If you have already a user account, please enter your
email address and
password and click on 'Login'. },
1.4 +2 -0 embperl/eg/web/db/add.epl
Index: add.epl
===
RCS file: /home/cvs/embperl/eg/web/db/add.epl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- add.epl 20 Nov 2002 06:56:27 - 1.3
+++ add.epl 9 Jan 2003 05:59:02 - 1.4
@@ -93,6 +93,8 @@
[$endwhile$]
+Owner: [+ $r->{item_set}{email} +]
+
[$ if $r -> {edit} $]
1.5 +2 -1 embperl/eg/web/db/content.epl
Index: content.epl
===
RCS file: /home/cvs/embperl/eg/web/db/content.epl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- content.epl 20 Nov 2002 21:29:38 - 1.4
+++ content.epl 9 Jan 2003 05:59:02 - 1.5
@@ -3,6 +3,7 @@
[= under_construction =]
#]
+[! use File::Basename ; !]
[- $r = shift -]
@@ -43,7 +44,7 @@
[= need_login =]
-[- Execute ('loginform.epl', $r -> param -> uri) ; -]
+[- Execute ('loginform.epl', $r -> {action_prefix} . $r -> param -> uri) ; -]
[$ else $]
[$if $r -> param -> uri !~ /html?$|epl$/ $][$endif$]
1.9 +34 -19embperl/eg/web/db/epwebapp.pl
Index: epwebapp.pl
===
RCS file: /home/cvs/embperl/eg/web/db/epwebapp.pl,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- epwebapp.pl 8 Jan 2003 06:03:23 - 1.8
+++ epwebapp.pl 9 Jan 2003 05:59:02 - 1.9
@@ -512,10 +512,10 @@
'!Table' => "${tt}text"}) ;
if (DBIx::Recordset->LastError)
-{
+{
$r -> {error} = 'err_update_db' ;
return ;
-}
+}
# Update the texts for every languange, but only if they belong to
# the item we have updated above
@@ -524,19 +524,34 @@
while ($rec = $$langset -> Next)
{
my $lang = $rec->{id};
-$$txtset -> Update ({ (map { $_ => $fdat{$_.'_'.$lang} || $fdat{$_} } @$cf),
- language_id => $lang,
- }, {
- "${tt}_id" => $id,
- id => $fdat{"id_$lang"}
- })
- if (grep { $fdat{$_.'_'.$lang} || $fdat{$_} } @$cf) ;
-
- if (DBIx::Recordset->LastError)
- {
- $r -> {error} = 'err_update_lang_db' ;
- return ;
- }
+if (grep { $fdat{$_.'_'.$lang} || $fdat{$_} } @$cf)
+{
+$rows = $$txtset -> Update ({ (map { $_ => $fdat{$_.'_'.$lang} ||
$fdat{$_} } @$cf),
+ language_id => $lang,
+ }, {
+ "${tt}_id" => $id,
+ id => $fdat{"id_$lang"}
+ }) ;
+
+ if (DBIx::Recordset->LastError)
+ {
+ $r -> {error} = 'err_update_lang_db' ;
+ return ;
+ }
+elsif ($rows == 0)
+{
+$$txtset -> Insert ({ (map { $_ => $fdat{$_.'_'.$lang} || $fdat{$_}
} @$cf),
+ language_id => $lang,
+ "${tt}_id"=> $id,
+