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  Changes    Path
  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 -0000       1.6
  +++ messages.pl       9 Jan 2003 05:59:01 -0000       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 -0000      1.3
  +++ add.epl   9 Jan 2003 05:59:02 -0000       1.4
  @@ -93,6 +93,8 @@
       [$endwhile$]
   </table>
   
  +<br>Owner: [+ $r->{item_set}{email} +]
  +
   <br><br>
   [$ if $r -> {edit} $]
   &nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" name="-update_item" value="[= update3 
=]">
  
  
  
  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 -0000      1.4
  +++ content.epl       9 Jan 2003 05:59:02 -0000       1.5
  @@ -3,6 +3,7 @@
   <center><font color="red" size=3>[= under_construction =]</font><br></center>
   #]
   <hr>
  +[! use File::Basename ; !]
   
   [- $r = shift -]
   
  @@ -43,7 +44,7 @@
       <div align="center">
       <p>[= need_login =]</p>
       
  -    [- Execute ('loginform.epl', $r -> param -> uri) ; -]
  +    [- Execute ('loginform.epl', $r -> {action_prefix} . $r -> param -> uri) ; -]
       </div>
   [$ else $]
       [$if $r -> param -> uri !~ /html?$|epl$/ $]<pre>[$endif$]
  
  
  
  1.9       +34 -19    embperl/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 -0000       1.8
  +++ epwebapp.pl       9 Jan 2003 05:59:02 -0000       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, 
  +                           }) ;
  +
  +             if (DBIx::Recordset->LastError)
  +                 {
  +                 $r -> {error} = 'err_update_lang_db' ; 
  +                 return ;
  +                 }
  +                }
  +            }
           }
   
       $r -> {item_set} = undef ;
  @@ -766,8 +781,8 @@
       $tt = $r->{category_set}{table_type};
   
       $r -> {item_set} = DBIx::Recordset -> Search ({'!DataSource'  => $r->{db}, 
  -                                                '!Table'       => "${tt}, 
${tt}text", 
  -                                                '!TabRelation' => "${tt}_id = 
${tt}.id",
  +                                                '!Table'       => "user, ${tt}, 
${tt}text", 
  +                                                '!TabRelation' => "${tt}_id = 
${tt}.id and ${tt}.user_id = user.id",
                                                   'language_id'  => 
$r->param->language,
                                                   '!Order'       => 'creationtime 
desc',
                                                   $fdat{category_id} ? (category_id 
=> $fdat{category_id}) : (),
  @@ -800,8 +815,8 @@
       $tt = $r->{category_set}{table_type};
   
       $r -> {item_set} = DBIx::Recordset -> Search ({'!DataSource'  => $r->{db}, 
  -                                                '!Table'       => "${tt}, language, 
${tt}text", # ${tt}text must be last to get it's id 
  -                                                '!TabRelation' => "${tt}_id = 
${tt}.id and language_id = language.id",
  +                                                '!Table'       => "user, ${tt}, 
language, ${tt}text", # ${tt}text must be last to get it's id 
  +                                                '!TabRelation' => "${tt}_id = 
${tt}.id and language_id = language.id and ${tt}.user_id = user.id",
                                                   '!Order'       => 'creationtime 
desc',
                                                   $fdat{category_id} ? (category_id 
=> $fdat{category_id}) : (),
                                                   $fdat{"${tt}_id"}  ? ("${tt}_id"  
=> $fdat{"${tt}_id"})  : (),
  
  
  
  1.3       +2 -1      embperl/eg/web/db/login.epl
  
  Index: login.epl
  ===================================================================
  RCS file: /home/cvs/embperl/eg/web/db/login.epl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- login.epl 20 Nov 2002 07:00:18 -0000      1.2
  +++ login.epl 9 Jan 2003 05:59:02 -0000       1.3
  @@ -1,7 +1,8 @@
  +[! use File::Basename ; !]
   <div align="center">
   <p class="cHeadline">[= login_head =]</p>
   
  -[- Execute ('loginform.epl', 'addsel.epl') ; -]
  +[- Execute ('loginform.epl', ($r -> {action_prefix}?($r->{action_prefix} . 
dirname($r-> param -> uri) .'/'):'') . 'addsel.epl') ; -]
   </div>
   
   [#
  
  
  
  1.4       +2 -1      embperl/eg/web/db/loginform.epl
  
  Index: loginform.epl
  ===================================================================
  RCS file: /home/cvs/embperl/eg/web/db/loginform.epl,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- loginform.epl     20 Nov 2002 21:29:38 -0000      1.3
  +++ loginform.epl     9 Jan 2003 05:59:02 -0000       1.4
  @@ -1,5 +1,6 @@
   [- 
   use Embperl::Form::Validate;
  +use File::Basename ;
   
   $epf1 = new Embperl::Form::Validate([ -key => 'user_email', required => 1, 
                                        -key => 'user_password', 
  @@ -54,7 +55,7 @@
   
       <P ALIGN="left">[= login3 =]</P>
   
  -    <form action="login.epl" method="POST" name="newuser" onSubmit="return 
epform_validate_newuser()">
  +    <form action="$r -> {action_prefix}?($r->{action_prefix} . dirname($r-> param 
-> uri) .'/'):''+]login.epl" method="POST" name="newuser" onSubmit="return 
epform_validate_newuser()">
           <table>
               <tr>
                   <td class="cText">[= user_email =]</td>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to