Failed Conditions
Pull Request — master (#1327)
by Nick
69:15 queued 59:17
created
www/docs/api/api_getConstituency.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
     $q = $db->query("select constituency, data_key, data_value from consinfo
61 61
                      where constituency = :constituency", array(':constituency' => $constituency));
62 62
     if ($q->rows()) {
63
-        for ($i=0; $i<$q->rows(); $i++) {
63
+        for ($i = 0; $i < $q->rows(); $i++) {
64 64
             $data_key = $q->field($i, 'data_key');
65 65
             $output[$data_key] = $q->field($i, 'data_value');
66 66
         }
Please login to merge, or discard this patch.
www/docs/api/api_getDebates.php 1 patch
Braces   +18 added lines, -9 removed lines patch added patch discarded remove patch
@@ -106,25 +106,31 @@  discard block
 block discarded – undo
106 106
     if ($t == 'commons') {
107 107
         $list = 'DEBATE';
108 108
         $type = 'debates';
109
-    } elseif ($t == 'lords') {
109
+    }
110
+    elseif ($t == 'lords') {
110 111
         $list = 'LORDSDEBATE';
111 112
         $type = 'lords';
112
-    } elseif ($t == 'westminsterhall') {
113
+    }
114
+    elseif ($t == 'westminsterhall') {
113 115
         $list = 'WHALL';
114 116
         $type = 'whall';
115
-    } elseif ($t == 'scotland') {
117
+    }
118
+    elseif ($t == 'scotland') {
116 119
         $list = 'SP';
117 120
         $type = 'sp';
118
-    } elseif ($t == 'northernireland') {
121
+    }
122
+    elseif ($t == 'northernireland') {
119 123
         $list = 'NI';
120 124
         $type = 'ni';
121
-    } else {
125
+    }
126
+    else {
122 127
         api_error('Unknown type');
123 128
         return;
124 129
     }
125 130
     if ($d = get_http_var('date')) {
126 131
         _api_getHansard_date($list, $d);
127
-    } elseif (get_http_var('search') || get_http_var('person')) {
132
+    }
133
+    elseif (get_http_var('search') || get_http_var('person')) {
128 134
         $s = get_http_var('search');
129 135
         $pid = get_http_var('person');
130 136
         _api_getHansard_search(array(
@@ -132,11 +138,14 @@  discard block
 block discarded – undo
132 138
             'pid' => $pid,
133 139
             'type' => $type,
134 140
         ));
135
-    } elseif ($gid = get_http_var('gid')) {
141
+    }
142
+    elseif ($gid = get_http_var('gid')) {
136 143
         _api_getHansard_gid($list, $gid);
137
-    } elseif ($y = get_http_var('year')) {
144
+    }
145
+    elseif ($y = get_http_var('year')) {
138 146
         _api_getHansard_year($list, $y);
139
-    } else {
147
+    }
148
+    else {
140 149
         api_error('That is not a valid search.');
141 150
     }
142 151
 }
Please login to merge, or discard this patch.
www/docs/api/api_getMPsInfo.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         where person_id in (" . $ids . ")");
31 31
     if ($q->rows()) {
32 32
         $output = array();
33
-        for ($i=0; $i<$q->rows(); $i++) {
33
+        for ($i = 0; $i < $q->rows(); $i++) {
34 34
             $data_key = $q->field($i, 'data_key');
35 35
             if (count($fields) && !in_array($data_key, $fields))
36 36
                 continue;
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
             where memberinfo.member_id=member.member_id and person_id in (" . $ids . ")
45 45
             order by person_id,member_id");
46 46
         if ($q->rows()) {
47
-            for ($i=0; $i<$q->rows(); $i++) {
47
+            for ($i = 0; $i < $q->rows(); $i++) {
48 48
                 $data_key = $q->field($i, 'data_key');
49 49
                 if (count($fields) && !in_array($data_key, $fields))
50 50
                     continue;
Please login to merge, or discard this patch.
Braces   +27 added lines, -14 removed lines patch added patch discarded remove patch
@@ -20,7 +20,9 @@  discard block
 block discarded – undo
20 20
     $ids = preg_split('#\s*,\s*#', $ids, -1, PREG_SPLIT_NO_EMPTY);
21 21
     $safe_ids = array(0);
22 22
     foreach ($ids as $id) {
23
-        if (ctype_digit($id)) $safe_ids[] = $id;
23
+        if (ctype_digit($id)) {
24
+            $safe_ids[] = $id;
25
+        }
24 26
     }
25 27
     $ids = join(',', $safe_ids);
26 28
 
@@ -32,13 +34,15 @@  discard block
 block discarded – undo
32 34
         $output = array();
33 35
         for ($i=0; $i<$q->rows(); $i++) {
34 36
             $data_key = $q->field($i, 'data_key');
35
-            if (count($fields) && !in_array($data_key, $fields))
36
-                continue;
37
+            if (count($fields) && !in_array($data_key, $fields)) {
38
+                            continue;
39
+            }
37 40
             $pid = $q->field($i, 'person_id');
38 41
             $output[$pid][$data_key] = $q->field($i, 'data_value');
39 42
             $time = strtotime($q->field($i, 'lastupdate'));
40
-            if ($time > $last_mod)
41
-                $last_mod = $time;
43
+            if ($time > $last_mod) {
44
+                            $last_mod = $time;
45
+            }
42 46
         }
43 47
         $q = $db->query("select memberinfo.*, person_id from memberinfo, member
44 48
             where memberinfo.member_id=member.member_id and person_id in (" . $ids . ")
@@ -46,21 +50,28 @@  discard block
 block discarded – undo
46 50
         if ($q->rows()) {
47 51
             for ($i=0; $i<$q->rows(); $i++) {
48 52
                 $data_key = $q->field($i, 'data_key');
49
-                if (count($fields) && !in_array($data_key, $fields))
50
-                    continue;
53
+                if (count($fields) && !in_array($data_key, $fields)) {
54
+                                    continue;
55
+                }
51 56
                 $mid = $q->field($i, 'member_id');
52 57
                 $pid = $q->field($i, 'person_id');
53
-                if (!isset($output[$pid]['by_member_id'])) $output[$pid]['by_member_id'] = array();
54
-                if (!isset($output[$pid]['by_member_id'][$mid])) $output[$pid]['by_member_id'][$mid] = array();
58
+                if (!isset($output[$pid]['by_member_id'])) {
59
+                    $output[$pid]['by_member_id'] = array();
60
+                }
61
+                if (!isset($output[$pid]['by_member_id'][$mid])) {
62
+                    $output[$pid]['by_member_id'][$mid] = array();
63
+                }
55 64
                 $output[$pid]['by_member_id'][$mid][$data_key] = $q->field($i, 'data_value');
56 65
                 $time = strtotime($q->field($i, 'lastupdate'));
57
-                if ($time > $last_mod)
58
-                    $last_mod = $time;
66
+                if ($time > $last_mod) {
67
+                                    $last_mod = $time;
68
+                }
59 69
             }
60 70
         }
61 71
         ksort($output);
62 72
         return array($output, $last_mod);
63
-    } else {
73
+    }
74
+    else {
64 75
         return null;
65 76
     }
66 77
 }
@@ -70,10 +81,12 @@  discard block
 block discarded – undo
70 81
     if ($output) {
71 82
         if ($output[0]) {
72 83
             api_output($output[0], $output[1]);
73
-        } else {
84
+        }
85
+        else {
74 86
             api_error('Unknown field');
75 87
         }
76
-    } else {
88
+    }
89
+    else {
77 90
         api_error('Unknown person ID');
78 91
     }
79 92
 }
Please login to merge, or discard this patch.
www/docs/api/api_getCommittee.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
             ));
67 67
     if ($q->rows() > 1) {
68 68
         # More than one committee matches
69
-        for ($i=0; $i<$q->rows(); $i++) {
69
+        for ($i = 0; $i < $q->rows(); $i++) {
70 70
             $output['committees'][] = array(
71 71
                 'name' => $q->field($i, 'dept')
72 72
             );
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
         if ($q->rows()) {
86 86
             $output = array();
87 87
             $output['committee'] = $q->field(0, 'dept');
88
-            for ($i=0; $i<$q->rows(); $i++) {
88
+            for ($i = 0; $i < $q->rows(); $i++) {
89 89
                 $member = array(
90 90
                     'person_id' => $q->field($i, 'person'),
91 91
                     'name' => $q->field($i, 'given_name') . ' ' . $q->field($i, 'family_name'),
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
         where source = 'chgpages/selctee'
115 115
         and from_date <= $date and $date <= to_date");
116 116
     if ($q->rows()) {
117
-        for ($i=0; $i<$q->rows(); $i++) {
117
+        for ($i = 0; $i < $q->rows(); $i++) {
118 118
             $output['committees'][] = array(
119 119
                 'name' => $q->field($i, 'dept')
120 120
             );
Please login to merge, or discard this patch.
Braces   +20 added lines, -8 removed lines patch added patch discarded remove patch
@@ -57,8 +57,12 @@  discard block
 block discarded – undo
57 57
     $name = preg_replace('#\s+Committee#', '', $name);
58 58
 
59 59
     $date = parse_date(get_http_var('date'));
60
-    if ($date) $date = '"' . $date['iso'] . '"';
61
-    else $date = 'date(now())';
60
+    if ($date) {
61
+        $date = '"' . $date['iso'] . '"';
62
+    }
63
+    else {
64
+        $date = 'date(now())';
65
+    }
62 66
     $q = $db->query("select distinct(dept) from moffice
63 67
         where dept like :department
64 68
         and from_date <= $date and $date <= to_date", array(
@@ -72,7 +76,8 @@  discard block
 block discarded – undo
72 76
             );
73 77
         }
74 78
         api_output($output);
75
-    } elseif ($q->rows()) {
79
+    }
80
+    elseif ($q->rows()) {
76 81
         # One committee
77 82
         $q = $db->query("select * from moffice, member, person_names pn
78 83
             where moffice.person = member.person_id
@@ -96,10 +101,12 @@  discard block
 block discarded – undo
96 101
                 $output['members'][] = $member;
97 102
             }
98 103
             api_output($output);
99
-        } else {
104
+        }
105
+        else {
100 106
             api_error('That committee has no members...?');
101 107
         }
102
-    } else {
108
+    }
109
+    else {
103 110
         api_error('That name was not recognised');
104 111
     }
105 112
 }
@@ -108,8 +115,12 @@  discard block
 block discarded – undo
108 115
     $db = new ParlDB;
109 116
 
110 117
     $date = parse_date($date);
111
-    if ($date) $date = '"' . $date['iso'] . '"';
112
-    else $date = 'date(now())';
118
+    if ($date) {
119
+        $date = '"' . $date['iso'] . '"';
120
+    }
121
+    else {
122
+        $date = 'date(now())';
123
+    }
113 124
     $q = $db->query("select distinct(dept) from moffice
114 125
         where source = 'chgpages/selctee'
115 126
         and from_date <= $date and $date <= to_date");
@@ -120,7 +131,8 @@  discard block
 block discarded – undo
120 131
             );
121 132
         }
122 133
         api_output($output);
123
-    } else {
134
+    }
135
+    else {
124 136
         api_error('No committees found');
125 137
     }
126 138
 }
Please login to merge, or discard this patch.
www/docs/mps/index.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 include_once '../../includes/easyparliament/init.php';
4
-include_once INCLUDESPATH."easyparliament/people.php";
4
+include_once INCLUDESPATH . "easyparliament/people.php";
5 5
 
6 6
 if (get_http_var('msp')) {
7 7
     $type = 'MSPs';
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 $args = $people->getArgs();
19 19
 $people->setMetaData($args);
20 20
 $data = $people->getData($args);
21
-if ( isset($args['f']) && $args['f'] == 'csv' ) {
21
+if (isset($args['f']) && $args['f'] == 'csv') {
22 22
     $people->sendAsCSV($data);
23 23
 } else {
24 24
     MySociety\TheyWorkForYou\Renderer::output("people/index", $data);
Please login to merge, or discard this patch.
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,11 +5,14 @@  discard block
 block discarded – undo
5 5
 
6 6
 if (get_http_var('msp')) {
7 7
     $type = 'MSPs';
8
-} elseif (get_http_var('mla')) {
8
+}
9
+elseif (get_http_var('mla')) {
9 10
     $type = 'MLAs';
10
-} elseif (get_http_var('peer')) {
11
+}
12
+elseif (get_http_var('peer')) {
11 13
     $type = 'Peers';
12
-} else {
14
+}
15
+else {
13 16
     $type = 'MPs';
14 17
 }
15 18
 
@@ -20,6 +23,7 @@  discard block
 block discarded – undo
20 23
 $data = $people->getData($args);
21 24
 if ( isset($args['f']) && $args['f'] == 'csv' ) {
22 25
     $people->sendAsCSV($data);
23
-} else {
26
+}
27
+else {
24 28
     MySociety\TheyWorkForYou\Renderer::output("people/index", $data);
25 29
 }
Please login to merge, or discard this patch.
www/docs/mps/speaker09.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     where personinfo.person_id=member.person_id and left_house='$left_house'
51 51
     and data_key='speaker_candidate_contacted_on'");
52 52
 $pids = array();
53
-for ($i=0; $i<$q->rows(); $i++) {
53
+for ($i = 0; $i < $q->rows(); $i++) {
54 54
     $pid = $q->field($i, 'person_id');
55 55
     $pids[] = $pid;
56 56
     $member[$pid] = new MEMBER(array('person_id' => $pid));
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     order by data_key desc");
64 64
 echo '<table>';
65 65
 $oldpid = null;
66
-for ($i=0; $i<$q->rows(); $i++) {
66
+for ($i = 0; $i < $q->rows(); $i++) {
67 67
     $pid = $q->field($i, 'person_id');
68 68
     $value = $q->field($i, 'data_value');
69 69
     $key = $q->field($i, 'data_key');
Please login to merge, or discard this patch.
Braces   +13 added lines, -7 removed lines patch added patch discarded remove patch
@@ -68,7 +68,9 @@  discard block
 block discarded – undo
68 68
     $value = $q->field($i, 'data_value');
69 69
     $key = $q->field($i, 'data_key');
70 70
     if ($pid != $oldpid) {
71
-        if ($oldpid) print "</tr>\n";
71
+        if ($oldpid) {
72
+            print "</tr>\n";
73
+        }
72 74
         print '<tr><th align="left"><a href="' . $member[$pid]->url() . '">' . $member[$pid]->full_name() . '</a></th>';
73 75
         $oldpid = $pid;
74 76
     }
@@ -77,14 +79,18 @@  discard block
 block discarded – undo
77 79
             $value = rtrim($value);
78 80
             $value = rtrim($value, ".");
79 81
             echo "<td>$value ";
80
-        } else {
82
+        }
83
+        else {
81 84
             echo "<td>No response ";
82 85
         }
83
-    } else {
84
-        if ($value)
85
-            echo "(and <strong>was</strong> a candidate for speaker).</td>";
86
-        else
87
-            echo "(but <strong>was not</strong> a candidate for speaker).</td>";
86
+    }
87
+    else {
88
+        if ($value) {
89
+                    echo "(and <strong>was</strong> a candidate for speaker).</td>";
90
+        }
91
+        else {
92
+                    echo "(but <strong>was not</strong> a candidate for speaker).</td>";
93
+        }
88 94
     }
89 95
 }
90 96
 
Please login to merge, or discard this patch.
www/docs/images/mps/photo-status.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
     WHERE house=1 AND left_house = (SELECT MAX(left_house) FROM member) ';
12 12
 $q = $db->query($query . "ORDER BY person_id");
13 13
 $out = array('both'=>'', 'small'=>'', 'none'=>array());
14
-for ($i=0; $i<$q->rows(); $i++) {
14
+for ($i = 0; $i < $q->rows(); $i++) {
15 15
     $p_id = $q->field($i, 'person_id');
16 16
     list($dummy, $sz) = MySociety\TheyWorkForYou\Utility\Member::findMemberImage($p_id);
17 17
     if ($sz == 'L') {
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
         array_push($out['none'], '<li>' . $q->field($i, 'person_id') . ' (' . $q->field($i, 'party') . ')' . ', ' . $q->field($i, 'constituency'));
23 23
     }
24 24
 }
25
-print '<h3>Missing completely ('.count($out['none']).')</h3> <ul>';
25
+print '<h3>Missing completely (' . count($out['none']) . ')</h3> <ul>';
26 26
 print join($out['none'], "\n");
27 27
 print '</ul>';
28 28
 print '<h3>Large and small</h3> <p>';
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,9 +16,11 @@
 block discarded – undo
16 16
     list($dummy, $sz) = MySociety\TheyWorkForYou\Utility\Member::findMemberImage($p_id);
17 17
     if ($sz == 'L') {
18 18
         $out['both'] .= $q->field($i, 'person_id') . ', ';
19
-    } elseif ($sz == 'S') {
19
+    }
20
+    elseif ($sz == 'S') {
20 21
         $out['small'] .= $q->field($i, 'person_id') . ', ';
21
-    } else {
22
+    }
23
+    else {
22 24
         array_push($out['none'], '<li>' . $q->field($i, 'person_id') . ' (' . $q->field($i, 'party') . ')' . ', ' . $q->field($i, 'constituency'));
23 25
     }
24 26
 }
Please login to merge, or discard this patch.
www/includes/easyparliament/trackback.php 2 patches
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     public function moderate_trackbacks() { return $this->moderate_trackbacks; }
52 52
 
53 53
 
54
-    public function display ($view, $args=array(), $format='html') {
54
+    public function display($view, $args = array(), $format = 'html') {
55 55
         // $view is one of:
56 56
         //	'epobject_id' - display the pings for one epobject.
57 57
         // 	'recent' - to get the most recent pings to anywhere.
@@ -64,18 +64,18 @@  discard block
 block discarded – undo
64 64
         if ($view == 'epobject_id' || $view == 'recent') {
65 65
 
66 66
             // What function do we call for this view?
67
-            $function = '_get_trackbacks_by_'.$view;
67
+            $function = '_get_trackbacks_by_' . $view;
68 68
             // Get all the data that's to be rendered.
69 69
             $trackbackdata = $this->$function($args);
70 70
 
71 71
         } else {
72
-            $PAGE->error_message ("You haven't specified a valid view type.");
72
+            $PAGE->error_message("You haven't specified a valid view type.");
73 73
             return false;
74 74
         }
75 75
 
76
-        $data = array (
76
+        $data = array(
77 77
             'data' 	=> $trackbackdata,
78
-            'info'	=> array (
78
+            'info'	=> array(
79 79
                 'view' => $view
80 80
             )
81 81
         );
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
         $this->render($view, $data, $format);
87 87
     }
88 88
 
89
-    public function render($view, $data, $format='html') {
89
+    public function render($view, $data, $format = 'html') {
90 90
 
91 91
         if ($format != 'html') {
92 92
             $format = 'html';
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
         // We currently only have one kind of trackback template, so
96 96
         // we're ignoring $view here I'm afraid...
97 97
 
98
-        include (INCLUDESPATH."easyparliament/templates/$format/trackbacks" . ".php");
98
+        include (INCLUDESPATH . "easyparliament/templates/$format/trackbacks" . ".php");
99 99
 
100 100
     }
101 101
 
@@ -131,14 +131,14 @@  discard block
 block discarded – undo
131 131
 
132 132
 
133 133
         // Still here? Then we're trackbacking to a valid hansard item.
134
-        $url 		= $trackbackdata['url'];
135
-        $source_ip	= $trackbackdata['source_ip'];
134
+        $url = $trackbackdata['url'];
135
+        $source_ip = $trackbackdata['source_ip'];
136 136
         // These all strip_tags too.
137
-        $title 		= trim_characters(html_entity_decode($trackbackdata['title']), 0, 255);
138
-        $excerpt 	= trim_characters(html_entity_decode($trackbackdata['excerpt']), 0, 255);
139
-        $blog_name 	= trim_characters(html_entity_decode($trackbackdata['blog_name']), 0, 255);
137
+        $title = trim_characters(html_entity_decode($trackbackdata['title']), 0, 255);
138
+        $excerpt = trim_characters(html_entity_decode($trackbackdata['excerpt']), 0, 255);
139
+        $blog_name = trim_characters(html_entity_decode($trackbackdata['blog_name']), 0, 255);
140 140
 
141
-        $visible 		= $this->moderate_trackbacks ? 0 : 1;
141
+        $visible = $this->moderate_trackbacks ? 0 : 1;
142 142
 
143 143
         $q = $this->db->query("INSERT INTO trackbacks
144 144
                         (epobject_id, blog_name, title, excerpt, url, source_ip, posted, visible)
@@ -198,8 +198,8 @@  discard block
 block discarded – undo
198 198
                         ");
199 199
 
200 200
         if ($q->rows() > 0) {
201
-            for ($row=0; $row<$q->rows(); $row++) {
202
-                $trackbackdata[] = array (
201
+            for ($row = 0; $row < $q->rows(); $row++) {
202
+                $trackbackdata[] = array(
203 203
                     'trackback_id' 	=> $q->field($row, 'trackback_id'),
204 204
                     'epobject_id'	=> $q->field($row, 'epobject_id'),
205 205
                     'blog_name' 	=> $q->field($row, 'blog_name'),
@@ -247,8 +247,8 @@  discard block
 block discarded – undo
247 247
                         ");
248 248
 
249 249
         if ($q->rows() > 0) {
250
-            for ($row=0; $row<$q->rows(); $row++) {
251
-                $trackbackdata[] = array (
250
+            for ($row = 0; $row < $q->rows(); $row++) {
251
+                $trackbackdata[] = array(
252 252
                     'trackback_id' 	=> $q->field($row, 'trackback_id'),
253 253
                     'epobject_id'	=> $q->field($row, 'epobject_id'),
254 254
                     'blog_name' 	=> $q->field($row, 'blog_name'),
@@ -277,13 +277,13 @@  discard block
 block discarded – undo
277 277
             // This page just does XML.
278 278
 
279 279
             if ($error) {
280
-                echo '<?xml version="1.0" encoding="utf-8"?'.">\n";
280
+                echo '<?xml version="1.0" encoding="utf-8"?' . ">\n";
281 281
                 echo "<response>\n";
282 282
                 echo "<error>1</error>\n";
283 283
                 echo "<message>$error_message</message>\n";
284 284
                 echo "</response>";
285 285
             } else {
286
-                echo '<?xml version="1.0" encoding="utf-8"?'.">\n";
286
+                echo '<?xml version="1.0" encoding="utf-8"?' . ">\n";
287 287
                 echo "<response>\n";
288 288
                 echo "<error>0</error>\n";
289 289
                 echo "</response>";
Please login to merge, or discard this patch.
Braces   +12 added lines, -6 removed lines patch added patch discarded remove patch
@@ -42,7 +42,8 @@  discard block
 block discarded – undo
42 42
         // Set in init.php
43 43
         if (ALLOWTRACKBACKS == true) {
44 44
             $this->trackbacks_enabled = true;
45
-        } else {
45
+        }
46
+        else {
46 47
             $this->trackbacks_enabled = false;
47 48
         }
48 49
     }
@@ -68,7 +69,8 @@  discard block
 block discarded – undo
68 69
             // Get all the data that's to be rendered.
69 70
             $trackbackdata = $this->$function($args);
70 71
 
71
-        } else {
72
+        }
73
+        else {
72 74
             $PAGE->error_message ("You haven't specified a valid view type.");
73 75
             return false;
74 76
         }
@@ -157,7 +159,8 @@  discard block
 block discarded – undo
157 159
             // Return a success message.
158 160
             $this->_trackback_response(0);
159 161
 
160
-        } else {
162
+        }
163
+        else {
161 164
             die ("Sorry, we could not save the trackback to the database. Please <a href=\"mailto:" . CONTACTEMAIL . "\">email us</a> to let us know. Thanks.");
162 165
         }
163 166
     }
@@ -282,7 +285,8 @@  discard block
 block discarded – undo
282 285
                 echo "<error>1</error>\n";
283 286
                 echo "<message>$error_message</message>\n";
284 287
                 echo "</response>";
285
-            } else {
288
+            }
289
+            else {
286 290
                 echo '<?xml version="1.0" encoding="utf-8"?'.">\n";
287 291
                 echo "<response>\n";
288 292
                 echo "<error>0</error>\n";
@@ -290,12 +294,14 @@  discard block
 block discarded – undo
290 294
             }
291 295
             die();
292 296
 
293
-        } else {
297
+        }
298
+        else {
294 299
             // We're adding a trackback from a page that's probably expecting HTML.
295 300
 
296 301
             if ($error) {
297 302
                 $PAGE->error_message($error_message);
298
-            } else {
303
+            }
304
+            else {
299 305
                 print "<p>Trackback added successfully.</p>\n";
300 306
             }
301 307
         }
Please login to merge, or discard this patch.
www/includes/easyparliament/glossarylist.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 class GLOSSARYLIST {
4 4
 
5
-    public function render($data, $format='html', $template='glossary') {
5
+    public function render($data, $format = 'html', $template = 'glossary') {
6 6
         // Once we have the data that's to be rendered,
7 7
         // include the template.
8 8
 
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
             $format = 'html';
11 11
         }
12 12
 
13
-        include (INCLUDESPATH."easyparliament/templates/$format/$template.php");
13
+        include (INCLUDESPATH . "easyparliament/templates/$format/$template.php");
14 14
 
15 15
     }
16 16
 
Please login to merge, or discard this patch.