Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Limits users displayed on /about/stats/ to 500. (Issue #286) #303

Merged
merged 2 commits into from
Oct 5, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ <h1>
{% end %}
{% block heading %}{% end %}
{% block body %}{% end %}
<p id='footer-nav'>
<a href="/about/">About</a> |
<a href='/about/faq.html'>FAQ</a> |
<a href='/about/stats/'>Stats</a> |
<a href='/about/charts.html'>Charts</a>
</p>
</div>
<script type="text/javascript">

Expand Down
4 changes: 2 additions & 2 deletions www/about/stats
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ npeople = db.fetchone("SELECT count(*) AS n FROM participants WHERE claimed_time
ncc = db.fetchone("SELECT count(*) AS n FROM participants WHERE last_bill_result = ''")['n']
ncc = 0 if ncc is None else ncc
pcc = "%5.1f" % ((ncc * 100.0) / npeople) if npeople > 0 else 0.0
statements = db.fetchall("SELECT id, statement FROM participants WHERE statement != '' ORDER BY id")
statements = db.fetchall("SELECT id, statement FROM participants WHERE statement != '' ORDER BY random(), id LIMIT 500")
statements = [] if statements is None else list(statements)
transfer_volume = db.fetchone("SELECT transfer_volume AS v FROM paydays ORDER BY ts_end DESC LIMIT 1")
transfer_volume = 0 if transfer_volume is None else transfer_volume['v']
Expand Down Expand Up @@ -246,7 +246,7 @@ account</a></b>.{% end %}</p>



<h2><b>{{ len(statements) }}</b> people are <b>making the world better</b>.</h2>
<h2>Here's a sample of how <b>{{ len(statements) }}</b> of them are <b>making the world better</b>.</h2>

<p>
{% for statement in statements %}
Expand Down
4 changes: 4 additions & 0 deletions www/assets/%version/gittip.css
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ PRE {
color: #B2A196;
}

#footer-nav {
text-align:right;
}

/* FORM */
/* ==== */

Expand Down