Passed
Pull Request — master (#1932)
by Struan
05:36
created
www/includes/easyparliament/templates/html/glossary/addterm.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -21,12 +21,12 @@
 block discarded – undo
21 21
             <p>It seems we already have <?= ngettext('a definition', 'some definitions', $glossary->num_search_matches) ?> for that. Would you care to see <?= ngettext('it', 'them', $glossary->num_search_matches) ?>?</p>
22 22
             <ul class="glossary">
23 23
             <?php
24
-              foreach ($glossary->search_matches as $match) {
25
-                  $URL = new \MySociety\TheyWorkForYou\Url('glossary');
26
-                  $URL->insert(['gl' => $match['glossary_id']]);
27
-                  $URL->remove(['g']);
28
-                  $term_link = $URL->generate('url');
29
-                  ?>
24
+                foreach ($glossary->search_matches as $match) {
25
+                    $URL = new \MySociety\TheyWorkForYou\Url('glossary');
26
+                    $URL->insert(['gl' => $match['glossary_id']]);
27
+                    $URL->remove(['g']);
28
+                    $term_link = $URL->generate('url');
29
+                    ?>
30 30
                   <li>
31 31
                     <a href="<?= $term_link ?>"><?= $match['title']?></a>
32 32
                   </li>
Please login to merge, or discard this patch.
www/docs/addlink/index.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@  discard block
 block discarded – undo
1 1
     <?php
2 2
 
3 3
 include_once '../../includes/easyparliament/init.php';
4
-include_once INCLUDESPATH."easyparliament/glossary.php";
5
-include_once INCLUDESPATH."easyparliament/glossarylist.php";
4
+include_once INCLUDESPATH . "easyparliament/glossary.php";
5
+include_once INCLUDESPATH . "easyparliament/glossarylist.php";
6 6
 
7 7
 $this_page = "glossary_addlink";
8 8
 
9
-$args = array( 'action' => $this_page);
9
+$args = array('action' => $this_page);
10 10
 
11 11
 // First things first...
12 12
 
13
-if ((get_http_var('g') != '') && (get_http_var('previewterm') == '') ) {
13
+if ((get_http_var('g') != '') && (get_http_var('previewterm') == '')) {
14 14
     // We're searching for something.
15 15
     $args['s'] = filter_user_input(get_http_var('g'), 'strict');
16 16
     $GLOSSARY = new GLOSSARY($args);
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 
26 26
 $PAGE->stripe_start();
27 27
 
28
-$data = array (
28
+$data = array(
29 29
     'title' => get_http_var('g'),
30 30
     'body'	=> get_http_var('definition')
31 31
 );
@@ -115,8 +115,8 @@  discard block
 block discarded – undo
115 115
 
116 116
     $PAGE->glossary_atoz($GLOSSARY);
117 117
 
118
-    $PAGE->stripe_end(array (
119
-        array (
118
+    $PAGE->stripe_end(array(
119
+        array(
120 120
             'type'		=> 'include',
121 121
             'content'	=> 'glossary_add'
122 122
         )
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -14,8 +14,7 @@  discard block
 block discarded – undo
14 14
     // We're searching for something.
15 15
     $args['s'] = filter_user_input(get_http_var('g'), 'strict');
16 16
     $GLOSSARY = new GLOSSARY($args);
17
-}
18
-else {
17
+} else {
19 18
     $args['sort'] = "regexp_replace";
20 19
     $GLOSSARY = new GLOSSARY($args);
21 20
     $args['s'] = filter_user_input(get_http_var('g'), 'strict');
@@ -86,13 +85,11 @@  discard block
 block discarded – undo
86 85
             if ($args['count']) {
87 86
                 // Display the Add definition form
88 87
                 $PAGE->glossary_add_link_form($args);
89
-            }
90
-            else {
88
+            } else {
91 89
                 print "<h4>No dice!</h4><p>Much as we'd love you to add a definition for <strong></strong>, it doesn't seem to appear in hansard at all...</p>";
92 90
                 $PAGE->glossary_links();
93 91
             }
94
-        }
95
-        else {
92
+        } else {
96 93
             print "<h4>Humdinger!</h4><p>it would appear that you aren't allowed to add glossary terms. How odd...</p>";
97 94
             $PAGE->glossary_links();
98 95
         }
Please login to merge, or discard this patch.
www/docs/glossary/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     $URL->update(["gl" => $GLOSSARY->next_term['glossary_id']]);
77 77
     $next_link = $URL->generate('url');
78 78
 
79
-    $nextprev =  [
79
+    $nextprev = [
80 80
         'next'	=>  [
81 81
             'url'	=> $next_link,
82 82
             'title'	=> 'Next term',
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 
118 118
 $URL = new \MySociety\TheyWorkForYou\Url('glossary_addterm');
119 119
 $add_url = $URL->generate();
120
-print "<p>Think you know a phrase that should be here? Help us improve the site by <a href=\"".$add_url."\">adding it</a>.</p>";
120
+print "<p>Think you know a phrase that should be here? Help us improve the site by <a href=\"" . $add_url . "\">adding it</a>.</p>";
121 121
 
122 122
 $PAGE->stripe_end([
123 123
     [
Please login to merge, or discard this patch.