Changeset 23028
- Timestamp:
- Jun 3, 2013, 9:51:59 PM (11 years ago)
- Location:
- extensions/NBM_Subscriber
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/NBM_Subscriber/changelog.txt.php
r22873 r23028 69 69 2013-05-25: 70 70 -- 2.5.2 : Add pt_PT, thanks to : ANO 71 72 2013-06-03: 73 -- 2.5.3 : Bug fixed - On new user registration, user should submit his NBM choice twice in his profile page for it to be considered 71 74 */ 72 75 ?> -
extensions/NBM_Subscriber/main.inc.php
r20822 r23028 53 53 WHERE user_id = \''.$user['id'].'\' 54 54 '; 55 55 56 56 $count = pwg_db_num_rows(pwg_query($query)); 57 57 58 58 if ($count == 0) 59 59 { 60 60 $inserts = array(); 61 61 $check_key_list = array(); 62 62 63 63 // Calculate key 64 64 $nbm_user['check_key'] = find_available_check_key(); … … 66 66 // Save key 67 67 array_push($check_key_list, $nbm_user['check_key']); 68 68 69 69 // Insert new nbm_users 70 70 array_push … … 75 75 'user_id' => $user['id'], 76 76 'check_key' => $nbm_user['check_key'], 77 'enabled' => 'false' // By default if false, set to true with specific functions77 'enabled' => $_POST['NBM_Subscription'] 78 78 ) 79 79 ); 80 80 81 mass_inserts(USER_MAIL_NOTIFICATION_TABLE, array('user_id', 'check_key', 'enabled'), $inserts); 81 mass_inserts(USER_MAIL_NOTIFICATION_TABLE, array('user_id', 'check_key', 'enabled'), $inserts); 82 82 } 83 83 elseif ($count != 0 and !empty($_POST['NBM_Subscription']) && in_array($_POST['NBM_Subscription'], array('true', 'false'))) … … 108 108 109 109 $values = $data['enabled']; 110 111 if (is_null($values)) 112 $values = 'false'; 110 113 111 114 $template->assign('radio_options', 112 115 array( 113 116 'true' => l10n('Yes'), 114 'false'=> l10n('No'))); 117 'false'=> l10n('No') 118 ) 119 ); 115 120 116 121 $template->assign( 117 122 array( 118 123 'NBMS'=>$values 119 )); 124 ) 125 ); 120 126 121 127 $template->set_prefilter('profile_content', 'NBMS_prefilter');
Note: See TracChangeset
for help on using the changeset viewer.