Merge lp:~quam-plures-core/quam-plures/alpha-dracones into lp:quam-plures

Proposed by Yabs
Status: Merged
Merged at revision: 7582
Proposed branch: lp:~quam-plures-core/quam-plures/alpha-dracones
Merge into: lp:quam-plures
Diff against target: 51 lines (+22/-3)
2 files modified
qp_templates/_contributors.php (+2/-2)
qp_templates/_credits.disp.php (+20/-1)
To merge this branch: bzr merge lp:~quam-plures-core/quam-plures/alpha-dracones
Reviewer Review Type Date Requested Status
EdB Approve
Quam Plures Core Team Pending
Review via email: mp+45638@code.launchpad.net

Description of the change

Corrects error with Toppies flag, also added her spiel of choice
Better alpha sorting of dracones based on their displayed name

¥

To post a comment you must log in.
Revision history for this message
EdB (edb) wrote :

grabbing branch at this time...

Revision history for this message
EdB (edb) wrote :

looks good works great :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qp_templates/_contributors.php'
2--- qp_templates/_contributors.php 2010-12-31 10:01:08 +0000
3+++ qp_templates/_contributors.php 2011-01-09 15:11:19 +0000
4@@ -66,8 +66,8 @@
5 'topanga' => array(
6 'name' => 'Topanga',
7 'homepage' => 'http://www.tenderfeelings.be/',
8- 'locale' => 'be-NL',
9- 'spiel' => T_( 'I have nothing to say!' )
10+ 'locale' => 'be-BE',
11+ 'spiel' => T_( 'if you can\'t do it the way it is suppose to be done, do it the way you can' )
12 ),
13 'yabs' => array(
14 'name' => 'Yabs',
15
16=== modified file 'qp_templates/_credits.disp.php'
17--- qp_templates/_credits.disp.php 2010-12-29 12:53:02 +0000
18+++ qp_templates/_credits.disp.php 2011-01-09 15:11:19 +0000
19@@ -99,7 +99,8 @@
20 echo '<dt>'.T_('Core Contributors').':</dt>'."\n";
21 echo '<dd><dl>'."\n";
22
23- ksort( $_hic_sunt_dracones ); // alpha order
24+ usort( $_hic_sunt_dracones, 'alpha_dracones' );
25+
26 foreach( $_hic_sunt_dracones as $dracone )
27 {
28 echo '<dt><a href="'.$dracone['homepage'].'" title="';
29@@ -128,3 +129,21 @@
30
31 </dl>
32 </div>
33+<?php
34+/**
35+ * Callback function for sorting dracones into alphabetical order by "name"
36+ * as opposed to forum names, which are the (unique) array keys we use
37+ *
38+ * @param string $drac_1 array entry
39+ * @param string $drac_2 next array entry
40+ * @return is $drac_1's name further down the alphabet than $drac_2's name
41+ */
42+function alpha_dracones( $drac_1, $drac_2 )
43+{
44+ $sorted = array( $drac_1['name'], $drac_2['name'] );
45+ natcasesort( $sorted );
46+ $sorted = array_values( $sorted );
47+
48+ return ( $sorted[0] == $drac_2['name'] );
49+}
50+?>
51\ No newline at end of file

Subscribers

People subscribed via source and target branches