@@ -14,14 +14,14 @@ discard block |
||
14 | 14 | $user = elgg_get_logged_in_user_entity(); |
15 | 15 | $lang = get_current_language(); |
16 | 16 | |
17 | - if(!empty($q)){ |
|
17 | + if (!empty($q)) { |
|
18 | 18 | $db_prefix = elgg_get_config('dbprefix'); |
19 | 19 | $params['type'] = 'group'; |
20 | 20 | $params['limit'] = $limit; |
21 | - if (strlen($q) <=3) { |
|
21 | + if (strlen($q) <= 3) { |
|
22 | 22 | $params['query'] = $q; |
23 | 23 | } else { |
24 | - $params['query'] = '*'.$q.'*'; |
|
24 | + $params['query'] = '*' . $q . '*'; |
|
25 | 25 | } |
26 | 26 | $join = "JOIN {$db_prefix}groups_entity ge ON e.guid = ge.guid"; |
27 | 27 | $params['joins'] = array($join); |
@@ -32,12 +32,12 @@ discard block |
||
32 | 32 | $params['subtype'] = ELGG_ENTITIES_ANY_VALUE; |
33 | 33 | //$params['count'] = TRUE; |
34 | 34 | $groups = elgg_get_entities($params); |
35 | - foreach($groups as $group){ |
|
35 | + foreach ($groups as $group) { |
|
36 | 36 | //if (! $group->isMember($user)) { |
37 | - if (! $group->isPublicMembership()) { |
|
38 | - $result[] = array("type" => "group", "value" => $group->getGUID(),"label" => $group->name,"content" => "<a class=' text-unstyled ' href='".$group->getURL()."'><img class='mrgn-rght-sm' src='" . $group->getIconURL("small") . "' /><span>" . gc_explode_translation($group->name,$lang) . "</span></a>", "name" => $group->name); |
|
37 | + if (!$group->isPublicMembership()) { |
|
38 | + $result[] = array("type" => "group", "value" => $group->getGUID(), "label" => $group->name, "content" => "<a class=' text-unstyled ' href='" . $group->getURL() . "'><img class='mrgn-rght-sm' src='" . $group->getIconURL("small") . "' /><span>" . gc_explode_translation($group->name, $lang) . "</span></a>", "name" => $group->name); |
|
39 | 39 | } else { |
40 | - $result[] = array("type" => "group", "value" => $group->getGUID(),"label" => $group->name,"content" => "<a class=' text-unstyled ' href='".$group->getURL()."'><img class='mrgn-rght-sm' src='" . $group->getIconURL("small") . "' /><span>" . gc_explode_translation($group->name,$lang)."</span></a>", "name" => $group->name); |
|
40 | + $result[] = array("type" => "group", "value" => $group->getGUID(), "label" => $group->name, "content" => "<a class=' text-unstyled ' href='" . $group->getURL() . "'><img class='mrgn-rght-sm' src='" . $group->getIconURL("small") . "' /><span>" . gc_explode_translation($group->name, $lang) . "</span></a>", "name" => $group->name); |
|
41 | 41 | } |
42 | 42 | //} |
43 | 43 | } |
@@ -339,13 +339,13 @@ |
||
339 | 339 | 'text' => elgg_echo('notifications:subscriptions:changesettings'), |
340 | 340 | 'href' => "notifications/personal/{$user->username}", |
341 | 341 | 'section' => "configure", |
342 | - ); |
|
342 | + ); |
|
343 | 343 | |
344 | 344 | elgg_register_menu_item('page', $params); |
345 | 345 | |
346 | 346 | if (elgg_is_active_plugin('groups')) { |
347 | 347 | $params = array( |
348 | - 'name' => '2_group_notify', |
|
348 | + 'name' => '2_group_notify', |
|
349 | 349 | 'text' => elgg_echo('notifications:subscriptions:changesettings:groups'), |
350 | 350 | 'href' => "notifications/group/{$user->username}", |
351 | 351 | 'section' => "configure", |
@@ -178,7 +178,7 @@ |
||
178 | 178 | $domain_addr = explode('.', $dom); |
179 | 179 | $domain_len = count($domain_addr) - 1; |
180 | 180 | |
181 | - if ($domain_addr[$domain_len - 1].'.'.$domain_addr[$domain_len] === 'gc.ca') |
|
181 | + if ($domain_addr[$domain_len - 1] . '.' . $domain_addr[$domain_len] === 'gc.ca') |
|
182 | 182 | { |
183 | 183 | //elgg_log('cyu - domain:'.$dom. ' this is a valid domain', 'NOTICE'); |
184 | 184 | $isNotValid = false; |
@@ -13,91 +13,91 @@ |
||
13 | 13 | |
14 | 14 | ***********************************************************************/ |
15 | 15 | /** |
16 | - * GCconnex combine English and French text into one string |
|
17 | - * |
|
18 | - * |
|
19 | - * @uses string $english_txt English text |
|
20 | - * @uses string $french_txt French Text |
|
21 | - * |
|
22 | - */ |
|
16 | + * GCconnex combine English and French text into one string |
|
17 | + * |
|
18 | + * |
|
19 | + * @uses string $english_txt English text |
|
20 | + * @uses string $french_txt French Text |
|
21 | + * |
|
22 | + */ |
|
23 | 23 | function gc_implode_translation($english_txt,$french_txt) |
24 | 24 | { |
25 | - $value = json_encode( array( "en" => $english_txt, "fr" => $french_txt ) ); |
|
25 | + $value = json_encode( array( "en" => $english_txt, "fr" => $french_txt ) ); |
|
26 | 26 | |
27 | - return $value; |
|
27 | + return $value; |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | function gc_explode_translation($imploded_txt, $lang) |
31 | 31 | { |
32 | - $json=json_decode($imploded_txt); |
|
32 | + $json=json_decode($imploded_txt); |
|
33 | 33 | |
34 | - if( isset($json->en) || isset($json->fr) ){ |
|
35 | - if( $lang == 'en' && trim($json->en) != ''){ |
|
36 | - $value=$json->en; |
|
37 | - } |
|
38 | - else if( $lang == 'fr' && trim($json->fr) != ''){ |
|
39 | - $value=$json->fr; |
|
40 | - } |
|
41 | - else |
|
42 | - { |
|
43 | - if( ($lang=='fr') && trim($json->fr) == '' ){ |
|
44 | - $value=$json->en; |
|
45 | - } |
|
46 | - else if( ($lang=='en') && trim($json->en) == '' ){ |
|
47 | - $value=$json->fr; |
|
48 | - } |
|
49 | - } |
|
50 | - } |
|
51 | - else |
|
52 | - { |
|
53 | - $value=$imploded_txt; |
|
54 | - } |
|
34 | + if( isset($json->en) || isset($json->fr) ){ |
|
35 | + if( $lang == 'en' && trim($json->en) != ''){ |
|
36 | + $value=$json->en; |
|
37 | + } |
|
38 | + else if( $lang == 'fr' && trim($json->fr) != ''){ |
|
39 | + $value=$json->fr; |
|
40 | + } |
|
41 | + else |
|
42 | + { |
|
43 | + if( ($lang=='fr') && trim($json->fr) == '' ){ |
|
44 | + $value=$json->en; |
|
45 | + } |
|
46 | + else if( ($lang=='en') && trim($json->en) == '' ){ |
|
47 | + $value=$json->fr; |
|
48 | + } |
|
49 | + } |
|
50 | + } |
|
51 | + else |
|
52 | + { |
|
53 | + $value=$imploded_txt; |
|
54 | + } |
|
55 | 55 | |
56 | - return $value; |
|
56 | + return $value; |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | function old_gc_explode_translation($imploded_txt, $lang) |
60 | 60 | { |
61 | - $text_ar=explode('[:',$imploded_txt); |
|
62 | - $en=''; |
|
63 | - $fr=''; |
|
64 | - if(count($text_ar)>0){ |
|
65 | - foreach($text_ar as $value){ |
|
66 | - if(strpos($value, "en]")!==false){ |
|
67 | - $en=substr($value,3,strlen($value)); |
|
68 | - } |
|
69 | - elseif(strpos($value, "fr]")!==false) |
|
70 | - { |
|
71 | - $fr=substr($value,3,strlen($value)); |
|
72 | - } |
|
73 | - } |
|
74 | - if($lang=='en' && trim($en)<>''){ |
|
75 | - $value=$en; |
|
76 | - } |
|
77 | - elseif($lang=='fr' && trim($fr)<>''){ |
|
78 | - $value=$fr; |
|
79 | - } |
|
80 | - else |
|
81 | - { |
|
82 | - if(($lang=='fr') && (!$fr)){ |
|
83 | - /* $value=$fr; |
|
61 | + $text_ar=explode('[:',$imploded_txt); |
|
62 | + $en=''; |
|
63 | + $fr=''; |
|
64 | + if(count($text_ar)>0){ |
|
65 | + foreach($text_ar as $value){ |
|
66 | + if(strpos($value, "en]")!==false){ |
|
67 | + $en=substr($value,3,strlen($value)); |
|
68 | + } |
|
69 | + elseif(strpos($value, "fr]")!==false) |
|
70 | + { |
|
71 | + $fr=substr($value,3,strlen($value)); |
|
72 | + } |
|
73 | + } |
|
74 | + if($lang=='en' && trim($en)<>''){ |
|
75 | + $value=$en; |
|
76 | + } |
|
77 | + elseif($lang=='fr' && trim($fr)<>''){ |
|
78 | + $value=$fr; |
|
79 | + } |
|
80 | + else |
|
81 | + { |
|
82 | + if(($lang=='fr') && (!$fr)){ |
|
83 | + /* $value=$fr; |
|
84 | 84 | }else{*/ |
85 | - $value=""; // for migration we want to maintain these as is |
|
86 | - } |
|
85 | + $value=""; // for migration we want to maintain these as is |
|
86 | + } |
|
87 | 87 | |
88 | - if(($lang=='en') && (!$en)){ |
|
89 | - /* $value=$en; |
|
88 | + if(($lang=='en') && (!$en)){ |
|
89 | + /* $value=$en; |
|
90 | 90 | }else{*/ |
91 | - $value=""; // for migration we want to maintain these as is |
|
92 | - } |
|
91 | + $value=""; // for migration we want to maintain these as is |
|
92 | + } |
|
93 | 93 | |
94 | - } |
|
95 | - } |
|
96 | - else |
|
97 | - { |
|
98 | - $value=$imploded_txt; |
|
99 | - } |
|
100 | - return $value; |
|
94 | + } |
|
95 | + } |
|
96 | + else |
|
97 | + { |
|
98 | + $value=$imploded_txt; |
|
99 | + } |
|
100 | + return $value; |
|
101 | 101 | |
102 | 102 | } |
103 | 103 | ?> |
104 | 104 | \ No newline at end of file |
@@ -20,37 +20,37 @@ discard block |
||
20 | 20 | * @uses string $french_txt French Text |
21 | 21 | * |
22 | 22 | */ |
23 | -function gc_implode_translation($english_txt,$french_txt) |
|
23 | +function gc_implode_translation($english_txt, $french_txt) |
|
24 | 24 | { |
25 | - $value = json_encode( array( "en" => $english_txt, "fr" => $french_txt ) ); |
|
25 | + $value = json_encode(array("en" => $english_txt, "fr" => $french_txt)); |
|
26 | 26 | |
27 | 27 | return $value; |
28 | 28 | } |
29 | 29 | |
30 | 30 | function gc_explode_translation($imploded_txt, $lang) |
31 | 31 | { |
32 | - $json=json_decode($imploded_txt); |
|
32 | + $json = json_decode($imploded_txt); |
|
33 | 33 | |
34 | - if( isset($json->en) || isset($json->fr) ){ |
|
35 | - if( $lang == 'en' && trim($json->en) != ''){ |
|
36 | - $value=$json->en; |
|
34 | + if (isset($json->en) || isset($json->fr)) { |
|
35 | + if ($lang == 'en' && trim($json->en) != '') { |
|
36 | + $value = $json->en; |
|
37 | 37 | } |
38 | - else if( $lang == 'fr' && trim($json->fr) != ''){ |
|
39 | - $value=$json->fr; |
|
38 | + else if ($lang == 'fr' && trim($json->fr) != '') { |
|
39 | + $value = $json->fr; |
|
40 | 40 | } |
41 | 41 | else |
42 | 42 | { |
43 | - if( ($lang=='fr') && trim($json->fr) == '' ){ |
|
44 | - $value=$json->en; |
|
43 | + if (($lang == 'fr') && trim($json->fr) == '') { |
|
44 | + $value = $json->en; |
|
45 | 45 | } |
46 | - else if( ($lang=='en') && trim($json->en) == '' ){ |
|
47 | - $value=$json->fr; |
|
46 | + else if (($lang == 'en') && trim($json->en) == '') { |
|
47 | + $value = $json->fr; |
|
48 | 48 | } |
49 | 49 | } |
50 | 50 | } |
51 | 51 | else |
52 | 52 | { |
53 | - $value=$imploded_txt; |
|
53 | + $value = $imploded_txt; |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | return $value; |
@@ -58,44 +58,44 @@ discard block |
||
58 | 58 | |
59 | 59 | function old_gc_explode_translation($imploded_txt, $lang) |
60 | 60 | { |
61 | - $text_ar=explode('[:',$imploded_txt); |
|
62 | - $en=''; |
|
63 | - $fr=''; |
|
64 | - if(count($text_ar)>0){ |
|
65 | - foreach($text_ar as $value){ |
|
66 | - if(strpos($value, "en]")!==false){ |
|
67 | - $en=substr($value,3,strlen($value)); |
|
61 | + $text_ar = explode('[:', $imploded_txt); |
|
62 | + $en = ''; |
|
63 | + $fr = ''; |
|
64 | + if (count($text_ar) > 0) { |
|
65 | + foreach ($text_ar as $value) { |
|
66 | + if (strpos($value, "en]") !== false) { |
|
67 | + $en = substr($value, 3, strlen($value)); |
|
68 | 68 | } |
69 | - elseif(strpos($value, "fr]")!==false) |
|
69 | + elseif (strpos($value, "fr]") !== false) |
|
70 | 70 | { |
71 | - $fr=substr($value,3,strlen($value)); |
|
71 | + $fr = substr($value, 3, strlen($value)); |
|
72 | 72 | } |
73 | 73 | } |
74 | - if($lang=='en' && trim($en)<>''){ |
|
75 | - $value=$en; |
|
74 | + if ($lang == 'en' && trim($en) <> '') { |
|
75 | + $value = $en; |
|
76 | 76 | } |
77 | - elseif($lang=='fr' && trim($fr)<>''){ |
|
78 | - $value=$fr; |
|
77 | + elseif ($lang == 'fr' && trim($fr) <> '') { |
|
78 | + $value = $fr; |
|
79 | 79 | } |
80 | 80 | else |
81 | 81 | { |
82 | - if(($lang=='fr') && (!$fr)){ |
|
82 | + if (($lang == 'fr') && (!$fr)) { |
|
83 | 83 | /* $value=$fr; |
84 | 84 | }else{*/ |
85 | - $value=""; // for migration we want to maintain these as is |
|
85 | + $value = ""; // for migration we want to maintain these as is |
|
86 | 86 | } |
87 | 87 | |
88 | - if(($lang=='en') && (!$en)){ |
|
88 | + if (($lang == 'en') && (!$en)) { |
|
89 | 89 | /* $value=$en; |
90 | 90 | }else{*/ |
91 | - $value=""; // for migration we want to maintain these as is |
|
91 | + $value = ""; // for migration we want to maintain these as is |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | } |
95 | 95 | } |
96 | 96 | else |
97 | 97 | { |
98 | - $value=$imploded_txt; |
|
98 | + $value = $imploded_txt; |
|
99 | 99 | } |
100 | 100 | return $value; |
101 | 101 |
@@ -34,21 +34,17 @@ discard block |
||
34 | 34 | if( isset($json->en) || isset($json->fr) ){ |
35 | 35 | if( $lang == 'en' && trim($json->en) != ''){ |
36 | 36 | $value=$json->en; |
37 | - } |
|
38 | - else if( $lang == 'fr' && trim($json->fr) != ''){ |
|
37 | + } else if( $lang == 'fr' && trim($json->fr) != ''){ |
|
39 | 38 | $value=$json->fr; |
40 | - } |
|
41 | - else |
|
39 | + } else |
|
42 | 40 | { |
43 | 41 | if( ($lang=='fr') && trim($json->fr) == '' ){ |
44 | 42 | $value=$json->en; |
45 | - } |
|
46 | - else if( ($lang=='en') && trim($json->en) == '' ){ |
|
43 | + } else if( ($lang=='en') && trim($json->en) == '' ){ |
|
47 | 44 | $value=$json->fr; |
48 | 45 | } |
49 | 46 | } |
50 | - } |
|
51 | - else |
|
47 | + } else |
|
52 | 48 | { |
53 | 49 | $value=$imploded_txt; |
54 | 50 | } |
@@ -65,19 +61,16 @@ discard block |
||
65 | 61 | foreach($text_ar as $value){ |
66 | 62 | if(strpos($value, "en]")!==false){ |
67 | 63 | $en=substr($value,3,strlen($value)); |
68 | - } |
|
69 | - elseif(strpos($value, "fr]")!==false) |
|
64 | + } elseif(strpos($value, "fr]")!==false) |
|
70 | 65 | { |
71 | 66 | $fr=substr($value,3,strlen($value)); |
72 | 67 | } |
73 | 68 | } |
74 | 69 | if($lang=='en' && trim($en)<>''){ |
75 | 70 | $value=$en; |
76 | - } |
|
77 | - elseif($lang=='fr' && trim($fr)<>''){ |
|
71 | + } elseif($lang=='fr' && trim($fr)<>''){ |
|
78 | 72 | $value=$fr; |
79 | - } |
|
80 | - else |
|
73 | + } else |
|
81 | 74 | { |
82 | 75 | if(($lang=='fr') && (!$fr)){ |
83 | 76 | /* $value=$fr; |
@@ -92,8 +85,7 @@ discard block |
||
92 | 85 | } |
93 | 86 | |
94 | 87 | } |
95 | - } |
|
96 | - else |
|
88 | + } else |
|
97 | 89 | { |
98 | 90 | $value=$imploded_txt; |
99 | 91 | } |
@@ -1,59 +1,59 @@ |
||
1 | 1 | <?php |
2 | 2 | $french = array( |
3 | - 'gccollab_stats:title' => "Statistiques de GCcollab", |
|
4 | - 'gcconnex_stats:title' => "Statistiques de GCconnex", |
|
5 | - 'gccollab_stats:unknown' => "Inconnu", |
|
6 | - 'gccollab_stats:membercount' => "Membres inscrits", |
|
7 | - 'gccollab_stats:loading' => "Chargement des données...", |
|
3 | + 'gccollab_stats:title' => "Statistiques de GCcollab", |
|
4 | + 'gcconnex_stats:title' => "Statistiques de GCconnex", |
|
5 | + 'gccollab_stats:unknown' => "Inconnu", |
|
6 | + 'gccollab_stats:membercount' => "Membres inscrits", |
|
7 | + 'gccollab_stats:loading' => "Chargement des données...", |
|
8 | 8 | |
9 | - 'gccollab_stats:registration:title' => "Inscription des membres", |
|
10 | - 'gccollab_stats:types:select' => "Sélectionner le type de membre :", |
|
11 | - 'gccollab_stats:types:title' => "Types de membres", |
|
12 | - 'gccollab_stats:federal:title' => "Gouvernement fédéral", |
|
13 | - 'gccollab_stats:student:title' => "Étudiants", |
|
14 | - 'gccollab_stats:academic:title' => "Universitaires", |
|
15 | - 'gccollab_stats:provincial:title' => "Provinciaux/territoriaux", |
|
16 | - 'gccollab_stats:municipal:title' => "Administration municipale", |
|
17 | - 'gccollab_stats:international:title' => "International / Gouvernement étranger", |
|
18 | - 'gccollab_stats:ngo:title' => "Organismes non gouvernementaux", |
|
19 | - 'gccollab_stats:community:title' => "Collectivité / Sans but lucratif", |
|
20 | - 'gccollab_stats:business:title' => "Entreprise", |
|
21 | - 'gccollab_stats:media:title' => "Média", |
|
22 | - 'gccollab_stats:retired:title' => "Fonctionnaire à la retraité(e)", |
|
23 | - 'gccollab_stats:other:title' => "Autres", |
|
9 | + 'gccollab_stats:registration:title' => "Inscription des membres", |
|
10 | + 'gccollab_stats:types:select' => "Sélectionner le type de membre :", |
|
11 | + 'gccollab_stats:types:title' => "Types de membres", |
|
12 | + 'gccollab_stats:federal:title' => "Gouvernement fédéral", |
|
13 | + 'gccollab_stats:student:title' => "Étudiants", |
|
14 | + 'gccollab_stats:academic:title' => "Universitaires", |
|
15 | + 'gccollab_stats:provincial:title' => "Provinciaux/territoriaux", |
|
16 | + 'gccollab_stats:municipal:title' => "Administration municipale", |
|
17 | + 'gccollab_stats:international:title' => "International / Gouvernement étranger", |
|
18 | + 'gccollab_stats:ngo:title' => "Organismes non gouvernementaux", |
|
19 | + 'gccollab_stats:community:title' => "Collectivité / Sans but lucratif", |
|
20 | + 'gccollab_stats:business:title' => "Entreprise", |
|
21 | + 'gccollab_stats:media:title' => "Média", |
|
22 | + 'gccollab_stats:retired:title' => "Fonctionnaire à la retraité(e)", |
|
23 | + 'gccollab_stats:other:title' => "Autres", |
|
24 | 24 | |
25 | - 'gccollab_stats:organization' => "Organisation", |
|
26 | - 'gccollab_stats:membertype' => "Type de membre", |
|
27 | - 'gccollab_stats:date' => "Date :", |
|
28 | - 'gccollab_stats:signups' => "Inscriptions :", |
|
29 | - 'gccollab_stats:total' => "Total :", |
|
30 | - 'gccollab_stats:users' => "utilisateur(s)", |
|
31 | - 'gccollab_stats:department' => "Département", |
|
32 | - 'gccollab_stats:province' => "Province / Territoire", |
|
25 | + 'gccollab_stats:organization' => "Organisation", |
|
26 | + 'gccollab_stats:membertype' => "Type de membre", |
|
27 | + 'gccollab_stats:date' => "Date :", |
|
28 | + 'gccollab_stats:signups' => "Inscriptions :", |
|
29 | + 'gccollab_stats:total' => "Total :", |
|
30 | + 'gccollab_stats:users' => "utilisateur(s)", |
|
31 | + 'gccollab_stats:department' => "Département", |
|
32 | + 'gccollab_stats:province' => "Province / Territoire", |
|
33 | 33 | |
34 | - 'gccollab_stats:wireposts:title' => "Messages sur le fil", |
|
35 | - 'gccollab_stats:wireposts:amount' => "Nombre de messages sur le fil", |
|
36 | - 'gccollab_stats:blogposts:title' => "Billets de blogue", |
|
37 | - 'gccollab_stats:blogposts:amount' => "Nombre de billets de blogue", |
|
38 | - 'gccollab_stats:comments:title' => "Commentaires", |
|
39 | - 'gccollab_stats:comments:amount' => "Nombre de commentaires", |
|
40 | - 'gccollab_stats:groups:label' => "Groupes :", |
|
41 | - 'gccollab_stats:groups:amount' => "Nombre de groupes", |
|
42 | - 'gccollab_stats:groupscreated:title' => "Groupes créés", |
|
43 | - 'gccollab_stats:groupscreated:amount' => "Nombre de groupes créés", |
|
44 | - 'gccollab_stats:groupsjoined:title' => "Groupes rejoints", |
|
45 | - 'gccollab_stats:groupsjoined:amount' => "Nombre de groupes rejoints", |
|
46 | - 'gccollab_stats:likes:title' => "J\'aimes", |
|
47 | - 'gccollab_stats:likes:amount' => "Nombre de j\'aimes", |
|
48 | - 'gccollab_stats:messages:title' => "Messages", |
|
49 | - 'gccollab_stats:messages:amount' => "Nombre de messages", |
|
50 | - 'gccollab_stats:optins:title' => "Inscriptions", |
|
51 | - 'gccollab_stats:optins:amount' => "Nombre d'inscriptions", |
|
34 | + 'gccollab_stats:wireposts:title' => "Messages sur le fil", |
|
35 | + 'gccollab_stats:wireposts:amount' => "Nombre de messages sur le fil", |
|
36 | + 'gccollab_stats:blogposts:title' => "Billets de blogue", |
|
37 | + 'gccollab_stats:blogposts:amount' => "Nombre de billets de blogue", |
|
38 | + 'gccollab_stats:comments:title' => "Commentaires", |
|
39 | + 'gccollab_stats:comments:amount' => "Nombre de commentaires", |
|
40 | + 'gccollab_stats:groups:label' => "Groupes :", |
|
41 | + 'gccollab_stats:groups:amount' => "Nombre de groupes", |
|
42 | + 'gccollab_stats:groupscreated:title' => "Groupes créés", |
|
43 | + 'gccollab_stats:groupscreated:amount' => "Nombre de groupes créés", |
|
44 | + 'gccollab_stats:groupsjoined:title' => "Groupes rejoints", |
|
45 | + 'gccollab_stats:groupsjoined:amount' => "Nombre de groupes rejoints", |
|
46 | + 'gccollab_stats:likes:title' => "J\'aimes", |
|
47 | + 'gccollab_stats:likes:amount' => "Nombre de j\'aimes", |
|
48 | + 'gccollab_stats:messages:title' => "Messages", |
|
49 | + 'gccollab_stats:messages:amount' => "Nombre de messages", |
|
50 | + 'gccollab_stats:optins:title' => "Inscriptions", |
|
51 | + 'gccollab_stats:optins:amount' => "Nombre d'inscriptions", |
|
52 | 52 | |
53 | - 'gccollab_stats:ministrymessage' => "Cliquez sur les colonnes pour afficher les ministères de la province ou du territoire", |
|
54 | - 'gccollab_stats:schoolmessage' => "Cliquez sur les colonnes pour afficher les différentes écoles", |
|
55 | - 'gccollab_stats:zoommessage' => "- Cliquez et glissez pour faire un zoom avant", |
|
56 | - 'gccollab_stats:pinchmessage' => "Pincer le graphique pour le zoomer", |
|
53 | + 'gccollab_stats:ministrymessage' => "Cliquez sur les colonnes pour afficher les ministères de la province ou du territoire", |
|
54 | + 'gccollab_stats:schoolmessage' => "Cliquez sur les colonnes pour afficher les différentes écoles", |
|
55 | + 'gccollab_stats:zoommessage' => "- Cliquez et glissez pour faire un zoom avant", |
|
56 | + 'gccollab_stats:pinchmessage' => "Pincer le graphique pour le zoomer", |
|
57 | 57 | ); |
58 | 58 | |
59 | 59 | add_translation("fr", $french); |
60 | 60 | \ No newline at end of file |
@@ -1,59 +1,59 @@ |
||
1 | 1 | <?php |
2 | 2 | $english = array( |
3 | - 'gccollab_stats:title' => "GCcollab Statistics", |
|
4 | - 'gcconnex_stats:title' => "GCconnex Statistics", |
|
5 | - 'gccollab_stats:unknown' => "Unknown", |
|
6 | - 'gccollab_stats:membercount' => "Registered Members", |
|
7 | - 'gccollab_stats:loading' => "Loading data...", |
|
3 | + 'gccollab_stats:title' => "GCcollab Statistics", |
|
4 | + 'gcconnex_stats:title' => "GCconnex Statistics", |
|
5 | + 'gccollab_stats:unknown' => "Unknown", |
|
6 | + 'gccollab_stats:membercount' => "Registered Members", |
|
7 | + 'gccollab_stats:loading' => "Loading data...", |
|
8 | 8 | |
9 | - 'gccollab_stats:registration:title' => "Member Registration", |
|
10 | - 'gccollab_stats:types:select' => "Select Member Type:", |
|
11 | - 'gccollab_stats:types:title' => "Member Types", |
|
12 | - 'gccollab_stats:federal:title' => "Federal", |
|
13 | - 'gccollab_stats:student:title' => "Student", |
|
14 | - 'gccollab_stats:academic:title' => "Academic", |
|
15 | - 'gccollab_stats:provincial:title' => "Provincial/Territorial", |
|
16 | - 'gccollab_stats:municipal:title' => "Municipal Government", |
|
17 | - 'gccollab_stats:international:title' => "International/Foreign Government", |
|
18 | - 'gccollab_stats:ngo:title' => "Non-Governmental Organization", |
|
19 | - 'gccollab_stats:community:title' => "Community/Non-profit", |
|
20 | - 'gccollab_stats:business:title' => "Business", |
|
21 | - 'gccollab_stats:media:title' => "Media", |
|
22 | - 'gccollab_stats:retired:title' => "Retired Public Servants", |
|
23 | - 'gccollab_stats:other:title' => "Other", |
|
9 | + 'gccollab_stats:registration:title' => "Member Registration", |
|
10 | + 'gccollab_stats:types:select' => "Select Member Type:", |
|
11 | + 'gccollab_stats:types:title' => "Member Types", |
|
12 | + 'gccollab_stats:federal:title' => "Federal", |
|
13 | + 'gccollab_stats:student:title' => "Student", |
|
14 | + 'gccollab_stats:academic:title' => "Academic", |
|
15 | + 'gccollab_stats:provincial:title' => "Provincial/Territorial", |
|
16 | + 'gccollab_stats:municipal:title' => "Municipal Government", |
|
17 | + 'gccollab_stats:international:title' => "International/Foreign Government", |
|
18 | + 'gccollab_stats:ngo:title' => "Non-Governmental Organization", |
|
19 | + 'gccollab_stats:community:title' => "Community/Non-profit", |
|
20 | + 'gccollab_stats:business:title' => "Business", |
|
21 | + 'gccollab_stats:media:title' => "Media", |
|
22 | + 'gccollab_stats:retired:title' => "Retired Public Servants", |
|
23 | + 'gccollab_stats:other:title' => "Other", |
|
24 | 24 | |
25 | - 'gccollab_stats:organization' => "Organization", |
|
26 | - 'gccollab_stats:membertype' => "Member Type", |
|
27 | - 'gccollab_stats:date' => "Date:", |
|
28 | - 'gccollab_stats:signups' => "Signups:", |
|
29 | - 'gccollab_stats:total' => "Total:", |
|
30 | - 'gccollab_stats:users' => "user(s)", |
|
31 | - 'gccollab_stats:department' => "Department", |
|
32 | - 'gccollab_stats:province' => "Province/Territory", |
|
25 | + 'gccollab_stats:organization' => "Organization", |
|
26 | + 'gccollab_stats:membertype' => "Member Type", |
|
27 | + 'gccollab_stats:date' => "Date:", |
|
28 | + 'gccollab_stats:signups' => "Signups:", |
|
29 | + 'gccollab_stats:total' => "Total:", |
|
30 | + 'gccollab_stats:users' => "user(s)", |
|
31 | + 'gccollab_stats:department' => "Department", |
|
32 | + 'gccollab_stats:province' => "Province/Territory", |
|
33 | 33 | |
34 | - 'gccollab_stats:wireposts:title' => "Wire Posts", |
|
35 | - 'gccollab_stats:wireposts:amount' => "Amount of Wire Posts", |
|
36 | - 'gccollab_stats:blogposts:title' => "Blog Posts", |
|
37 | - 'gccollab_stats:blogposts:amount' => "Amount of Blog Posts", |
|
38 | - 'gccollab_stats:comments:title' => "Comments", |
|
39 | - 'gccollab_stats:comments:amount' => "Amount of Comments", |
|
40 | - 'gccollab_stats:groups:label' => "Groups:", |
|
41 | - 'gccollab_stats:groups:amount' => "Amount of Groups", |
|
42 | - 'gccollab_stats:groupscreated:title' => "Groups Created", |
|
43 | - 'gccollab_stats:groupscreated:amount' => "Amount of Groups Created", |
|
44 | - 'gccollab_stats:groupsjoined:title' => "Groups Joined", |
|
45 | - 'gccollab_stats:groupsjoined:amount' => "Amount of Groups Joined", |
|
46 | - 'gccollab_stats:likes:title' => "Likes", |
|
47 | - 'gccollab_stats:likes:amount' => "Amount of Likes", |
|
48 | - 'gccollab_stats:messages:title' => "Messages", |
|
49 | - 'gccollab_stats:messages:amount' => "Amount of Messages", |
|
50 | - 'gccollab_stats:optins:title' => "Opt Ins", |
|
51 | - 'gccollab_stats:optins:amount' => "Amount of Opt Ins", |
|
34 | + 'gccollab_stats:wireposts:title' => "Wire Posts", |
|
35 | + 'gccollab_stats:wireposts:amount' => "Amount of Wire Posts", |
|
36 | + 'gccollab_stats:blogposts:title' => "Blog Posts", |
|
37 | + 'gccollab_stats:blogposts:amount' => "Amount of Blog Posts", |
|
38 | + 'gccollab_stats:comments:title' => "Comments", |
|
39 | + 'gccollab_stats:comments:amount' => "Amount of Comments", |
|
40 | + 'gccollab_stats:groups:label' => "Groups:", |
|
41 | + 'gccollab_stats:groups:amount' => "Amount of Groups", |
|
42 | + 'gccollab_stats:groupscreated:title' => "Groups Created", |
|
43 | + 'gccollab_stats:groupscreated:amount' => "Amount of Groups Created", |
|
44 | + 'gccollab_stats:groupsjoined:title' => "Groups Joined", |
|
45 | + 'gccollab_stats:groupsjoined:amount' => "Amount of Groups Joined", |
|
46 | + 'gccollab_stats:likes:title' => "Likes", |
|
47 | + 'gccollab_stats:likes:amount' => "Amount of Likes", |
|
48 | + 'gccollab_stats:messages:title' => "Messages", |
|
49 | + 'gccollab_stats:messages:amount' => "Amount of Messages", |
|
50 | + 'gccollab_stats:optins:title' => "Opt Ins", |
|
51 | + 'gccollab_stats:optins:amount' => "Amount of Opt Ins", |
|
52 | 52 | |
53 | - 'gccollab_stats:ministrymessage' => "Click the columns to view the ministries within the province/territory", |
|
54 | - 'gccollab_stats:schoolmessage' => "Click the columns to view the various schools", |
|
55 | - 'gccollab_stats:zoommessage' => "- Click and drag to zoom in", |
|
56 | - 'gccollab_stats:pinchmessage' => "Pinch the chart to zoom in", |
|
53 | + 'gccollab_stats:ministrymessage' => "Click the columns to view the ministries within the province/territory", |
|
54 | + 'gccollab_stats:schoolmessage' => "Click the columns to view the various schools", |
|
55 | + 'gccollab_stats:zoommessage' => "- Click and drag to zoom in", |
|
56 | + 'gccollab_stats:pinchmessage' => "Pinch the chart to zoom in", |
|
57 | 57 | ); |
58 | 58 | |
59 | 59 | add_translation("en", $english); |
60 | 60 | \ No newline at end of file |
@@ -9,29 +9,29 @@ discard block |
||
9 | 9 | } |
10 | 10 | |
11 | 11 | elgg_ws_expose_function( |
12 | - "member.stats", |
|
13 | - "get_member_data", |
|
14 | - array( |
|
15 | - "type" => array('type' => 'string', 'required' => true), |
|
16 | - "lang" => array('type' => 'string', 'required' => false, 'default' => 'en') |
|
17 | - ), |
|
18 | - 'Exposes member data for use with dashboard', |
|
19 | - 'GET', |
|
20 | - false, |
|
21 | - false |
|
12 | + "member.stats", |
|
13 | + "get_member_data", |
|
14 | + array( |
|
15 | + "type" => array('type' => 'string', 'required' => true), |
|
16 | + "lang" => array('type' => 'string', 'required' => false, 'default' => 'en') |
|
17 | + ), |
|
18 | + 'Exposes member data for use with dashboard', |
|
19 | + 'GET', |
|
20 | + false, |
|
21 | + false |
|
22 | 22 | ); |
23 | 23 | |
24 | 24 | elgg_ws_expose_function( |
25 | - "site.stats", |
|
26 | - "get_site_data", |
|
27 | - array( |
|
28 | - "type" => array('type' => 'string', 'required' => true), |
|
29 | - "lang" => array('type' => 'string', 'required' => false, 'default' => 'en') |
|
30 | - ), |
|
31 | - 'Exposes site data for use with dashboard', |
|
32 | - 'GET', |
|
33 | - false, |
|
34 | - false |
|
25 | + "site.stats", |
|
26 | + "get_site_data", |
|
27 | + array( |
|
28 | + "type" => array('type' => 'string', 'required' => true), |
|
29 | + "lang" => array('type' => 'string', 'required' => false, 'default' => 'en') |
|
30 | + ), |
|
31 | + 'Exposes site data for use with dashboard', |
|
32 | + 'GET', |
|
33 | + false, |
|
34 | + false |
|
35 | 35 | ); |
36 | 36 | } |
37 | 37 | |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | $data = get_data($query); |
307 | 307 | } else if ($type === 'gcconnex') { |
308 | 308 | $dbprefix = elgg_get_config('dbprefix'); |
309 | - $query = "SELECT msv.string as department, count(*) as count FROM {$dbprefix}users_entity u LEFT JOIN {$dbprefix}metadata md ON u.guid = md.entity_guid LEFT JOIN {$dbprefix}metastrings msn ON md.name_id = msn.id LEFT JOIN {$dbprefix}metastrings msv ON md.value_id = msv.id WHERE msn.string = 'department' GROUP BY department ORDER BY count DESC LIMIT 25"; |
|
309 | + $query = "SELECT msv.string as department, count(*) as count FROM {$dbprefix}users_entity u LEFT JOIN {$dbprefix}metadata md ON u.guid = md.entity_guid LEFT JOIN {$dbprefix}metastrings msn ON md.name_id = msn.id LEFT JOIN {$dbprefix}metastrings msv ON md.value_id = msv.id WHERE msn.string = 'department' GROUP BY department ORDER BY count DESC LIMIT 25"; |
|
310 | 310 | $departments = get_data($query); |
311 | 311 | |
312 | 312 | foreach($departments as $key => $obj){ |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | } |
315 | 315 | } |
316 | 316 | |
317 | - return $data; |
|
317 | + return $data; |
|
318 | 318 | } |
319 | 319 | |
320 | 320 | function get_site_data($type, $lang) { |
@@ -443,5 +443,5 @@ discard block |
||
443 | 443 | } |
444 | 444 | } |
445 | 445 | } |
446 | - return $data; |
|
446 | + return $data; |
|
447 | 447 | } |
448 | 448 | \ No newline at end of file |
@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | |
5 | 5 | function gccollab_stats_init() { |
6 | 6 | elgg_register_page_handler('stats', 'stats_page_handler'); |
7 | - if( strpos(elgg_get_site_entity()->name, 'collab') !== false ){ |
|
7 | + if (strpos(elgg_get_site_entity()->name, 'collab') !== false) { |
|
8 | 8 | elgg_register_plugin_hook_handler('public_pages', 'walled_garden', 'gccollab_stats_public_page'); |
9 | 9 | } |
10 | 10 | |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | ); |
36 | 36 | } |
37 | 37 | |
38 | -function gccollab_stats_public_page($hook, $handler, $return, $params){ |
|
38 | +function gccollab_stats_public_page($hook, $handler, $return, $params) { |
|
39 | 39 | $pages = array('stats'); |
40 | 40 | return array_merge($pages, $return); |
41 | 41 | } |
@@ -58,15 +58,15 @@ discard block |
||
58 | 58 | 'limit' => 0 |
59 | 59 | )); |
60 | 60 | |
61 | - if ($lang == 'fr'){ |
|
61 | + if ($lang == 'fr') { |
|
62 | 62 | $users_types = array('federal' => 'féderal', 'academic' => 'milieu universitaire', 'student' => 'étudiant', 'provincial' => 'provincial', 'municipal' => 'municipale', 'international' => 'international', 'ngo' => 'ngo', 'community' => 'collectivité', 'business' => 'entreprise', 'media' => 'média', 'retired' => 'retraité(e)', 'other' => 'autre'); |
63 | 63 | |
64 | - foreach($users as $key => $obj){ |
|
65 | - $data[$users_types[$obj->user_type]] = isset( $data[$users_types[$obj->user_type]] ) ? $data[$users_types[$obj->user_type]] + 1 : 1; |
|
64 | + foreach ($users as $key => $obj) { |
|
65 | + $data[$users_types[$obj->user_type]] = isset($data[$users_types[$obj->user_type]]) ? $data[$users_types[$obj->user_type]] + 1 : 1; |
|
66 | 66 | } |
67 | 67 | } else { |
68 | - foreach($users as $key => $obj){ |
|
69 | - $data[$obj->user_type] = isset( $data[$obj->user_type] ) ? $data[$obj->user_type] + 1 : 1; |
|
68 | + foreach ($users as $key => $obj) { |
|
69 | + $data[$obj->user_type] = isset($data[$obj->user_type]) ? $data[$obj->user_type] + 1 : 1; |
|
70 | 70 | } |
71 | 71 | } |
72 | 72 | } else if ($type === 'federal') { |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | 'limit' => 0 |
79 | 79 | )); |
80 | 80 | |
81 | - if ($lang == 'fr'){ |
|
81 | + if ($lang == 'fr') { |
|
82 | 82 | $deptObj = elgg_get_entities(array( |
83 | 83 | 'type' => 'object', |
84 | 84 | 'subtype' => 'federal_departments', |
@@ -86,12 +86,12 @@ discard block |
||
86 | 86 | $depts = get_entity($deptObj[0]->guid); |
87 | 87 | $federal_departments = json_decode($depts->federal_departments_fr, true); |
88 | 88 | |
89 | - foreach($users as $key => $obj){ |
|
90 | - $data[$federal_departments[$obj->federal]] = isset( $data[$federal_departments[$obj->federal]] ) ? $data[$federal_departments[$obj->federal]] + 1 : 1; |
|
89 | + foreach ($users as $key => $obj) { |
|
90 | + $data[$federal_departments[$obj->federal]] = isset($data[$federal_departments[$obj->federal]]) ? $data[$federal_departments[$obj->federal]] + 1 : 1; |
|
91 | 91 | } |
92 | 92 | } else { |
93 | - foreach($users as $key => $obj){ |
|
94 | - $data[$obj->federal] = isset( $data[$obj->federal] ) ? $data[$obj->federal] + 1 : 1; |
|
93 | + foreach ($users as $key => $obj) { |
|
94 | + $data[$obj->federal] = isset($data[$obj->federal]) ? $data[$obj->federal] + 1 : 1; |
|
95 | 95 | } |
96 | 96 | } |
97 | 97 | } else if ($type === 'academic') { |
@@ -102,13 +102,13 @@ discard block |
||
102 | 102 | ), |
103 | 103 | 'limit' => 0 |
104 | 104 | )); |
105 | - foreach($users as $key => $obj){ |
|
106 | - $data[$obj->institution]['total'] = isset( $data[$obj->institution]['total'] ) ? $data[$obj->institution]['total'] + 1 : 1; |
|
107 | - if($obj->university){ |
|
108 | - $data[$obj->institution][$obj->university] = isset( $data[$obj->institution][$obj->university] ) ? $data[$obj->institution][$obj->university] + 1 : 1; |
|
105 | + foreach ($users as $key => $obj) { |
|
106 | + $data[$obj->institution]['total'] = isset($data[$obj->institution]['total']) ? $data[$obj->institution]['total'] + 1 : 1; |
|
107 | + if ($obj->university) { |
|
108 | + $data[$obj->institution][$obj->university] = isset($data[$obj->institution][$obj->university]) ? $data[$obj->institution][$obj->university] + 1 : 1; |
|
109 | 109 | } |
110 | - if($obj->college){ |
|
111 | - $data[$obj->institution][$obj->college] = isset( $data[$obj->institution][$obj->college] ) ? $data[$obj->institution][$obj->college] + 1 : 1; |
|
110 | + if ($obj->college) { |
|
111 | + $data[$obj->institution][$obj->college] = isset($data[$obj->institution][$obj->college]) ? $data[$obj->institution][$obj->college] + 1 : 1; |
|
112 | 112 | } |
113 | 113 | } |
114 | 114 | } else if ($type === 'student') { |
@@ -119,16 +119,16 @@ discard block |
||
119 | 119 | ), |
120 | 120 | 'limit' => 0 |
121 | 121 | )); |
122 | - foreach($users as $key => $obj){ |
|
123 | - $data[$obj->institution]['total'] = isset( $data[$obj->institution]['total'] ) ? $data[$obj->institution]['total'] + 1 : 1; |
|
124 | - if($obj->university){ |
|
125 | - $data[$obj->institution][$obj->university] = isset( $data[$obj->institution][$obj->university] ) ? $data[$obj->institution][$obj->university] + 1 : 1; |
|
122 | + foreach ($users as $key => $obj) { |
|
123 | + $data[$obj->institution]['total'] = isset($data[$obj->institution]['total']) ? $data[$obj->institution]['total'] + 1 : 1; |
|
124 | + if ($obj->university) { |
|
125 | + $data[$obj->institution][$obj->university] = isset($data[$obj->institution][$obj->university]) ? $data[$obj->institution][$obj->university] + 1 : 1; |
|
126 | 126 | } |
127 | - if($obj->college){ |
|
128 | - $data[$obj->institution][$obj->college] = isset( $data[$obj->institution][$obj->college] ) ? $data[$obj->institution][$obj->college] + 1 : 1; |
|
127 | + if ($obj->college) { |
|
128 | + $data[$obj->institution][$obj->college] = isset($data[$obj->institution][$obj->college]) ? $data[$obj->institution][$obj->college] + 1 : 1; |
|
129 | 129 | } |
130 | - if($obj->highschool){ |
|
131 | - $data[$obj->institution][$obj->highschool] = isset( $data[$obj->institution][$obj->highschool] ) ? $data[$obj->institution][$obj->highschool] + 1 : 1; |
|
130 | + if ($obj->highschool) { |
|
131 | + $data[$obj->institution][$obj->highschool] = isset($data[$obj->institution][$obj->highschool]) ? $data[$obj->institution][$obj->highschool] + 1 : 1; |
|
132 | 132 | } |
133 | 133 | } |
134 | 134 | } else if ($type === 'university') { |
@@ -140,9 +140,9 @@ discard block |
||
140 | 140 | ), |
141 | 141 | 'limit' => 0 |
142 | 142 | )); |
143 | - foreach($users as $key => $obj){ |
|
144 | - $data['total'] = isset( $data['total'] ) ? $data['total'] + 1 : 1; |
|
145 | - $data[$obj->university] = isset( $data[$obj->university] ) ? $data[$obj->university] + 1 : 1; |
|
143 | + foreach ($users as $key => $obj) { |
|
144 | + $data['total'] = isset($data['total']) ? $data['total'] + 1 : 1; |
|
145 | + $data[$obj->university] = isset($data[$obj->university]) ? $data[$obj->university] + 1 : 1; |
|
146 | 146 | } |
147 | 147 | } else if ($type === 'college') { |
148 | 148 | $users = elgg_get_entities_from_metadata(array( |
@@ -153,11 +153,11 @@ discard block |
||
153 | 153 | ), |
154 | 154 | 'limit' => 0 |
155 | 155 | )); |
156 | - foreach($users as $key => $obj){ |
|
157 | - $data['total'] = isset( $data['total'] ) ? $data['total'] + 1 : 1; |
|
158 | - $data[$obj->college] = isset( $data[$obj->college] ) ? $data[$obj->college] + 1 : 1; |
|
156 | + foreach ($users as $key => $obj) { |
|
157 | + $data['total'] = isset($data['total']) ? $data['total'] + 1 : 1; |
|
158 | + $data[$obj->college] = isset($data[$obj->college]) ? $data[$obj->college] + 1 : 1; |
|
159 | 159 | } |
160 | - } else if ($type === 'highschool') { |
|
160 | + } else if ($type === 'highschool') { |
|
161 | 161 | $users = elgg_get_entities_from_metadata(array( |
162 | 162 | 'type' => 'user', |
163 | 163 | 'metadata_name_value_pairs' => array( |
@@ -166,9 +166,9 @@ discard block |
||
166 | 166 | ), |
167 | 167 | 'limit' => 0 |
168 | 168 | )); |
169 | - foreach($users as $key => $obj){ |
|
170 | - $data['total'] = isset( $data['total'] ) ? $data['total'] + 1 : 1; |
|
171 | - $data[$obj->highschool] = isset( $data[$obj->highschool] ) ? $data[$obj->highschool] + 1 : 1; |
|
169 | + foreach ($users as $key => $obj) { |
|
170 | + $data['total'] = isset($data['total']) ? $data['total'] + 1 : 1; |
|
171 | + $data[$obj->highschool] = isset($data[$obj->highschool]) ? $data[$obj->highschool] + 1 : 1; |
|
172 | 172 | } |
173 | 173 | } else if ($type === 'provincial') { |
174 | 174 | $users = elgg_get_entities_from_metadata(array( |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | 'limit' => 0 |
180 | 180 | )); |
181 | 181 | |
182 | - if ($lang == 'fr'){ |
|
182 | + if ($lang == 'fr') { |
|
183 | 183 | $provObj = elgg_get_entities(array( |
184 | 184 | 'type' => 'object', |
185 | 185 | 'subtype' => 'provinces', |
@@ -194,14 +194,14 @@ discard block |
||
194 | 194 | $mins = get_entity($minObj[0]->guid); |
195 | 195 | $ministries = json_decode($mins->ministries_fr, true); |
196 | 196 | |
197 | - foreach($users as $key => $obj){ |
|
198 | - $data[$provincial_departments[$obj->provincial]]['total'] = isset( $data[$provincial_departments[$obj->provincial]]['total'] ) ? $data[$provincial_departments[$obj->provincial]]['total'] + 1 : 1; |
|
199 | - $data[$provincial_departments[$obj->provincial]][$ministries[$obj->provincial][$obj->ministry]] = isset( $data[$provincial_departments[$obj->provincial]][$ministries[$obj->provincial][$obj->ministry]] ) ? $data[$provincial_departments[$obj->provincial]][$ministries[$obj->provincial][$obj->ministry]] + 1 : 1; |
|
197 | + foreach ($users as $key => $obj) { |
|
198 | + $data[$provincial_departments[$obj->provincial]]['total'] = isset($data[$provincial_departments[$obj->provincial]]['total']) ? $data[$provincial_departments[$obj->provincial]]['total'] + 1 : 1; |
|
199 | + $data[$provincial_departments[$obj->provincial]][$ministries[$obj->provincial][$obj->ministry]] = isset($data[$provincial_departments[$obj->provincial]][$ministries[$obj->provincial][$obj->ministry]]) ? $data[$provincial_departments[$obj->provincial]][$ministries[$obj->provincial][$obj->ministry]] + 1 : 1; |
|
200 | 200 | } |
201 | 201 | } else { |
202 | - foreach($users as $key => $obj){ |
|
203 | - $data[$obj->provincial]['total'] = isset( $data[$obj->provincial]['total'] ) ? $data[$obj->provincial]['total'] + 1 : 1; |
|
204 | - $data[$obj->provincial][$obj->ministry] = isset( $data[$obj->provincial][$obj->ministry] ) ? $data[$obj->provincial][$obj->ministry] + 1 : 1; |
|
202 | + foreach ($users as $key => $obj) { |
|
203 | + $data[$obj->provincial]['total'] = isset($data[$obj->provincial]['total']) ? $data[$obj->provincial]['total'] + 1 : 1; |
|
204 | + $data[$obj->provincial][$obj->ministry] = isset($data[$obj->provincial][$obj->ministry]) ? $data[$obj->provincial][$obj->ministry] + 1 : 1; |
|
205 | 205 | } |
206 | 206 | } |
207 | 207 | } else if ($type === 'municipal') { |
@@ -212,9 +212,9 @@ discard block |
||
212 | 212 | ), |
213 | 213 | 'limit' => 0 |
214 | 214 | )); |
215 | - foreach($users as $key => $obj){ |
|
216 | - $data['total'] = isset( $data['total'] ) ? $data['total'] + 1 : 1; |
|
217 | - $data[$obj->municipal] = isset( $data[$obj->municipal] ) ? $data[$obj->municipal] + 1 : 1; |
|
215 | + foreach ($users as $key => $obj) { |
|
216 | + $data['total'] = isset($data['total']) ? $data['total'] + 1 : 1; |
|
217 | + $data[$obj->municipal] = isset($data[$obj->municipal]) ? $data[$obj->municipal] + 1 : 1; |
|
218 | 218 | } |
219 | 219 | } else if ($type === 'international') { |
220 | 220 | $users = elgg_get_entities_from_metadata(array( |
@@ -224,9 +224,9 @@ discard block |
||
224 | 224 | ), |
225 | 225 | 'limit' => 0 |
226 | 226 | )); |
227 | - foreach($users as $key => $obj){ |
|
228 | - $data['total'] = isset( $data['total'] ) ? $data['total'] + 1 : 1; |
|
229 | - $data[$obj->international] = isset( $data[$obj->international] ) ? $data[$obj->international] + 1 : 1; |
|
227 | + foreach ($users as $key => $obj) { |
|
228 | + $data['total'] = isset($data['total']) ? $data['total'] + 1 : 1; |
|
229 | + $data[$obj->international] = isset($data[$obj->international]) ? $data[$obj->international] + 1 : 1; |
|
230 | 230 | } |
231 | 231 | } else if ($type === 'ngo') { |
232 | 232 | $users = elgg_get_entities_from_metadata(array( |
@@ -236,9 +236,9 @@ discard block |
||
236 | 236 | ), |
237 | 237 | 'limit' => 0 |
238 | 238 | )); |
239 | - foreach($users as $key => $obj){ |
|
240 | - $data['total'] = isset( $data['total'] ) ? $data['total'] + 1 : 1; |
|
241 | - $data[$obj->ngo] = isset( $data[$obj->ngo] ) ? $data[$obj->ngo] + 1 : 1; |
|
239 | + foreach ($users as $key => $obj) { |
|
240 | + $data['total'] = isset($data['total']) ? $data['total'] + 1 : 1; |
|
241 | + $data[$obj->ngo] = isset($data[$obj->ngo]) ? $data[$obj->ngo] + 1 : 1; |
|
242 | 242 | } |
243 | 243 | } else if ($type === 'community') { |
244 | 244 | $users = elgg_get_entities_from_metadata(array( |
@@ -248,9 +248,9 @@ discard block |
||
248 | 248 | ), |
249 | 249 | 'limit' => 0 |
250 | 250 | )); |
251 | - foreach($users as $key => $obj){ |
|
252 | - $data['total'] = isset( $data['total'] ) ? $data['total'] + 1 : 1; |
|
253 | - $data[$obj->community] = isset( $data[$obj->community] ) ? $data[$obj->community] + 1 : 1; |
|
251 | + foreach ($users as $key => $obj) { |
|
252 | + $data['total'] = isset($data['total']) ? $data['total'] + 1 : 1; |
|
253 | + $data[$obj->community] = isset($data[$obj->community]) ? $data[$obj->community] + 1 : 1; |
|
254 | 254 | } |
255 | 255 | } else if ($type === 'business') { |
256 | 256 | $users = elgg_get_entities_from_metadata(array( |
@@ -260,9 +260,9 @@ discard block |
||
260 | 260 | ), |
261 | 261 | 'limit' => 0 |
262 | 262 | )); |
263 | - foreach($users as $key => $obj){ |
|
264 | - $data['total'] = isset( $data['total'] ) ? $data['total'] + 1 : 1; |
|
265 | - $data[$obj->business] = isset( $data[$obj->business] ) ? $data[$obj->business] + 1 : 1; |
|
263 | + foreach ($users as $key => $obj) { |
|
264 | + $data['total'] = isset($data['total']) ? $data['total'] + 1 : 1; |
|
265 | + $data[$obj->business] = isset($data[$obj->business]) ? $data[$obj->business] + 1 : 1; |
|
266 | 266 | } |
267 | 267 | } else if ($type === 'media') { |
268 | 268 | $users = elgg_get_entities_from_metadata(array( |
@@ -272,9 +272,9 @@ discard block |
||
272 | 272 | ), |
273 | 273 | 'limit' => 0 |
274 | 274 | )); |
275 | - foreach($users as $key => $obj){ |
|
276 | - $data['total'] = isset( $data['total'] ) ? $data['total'] + 1 : 1; |
|
277 | - $data[$obj->media] = isset( $data[$obj->media] ) ? $data[$obj->media] + 1 : 1; |
|
275 | + foreach ($users as $key => $obj) { |
|
276 | + $data['total'] = isset($data['total']) ? $data['total'] + 1 : 1; |
|
277 | + $data[$obj->media] = isset($data[$obj->media]) ? $data[$obj->media] + 1 : 1; |
|
278 | 278 | } |
279 | 279 | } else if ($type === 'retired') { |
280 | 280 | $users = elgg_get_entities_from_metadata(array( |
@@ -284,9 +284,9 @@ discard block |
||
284 | 284 | ), |
285 | 285 | 'limit' => 0 |
286 | 286 | )); |
287 | - foreach($users as $key => $obj){ |
|
288 | - $data['total'] = isset( $data['total'] ) ? $data['total'] + 1 : 1; |
|
289 | - $data[$obj->retired] = isset( $data[$obj->retired] ) ? $data[$obj->retired] + 1 : 1; |
|
287 | + foreach ($users as $key => $obj) { |
|
288 | + $data['total'] = isset($data['total']) ? $data['total'] + 1 : 1; |
|
289 | + $data[$obj->retired] = isset($data[$obj->retired]) ? $data[$obj->retired] + 1 : 1; |
|
290 | 290 | } |
291 | 291 | } else if ($type === 'other') { |
292 | 292 | $users = elgg_get_entities_from_metadata(array( |
@@ -296,9 +296,9 @@ discard block |
||
296 | 296 | ), |
297 | 297 | 'limit' => 0 |
298 | 298 | )); |
299 | - foreach($users as $key => $obj){ |
|
300 | - $data['total'] = isset( $data['total'] ) ? $data['total'] + 1 : 1; |
|
301 | - $data[$obj->other] = isset( $data[$obj->other] ) ? $data[$obj->other] + 1 : 1; |
|
299 | + foreach ($users as $key => $obj) { |
|
300 | + $data['total'] = isset($data['total']) ? $data['total'] + 1 : 1; |
|
301 | + $data[$obj->other] = isset($data[$obj->other]) ? $data[$obj->other] + 1 : 1; |
|
302 | 302 | } |
303 | 303 | } else if ($type === 'time') { |
304 | 304 | $dbprefix = elgg_get_config('dbprefix'); |
@@ -309,8 +309,8 @@ discard block |
||
309 | 309 | $query = "SELECT msv.string as department, count(*) as count FROM {$dbprefix}users_entity u LEFT JOIN {$dbprefix}metadata md ON u.guid = md.entity_guid LEFT JOIN {$dbprefix}metastrings msn ON md.name_id = msn.id LEFT JOIN {$dbprefix}metastrings msv ON md.value_id = msv.id WHERE msn.string = 'department' GROUP BY department ORDER BY count DESC LIMIT 25"; |
310 | 310 | $departments = get_data($query); |
311 | 311 | |
312 | - foreach($departments as $key => $obj){ |
|
313 | - $data[$obj->department] = (int)$obj->count; |
|
312 | + foreach ($departments as $key => $obj) { |
|
313 | + $data[$obj->department] = (int) $obj->count; |
|
314 | 314 | } |
315 | 315 | } |
316 | 316 | |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | $query = "SELECT guid, time_created, owner_guid FROM {$dbprefix}entities WHERE type = 'object' AND subtype = {$typeid} AND enabled = 'yes'"; |
330 | 330 | $wireposts = get_data($query); |
331 | 331 | |
332 | - foreach($wireposts as $key => $obj){ |
|
332 | + foreach ($wireposts as $key => $obj) { |
|
333 | 333 | $data[] = array($obj->time_created, "", $obj->owner_guid); |
334 | 334 | } |
335 | 335 | } else if ($type === 'blogposts') { |
@@ -338,7 +338,7 @@ discard block |
||
338 | 338 | $query = "SELECT guid, time_created, owner_guid FROM {$dbprefix}entities WHERE type = 'object' AND subtype = {$typeid} AND enabled = 'yes'"; |
339 | 339 | $blogposts = get_data($query); |
340 | 340 | |
341 | - foreach($blogposts as $key => $obj){ |
|
341 | + foreach ($blogposts as $key => $obj) { |
|
342 | 342 | $data[] = array($obj->time_created, "", "", $obj->owner_guid); |
343 | 343 | } |
344 | 344 | } else if ($type === 'comments') { |
@@ -347,22 +347,22 @@ discard block |
||
347 | 347 | $query = "SELECT guid, time_created, owner_guid FROM {$dbprefix}entities WHERE type = 'object' AND subtype = {$typeid} AND enabled = 'yes'"; |
348 | 348 | $comments = get_data($query); |
349 | 349 | |
350 | - foreach($comments as $key => $obj){ |
|
350 | + foreach ($comments as $key => $obj) { |
|
351 | 351 | $data[] = array($obj->time_created, "", $obj->owner_guid); |
352 | 352 | } |
353 | 353 | } else if ($type === 'groupscreated') { |
354 | 354 | $query = "SELECT guid, time_created, owner_guid FROM {$dbprefix}entities WHERE type = 'group' AND enabled = 'yes'"; |
355 | 355 | $groupscreated = get_data($query); |
356 | 356 | |
357 | - foreach($groupscreated as $key => $obj){ |
|
357 | + foreach ($groupscreated as $key => $obj) { |
|
358 | 358 | $data[] = array($obj->time_created, "", "", $obj->owner_guid); |
359 | 359 | } |
360 | 360 | } else if ($type === 'groupsjoined') { |
361 | 361 | $query = "SELECT * FROM {$dbprefix}entity_relationships WHERE relationship = 'member'"; |
362 | 362 | $groupsjoined = get_data($query); |
363 | 363 | |
364 | - foreach($groupsjoined as $key => $obj){ |
|
365 | - if ( $obj->time_created ){ |
|
364 | + foreach ($groupsjoined as $key => $obj) { |
|
365 | + if ($obj->time_created) { |
|
366 | 366 | $data[] = array($obj->time_created, $obj->guid_one, $obj->guid_two); |
367 | 367 | } |
368 | 368 | } |
@@ -372,7 +372,7 @@ discard block |
||
372 | 372 | $query = "SELECT * FROM {$dbprefix}annotations WHERE name_id = $likesID"; |
373 | 373 | $likes = get_data($query); |
374 | 374 | |
375 | - foreach($likes as $key => $obj){ |
|
375 | + foreach ($likes as $key => $obj) { |
|
376 | 376 | $data[] = array($obj->time_created, $obj->owner_guid, ""); |
377 | 377 | } |
378 | 378 | } else if ($type === 'messages') { |
@@ -384,7 +384,7 @@ discard block |
||
384 | 384 | WHERE md.name_id = {$name_id}"; |
385 | 385 | $messages = get_data($query); |
386 | 386 | |
387 | - foreach($messages as $key => $obj){ |
|
387 | + foreach ($messages as $key => $obj) { |
|
388 | 388 | $data[] = array($obj->time_created, "", $obj->sender_guid); |
389 | 389 | } |
390 | 390 | } else if ($type === 'optins') { |
@@ -425,18 +425,18 @@ discard block |
||
425 | 425 | $result = get_data($temp)[0]; |
426 | 426 | $count = intval($result->num); |
427 | 427 | |
428 | - if($count > 0){ |
|
428 | + if ($count > 0) { |
|
429 | 429 | $string = elgg_echo($index, $lang); |
430 | - if(stripos($optin_type, 'create') !== false){ |
|
430 | + if (stripos($optin_type, 'create') !== false) { |
|
431 | 431 | $string .= " (" . elgg_echo("missions:offering", $lang) . ")"; |
432 | 432 | } |
433 | - if(stripos($optin_type, 'seek') !== false){ |
|
433 | + if (stripos($optin_type, 'seek') !== false) { |
|
434 | 434 | $string .= " (" . elgg_echo("missions:seeking", $lang) . ")"; |
435 | 435 | } |
436 | - if($optin_type == "opt_in_mentored"){ |
|
436 | + if ($optin_type == "opt_in_mentored") { |
|
437 | 437 | $string .= " (" . elgg_echo("gcconnex_profile:opt:mentored", $lang) . ")"; |
438 | 438 | } |
439 | - if($optin_type == "opt_in_mentoring"){ |
|
439 | + if ($optin_type == "opt_in_mentoring") { |
|
440 | 440 | $string .= " (" . elgg_echo("gcconnex_profile:opt:mentoring", $lang) . ")"; |
441 | 441 | } |
442 | 442 | $data[$string] = $count; |
@@ -157,7 +157,7 @@ |
||
157 | 157 | $data['total'] = isset( $data['total'] ) ? $data['total'] + 1 : 1; |
158 | 158 | $data[$obj->college] = isset( $data[$obj->college] ) ? $data[$obj->college] + 1 : 1; |
159 | 159 | } |
160 | - } else if ($type === 'highschool') { |
|
160 | + } else if ($type === 'highschool') { |
|
161 | 161 | $users = elgg_get_entities_from_metadata(array( |
162 | 162 | 'type' => 'user', |
163 | 163 | 'metadata_name_value_pairs' => array( |
@@ -16,4 +16,4 @@ |
||
16 | 16 | 'embedvideo:parseerror' => "Impossible d'analyse l'adresse URL de %s", |
17 | 17 | 'embed_extender:custom:views' => "<b>Avancé</b> : Afficher une vidéo dans des vues personnalisées. Entrez une vue par ligne." |
18 | 18 | ); |
19 | -add_translation("fr",$french); |
|
19 | +add_translation("fr", $french); |
@@ -39,9 +39,9 @@ |
||
39 | 39 | 'gcRegister:email_mismatch' => '<a href="#email_initial">Les adresses de courriel ne sont pas identitiques</a>', |
40 | 40 | 'gcRegister:display_name_is_empty' => '<a href="#name">Le champ « Nom à afficher » ne peut pas être laissé vide</a>', |
41 | 41 | |
42 | - 'registration:userexists' => 'That username already exists. <a href=forgotpassword>Retrieve your password</a>(translate me)', |
|
43 | - 'gcRegister:department' => 'Ministère', |
|
44 | - 'gcRegister:required' => 'Obligatoires', |
|
42 | + 'registration:userexists' => 'That username already exists. <a href=forgotpassword>Retrieve your password</a>(translate me)', |
|
43 | + 'gcRegister:department' => 'Ministère', |
|
44 | + 'gcRegister:required' => 'Obligatoires', |
|
45 | 45 | ); |
46 | 46 | |
47 | 47 | add_translation("fr", $french); |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | |
3 | 3 | $english = array( |
4 | 4 | // labels |
5 | - 'gcRegister:form' => 'Registration form', |
|
5 | + 'gcRegister:form' => 'Registration form', |
|
6 | 6 | 'gcRegister:email_initial' => 'Enter your e-mail', |
7 | 7 | 'gcRegister:email_secondary' => 'Confirm your e-mail', |
8 | 8 | 'gcRegister:username' => 'Your username (auto-generated)', |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | // error messages on the form |
18 | 18 | 'gcRegister:failedMySQLconnection' => 'Unable to connect to the database', |
19 | 19 | 'gcRegister:invalid_email' => '<a href="#email_initial">Invalid email</a>', |
20 | - 'gcRegister:invalid_email2' => 'Invalid email', |
|
20 | + 'gcRegister:invalid_email2' => 'Invalid email', |
|
21 | 21 | 'gcRegister:empty_field' => 'empty field', |
22 | 22 | 'gcRegister:mismatch' => 'mismatch', |
23 | 23 |