mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)
Mark Smith ([staff profile] mark) wrote in [site community profile] changelog2010-03-17 05:31 am

[dw-free] 'Review invite history' errors without a user

[commit: http://hg.dwscoalition.org/dw-free/rev/b64bd5fc1481]

http://bugs.dwscoalition.org/show_bug.cgi?id=2302

Add user box so admins can type in a username to review invite code history.

Patch by [personal profile] afuna.

Files modified:
  • htdocs/admin/invites/review.bml
--------------------------------------------------------------------------------
diff -r 66b1e6e3bf90 -r b64bd5fc1481 htdocs/admin/invites/review.bml
--- a/htdocs/admin/invites/review.bml	Wed Mar 17 05:24:52 2010 +0000
+++ b/htdocs/admin/invites/review.bml	Wed Mar 17 05:31:34 2010 +0000
@@ -38,8 +38,11 @@ body<=
         }
     }
 
+    my $form = "<form method='GET'><label>User:</label> <input type='text' name='user' /> <input type='submit' value='View Invite History' /></form>"; 
+    return $form unless $GET{user};
+
     my $u = LJ::load_user( $GET{user} );
-    return "<?h1 $ML{'Error'} h1?> Invalid user." unless $u;
+    return "<?h1 $ML{'Error'} h1?> <p>Invalid user.</p> $form" unless $u;
 
     $ret .= "<?p User: " . $u->ljuser_display . " p?>";
     $ret .= "<?h2 Invites h2?>";
--------------------------------------------------------------------------------