@@ -68,84 +68,84 @@ discard block |
||
68 | 68 | 'title' => 'Look up account RPC', |
69 | 69 | 'description' => 'RPC for getting the authenticator for a user account.', |
70 | 70 | 'page callback' => 'boinccore_lookup_account', |
71 | - 'access callback' => TRUE, |
|
71 | + 'access callback' => true, |
|
72 | 72 | 'type' => MENU_CALLBACK |
73 | 73 | ); |
74 | 74 | $items['am_get_info.php'] = array( |
75 | 75 | 'title' => 'Account manager get info RPC', |
76 | 76 | 'description' => 'RPC for getting assorted details of a user account.', |
77 | 77 | 'page callback' => 'boinccore_am_get_info', |
78 | - 'access callback' => TRUE, |
|
78 | + 'access callback' => true, |
|
79 | 79 | 'type' => MENU_CALLBACK |
80 | 80 | ); |
81 | 81 | $items['am_set_info.php'] = array( |
82 | 82 | 'title' => 'Account manager set info RPC', |
83 | 83 | 'description' => 'RPC for updating assorted details of a user account.', |
84 | 84 | 'page callback' => 'boinccore_am_set_info', |
85 | - 'access callback' => TRUE, |
|
85 | + 'access callback' => true, |
|
86 | 86 | 'type' => MENU_CALLBACK |
87 | 87 | ); |
88 | 88 | $items['am_set_host_info.php'] = array( |
89 | 89 | 'title' => 'Account manager set host info RPC', |
90 | 90 | 'description' => 'RPC for updating the venue for a given host.', |
91 | 91 | 'page callback' => 'boinccore_am_set_host_info', |
92 | - 'access callback' => TRUE, |
|
92 | + 'access callback' => true, |
|
93 | 93 | 'type' => MENU_CALLBACK |
94 | 94 | ); |
95 | 95 | $items['show_user.php'] = array( |
96 | 96 | 'title' => 'Show user RPC', |
97 | 97 | 'description' => 'RPC for getting assorted details of a user account.', |
98 | 98 | 'page callback' => 'boinccore_show_user', |
99 | - 'access callback' => TRUE, |
|
99 | + 'access callback' => true, |
|
100 | 100 | 'type' => MENU_CALLBACK |
101 | 101 | ); |
102 | 102 | $items['pending.php'] = array( |
103 | 103 | 'title' => 'Pending credit RPC', |
104 | 104 | 'description' => 'RPC for getting pending credit for a given account.', |
105 | 105 | 'page callback' => 'boinccore_pending_credit', |
106 | - 'access callback' => TRUE, |
|
106 | + 'access callback' => true, |
|
107 | 107 | 'type' => MENU_CALLBACK |
108 | 108 | ); |
109 | 109 | $items['create_team.php'] = array( |
110 | 110 | 'title' => 'Create team RPC', |
111 | 111 | 'description' => 'RPC for creating a new team.', |
112 | 112 | 'page callback' => 'boinccore_create_team', |
113 | - 'access callback' => TRUE, |
|
113 | + 'access callback' => true, |
|
114 | 114 | 'type' => MENU_CALLBACK |
115 | 115 | ); |
116 | 116 | $items['team_lookup.php'] = array( |
117 | 117 | 'title' => 'Team lookup RPC', |
118 | 118 | 'description' => 'RPC for getting info on a team or matching teams.', |
119 | 119 | 'page callback' => 'boinccore_team_lookup', |
120 | - 'access callback' => TRUE, |
|
120 | + 'access callback' => true, |
|
121 | 121 | 'type' => MENU_CALLBACK |
122 | 122 | ); |
123 | 123 | $items['team_email_list.php'] = array( |
124 | 124 | 'title' => 'Get team member list RPC', |
125 | 125 | 'description' => 'RPC for getting a list of members of a given team.', |
126 | 126 | 'page callback' => 'boinccore_team_email_list', |
127 | - 'access callback' => TRUE, |
|
127 | + 'access callback' => true, |
|
128 | 128 | 'type' => MENU_CALLBACK |
129 | 129 | ); |
130 | 130 | $items['edit_forum_preferences_action.php'] = array( |
131 | 131 | 'title' => 'Forum preferences RPC', |
132 | 132 | 'description' => 'RPC for setting forum preferences for a given user.', |
133 | 133 | 'page callback' => 'boinccore_edit_forum_preferences', |
134 | - 'access callback' => TRUE, |
|
134 | + 'access callback' => true, |
|
135 | 135 | 'type' => MENU_CALLBACK |
136 | 136 | ); |
137 | 137 | $items['forum_get_data.php'] = array( |
138 | 138 | 'title' => 'Forum get data RPC', |
139 | 139 | 'description' => 'RPC for getting recent forum activity for a given user.', |
140 | 140 | 'page callback' => 'boinccore_forum_get_data', |
141 | - 'access callback' => TRUE, |
|
141 | + 'access callback' => true, |
|
142 | 142 | 'type' => MENU_CALLBACK |
143 | 143 | ); |
144 | 144 | $items['apps.php'] = array( |
145 | 145 | 'title' => 'Apps RPC', |
146 | 146 | 'description' => 'RPC for getting the applications in the system.', |
147 | 147 | 'page callback' => 'boinccore_apps', |
148 | - 'access callback' => TRUE, |
|
148 | + 'access callback' => true, |
|
149 | 149 | 'type' => MENU_CALLBACK |
150 | 150 | ); |
151 | 151 | |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | */ |
158 | 158 | function boinccore_menu_alter(&$items) { |
159 | 159 | // If using Solr search and not core Drupal search, disable core search! |
160 | - if (module_exists('global_search_solr') AND !module_exists('global_search')) { |
|
160 | + if (module_exists('global_search_solr') and !module_exists('global_search')) { |
|
161 | 161 | // Add permission to user search. |
162 | 162 | $check = array( |
163 | 163 | 'search/node/%menu_tail', |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | ); |
167 | 167 | foreach ($check as $path) { |
168 | 168 | if (isset($items[$path])) { |
169 | - $items[$path]['access callback'] = FALSE; |
|
169 | + $items[$path]['access callback'] = false; |
|
170 | 170 | } |
171 | 171 | } |
172 | 172 | } |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | // Since we are in a hook_boot() implementation cache mode is normal, so |
225 | 225 | // we can safely call hook_exit(). |
226 | 226 | bootstrap_invoke_all('exit'); |
227 | - header("Location: $url", TRUE, $code); |
|
227 | + header("Location: $url", true, $code); |
|
228 | 228 | exit; |
229 | 229 | } |
230 | 230 | } |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | */ |
243 | 243 | function locale_language_from_browser() { |
244 | 244 | if (empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { |
245 | - return FALSE; |
|
245 | + return false; |
|
246 | 246 | } |
247 | 247 | |
248 | 248 | $languages = language_list('enabled'); |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | // Find the enabled language with the greatest qvalue, following the rules |
286 | 286 | // of RFC 2616 (section 14.4). If several languages have the same qvalue, |
287 | 287 | // prefer the one with the greatest weight. |
288 | - $best_match_language = FALSE; |
|
288 | + $best_match_language = false; |
|
289 | 289 | $max_qvalue = 0; |
290 | 290 | foreach ($languages as $langcode => $language) { |
291 | 291 | // Language tags are case insensitive (RFC2616, sec 3.10). |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | // Notify moderators if there is site content that requires moderator action |
325 | 325 | $items_in_queue = boincuser_moderation_queue_count('cron'); |
326 | 326 | $last_notification = variable_get('boinccore_last_content_moderation_reminder', 0); |
327 | - if ($items_in_queue AND $last_notification < time() - 24*60*60) { |
|
327 | + if ($items_in_queue and $last_notification < time() - 24*60*60) { |
|
328 | 328 | global $base_url; |
329 | 329 | global $base_path; |
330 | 330 | $site_name = variable_get('site_name', bts('project')); |
@@ -376,7 +376,7 @@ discard block |
||
376 | 376 | $user_info = '<div class="user">'; |
377 | 377 | if ($user_image) { |
378 | 378 | $user_info .= ' <div class="picture">'; |
379 | - if (is_array($user_image) AND $user_image['image']['filepath']) { |
|
379 | + if (is_array($user_image) and $user_image['image']['filepath']) { |
|
380 | 380 | $user_info .= theme('imagefield_image', $user_image['image'], $user_image['alt'], $user_image['alt'], array(), false); |
381 | 381 | } |
382 | 382 | elseif (is_string($user_image)) { |
@@ -411,8 +411,8 @@ discard block |
||
411 | 411 | '#attributes' => array( |
412 | 412 | 'class' => 'bbcode_help', |
413 | 413 | ), |
414 | - '#collapsible' => TRUE, |
|
415 | - '#collapsed' => TRUE, |
|
414 | + '#collapsible' => true, |
|
415 | + '#collapsed' => true, |
|
416 | 416 | 'content' => array( |
417 | 417 | '#value' => _bbcode_filter_tip(), |
418 | 418 | ), |
@@ -502,7 +502,7 @@ discard block |
||
502 | 502 | /** |
503 | 503 | * Implementation of hook_link_alter() |
504 | 504 | */ |
505 | -function boinccore_link_alter(&$links, $node, $comment = NULL) { |
|
505 | +function boinccore_link_alter(&$links, $node, $comment = null) { |
|
506 | 506 | //echo '<pre>' . print_r($links, true) . '</pre>'; |
507 | 507 | foreach ($links as $module => $link) { |
508 | 508 | // Remove the ignore user link |
@@ -549,13 +549,13 @@ discard block |
||
549 | 549 | /** |
550 | 550 | * Implementation of hook_locale(). |
551 | 551 | */ |
552 | -function boinccore_locale($op = 'groups', $group = NULL) { |
|
552 | +function boinccore_locale($op = 'groups', $group = null) { |
|
553 | 553 | switch ($op) { |
554 | 554 | case 'groups': |
555 | 555 | return array('boinc' => bts('BOINC')); |
556 | 556 | case 'info': |
557 | 557 | //$info['boinc']['refresh callback'] = 'boinccore_locale_refresh'; |
558 | - $info['boinc']['format'] = FALSE; |
|
558 | + $info['boinc']['format'] = false; |
|
559 | 559 | return $info; |
560 | 560 | } |
561 | 561 | } |
@@ -564,11 +564,11 @@ discard block |
||
564 | 564 | /** |
565 | 565 | * Implementation of hook_link() |
566 | 566 | */ |
567 | -function boinccore_link($type, $object, $teaser = FALSE) { |
|
567 | +function boinccore_link($type, $object, $teaser = false) { |
|
568 | 568 | // Add custom links with this hook |
569 | 569 | |
570 | 570 | if ($type=='node') { |
571 | - if ( ($object->type=='forum') OR ($object->type=='team_forum') ) { |
|
571 | + if ( ($object->type=='forum') or ($object->type=='team_forum') ) { |
|
572 | 572 | // Add topic moderator controls |
573 | 573 | if (user_access('edit any forum topic')) { |
574 | 574 | $node_control = "node_control/{$object->nid}"; |
@@ -696,12 +696,12 @@ discard block |
||
696 | 696 | * Allow published, sticky, and comment status to be set on nodes by direct |
697 | 697 | * link rather than through the node form. |
698 | 698 | */ |
699 | -function boinccore_node_control($nid = NULL, $action = NULL) { |
|
700 | - if ((!$nid OR !$node = node_load($nid)) OR |
|
701 | - ($node->type == 'forum' AND !user_access('edit any forum topic')) OR |
|
702 | - ($node->type != 'forum' AND !user_access('administer nodes'))) { |
|
699 | +function boinccore_node_control($nid = null, $action = null) { |
|
700 | + if ((!$nid or !$node = node_load($nid)) or |
|
701 | + ($node->type == 'forum' and !user_access('edit any forum topic')) or |
|
702 | + ($node->type != 'forum' and !user_access('administer nodes'))) { |
|
703 | 703 | // What are you even doing here... |
704 | - return FALSE; |
|
704 | + return false; |
|
705 | 705 | } |
706 | 706 | switch ($action) { |
707 | 707 | case 'unhide': |
@@ -737,10 +737,10 @@ discard block |
||
737 | 737 | * Allow published status to be set on comments by direct link rather than |
738 | 738 | * through the comment edit form. |
739 | 739 | */ |
740 | -function boinccore_comment_control($cid = NULL, $action = NULL) { |
|
741 | - if (!$cid OR !$comment = _comment_load($cid)) { |
|
740 | +function boinccore_comment_control($cid = null, $action = null) { |
|
741 | + if (!$cid or !$comment = _comment_load($cid)) { |
|
742 | 742 | // What are you even doing here... |
743 | - return FALSE; |
|
743 | + return false; |
|
744 | 744 | } |
745 | 745 | $return_path = "node/{$comment->nid}"; |
746 | 746 | $return_anchor = "comment-{$cid}"; |
@@ -789,11 +789,11 @@ discard block |
||
789 | 789 | _comment_delete_thread($comment); |
790 | 790 | |
791 | 791 | $return_path = "node/{$node->nid}"; |
792 | - $return_anchor = NULL; |
|
792 | + $return_anchor = null; |
|
793 | 793 | break; |
794 | 794 | default: |
795 | 795 | } |
796 | - drupal_goto($return_path, NULL, $return_anchor); |
|
796 | + drupal_goto($return_path, null, $return_anchor); |
|
797 | 797 | } |
798 | 798 | |
799 | 799 | /** |
@@ -820,7 +820,7 @@ discard block |
||
820 | 820 | $uid = !empty($xml['am_get_info_reply']['id']) ? boincuser_lookup_uid($xml['am_get_info_reply']['id']) : 0; |
821 | 821 | if ($uid) { |
822 | 822 | $content_profile = content_profile_load('profile', $uid); |
823 | - $profile_is_approved = ($content_profile->status AND !$content_profile->moderate); |
|
823 | + $profile_is_approved = ($content_profile->status and !$content_profile->moderate); |
|
824 | 824 | $country = check_plain($content_profile->field_country[0]['value']); |
825 | 825 | $website = ''; |
826 | 826 | if ($profile_is_approved) { |
@@ -842,8 +842,8 @@ discard block |
||
842 | 842 | // Remove q from the GET request or BOINC will panic |
843 | 843 | unset($_GET['q']); |
844 | 844 | // Validate the XML prefs (in case BOINC does not) |
845 | - $global_prefs = !empty($_POST['global_prefs']) ? $_POST['global_prefs'] : (!empty($_GET['global_prefs']) ? $_GET['global_prefs'] : NULL); |
|
846 | - $project_prefs = !empty($_POST['project_prefs']) ? $_POST['project_prefs'] : (!empty($_GET['project_prefs']) ? $_GET['project_prefs'] : NULL); |
|
845 | + $global_prefs = !empty($_POST['global_prefs']) ? $_POST['global_prefs'] : (!empty($_GET['global_prefs']) ? $_GET['global_prefs'] : null); |
|
846 | + $project_prefs = !empty($_POST['project_prefs']) ? $_POST['project_prefs'] : (!empty($_GET['project_prefs']) ? $_GET['project_prefs'] : null); |
|
847 | 847 | libxml_use_internal_errors(true); |
848 | 848 | $xml = new DomDocument(); |
849 | 849 | if ($global_prefs) { |
@@ -882,15 +882,15 @@ discard block |
||
882 | 882 | $uid = boincuser_lookup_uid($boinc_id); |
883 | 883 | |
884 | 884 | // Apply any relevant updates to the Drupal account, also |
885 | - $country = !empty($_POST['country']) ? $_POST['country'] : (!empty($_GET['country']) ? $_GET['country'] : NULL); |
|
886 | - $url = !empty($_POST['url']) ? $_POST['url'] : (!empty($_GET['url']) ? $_GET['url'] : NULL); |
|
887 | - $email_addr = !empty($_POST['email_addr']) ? $_POST['email_addr'] : (!empty($_GET['email_addr']) ? $_GET['email_addr'] : NULL); |
|
885 | + $country = !empty($_POST['country']) ? $_POST['country'] : (!empty($_GET['country']) ? $_GET['country'] : null); |
|
886 | + $url = !empty($_POST['url']) ? $_POST['url'] : (!empty($_GET['url']) ? $_GET['url'] : null); |
|
887 | + $email_addr = !empty($_POST['email_addr']) ? $_POST['email_addr'] : (!empty($_GET['email_addr']) ? $_GET['email_addr'] : null); |
|
888 | 888 | |
889 | 889 | if ($email_addr) { |
890 | 890 | $account = user_load($uid); |
891 | 891 | user_save($account, array('mail' => $email_addr)); |
892 | 892 | } |
893 | - if ($country OR $url) { |
|
893 | + if ($country or $url) { |
|
894 | 894 | $content_profile = content_profile_load('profile', $uid); |
895 | 895 | if ($country) $content_profile->field_country[0]['value'] = $country; |
896 | 896 | if ($url) $content_profile->field_url[0]['value'] = $url; |
@@ -944,7 +944,7 @@ discard block |
||
944 | 944 | $uid = !empty($xml['user']['id']) ? boincuser_lookup_uid($xml['user']['id']) : 0; |
945 | 945 | if ($uid) { |
946 | 946 | $content_profile = content_profile_load('profile', $uid); |
947 | - $profile_is_approved = ($content_profile->status AND !$content_profile->moderate); |
|
947 | + $profile_is_approved = ($content_profile->status and !$content_profile->moderate); |
|
948 | 948 | $country = check_plain($content_profile->field_country[0]['value']); |
949 | 949 | $website = ''; |
950 | 950 | if ($profile_is_approved) { |
@@ -1107,9 +1107,9 @@ discard block |
||
1107 | 1107 | $show_xml = !empty($_POST['xml']) ? $_POST['xml'] : $_GET['xml']; |
1108 | 1108 | if (!$show_xml) { |
1109 | 1109 | // creditonly does not affect non xml output in BOINC |
1110 | - $credit_only = FALSE; |
|
1110 | + $credit_only = false; |
|
1111 | 1111 | } |
1112 | - $admin_request = FALSE; |
|
1112 | + $admin_request = false; |
|
1113 | 1113 | if ($boincteam_id && is_numeric($boincteam_id)) { |
1114 | 1114 | if ($account_key) { |
1115 | 1115 | // See if this is a team admin |
@@ -1124,9 +1124,9 @@ discard block |
||
1124 | 1124 | )); |
1125 | 1125 | db_set_active('default'); |
1126 | 1126 | require_boinc('team'); |
1127 | - $boincuser = boincuser_load(boincuser_lookup_uid($boincuser_id), TRUE); |
|
1127 | + $boincuser = boincuser_load(boincuser_lookup_uid($boincuser_id), true); |
|
1128 | 1128 | $boincteam = boincteam_load($boincteam_id); |
1129 | - $admin_request = is_team_admin($boincuser, $boincteam) OR is_team_founder($boincuser, $boincteam); |
|
1129 | + $admin_request = is_team_admin($boincuser, $boincteam) or is_team_founder($boincuser, $boincteam); |
|
1130 | 1130 | } |
1131 | 1131 | |
1132 | 1132 | if ($credit_only) { |
@@ -1183,7 +1183,7 @@ discard block |
||
1183 | 1183 | 'expavg_credit' => $member->boincuser_expavg_credit, |
1184 | 1184 | 'expavg_time' => $member->boincuser_expavg_time, |
1185 | 1185 | 'url' => $content_profile->field_url[0]['value'], |
1186 | - 'has_profile' => ($content_profile->status AND !$content_profile->moderate) ? 1 : 0, |
|
1186 | + 'has_profile' => ($content_profile->status and !$content_profile->moderate) ? 1 : 0, |
|
1187 | 1187 | ); |
1188 | 1188 | if ($admin_request) { |
1189 | 1189 | $team_member['email_addr'] = $member->mail; |
@@ -1200,7 +1200,7 @@ discard block |
||
1200 | 1200 | ), |
1201 | 1201 | ); |
1202 | 1202 | } |
1203 | - print xml_to_text(array_to_xml($xml), TRUE, TRUE); |
|
1203 | + print xml_to_text(array_to_xml($xml), true, true); |
|
1204 | 1204 | } |
1205 | 1205 | |
1206 | 1206 | /** |
@@ -1211,18 +1211,18 @@ discard block |
||
1211 | 1211 | // Do not pass through to BOINC in this case as BOINC forums are no longer |
1212 | 1212 | // relevant -- use Drupal data only |
1213 | 1213 | |
1214 | - $account_key = !empty($_POST['account_key']) ? $_POST['account_key'] : (!empty($_GET['account_key']) ? $_GET['account_key'] : NULL); |
|
1214 | + $account_key = !empty($_POST['account_key']) ? $_POST['account_key'] : (!empty($_GET['account_key']) ? $_GET['account_key'] : null); |
|
1215 | 1215 | |
1216 | 1216 | require_boinc('boinc_db'); |
1217 | 1217 | $boincuser = BoincUser::lookup_auth($account_key); |
1218 | 1218 | if ($boincuser) { |
1219 | 1219 | $uid = boincuser_lookup_uid($boincuser->id); |
1220 | - if ($uid AND $account = user_load($uid)) { |
|
1220 | + if ($uid and $account = user_load($uid)) { |
|
1221 | 1221 | // Currently supported preferences |
1222 | - $avatar_url = isset($_POST['avatar_url']) ? $_POST['avatar_url'] : (isset($_GET['avatar_url']) ? $_GET['avatar_url'] : NULL); |
|
1223 | - $hide_signatures = isset($_POST['forum_hide_signatures']) ? $_POST['forum_hide_signatures'] : (isset($_GET['forum_hide_signatures']) ? $_GET['forum_hide_signatures'] : NULL); |
|
1224 | - $signature = isset($_POST['signature']) ? $_POST['signature'] : (isset($_GET['signature']) ? $_GET['signature'] : NULL); |
|
1225 | - $post_order = isset($_POST['thread_sort']) ? $_POST['thread_sort'] : (isset($_GET['thread_sort']) ? $_GET['thread_sort'] : NULL); |
|
1222 | + $avatar_url = isset($_POST['avatar_url']) ? $_POST['avatar_url'] : (isset($_GET['avatar_url']) ? $_GET['avatar_url'] : null); |
|
1223 | + $hide_signatures = isset($_POST['forum_hide_signatures']) ? $_POST['forum_hide_signatures'] : (isset($_GET['forum_hide_signatures']) ? $_GET['forum_hide_signatures'] : null); |
|
1224 | + $signature = isset($_POST['signature']) ? $_POST['signature'] : (isset($_GET['signature']) ? $_GET['signature'] : null); |
|
1225 | + $post_order = isset($_POST['thread_sort']) ? $_POST['thread_sort'] : (isset($_GET['thread_sort']) ? $_GET['thread_sort'] : null); |
|
1226 | 1226 | // Update preferences as needed |
1227 | 1227 | if ($avatar_url) { |
1228 | 1228 | $avatar_image = file_get_contents($avatar_url); |
@@ -1233,11 +1233,11 @@ discard block |
||
1233 | 1233 | if ($file) { |
1234 | 1234 | $profile = new stdClass(); |
1235 | 1235 | $profile->type = 'profile'; |
1236 | - $profile->language = NULL; |
|
1236 | + $profile->language = null; |
|
1237 | 1237 | if ($profile_nid = content_profile_profile_exists($profile, $account->uid)) { |
1238 | 1238 | $profile_node = node_load($profile_nid); |
1239 | 1239 | if ($profile_node) { |
1240 | - $avatar_image = get_cck_image_object(file_directory_path() . '/' . $image_path, 'field_image', 'profile', TRUE); |
|
1240 | + $avatar_image = get_cck_image_object(file_directory_path() . '/' . $image_path, 'field_image', 'profile', true); |
|
1241 | 1241 | if ($avatar_image) { |
1242 | 1242 | $profile_node->field_image[0] = $avatar_image; |
1243 | 1243 | node_save($profile_node); |
@@ -1262,10 +1262,10 @@ discard block |
||
1262 | 1262 | $error = 'Could not find avatar image at URL'; |
1263 | 1263 | } |
1264 | 1264 | } |
1265 | - if ($hide_signatures !== NULL) { |
|
1265 | + if ($hide_signatures !== null) { |
|
1266 | 1266 | user_save($account, array('hide_signatures' => ($hide_signatures ? 1 : 0))); |
1267 | 1267 | } |
1268 | - if ($signature !== NULL) { |
|
1268 | + if ($signature !== null) { |
|
1269 | 1269 | $signature = check_markup($signature); |
1270 | 1270 | user_save($account, array('signature' => $signature)); |
1271 | 1271 | } |
@@ -1282,7 +1282,7 @@ discard block |
||
1282 | 1282 | // Success |
1283 | 1283 | $xml = array( |
1284 | 1284 | 'edit_forum_preferences' => array( |
1285 | - 'success' => NULL, |
|
1285 | + 'success' => null, |
|
1286 | 1286 | ), |
1287 | 1287 | ); |
1288 | 1288 | } |
@@ -1315,7 +1315,7 @@ discard block |
||
1315 | 1315 | ), |
1316 | 1316 | ); |
1317 | 1317 | } |
1318 | - print xml_to_text(array_to_xml($xml), TRUE, TRUE); |
|
1318 | + print xml_to_text(array_to_xml($xml), true, true); |
|
1319 | 1319 | } |
1320 | 1320 | |
1321 | 1321 | /** |
@@ -1327,17 +1327,17 @@ discard block |
||
1327 | 1327 | // relevant -- use Drupal data only |
1328 | 1328 | |
1329 | 1329 | $xml = array(); |
1330 | - $boinc_id = !empty($_POST['userid']) ? $_POST['userid'] : (!empty($_GET['userid']) ? $_GET['userid'] : NULL); |
|
1330 | + $boinc_id = !empty($_POST['userid']) ? $_POST['userid'] : (!empty($_GET['userid']) ? $_GET['userid'] : null); |
|
1331 | 1331 | $uid = boincuser_lookup_uid($boinc_id); |
1332 | 1332 | |
1333 | 1333 | if ($uid) { |
1334 | - $method = !empty($_POST['method']) ? $_POST['method'] : (!empty($_GET['method']) ? $_GET['method'] : NULL); |
|
1335 | - $count = !empty($_POST['count']) ? $_POST['count'] : (!empty($_GET['count']) ? $_GET['count'] : NULL); |
|
1334 | + $method = !empty($_POST['method']) ? $_POST['method'] : (!empty($_GET['method']) ? $_GET['method'] : null); |
|
1335 | + $count = !empty($_POST['count']) ? $_POST['count'] : (!empty($_GET['count']) ? $_GET['count'] : null); |
|
1336 | 1336 | if (!$count) $count = 10; |
1337 | 1337 | |
1338 | 1338 | switch ($method) { |
1339 | 1339 | case 'user_posts': |
1340 | - $content_length = !empty($_POST['content_length']) ? $_POST['content_length'] : (!empty($_GET['content_length']) ? $_GET['content_length'] : NULL); |
|
1340 | + $content_length = !empty($_POST['content_length']) ? $_POST['content_length'] : (!empty($_GET['content_length']) ? $_GET['content_length'] : null); |
|
1341 | 1341 | $posts = db_query(" |
1342 | 1342 | SELECT |
1343 | 1343 | c.cid, |
@@ -1433,7 +1433,7 @@ discard block |
||
1433 | 1433 | ), |
1434 | 1434 | ); |
1435 | 1435 | } |
1436 | - print xml_to_text(array_to_xml($xml), TRUE, TRUE); |
|
1436 | + print xml_to_text(array_to_xml($xml), true, true); |
|
1437 | 1437 | } |
1438 | 1438 | |
1439 | 1439 | /** |
@@ -1452,9 +1452,9 @@ discard block |
||
1452 | 1452 | * in advance on which page a given comment will appear. Link instead to this |
1453 | 1453 | * controller function, which can compute the page based on the user's settings |
1454 | 1454 | */ |
1455 | -function boinccore_url_pagination_handler($type, $object_id = NULL) { |
|
1455 | +function boinccore_url_pagination_handler($type, $object_id = null) { |
|
1456 | 1456 | global $user; |
1457 | - $path = NULL; |
|
1457 | + $path = null; |
|
1458 | 1458 | $params = array(); |
1459 | 1459 | switch ($type) { |
1460 | 1460 | case 'boinc-forum': |
@@ -1841,11 +1841,11 @@ discard block |
||
1841 | 1841 | $mailing_list = variable_get('boinc_moderator_mailing_list', ''); |
1842 | 1842 | $force_individual_notifications = variable_get('boinc_moderator_force_individual_notifications', 0); |
1843 | 1843 | |
1844 | - if (!$mailing_list OR $force_individual_notifications) { |
|
1844 | + if (!$mailing_list or $force_individual_notifications) { |
|
1845 | 1845 | // Send individual emails to all moderators |
1846 | 1846 | $roles = user_roles(); |
1847 | 1847 | $moderator_rid = array_search('moderator', $roles); |
1848 | - if ($moderator_rid !== FALSE) { |
|
1848 | + if ($moderator_rid !== false) { |
|
1849 | 1849 | $settings['recipients'] = array($moderator_rid); |
1850 | 1850 | rules_action_mail_to_users_of_role($settings); |
1851 | 1851 | } |
@@ -1874,7 +1874,7 @@ discard block |
||
1874 | 1874 | /* |
1875 | 1875 | * BOINC wrapper for string translation |
1876 | 1876 | */ |
1877 | -function bts($string, $args = array(), $langcode = NULL, $context = 'boinc: ', $update = TRUE) { |
|
1877 | +function bts($string, $args = array(), $langcode = null, $context = 'boinc: ', $update = true) { |
|
1878 | 1878 | if (function_exists('i18nstrings_ts')) { |
1879 | 1879 | $string = i18nstrings_ts($context, $string, $langcode, $update); |
1880 | 1880 | } |