]> sipb.mit.edu Git - ikiwiki.git/commitdiff
Merge commit 'ffcd2da8274b44663207bb866007ee3bc8d8a15f' into sipb
authorAnders Kaseorg <andersk@mit.edu>
Fri, 31 Jan 2014 05:47:26 +0000 (00:47 -0500)
committerAnders Kaseorg <andersk@mit.edu>
Fri, 31 Jan 2014 05:47:26 +0000 (00:47 -0500)
Conflicts:
templates/page.tmpl

1  2 
IkiWiki/CGI.pm

diff --combined IkiWiki/CGI.pm
index 94600a3c64ba51044f1955c73f5bca547a71a6e5,28020b500c830bafc52cf49c3ba75bc5dfca1ce4..11b2f2ce39d4f1ab2cf158ea3baf81d1578c35af
@@@ -121,9 -121,7 +121,9 @@@ sub cgi_signin ($$;$) 
                template => {type => 'div'},
                stylesheet => 1,
        );
 -      my $buttons=["Login"];
 +      # MITLOGIN: These should be restored when logins are allowed again.
 +      #my $buttons=["Login"];
 +      my $buttons=[];
        
        $form->field(name => "do", type => "hidden", value => "signin",
                force => 1);
@@@ -222,16 -220,13 +222,16 @@@ sub cgi_prefs ($$) 
                force => 1);
        $form->field(name => "sid", type => "hidden", value => $session->id,
                force => 1);
 -      $form->field(name => "email", size => 50, fieldset => "preferences");
 +            #$form->field(name => "email", size => 50, fieldset => "preferences");
 +      $form->field(name => "realname", size => 50, fieldset => "preferences");
        
        my $user_name=$session->param("name");
  
        if (! $form->submitted) {
 -              $form->field(name => "email", force => 1,
 -                      value => userinfo_get($user_name, "email"));
 +            #$form->field(name => "email", force => 1,
 +            #value => userinfo_get($user_name, "email"));
 +              $form->field(name => "realname", force => 1,
 +                      value => userinfo_get($user_name, "realname"));
        }
        
        if ($form->submitted eq 'Logout') {
                        userinfo_set($user_name, 'email', $form->field('email')) ||
                                error("failed to set email");
                }
 -
 +              if (defined $form->field('realname')) {
 +                      userinfo_set($user_name, 'realname', $form->field('realname')) ||
 +                              error("failed to set realname");
 +                }
                $form->text(gettext("Preferences saved."));
        }
        
-       showform($form, $buttons, $session, $q);
+       showform($form, $buttons, $session, $q,
+               prefsurl => "", # avoid showing the preferences link
+       );
  }
  
  sub cgi_custom_failure ($$$) {