@@ -6,16 +6,16 @@ discard block |
||
6 | 6 | elgg_register_event_handler('init', 'system', 'gc_profile_nudge_init'); |
7 | 7 | |
8 | 8 | function gc_profile_nudge_init(){ |
9 | - elgg_register_ajax_view('gc_profile_nudge/profile_nudge'); |
|
9 | + elgg_register_ajax_view('gc_profile_nudge/profile_nudge'); |
|
10 | 10 | |
11 | - if( elgg_is_logged_in() && !elgg_is_admin_logged_in() ){ |
|
11 | + if( elgg_is_logged_in() && !elgg_is_admin_logged_in() ){ |
|
12 | 12 | |
13 | - $reminder_time = elgg_get_plugin_setting('reminder_time', 'gc_profile_nudge'); |
|
13 | + $reminder_time = elgg_get_plugin_setting('reminder_time', 'gc_profile_nudge'); |
|
14 | 14 | |
15 | 15 | if( $reminder_time ){ |
16 | - $in_days = $reminder_time * 86400; // 1 day = 86400 seconds |
|
16 | + $in_days = $reminder_time * 86400; // 1 day = 86400 seconds |
|
17 | 17 | |
18 | - $user = elgg_get_logged_in_user_entity(); |
|
18 | + $user = elgg_get_logged_in_user_entity(); |
|
19 | 19 | |
20 | 20 | // If user hasn't seen nudge, use their last login date as benchmark |
21 | 21 | if( !isset( $user->last_profile_nudge ) ){ |
@@ -23,12 +23,12 @@ discard block |
||
23 | 23 | $user->save(); |
24 | 24 | } |
25 | 25 | |
26 | - $last_profile_nudge = intval($user->last_profile_nudge); |
|
26 | + $last_profile_nudge = intval($user->last_profile_nudge); |
|
27 | 27 | |
28 | - // Show nudge if user hasn't seen in XX days |
|
29 | - if( (time() - $last_profile_nudge) > $in_days ){ |
|
30 | - elgg_extend_view('page/elements/foot', 'gc_profile_nudge/include'); |
|
31 | - } |
|
28 | + // Show nudge if user hasn't seen in XX days |
|
29 | + if( (time() - $last_profile_nudge) > $in_days ){ |
|
30 | + elgg_extend_view('page/elements/foot', 'gc_profile_nudge/include'); |
|
31 | + } |
|
32 | 32 | } |
33 | 33 | } |
34 | 34 | } |
@@ -5,20 +5,20 @@ discard block |
||
5 | 5 | |
6 | 6 | elgg_register_event_handler('init', 'system', 'gc_profile_nudge_init'); |
7 | 7 | |
8 | -function gc_profile_nudge_init(){ |
|
8 | +function gc_profile_nudge_init() { |
|
9 | 9 | elgg_register_ajax_view('gc_profile_nudge/profile_nudge'); |
10 | 10 | |
11 | - if( elgg_is_logged_in() && !elgg_is_admin_logged_in() ){ |
|
11 | + if (elgg_is_logged_in() && !elgg_is_admin_logged_in()) { |
|
12 | 12 | |
13 | 13 | $reminder_time = elgg_get_plugin_setting('reminder_time', 'gc_profile_nudge'); |
14 | 14 | |
15 | - if( $reminder_time ){ |
|
15 | + if ($reminder_time) { |
|
16 | 16 | $in_days = $reminder_time * 86400; // 1 day = 86400 seconds |
17 | 17 | |
18 | 18 | $user = elgg_get_logged_in_user_entity(); |
19 | 19 | |
20 | 20 | // If user hasn't seen nudge, use their last login date as benchmark |
21 | - if( !isset( $user->last_profile_nudge ) ){ |
|
21 | + if (!isset($user->last_profile_nudge)) { |
|
22 | 22 | $user->last_profile_nudge = (isset($user->prev_last_login) ? $user->prev_last_login : $user->last_login); |
23 | 23 | $user->save(); |
24 | 24 | } |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | $last_profile_nudge = intval($user->last_profile_nudge); |
27 | 27 | |
28 | 28 | // Show nudge if user hasn't seen in XX days |
29 | - if( (time() - $last_profile_nudge) > $in_days ){ |
|
29 | + if ((time() - $last_profile_nudge) > $in_days) { |
|
30 | 30 | elgg_extend_view('page/elements/foot', 'gc_profile_nudge/include'); |
31 | 31 | } |
32 | 32 | } |
@@ -9,9 +9,9 @@ |
||
9 | 9 | |
10 | 10 | echo '<div class="verify-content" style="max-width:600px;">'; |
11 | 11 | |
12 | -echo '<h1>'. elgg_echo('gc_profile_nudge:title') .'</h1>'; |
|
12 | +echo '<h1>' . elgg_echo('gc_profile_nudge:title') . '</h1>'; |
|
13 | 13 | |
14 | -echo '<p class="mrgn-tp-md mrgn-bttm-md">'. elgg_echo('gc_profile_nudge:text') .'</p>'; |
|
14 | +echo '<p class="mrgn-tp-md mrgn-bttm-md">' . elgg_echo('gc_profile_nudge:text') . '</p>'; |
|
15 | 15 | |
16 | 16 | echo "<p><a class='btn btn-primary' href='" . elgg_get_site_url() . "profile/" . $user->username . "'>" . elgg_echo('gc_profile_nudge:update') . "</a></p>"; |
17 | 17 |
@@ -5,10 +5,10 @@ |
||
5 | 5 | |
6 | 6 | //create hidden link |
7 | 7 | $content = elgg_view('output/url', array( |
8 | - 'href' => 'ajax/view/gc_profile_nudge/profile_nudge', |
|
9 | - 'id' => 'nudge', |
|
10 | - 'aria-hidden' => 'true', |
|
11 | - 'class' => 'elgg-lightbox hidden' |
|
8 | + 'href' => 'ajax/view/gc_profile_nudge/profile_nudge', |
|
9 | + 'id' => 'nudge', |
|
10 | + 'aria-hidden' => 'true', |
|
11 | + 'class' => 'elgg-lightbox hidden' |
|
12 | 12 | )); |
13 | 13 | |
14 | 14 | //after page is loaded click link |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | return array( |
3 | 3 | /** |
4 | - * Menu items and titles |
|
5 | - */ |
|
4 | + * Menu items and titles |
|
5 | + */ |
|
6 | 6 | 'bookmarks' => "Signets", |
7 | 7 | 'bookmarks:add' => "Ajouter un signet", |
8 | 8 | 'bookmarks:edit' => "Modifier le signet", |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | $title3 = gc_implode_translation($title, $title2); |
11 | 11 | $description = get_input('description'); |
12 | 12 | $description2 = get_input('description2'); |
13 | -$description3 = gc_implode_translation($description,$description2); |
|
13 | +$description3 = gc_implode_translation($description, $description2); |
|
14 | 14 | $address = get_input('address'); |
15 | 15 | $access_id = get_input('access_id'); |
16 | 16 | $tags = get_input('tags'); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | if ($guid == 0) { |
51 | 51 | $bookmark = new ElggObject; |
52 | 52 | $bookmark->subtype = "bookmarks"; |
53 | - $bookmark->container_guid = (int)get_input('container_guid', elgg_get_logged_in_user_guid()); |
|
53 | + $bookmark->container_guid = (int) get_input('container_guid', elgg_get_logged_in_user_guid()); |
|
54 | 54 | $new = true; |
55 | 55 | } else { |
56 | 56 | $bookmark = get_entity($guid); |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | $bookmark->tags = $tagarray; |
74 | 74 | |
75 | 75 | //temporary |
76 | -if(!$bookmark->title){ |
|
76 | +if (!$bookmark->title) { |
|
77 | 77 | $bookmark->title = $bookmark->title2; |
78 | 78 | } |
79 | 79 |
@@ -17,9 +17,9 @@ discard block |
||
17 | 17 | |
18 | 18 | elgg_group_gatekeeper(); |
19 | 19 | |
20 | -if (!$page_owner->title){ |
|
20 | +if (!$page_owner->title) { |
|
21 | 21 | $crumbs_title = $page_owner->name; |
22 | -}else{ |
|
22 | +} else { |
|
23 | 23 | $crumbs_title = gc_explode_translation($page_owner->title, $lang); |
24 | 24 | } |
25 | 25 | |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | elgg_push_breadcrumb($crumbs_title, "bookmarks/owner/$page_owner->username"); |
30 | 30 | } |
31 | 31 | |
32 | -$title = gc_explode_translation($bookmark->title,$lang); |
|
32 | +$title = gc_explode_translation($bookmark->title, $lang); |
|
33 | 33 | |
34 | 34 | elgg_push_breadcrumb($title); |
35 | 35 |
@@ -19,7 +19,7 @@ |
||
19 | 19 | |
20 | 20 | if (!$page_owner->title){ |
21 | 21 | $crumbs_title = $page_owner->name; |
22 | -}else{ |
|
22 | +} else{ |
|
23 | 23 | $crumbs_title = gc_explode_translation($page_owner->title, $lang); |
24 | 24 | } |
25 | 25 |
@@ -35,7 +35,7 @@ |
||
35 | 35 | elgg_extend_view('css/elgg', 'bookmarks/css'); |
36 | 36 | elgg_extend_view('js/elgg', 'bookmarks/js'); |
37 | 37 | |
38 | - elgg_register_widget_type('bookmarks', elgg_echo('bookmarks'), elgg_echo('bookmarks:widget:description'),array("profile", "dashboard", "groups")); |
|
38 | + elgg_register_widget_type('bookmarks', elgg_echo('bookmarks'), elgg_echo('bookmarks:widget:description'), array("profile", "dashboard", "groups")); |
|
39 | 39 | |
40 | 40 | if (elgg_is_logged_in()) { |
41 | 41 | $user_guid = elgg_get_logged_in_user_guid(); |
@@ -12,7 +12,7 @@ |
||
12 | 12 | $object = $item->getObjectEntity(); |
13 | 13 | |
14 | 14 | |
15 | - $description = gc_explode_translation($object->description3,$lang); |
|
15 | + $description = gc_explode_translation($object->description3, $lang); |
|
16 | 16 | |
17 | 17 | |
18 | 18 | $object = $item->getObjectEntity(); |
@@ -23,43 +23,43 @@ |
||
23 | 23 | $user = get_user($uid); |
24 | 24 | |
25 | 25 | //loop through all the data passed from table |
26 | - foreach($data as $dataItem){ |
|
26 | + foreach ($data as $dataItem) { |
|
27 | 27 | |
28 | - if($dataItem->geds){ |
|
28 | + if ($dataItem->geds) { |
|
29 | 29 | $user->set($dataItem->property, $dataItem->geds); |
30 | 30 | } |
31 | 31 | |
32 | 32 | |
33 | 33 | } |
34 | - if ($depAcc){ |
|
34 | + if ($depAcc) { |
|
35 | 35 | $user->set('depAcc', $depAcc); |
36 | 36 | } |
37 | - if ($org){ |
|
37 | + if ($org) { |
|
38 | 38 | $user->set('orgStruct', $org); |
39 | 39 | } |
40 | - if ($orgFr){ |
|
40 | + if ($orgFr) { |
|
41 | 41 | $user->set('orgStructFr', $orgFr); |
42 | 42 | } |
43 | - if ($loc){ |
|
43 | + if ($loc) { |
|
44 | 44 | $user->set('addressString', $loc); |
45 | 45 | //add plain text version to location if field already filled out |
46 | - if($user->location){ |
|
46 | + if ($user->location) { |
|
47 | 47 | $locString = json_decode($loc); |
48 | - $user->set('location', $locString->street .','. $locString->city.' '. $locString->province); |
|
48 | + $user->set('location', $locString->street . ',' . $locString->city . ' ' . $locString->province); |
|
49 | 49 | } |
50 | 50 | } |
51 | - if ($locFr){ |
|
51 | + if ($locFr) { |
|
52 | 52 | $user->set('addressStringFr', $locFr); |
53 | 53 | //add plain text version to location if field already filled out |
54 | - if($user->location){ |
|
54 | + if ($user->location) { |
|
55 | 55 | $locString = json_decode($locFr); |
56 | - $user->set('location', $locString->street .','. $locString->city.' '. $locString->province); |
|
56 | + $user->set('location', $locString->street . ',' . $locString->city . ' ' . $locString->province); |
|
57 | 57 | } |
58 | 58 | } |
59 | - if ($gedsDN){ |
|
60 | - if($gedsDN == 'DELETE_ME'){ |
|
59 | + if ($gedsDN) { |
|
60 | + if ($gedsDN == 'DELETE_ME') { |
|
61 | 61 | $user->set('gedsDN', ''); |
62 | - }else{ |
|
62 | + } else { |
|
63 | 63 | $user->set('gedsDN', $gedsDN); |
64 | 64 | } |
65 | 65 |
@@ -59,7 +59,7 @@ |
||
59 | 59 | if ($gedsDN){ |
60 | 60 | if($gedsDN == 'DELETE_ME'){ |
61 | 61 | $user->set('gedsDN', ''); |
62 | - }else{ |
|
62 | + } else{ |
|
63 | 63 | $user->set('gedsDN', $gedsDN); |
64 | 64 | } |
65 | 65 |