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] changelog2009-12-24 07:21 am

[dw-free] Misc BML cleanup

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

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

Remove this, doesn't work anymore anyway.

Patch by [staff profile] mark.

Files modified:
  • htdocs/dev/index.html
  • htdocs/dev/userlist.bml
--------------------------------------------------------------------------------
diff -r 6d147672fb7f -r 824729656153 htdocs/dev/index.html
--- a/htdocs/dev/index.html	Thu Dec 24 07:10:54 2009 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-<html>
-<head>
-</head>
-</html>
\ No newline at end of file
diff -r 6d147672fb7f -r 824729656153 htdocs/dev/userlist.bml
--- a/htdocs/dev/userlist.bml	Thu Dec 24 07:10:54 2009 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-<?page
-title=>Users on this server
-body<=
-<?_code
-{
-    use strict;
-    use vars qw(%GET);
-    return "Not a dev server." unless $LJ::IS_DEV_SERVER;
-
-    my $pagesize = 250;
-
-    $GET{'page'} ||= 1;
-    my $page = $GET{'page'} - 1;
-    my $offset = $page * $pagesize;
-    my $ret = "";
-    my $dbr = LJ::get_db_reader();
-    my %ss;
-    my $orderby = $GET{'sort'} eq 'user' ? "user" :
-                  $GET{'sort'} eq 'jt' ? "journaltype,user" :
-                  $GET{'sort'} eq 'sv' ? "statusvis,user" : "userid";
-    my $pagesizeplus1 = $pagesize + 1;
-    my $h = $dbr->prepare("SELECT userid,user,journaltype,statusvis FROM user ORDER BY $orderby LIMIT $offset,$pagesizeplus1");
-    $h->execute;
-    my @userids;
-    while (my $row = $h->fetchrow_hashref) {
-        $ss{$row->{'userid'}} = $row;
-        push @userids, $row->{'userid'};
-    }
-    my $islastpage = 1;
-    if (scalar(@userids) > $pagesize) {
-        pop @userids;
-        $islastpage = 0;
-    }
-    my $inclause = join (",", @userids);
-    $h = $dbr->prepare("SELECT * FROM reluser WHERE userid IN ($inclause)");
-    $h->execute;
-    while (my $row = $h->fetchrow_hashref) {
-        push @{$ss{$row->{'userid'}}->{'reluser'}}, $row;
-    }
-
-    # sort bar
-    my $pagearg = $GET{'page'} > 1 ? "&amp;page=$GET{'page'}" : "";
-    my $pagearg2 = $GET{'page'} > 1 ? "?page=$GET{'page'}" : "";
-    $ret .= "<?p <strong>Sort by:</strong> [<a href='userlist$pagearg2'> User ID
-        </a>|<a href='userlist?sort=user$pagearg'> Username
-        </a>|<a href='userlist?sort=jt$pagearg'> Journal Type
-        </a>|<a href='userlist?sort=sv$pagearg'> Status Vis
-        </a>] p?>";
-
-    # page bar
-    my $next = $page + 2;
-    $pagearg = $page > 1 ? "&amp;page=$page" : "";
-    $ret .= "<?p [" if $page || !$islastpage;
-    $ret .= "<a href='userlist?sort=$GET{'sort'}$pagearg'> Previous Page </a>" if $page;
-    $ret .= "|" if $page && !$islastpage;
-    $ret .= "<a href='userlist?sort=$GET{'sort'}&amp;page=$next'> Next Page </a>" if !$islastpage;
-    $ret .= "] p?>" if $page || !$islastpage;
-
-    $ret .= "<br /><br /> <table width='100%' border='1'>
-        <tr valign='bottom'><td><b>User ID</b></td><td><b>Username</b></td>
-        <td><b>T/S</b></td><td><b>Reluser Edges</b></td></tr>";
-
-    foreach my $userid (@userids) {
-        my $hr = $ss{$userid};
-        $ret .= "<tr><td><b>$userid</b></td><td>";
-        $ret .= LJ::ljuser($hr->{'user'}, {type=> $hr->{'journaltype'}});
-        $ret .= "</td><td><b>$hr->{'journaltype'}</b>/<b>$hr->{'statusvis'}</b></td><td>";
-        if ($hr->{'reluser'} && scalar(@{$hr->{'reluser'}})) {
-            my $c = 0;
-            foreach my $t (sort { $a->{'type'} cmp $b->{'type'} }
-                           @{$hr->{'reluser'}}) {
-                $ret .= "; " if $c;
-                $ret .= "<b>$t->{'type'}</b>/";
-                $ret .= LJ::ljuser($ss{$t->{'targetid'}}->{'user'}, {type=>
-                                   $ss{$t->{'targetid'}}->{'journaltype'}});
-                $c = 1;
-            }
-        }
-        $ret .= "</td></tr>";
-    }
-    $ret .= "</table>";
-    return $ret;
-}
-_code?>
-page?>
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org