| @@ -12,11 +12,11 @@ | ||
| 12 | 12 | |
| 13 | 13 |  class UtilityTest extends UnitTestCase{ | 
| 14 | 14 | |
| 15 | -  public function testVerpEnvelopeSenderCanCreateStandardSender() { | |
| 15 | +    public function testVerpEnvelopeSenderCanCreateStandardSender() { | |
| 16 | 16 |      $sender = twfy_verp_envelope_sender('[email protected]'); | 
| 17 | 17 | $expected_sender = 'twfy+aperson=a.nother.dom@' + EMAILDOMAIN; | 
| 18 | 18 | $this->assertEqual($sender, $expected_sender, 'verp_envelope_sender can create a sender for a standard address'); | 
| 19 | - } | |
| 19 | + } | |
| 20 | 20 | |
| 21 | 21 | } | 
| 22 | 22 | |
| @@ -3,18 +3,18 @@ | ||
| 3 | 3 | * SimpleTest tests for the functions in utility.php | 
| 4 | 4 | * $Id: utility_test.php,v 1.3 2009-06-25 12:23:58 louise Exp $ | 
| 5 | 5 | */ | 
| 6 | -error_reporting (E_ALL); | |
| 6 | +error_reporting(E_ALL); | |
| 7 | 7 |  ini_set("display_errors", 1); | 
| 8 | 8 | include_once dirname(__FILE__) . '/../../../conf/general'; | 
| 9 | 9 | include_once '../utility.php'; | 
| 10 | 10 | include_once 'simpletest/unit_tester.php'; | 
| 11 | 11 | include_once 'simpletest/reporter.php'; | 
| 12 | 12 | |
| 13 | -class UtilityTest extends UnitTestCase{ | |
| 13 | +class UtilityTest extends UnitTestCase { | |
| 14 | 14 | |
| 15 | 15 |    public function testVerpEnvelopeSenderCanCreateStandardSender() { | 
| 16 | 16 |      $sender = twfy_verp_envelope_sender('[email protected]'); | 
| 17 | - $expected_sender = 'twfy+aperson=a.nother.dom@' + EMAILDOMAIN; | |
| 17 | + $expected_sender = 'twfy+aperson=a.nother.dom@' +EMAILDOMAIN; | |
| 18 | 18 | $this->assertEqual($sender, $expected_sender, 'verp_envelope_sender can create a sender for a standard address'); | 
| 19 | 19 | } | 
| 20 | 20 | |
| @@ -110,13 +110,16 @@ | ||
| 110 | 110 | |
| 111 | 111 | <?php endif; ?> | 
| 112 | 112 | |
| 113 | - <?php else: ?> | |
| 113 | +                    <?php else { | |
| 114 | + : ?> | |
| 114 | 115 | |
| 115 | 116 | <div class="panel"> | 
| 116 | 117 | <p>This person has not voted on any of the key issues which we keep track of.</p> | 
| 117 | 118 | </div> | 
| 118 | 119 | |
| 119 | - <?php endif; ?> | |
| 120 | + <?php endif; | |
| 121 | +} | |
| 122 | +?> | |
| 120 | 123 | |
| 121 | 124 | <?php endif; ?> | 
| 122 | 125 | |
| @@ -76,7 +76,7 @@ discard block | ||
| 76 | 76 | $policy_group = $segment['key']; | 
| 77 | 77 | |
| 78 | 78 |                                  if (isset($policy_last_update[$policy_id]) && $policy_last_update[$policy_id] > $most_recent) { | 
| 79 | - $most_recent = $policy_last_update[$policy_id]; | |
| 79 | + $most_recent = $policy_last_update[$policy_id]; | |
| 80 | 80 | } | 
| 81 | 81 | |
| 82 | 82 |                                  if ( $key_vote['has_strong'] || $key_vote['position'] == 'has never voted on' ) { | 
| @@ -111,7 +111,7 @@ discard block | ||
| 111 | 111 | |
| 112 | 112 | include '_vote_description.php'; | 
| 113 | 113 | |
| 114 | - } ?> | |
| 114 | + } ?> | |
| 115 | 115 | </ul> | 
| 116 | 116 | |
| 117 | 117 | <div class="share-vote-descriptions"> | 
| @@ -79,7 +79,7 @@ discard block | ||
| 79 | 79 | $most_recent = $policy_last_update[$policy_id]; | 
| 80 | 80 | } | 
| 81 | 81 | |
| 82 | -                                if ( $key_vote['has_strong'] || $key_vote['position'] == 'has never voted on' ) { | |
| 82 | +                                if ($key_vote['has_strong'] || $key_vote['position'] == 'has never voted on') { | |
| 83 | 83 | $description = ucfirst($key_vote['desc']); | 
| 84 | 84 |                                  } else { | 
| 85 | 85 | $description = sprintf( | 
| @@ -101,7 +101,7 @@ discard block | ||
| 101 | 101 | $party_position = $diff['party_position']; | 
| 102 | 102 | $party_score_difference = $diff["score_difference"]; | 
| 103 | 103 |                                      if ($sorted_diffs[$policy_id]['score_difference'] > $min_diff_score && $party_member_count > 1) { | 
| 104 | - $party_voting_line = sprintf( 'Comparable %s MPs %s (%s).', $comparison_party, $diff['party_position'], $diff['party_voting_summary']); | |
| 104 | +                                        $party_voting_line = sprintf('Comparable %s MPs %s (%s).', $comparison_party, $diff['party_position'], $diff['party_voting_summary']); | |
| 105 | 105 | } | 
| 106 | 106 |                                  } else { | 
| 107 | 107 | $party_voting_line = null; | 
| @@ -190,11 +190,14 @@ | ||
| 190 | 190 | <?= $recent_appearances['additional_links'] ?> | 
| 191 | 191 | <?php endif; ?> | 
| 192 | 192 | |
| 193 | - <?php else: ?> | |
| 193 | +                    <?php else { | |
| 194 | + : ?> | |
| 194 | 195 | |
| 195 | 196 | <p>No recent appearances to display.</p> | 
| 196 | 197 | |
| 197 | - <?php endif; ?> | |
| 198 | + <?php endif; | |
| 199 | +} | |
| 200 | +?> | |
| 198 | 201 | |
| 199 | 202 | </div> | 
| 200 | 203 | <?php endif; ?> | 
| @@ -83,7 +83,7 @@ discard block | ||
| 83 | 83 | |
| 84 | 84 | include '_vote_description.php'; | 
| 85 | 85 | |
| 86 | - } ?> | |
| 86 | + } ?> | |
| 87 | 87 | </ul> | 
| 88 | 88 | |
| 89 | 89 | <p>We have <b>lots more</b> plain English analysis of <?= $full_name ?>’s voting record on issues like health, welfare, taxation and more. Visit <a href="<?= $member_url ?>/votes"><?= $full_name ?>’s full vote analysis page</a> for more.</p> | 
| @@ -130,7 +130,7 @@ discard block | ||
| 130 | 130 | |
| 131 | 131 | include '_vote_description.php'; | 
| 132 | 132 | |
| 133 | - } ?> | |
| 133 | + } ?> | |
| 134 | 134 | </ul> | 
| 135 | 135 | |
| 136 | 136 | <p>We have <b>lots more</b> plain English analysis of <?= $full_name ?>’s voting record on issues like health, welfare, taxation and more. Visit <a href="<?= $member_url ?>/votes"><?= $full_name ?>’s full vote analysis page</a> for more.</p> | 
| @@ -159,7 +159,7 @@ discard block | ||
| 159 | 159 | |
| 160 | 160 | include '_vote_description.php'; | 
| 161 | 161 | |
| 162 | - } ?> | |
| 162 | + } ?> | |
| 163 | 163 | </ul> | 
| 164 | 164 | |
| 165 | 165 | <p class="voting-information-provenance"> | 
| @@ -403,7 +403,7 @@ discard block | ||
| 403 | 403 | <a href="https://www.publicwhip.org.uk/mp.php?id=uk.org.publicwhip/member/<?= $member_id ?>&showall=yes">Public Whip</a>.</p> | 
| 404 | 404 | |
| 405 | 405 |                    <?php if($image && $image['exists']) { | 
| 406 | -                      if(isset($data['photo_attribution_text'])) { ?> | |
| 406 | +                        if(isset($data['photo_attribution_text'])) { ?> | |
| 407 | 407 | <p> | 
| 408 | 408 |                        <?php if(isset($data['photo_attribution_link'])) { ?> | 
| 409 | 409 | Profile photo: | 
| @@ -413,7 +413,7 @@ discard block | ||
| 413 | 413 | <?php } ?> | 
| 414 | 414 | </p> | 
| 415 | 415 | <?php } | 
| 416 | -                  } else { ?> | |
| 416 | +                    } else { ?> | |
| 417 | 417 | <p> | 
| 418 | 418 | We’re missing a photo of <?= $full_name ?>. | 
| 419 | 419 | If you have a photo <em>that you can release under | 
| @@ -62,7 +62,7 @@ discard block | ||
| 62 | 62 | </div> | 
| 63 | 63 | <?php endif; ?> | 
| 64 | 64 | |
| 65 | -                <?php if ( !$current_member[HOUSE_TYPE_COMMONS] ) { ?> | |
| 65 | +                <?php if (!$current_member[HOUSE_TYPE_COMMONS]) { ?> | |
| 66 | 66 |                      <?php if (count($policyPositions->positions) > 0) { ?> | 
| 67 | 67 | <div class="panel"> | 
| 68 | 68 | <a name="votes"></a> | 
| @@ -114,7 +114,7 @@ discard block | ||
| 114 | 114 | $policy_direction = $key_vote["person_position"]; | 
| 115 | 115 | $policy_group = "highlighted"; | 
| 116 | 116 | $party_score_difference = $key_vote["score_difference"]; | 
| 117 | - $party_position = $key_vote['party_position'] ; | |
| 117 | + $party_position = $key_vote['party_position']; | |
| 118 | 118 | $comparison_party = $data["comparison_party"]; | 
| 119 | 119 | $current_party_comparison = $data["current_party_comparison"]; | 
| 120 | 120 |                              $party_voting_line = sprintf("%s, %s", $party, $diff['party_voting_summary']); | 
| @@ -136,9 +136,9 @@ discard block | ||
| 136 | 136 | |
| 137 | 137 | <p>We have <b>lots more</b> plain English analysis of <?= $full_name ?>’s voting record on issues like health, welfare, taxation and more. Visit <a href="<?= $member_url ?>/votes"><?= $full_name ?>’s full vote analysis page</a> for more.</p> | 
| 138 | 138 | |
| 139 | - <?php elseif (count($policyPositions->positions) > 0 ): ?> | |
| 139 | + <?php elseif (count($policyPositions->positions) > 0): ?> | |
| 140 | 140 |                          <?php if (count($party_positions) && $party_member_count > 1) { ?> | 
| 141 | -                            <?php if ($current_party_comparison <> $comparison_party){ ?>  | |
| 141 | +                            <?php if ($current_party_comparison <> $comparison_party) { ?>  | |
| 142 | 142 | <p> | 
| 143 | 143 | <?= $full_name ?> is a <?= $party ?> MP, but has changed parties or become independent. | 
| 144 | 144 | </p> | 
| @@ -180,7 +180,7 @@ discard block | ||
| 180 | 180 | </p> | 
| 181 | 181 | |
| 182 | 182 | <p>We have <b>lots more</b> plain English analysis of <?= $full_name ?>’s voting record on issues like health, welfare, taxation and more. Visit <a href="<?= $member_url ?>/votes"><?= $full_name ?>’s full vote analysis page</a> for more.</p> | 
| 183 | - <?php elseif (count($policyPositions->positions) == 0 ): ?> | |
| 183 | + <?php elseif (count($policyPositions->positions) == 0): ?> | |
| 184 | 184 | |
| 185 | 185 | <p>No votes to display.</p> | 
| 186 | 186 | |
| @@ -414,10 +414,10 @@ discard block | ||
| 414 | 414 | of sources. Voting information from | 
| 415 | 415 | <a href="https://www.publicwhip.org.uk/mp.php?id=uk.org.publicwhip/member/<?= $member_id ?>&showall=yes">Public Whip</a>.</p> | 
| 416 | 416 | |
| 417 | -                  <?php if($image && $image['exists']) { | |
| 418 | -                      if(isset($data['photo_attribution_text'])) { ?> | |
| 417 | +                  <?php if ($image && $image['exists']) { | |
| 418 | +                      if (isset($data['photo_attribution_text'])) { ?> | |
| 419 | 419 | <p> | 
| 420 | -                      <?php if(isset($data['photo_attribution_link'])) { ?> | |
| 420 | +                      <?php if (isset($data['photo_attribution_link'])) { ?> | |
| 421 | 421 | Profile photo: | 
| 422 | 422 | <a href="<?= $data['photo_attribution_link'] ?>"><?= $data['photo_attribution_text'] ?></a> | 
| 423 | 423 |                        <?php } else { ?> | 
| @@ -32,8 +32,8 @@ | ||
| 32 | 32 | </div> | 
| 33 | 33 | </div> | 
| 34 | 34 |    <?php } else { | 
| 35 | - $section = false; include '_section_content.php'; | |
| 36 | - } ?> | |
| 35 | + $section = false; include '_section_content.php'; | |
| 36 | + } ?> | |
| 37 | 37 | |
| 38 | 38 | </div> | 
| 39 | 39 | |
| @@ -19,11 +19,11 @@ | ||
| 19 | 19 | </div> | 
| 20 | 20 | <div class="full-page"> | 
| 21 | 21 | |
| 22 | -  <?php if ( count($data['rows']) == 0 ) { ?> | |
| 22 | +  <?php if (count($data['rows']) == 0) { ?> | |
| 23 | 23 | <div class="debate-speech"> | 
| 24 | 24 | <div class="full-page__row"> | 
| 25 | 25 | <div class="full-page__unit"> | 
| 26 | -                <?php if ( $current_assembly != 'uk-commons' && $current_assembly != 'uk-lords' ) { ?> | |
| 26 | +                <?php if ($current_assembly != 'uk-commons' && $current_assembly != 'uk-lords') { ?> | |
| 27 | 27 | We only have information about columns for debates in the House of Commons and the House of Lords. | 
| 28 | 28 |                  <?php } else { ?> | 
| 29 | 29 | We can't find anything in column <?= $column ?> on <?= $debate_day_human ?>. | 
| @@ -49,7 +49,7 @@ | ||
| 49 | 49 | <?php } ?> | 
| 50 | 50 | </a> | 
| 51 | 51 | <?php } | 
| 52 | -                  if ( isset($row['excerpt']) ) { ?> | |
| 52 | +                    if ( isset($row['excerpt']) ) { ?> | |
| 53 | 53 | <p class="business-list__excerpt"> | 
| 54 | 54 | <?= trim_characters($row['excerpt'], 0, 200 ) ?> | 
| 55 | 55 | </p> | 
| @@ -84,6 +84,6 @@ | ||
| 84 | 84 | <?php } ?> | 
| 85 | 85 | </div> | 
| 86 | 86 | |
| 87 | - <?php $search_title = "Search $title"; include '_search.php'; ?> | |
| 87 | + <?php $search_title = "search $title"; include '_search.php'; ?> | |
| 88 | 88 | |
| 89 | 89 | </div> | 
| @@ -6,32 +6,32 @@ discard block | ||
| 6 | 6 | <?= $parent_title ?> | 
| 7 | 7 | </h1> | 
| 8 | 8 | <p class="business-section__header__date"> | 
| 9 | - <?= format_date( $info['date'], LONGERDATEFORMAT ) ?> | |
| 9 | + <?= format_date($info['date'], LONGERDATEFORMAT) ?> | |
| 10 | 10 | </p> | 
| 11 | 11 | </div> | 
| 12 | -      <?php if ( isset($rows) ) { ?> | |
| 12 | +      <?php if (isset($rows)) { ?> | |
| 13 | 13 | <div class="business-section__primary"> | 
| 14 | 14 | <ul class="business-list"> | 
| 15 | 15 | <?php | 
| 16 | 16 | $prevlevel = ''; | 
| 17 | -                foreach ( $rows as $row ) { ?> | |
| 18 | -                <?php if ( $row['htype'] == 10 ) { | |
| 19 | -                    if ( $prevlevel == 'sub' ) { ?> | |
| 17 | +                foreach ($rows as $row) { ?> | |
| 18 | +                <?php if ($row['htype'] == 10) { | |
| 19 | +                    if ($prevlevel == 'sub') { ?> | |
| 20 | 20 | </ul> | 
| 21 | 21 | </li> | 
| 22 | -                    <?php } elseif ( $prevlevel == 'top' ) { ?> | |
| 22 | +                    <?php } elseif ($prevlevel == 'top') { ?> | |
| 23 | 23 | </li> | 
| 24 | 24 | <?php } ?> | 
| 25 | 25 | <li> | 
| 26 | 26 |                  <?php } else { | 
| 27 | -                    if ( $prevlevel == '' ) { ?> | |
| 27 | +                    if ($prevlevel == '') { ?> | |
| 28 | 28 | <li> | 
| 29 | -                    <?php } elseif ( $prevlevel == 'top' ) { ?> | |
| 29 | +                    <?php } elseif ($prevlevel == 'top') { ?> | |
| 30 | 30 | <ul> | 
| 31 | 31 | <li> | 
| 32 | 32 | <?php } ?> | 
| 33 | 33 | <?php } ?> | 
| 34 | -                  <?php if ( isset($row['excerpt']) && strstr($row['excerpt'], "was asked—") ) { ?> | |
| 34 | +                  <?php if (isset($row['excerpt']) && strstr($row['excerpt'], "was asked—")) { ?> | |
| 35 | 35 | <div class="business-list__title"> | 
| 36 | 36 | <h3> | 
| 37 | 37 | <?= $row['body'] ?> | 
| @@ -42,26 +42,26 @@ discard block | ||
| 42 | 42 | <h3> | 
| 43 | 43 | <?= $row['body'] ?> | 
| 44 | 44 | </h3> | 
| 45 | -                      <?php if ( isset($row['contentcount']) && $row['contentcount'] > 0 ) { ?> | |
| 45 | +                      <?php if (isset($row['contentcount']) && $row['contentcount'] > 0) { ?> | |
| 46 | 46 | <span class="business-list__meta"> | 
| 47 | 47 | <?= $row['contentcount'] == 1 ? '1 speech' : $row['contentcount'] . ' speeches' ?> | 
| 48 | 48 | </span> | 
| 49 | 49 | <?php } ?> | 
| 50 | 50 | </a> | 
| 51 | 51 | <?php } | 
| 52 | -                  if ( isset($row['excerpt']) ) { ?> | |
| 52 | +                  if (isset($row['excerpt'])) { ?> | |
| 53 | 53 | <p class="business-list__excerpt"> | 
| 54 | - <?= trim_characters($row['excerpt'], 0, 200 ) ?> | |
| 54 | + <?= trim_characters($row['excerpt'], 0, 200) ?> | |
| 55 | 55 | </p> | 
| 56 | 56 | <?php } ?> | 
| 57 | -                <?php if ( $row['htype'] == 10 ) { | |
| 57 | +                <?php if ($row['htype'] == 10) { | |
| 58 | 58 | $prevlevel = 'top'; | 
| 59 | 59 |                  } else { | 
| 60 | 60 | $prevlevel = 'sub'; ?> | 
| 61 | 61 | </li> | 
| 62 | 62 | <?php } ?> | 
| 63 | 63 | <?php } ?> | 
| 64 | -                <?php if ( $prevlevel == 'sub' ) { ?> | |
| 64 | +                <?php if ($prevlevel == 'sub') { ?> | |
| 65 | 65 | </ul> | 
| 66 | 66 | </li> | 
| 67 | 67 | <?php } ?> | 
| @@ -41,7 +41,7 @@ | ||
| 41 | 41 | <div class="row nested-row"> | 
| 42 | 42 | <div class="homepage-in-the-news homepage-content-section"> | 
| 43 | 43 |                          <?php if ( $featured ) { | 
| 44 | - include dirname(__FILE__) . "/../homepage/featured.php"; | |
| 44 | + include dirname(__FILE__) . "/../homepage/featured.php"; | |
| 45 | 45 | } ?> | 
| 46 | 46 | </div> | 
| 47 | 47 | <div class="homepage-create-alert homepage-content-section"> | 
| @@ -4,10 +4,10 @@ discard block | ||
| 4 | 4 | <div class="hero__mp-search__wrap"> | 
| 5 | 5 | <h1>Do your MLAs represent you?</h1> | 
| 6 | 6 | <div class="row collapse"> | 
| 7 | -                    <?php if ( count($data['regional']) > 0 ) { ?> | |
| 7 | +                    <?php if (count($data['regional']) > 0) { ?> | |
| 8 | 8 | <ul class="homepage-rep-list"> | 
| 9 | 9 | <li>Your MLAs: </li> | 
| 10 | -                        <?php foreach ( $data['regional'] as $mla ) { ?> | |
| 10 | +                        <?php foreach ($data['regional'] as $mla) { ?> | |
| 11 | 11 | <li class="homepage-rep-list__rep"><a href="/mla/?p=<?= $mla['person_id'] ?>"><?= $mla['name'] ?></a></li> | 
| 12 | 12 | <?php } ?> | 
| 13 | 13 | </ul> | 
| @@ -40,7 +40,7 @@ discard block | ||
| 40 | 40 | <div class="panel panel--flushtop clearfix"> | 
| 41 | 41 | <div class="row nested-row"> | 
| 42 | 42 | <div class="homepage-in-the-news homepage-content-section"> | 
| 43 | -                        <?php if ( $featured ) { | |
| 43 | +                        <?php if ($featured) { | |
| 44 | 44 | include dirname(__FILE__) . "/../homepage/featured.php"; | 
| 45 | 45 | } ?> | 
| 46 | 46 | </div> | 
| @@ -85,7 +85,7 @@ discard block | ||
| 85 | 85 | <div class="homepage-recently homepage-content-section"> | 
| 86 | 86 | <h2>Recently in the Northern Ireland Assembly</h2> | 
| 87 | 87 | <ul class="recently__list"><?php | 
| 88 | -                            foreach ( $debates['recent'] as $recent ) { | |
| 88 | +                            foreach ($debates['recent'] as $recent) { | |
| 89 | 89 | include dirname(__FILE__) . '/../homepage/recent-debates.php'; | 
| 90 | 90 | } | 
| 91 | 91 | ?></ul> | 
| @@ -58,10 +58,12 @@ | ||
| 58 | 58 | to <a href="<?= $member_url ?>/votes">see all their votes</a>. | 
| 59 | 59 | </p> | 
| 60 | 60 | |
| 61 | - <?php else: ?> | |
| 61 | +              <?php else { | |
| 62 | + : ?> | |
| 62 | 63 | <ul class="vote-descriptions"> | 
| 63 | 64 | <?php | 
| 64 | 65 | $policy_ids = array(); | 
| 66 | +} | |
| 65 | 67 | |
| 66 | 68 |                    foreach ($positions as $position) { | 
| 67 | 69 |                        if (!in_array($position['policy_id'], $policy_ids)) { | 
| @@ -61,23 +61,23 @@ | ||
| 61 | 61 | <?php else: ?> | 
| 62 | 62 | <ul class="vote-descriptions"> | 
| 63 | 63 | <?php | 
| 64 | - $policy_ids = array(); | |
| 65 | - | |
| 66 | -                  foreach ($positions as $position) { | |
| 67 | -                      if (!in_array($position['policy_id'], $policy_ids)) { | |
| 68 | - $description = ucfirst($position['desc']); | |
| 69 | - $link = sprintf( | |
| 70 | - '%s/divisions?policy=%s', | |
| 71 | - $member_url, | |
| 72 | - $position['policy_id'] | |
| 73 | - ); | |
| 74 | - $link_text = $position['position'] != 'has never voted on' ? 'Show votes' : 'Details'; | |
| 75 | - $key_vote = $position; | |
| 76 | - include(dirname(__DIR__) . '/mp/_vote_description.php'); | |
| 77 | - | |
| 78 | - $policy_ids[] = $position['policy_id']; | |
| 79 | - } | |
| 80 | - } ?> | |
| 64 | + $policy_ids = array(); | |
| 65 | + | |
| 66 | +                    foreach ($positions as $position) { | |
| 67 | +                        if (!in_array($position['policy_id'], $policy_ids)) { | |
| 68 | + $description = ucfirst($position['desc']); | |
| 69 | + $link = sprintf( | |
| 70 | + '%s/divisions?policy=%s', | |
| 71 | + $member_url, | |
| 72 | + $position['policy_id'] | |
| 73 | + ); | |
| 74 | + $link_text = $position['position'] != 'has never voted on' ? 'Show votes' : 'Details'; | |
| 75 | + $key_vote = $position; | |
| 76 | + include(dirname(__DIR__) . '/mp/_vote_description.php'); | |
| 77 | + | |
| 78 | + $policy_ids[] = $position['policy_id']; | |
| 79 | + } | |
| 80 | + } ?> | |
| 81 | 81 | </ul> | 
| 82 | 82 | |
| 83 | 83 | <?php endif; ?> | 
| @@ -67,4 +67,4 @@ | ||
| 67 | 67 | api_output($out); | 
| 68 | 68 |  } else { | 
| 69 | 69 |      api_error('Nothing'); | 
| 70 | - } | |
| 70 | + } | |
| @@ -12,7 +12,7 @@ | ||
| 12 | 12 | |
| 13 | 13 | $out = array(); | 
| 14 | 14 |  if (isset ($data['rows'])) { | 
| 15 | -    for ($i=0; $i<count($data['rows']); $i++) { | |
| 15 | +    for ($i = 0; $i < count($data['rows']); $i++) { | |
| 16 | 16 | $row = $data['rows'][$i]; | 
| 17 | 17 |          if (count($row) == 0) { | 
| 18 | 18 | continue; | 
| @@ -11,7 +11,7 @@ discard block | ||
| 11 | 11 | |
| 12 | 12 |  if (isset ($data['rows'])) { | 
| 13 | 13 | $out = array(); | 
| 14 | -    for ($i=0; $i<count($data['rows']); $i++) { | |
| 14 | +    for ($i = 0; $i < count($data['rows']); $i++) { | |
| 15 | 15 | $row = $data['rows'][$i]; | 
| 16 | 16 | |
| 17 | 17 |          if ($row['htype'] == '10' && isset($row['excerpt']) && strstr($row['excerpt'], "was asked—")) { | 
| @@ -40,7 +40,7 @@ discard block | ||
| 40 | 40 |          if ($row['htype'] == '10') { | 
| 41 | 41 |              $out[] = array('entry' => $entry, 'subs' => array()); | 
| 42 | 42 |          } else { | 
| 43 | - $out[sizeof($out)-1]['subs'][] = $entry; | |
| 43 | + $out[sizeof($out) - 1]['subs'][] = $entry; | |
| 44 | 44 | } | 
| 45 | 45 | |
| 46 | 46 | } |