Test Setup Failed
Push — gcconnex ( ce8bb3...ee5ffc )
by Ilia
05:11
created
mod/au_subgroups/views/default/au_subgroups/group/elements/summary.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 		<?php
14 14
 		$link = elgg_view('output/url', array(
15 15
 			'href' => $parent->getURL(),
16
-			'text' => gc_explode_translation($parent->title,$lang),
16
+			'text' => gc_explode_translation($parent->title, $lang),
17 17
 			'is_trusted' => true
18 18
 		));
19 19
 
Please login to merge, or discard this patch.
mod/au_subgroups/views/default/au_subgroups/search_results.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
 if ($groups) {
34 34
   echo '<div class="au-subgroups-result-col">';
35 35
   
36
-  for ($i=0; $i<count($groups); $i++) {
36
+  for ($i = 0; $i < count($groups); $i++) {
37 37
 	// break results into 2 columns of 5
38 38
 	if ($i == 5) {
39 39
 	  echo '</div>';
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -5,8 +5,7 @@  discard block
 block discarded – undo
5 5
 if ($vars['subgroup_guid']) {
6 6
   $subgroup_guid = $vars['subgroup_guid'];
7 7
   $subgroup = get_entity($subgroup_guid);
8
-}
9
-else {
8
+} else {
10 9
   $subgroup = elgg_get_page_owner_entity();
11 10
 }
12 11
 
@@ -21,8 +20,7 @@  discard block
 block discarded – undo
21 20
 
22 21
 if (empty($vars['q'])) {
23 22
   $options['order_by'] = "g.name ASC";
24
-}
25
-else {
23
+} else {
26 24
   $query = sanitize_string($vars['q']);
27 25
   $options['wheres'][] = "g.name LIKE '%{$query}%'";
28 26
 }
@@ -42,8 +40,7 @@  discard block
 block discarded – undo
42 40
 	
43 41
 	if (can_move_subgroup($subgroup, $groups[$i])) {
44 42
 	  $class = 'au-subgroups-parentable';
45
-	}
46
-	else {
43
+	} else {
47 44
 	  $class = 'au-subgroups-non-parentable';
48 45
 	}
49 46
 	
@@ -55,8 +52,7 @@  discard block
 block discarded – undo
55 52
   }
56 53
   
57 54
   echo '</div>';
58
-}
59
-else {
55
+} else {
60 56
   echo elgg_echo('au_subgroups:search:noresults');
61 57
 }
62 58
 elgg_pop_context();
Please login to merge, or discard this patch.
mod/au_subgroups/lib/functions.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 				$breadcrumbs[] = $parentcrumb;
22 22
 			}
23 23
 
24
-			$group_title = gc_explode_translation($group->name,$lang);
24
+			$group_title = gc_explode_translation($group->name, $lang);
25 25
 
26 26
 			$breadcrumbs[] = array(
27 27
 				'title' => $group_title,
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 				$breadcrumbs[] = $parentcrumb;
45 45
 			}
46 46
 
47
-			$breadcrumbs[] = array('title' => gc_explode_translation($group->name,$lang), 'link' => $group->getURL());
47
+			$breadcrumbs[] = array('title' => gc_explode_translation($group->name, $lang), 'link' => $group->getURL());
48 48
 			$breadcrumbs[] = array('title' => elgg_echo('groups:edit'), 'link' => NULL);
49 49
 			set_input('au_subgroups_breadcrumbs', $breadcrumbs);
50 50
 			break;
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 
187 187
 	while ($parent = get_parent_group($group)) {
188 188
 
189
-		$group_name = gc_explode_translation($parent->title,$lang);
189
+		$group_name = gc_explode_translation($parent->title, $lang);
190 190
 
191 191
 		$parents[] = array('title' => $group_name, 'link' => $parent->getURL());
192 192
 		$group = $parent;
Please login to merge, or discard this patch.
mod/blog/views/default/blog/sidebar/archives.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
  */
5 5
 
6 6
 // cyu - 01/04/2016: as per eric cantin's advice
7
-if (elgg_is_active_plugin('gc_fedsearch_gsa') && ((!$gsa_usertest) && strcmp($gsa_agentstring,strtolower($_SERVER['HTTP_USER_AGENT'])) == 0) || strstr(strtolower($_SERVER['HTTP_USER_AGENT']), 'gsa-crawler') !== false ) {
7
+if (elgg_is_active_plugin('gc_fedsearch_gsa') && ((!$gsa_usertest) && strcmp($gsa_agentstring, strtolower($_SERVER['HTTP_USER_AGENT'])) == 0) || strstr(strtolower($_SERVER['HTTP_USER_AGENT']), 'gsa-crawler') !== false) {
8 8
 	// do nothing...
9 9
 } else {
10 10
 	$loggedin_user = elgg_get_logged_in_user_entity();
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 			$title = elgg_echo('blog:archives');
26 26
 			$content = '<ul class="blog-archives">';
27 27
 			foreach ($dates as $date) {
28
-				$timestamplow = mktime(0, 0, 0, substr($date,4,2) , 1, substr($date, 0, 4));
28
+				$timestamplow = mktime(0, 0, 0, substr($date, 4, 2), 1, substr($date, 0, 4));
29 29
 				$timestamphigh = mktime(0, 0, 0, ((int) substr($date, 4, 2)) + 1, 1, substr($date, 0, 4));
30 30
 				$link = elgg_get_site_url() . $url_segment . '/' . $timestamplow . '/' . $timestamphigh;
31 31
 				$month = elgg_echo('date:month:' . substr($date, 4, 2), array(substr($date, 0, 4)));
Please login to merge, or discard this patch.
mod/blog/views/default/blog/sidebar/revisions.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 
8 8
 
9 9
 // cyu - 01/04/2016: as per eric cantin's advice
10
-if (elgg_is_active_plugin('gc_fedsearch_gsa') && ((!$gsa_usertest) && strcmp($gsa_agentstring,strtolower($_SERVER['HTTP_USER_AGENT'])) == 0) || strstr(strtolower($_SERVER['HTTP_USER_AGENT']), 'gsa-crawler') !== false ) {
10
+if (elgg_is_active_plugin('gc_fedsearch_gsa') && ((!$gsa_usertest) && strcmp($gsa_agentstring, strtolower($_SERVER['HTTP_USER_AGENT'])) == 0) || strstr(strtolower($_SERVER['HTTP_USER_AGENT']), 'gsa-crawler') !== false) {
11 11
  
12 12
 } else {
13 13
 
@@ -54,12 +54,12 @@  discard block
 block discarded – undo
54 54
 					'is_trusted' => true,
55 55
 				));
56 56
 
57
-				$time = "<span class='elgg-subtext'>". elgg_view_friendly_time($blog->time_created) . "</span>";
57
+				$time = "<span class='elgg-subtext'>" . elgg_view_friendly_time($blog->time_created) . "</span>";
58 58
 				$body .= "<li>$load : $time</li>";
59 59
 			}
60 60
 
61 61
 			foreach ($revisions as $revision) {
62
-				$time = "<span class='elgg-subtext'>". elgg_view_friendly_time($revision->time_created) . "</span>";
62
+				$time = "<span class='elgg-subtext'>" . elgg_view_friendly_time($revision->time_created) . "</span>";
63 63
 
64 64
 				if ($revision->name == 'blog_auto_save') {
65 65
 					$revision_lang = elgg_echo('blog:auto_saved_revision');
Please login to merge, or discard this patch.
mod/blog/lib/blog.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@
 block discarded – undo
85 85
 		$options['container_guid'] = $container_guid;
86 86
 		$container = get_entity($container_guid);
87 87
 		
88
-        $return['title'] = elgg_echo('blog:title:user_blogs', array(gc_explode_translation($container->name, $lang)));
88
+		$return['title'] = elgg_echo('blog:title:user_blogs', array(gc_explode_translation($container->name, $lang)));
89 89
 
90 90
 		$crumbs_title = gc_explode_translation($container->name, $lang);
91 91
 		elgg_push_breadcrumb($crumbs_title);
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -27,12 +27,12 @@  discard block
 block discarded – undo
27 27
  	$container = $blog->getContainerEntity();
28 28
 
29 29
 	
30
-	$return['title'] =  gc_explode_translation($blog->title, $lang);
30
+	$return['title'] = gc_explode_translation($blog->title, $lang);
31 31
 
32
-	if (!$container->title){
33
-		$crumbs_title = gc_explode_translation($container->name,$lang);
34
-	}else{
35
-		$crumbs_title = gc_explode_translation($container->title,$lang);
32
+	if (!$container->title) {
33
+		$crumbs_title = gc_explode_translation($container->name, $lang);
34
+	} else {
35
+		$crumbs_title = gc_explode_translation($container->title, $lang);
36 36
 	}
37 37
 	
38 38
 
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	}
45 45
 
46 46
 	
47
-	elgg_push_breadcrumb(gc_explode_translation($blog->title,$lang));
47
+	elgg_push_breadcrumb(gc_explode_translation($blog->title, $lang));
48 48
 
49 49
 	
50 50
 	$return['content'] = elgg_view_entity($blog, array('full_view' => true));
@@ -192,11 +192,11 @@  discard block
 block discarded – undo
192 192
 	elgg_push_breadcrumb(elgg_echo('blog:archives'));
193 193
 
194 194
 	if ($lower) {
195
-		$lower = (int)$lower;
195
+		$lower = (int) $lower;
196 196
 	}
197 197
 
198 198
 	if ($upper) {
199
-		$upper = (int)$upper;
199
+		$upper = (int) $upper;
200 200
 	}
201 201
 
202 202
 	$options = array(
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 	$sidebar = '';
253 253
 
254 254
 	if ($page == 'edit') {
255
-		$blog = get_entity((int)$guid);
255
+		$blog = get_entity((int) $guid);
256 256
 		$title = elgg_echo('blog:edit');
257 257
 
258 258
 		if (elgg_instanceof($blog, 'object', 'blog') && $blog->canEdit()) {
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
 			$title .= ": \"$blog->title\"";
261 261
 
262 262
 			if ($revision) {
263
-				$revision = elgg_get_annotation_from_id((int)$revision);
263
+				$revision = elgg_get_annotation_from_id((int) $revision);
264 264
 				$vars['revision'] = $revision;
265 265
 				$title .= ' ' . elgg_echo('blog:edit_revision_notice');
266 266
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
 
32 32
 	if (!$container->title){
33 33
 		$crumbs_title = gc_explode_translation($container->name,$lang);
34
-	}else{
34
+	} else{
35 35
 		$crumbs_title = gc_explode_translation($container->title,$lang);
36 36
 	}
37 37
 	
Please login to merge, or discard this patch.
mod/c_members_byDepartment/actions/c_member_byDepartment/tag_users.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -13,24 +13,24 @@
 block discarded – undo
13 13
 }
14 14
 
15 15
 $connection = mysqli_connect($read_settings["host"], $read_settings["user"], $read_settings["password"], $read_settings["database"]);
16
-if (mysqli_connect_errno($connection)) elgg_log("Failed to connect to MySQL: ".mysqli_connect_errno(), 'NOTICE');
17
-$result = mysqli_query($connection,$query);
16
+if (mysqli_connect_errno($connection)) elgg_log("Failed to connect to MySQL: " . mysqli_connect_errno(), 'NOTICE');
17
+$result = mysqli_query($connection, $query);
18 18
 mysqli_close($connection);
19 19
 
20 20
 $tagging_members = array();
21 21
 while ($row = mysqli_fetch_array($result)) {
22 22
 	$department = $row['email'];
23
-	$department = explode('@',$department);
24
-	$department = explode('.',$department[1]);
23
+	$department = explode('@', $department);
24
+	$department = explode('.', $department[1]);
25 25
 	$tagging_members[$row['username']] = strtoupper($department[0]);
26 26
 }
27 27
 
28 28
 $today = date("YmdHis");
29
-$data_directory = $CONFIG->dataroot.'gc_dept'.DIRECTORY_SEPARATOR;
29
+$data_directory = $CONFIG->dataroot . 'gc_dept' . DIRECTORY_SEPARATOR;
30 30
 if (is_array($tagging_members)) {
31
-	error_log('cyu - this is an array to location: '.$data_directory.'tagged_members_'.$today);
32
-	$write_as_backup = file_put_contents($data_directory.'tagged_members_'.$today.'.json', json_encode($tagging_members));
31
+	error_log('cyu - this is an array to location: ' . $data_directory . 'tagged_members_' . $today);
32
+	$write_as_backup = file_put_contents($data_directory . 'tagged_members_' . $today . '.json', json_encode($tagging_members));
33 33
 }
34 34
 
35
-error_log('cyu - write status: '.$write_as_backup.' /// size of array: '.count($tagging_members));
35
+error_log('cyu - write status: ' . $write_as_backup . ' /// size of array: ' . count($tagging_members));
36 36
 forward(REFERER);
37 37
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,9 @@
 block discarded – undo
13 13
 }
14 14
 
15 15
 $connection = mysqli_connect($read_settings["host"], $read_settings["user"], $read_settings["password"], $read_settings["database"]);
16
-if (mysqli_connect_errno($connection)) elgg_log("Failed to connect to MySQL: ".mysqli_connect_errno(), 'NOTICE');
16
+if (mysqli_connect_errno($connection)) {
17
+	elgg_log("Failed to connect to MySQL: ".mysqli_connect_errno(), 'NOTICE');
18
+}
17 19
 $result = mysqli_query($connection,$query);
18 20
 mysqli_close($connection);
19 21
 
Please login to merge, or discard this patch.
c_members_byDepartment/actions/c_member_byDepartment/generate_report.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 global $CONFIG;
4
-$data_directory = $CONFIG->dataroot.'gc_dept'.DIRECTORY_SEPARATOR;
4
+$data_directory = $CONFIG->dataroot . 'gc_dept' . DIRECTORY_SEPARATOR;
5 5
 
6
-$information_array = json_decode(file_get_contents($data_directory.'department_directory.json'));
6
+$information_array = json_decode(file_get_contents($data_directory . 'department_directory.json'));
7 7
 $information_array = get_object_vars($information_array);
8 8
 
9 9
 $last_member = elgg_get_entities(array('types' => 'user', 'limit' => '1'));
@@ -22,8 +22,8 @@  discard block
 block discarded – undo
22 22
 	}
23 23
 
24 24
 	$connection = mysqli_connect($read_settings["host"], $read_settings["user"], $read_settings["password"], $read_settings["database"]);
25
-	if (mysqli_connect_errno($connection)) elgg_log("cyu - Failed to connect to MySQL: ".mysqli_connect_errno(), 'NOTICE');
26
-	$result = mysqli_query($connection,$query);
25
+	if (mysqli_connect_errno($connection)) elgg_log("cyu - Failed to connect to MySQL: " . mysqli_connect_errno(), 'NOTICE');
26
+	$result = mysqli_query($connection, $query);
27 27
 	mysqli_close($connection);
28 28
 
29 29
 	$array_of_users = array();
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 	{
32 32
 		$domain = explode('@', strtolower($row['email']));
33 33
 		$filter_domain = explode('.', $domain[1]);
34
-		if ($filter_domain[count($filter_domain) - 2].'.'.$filter_domain[count($filter_domain) - 1] === 'gc.ca')
34
+		if ($filter_domain[count($filter_domain) - 2] . '.' . $filter_domain[count($filter_domain) - 1] === 'gc.ca')
35 35
 			$array_of_users[$row['guid']] = $filter_domain[0];
36 36
 		else
37 37
 			$array_of_users[$row['guid']] = $domain[1];
@@ -50,13 +50,13 @@  discard block
 block discarded – undo
50 50
 			$main_json_file[$value] = array('members' => $main_json_file[$value]);
51 51
 		}
52 52
 		$user = get_user($key);
53
-		$tmp_arr = array_merge($main_json_file[$value], array($key => strtolower($user->email).'|'.strtolower($user->username).'|'.$key.'|'.$user->time_created.'|'.$user->name.'|'.$user->getIconURL()));
53
+		$tmp_arr = array_merge($main_json_file[$value], array($key => strtolower($user->email) . '|' . strtolower($user->username) . '|' . $key . '|' . $user->time_created . '|' . $user->name . '|' . $user->getIconURL()));
54 54
 		$main_json_file[$value] = $tmp_arr;
55 55
 	}
56 56
 	
57
-	$write_to_json = file_put_contents($data_directory.'department_directory.json', json_encode($main_json_file));
57
+	$write_to_json = file_put_contents($data_directory . 'department_directory.json', json_encode($main_json_file));
58 58
 	$today = date("YmdHis");
59
-	$write_as_backup = file_put_contents($data_directory.'department_directory_'.$today.'.json', json_encode($main_json_file));
59
+	$write_as_backup = file_put_contents($data_directory . 'department_directory_' . $today . '.json', json_encode($main_json_file));
60 60
 }
61 61
 
62 62
 forward(REFERER);
63 63
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +8 added lines, -5 removed lines patch added patch discarded remove patch
@@ -22,7 +22,9 @@  discard block
 block discarded – undo
22 22
 	}
23 23
 
24 24
 	$connection = mysqli_connect($read_settings["host"], $read_settings["user"], $read_settings["password"], $read_settings["database"]);
25
-	if (mysqli_connect_errno($connection)) elgg_log("cyu - Failed to connect to MySQL: ".mysqli_connect_errno(), 'NOTICE');
25
+	if (mysqli_connect_errno($connection)) {
26
+		elgg_log("cyu - Failed to connect to MySQL: ".mysqli_connect_errno(), 'NOTICE');
27
+	}
26 28
 	$result = mysqli_query($connection,$query);
27 29
 	mysqli_close($connection);
28 30
 
@@ -31,10 +33,11 @@  discard block
 block discarded – undo
31 33
 	{
32 34
 		$domain = explode('@', strtolower($row['email']));
33 35
 		$filter_domain = explode('.', $domain[1]);
34
-		if ($filter_domain[count($filter_domain) - 2].'.'.$filter_domain[count($filter_domain) - 1] === 'gc.ca')
35
-			$array_of_users[$row['guid']] = $filter_domain[0];
36
-		else
37
-			$array_of_users[$row['guid']] = $domain[1];
36
+		if ($filter_domain[count($filter_domain) - 2].'.'.$filter_domain[count($filter_domain) - 1] === 'gc.ca') {
37
+					$array_of_users[$row['guid']] = $filter_domain[0];
38
+		} else {
39
+					$array_of_users[$row['guid']] = $domain[1];
40
+		}
38 41
 	}
39 42
 	$main_json_file = array();
40 43
 	$count_members = array();
Please login to merge, or discard this patch.
mod/gc_splash_page_collab/pages/splash.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
-  * Creates a splash page for GCcollab for users to check language.
4
-  */
3
+ * Creates a splash page for GCcollab for users to check language.
4
+ */
5 5
 
6 6
 $site_url = elgg_get_site_url();
7 7
 $jsLocation = $site_url . "mod/wet4/views/default/js/wet-boew.js";
@@ -11,9 +11,9 @@  discard block
 block discarded – undo
11 11
 $gccollab_text = elgg_echo('wet:login_welcome');
12 12
 
13 13
 if( _elgg_services()->session->get('language') == 'fr'){
14
-    $graphic_lang = 'fr';
14
+	$graphic_lang = 'fr';
15 15
 } else {
16
-    $graphic_lang = 'en';
16
+	$graphic_lang = 'en';
17 17
 }
18 18
 
19 19
 //Create The body of the splash
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 $body .= elgg_view('page/elements/foot');
143 143
 
144 144
 $head = elgg_view('page/elements/head', array(
145
-    'title' => 'GCcollab',
145
+	'title' => 'GCcollab',
146 146
 ));
147 147
 
148 148
 $params = array(
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,12 +5,12 @@
 block discarded – undo
5 5
 
6 6
 $site_url = elgg_get_site_url();
7 7
 $jsLocation = $site_url . "mod/wet4/views/default/js/wet-boew.js";
8
-$termsLink = $site_url .'terms';
9
-$frenchLink = $site_url .'login';
10
-$toggle_lang = $site_url .'mod/toggle_language/action/toggle_language/toggle';
8
+$termsLink = $site_url . 'terms';
9
+$frenchLink = $site_url . 'login';
10
+$toggle_lang = $site_url . 'mod/toggle_language/action/toggle_language/toggle';
11 11
 $gccollab_text = elgg_echo('wet:login_welcome');
12 12
 
13
-if( _elgg_services()->session->get('language') == 'fr'){
13
+if (_elgg_services()->session->get('language') == 'fr') {
14 14
     $graphic_lang = 'fr';
15 15
 } else {
16 16
     $graphic_lang = 'en';
Please login to merge, or discard this patch.