Passed
Pull Request — master (#4923)
by David
10:06
created
html/user/download_software.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 //
65 65
 function get_platform($user_agent) {
66 66
     if (strstr($user_agent, 'Windows')) {
67
-        if (strstr($user_agent, 'Win64')||strstr($user_agent, 'WOW64')) {
67
+        if (strstr($user_agent, 'Win64') || strstr($user_agent, 'WOW64')) {
68 68
             return 'windows_x86_64';
69 69
         } else {
70 70
             return 'windows_intelx86';
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
         $token,
139 139
         $user->id,
140 140
         (string)$v->filename,
141
-        $green?"btn-success":"btn-info",
141
+        $green ? "btn-success" : "btn-info",
142 142
         (string)$v->platform,
143 143
         (string)$v->size_mb,
144 144
         (string)$v->version_num
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 
148 148
 function download_button_vbox($v, $project_id, $token, $user) {
149 149
     // if no vbox version exists for platform, don't show vbox button
150
-    if(!$v->vbox_filename) {
150
+    if (!$v->vbox_filename) {
151 151
         return;
152 152
     }
153 153
     return sprintf(
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
     handle_get_info();
437 437
 } else {
438 438
     $dev = get_str("dev", true);
439
-    $user_agent = get_str("user_agent", true);      // for debugging
439
+    $user_agent = get_str("user_agent", true); // for debugging
440 440
     if (!$user_agent) {
441 441
         $user_agent = $_SERVER['HTTP_USER_AGENT'];
442 442
     }
Please login to merge, or discard this patch.
html/inc/web_rpc_api.inc 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
     // Adapt to your web site. The following assumes Bootstrap.
137 137
     //
138 138
     function show_download_button($info, $is_vbox) {
139
-        $desc = $is_vbox?$info->boinc_vbox:$info->boinc;
139
+        $desc = $is_vbox ? $info->boinc_vbox : $info->boinc;
140 140
         echo sprintf('
141 141
 <form action="https://boinc.berkeley.edu/concierge.php" method="post">
142 142
     <input type=hidden name=project_id value="%d">
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
             (string)$info->token,
151 151
             (int)$info->user_id,
152 152
             (string)$desc->filename,
153
-            $is_vbox?" + VirtualBox":"",
153
+            $is_vbox ? " + VirtualBox" : "",
154 154
             (string)$info->platform,
155 155
             (string)$desc->size_mb
156 156
         );
Please login to merge, or discard this patch.
html/inc/rss.inc 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
 // You can pass a function $filter;
56 56
 // if $filter(item) returns true, don't show it.
57 57
 //
58
-function show_rss_items($items, $n=0, $filter=null) {
58
+function show_rss_items($items, $n = 0, $filter = null) {
59 59
     $i = 0;
60 60
     foreach ($items as $item) {
61 61
         if ($filter && $filter($item)) {
Please login to merge, or discard this patch.
html/inc/team.inc 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     row2('<b>'.tra('Search criteria (use one or more)').'</b>', '');
41 41
     row2(
42 42
         tra('Key words').'<br><small>'.tra('Find teams with these words in their names or descriptions').'</small>',
43
-        '<input class="form-control" type="text" name="keywords" value="' . htmlspecialchars($params->keywords) . '">');
43
+        '<input class="form-control" type="text" name="keywords" value="'.htmlspecialchars($params->keywords).'">');
44 44
     row2_init(tra('Country'), '');
45 45
     echo '<select class="form-control" name="country"><option value="" selected>---</option>';
46 46
     $country = $params->country;
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     echo country_select_options($country);
49 49
     echo "</select></td></tr>\n";
50 50
     row2(tra('Type of team'), team_type_select($params->type, true));
51
-    $checked = $params->active?"checked":"";
51
+    $checked = $params->active ? "checked" : "";
52 52
     row2(tra('Show only active teams'), "<input type=checkbox name=active $checked>");
53 53
     row2("", "<input class=\"btn btn-primary\" type=submit name=submit value=\"".tra('Search')."\">");
54 54
     end_table();
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
     row2("Created", date_str($team->create_time));
97 97
     if (defined("SHOW_NONVALIDATED_TEAMS")) {
98 98
         $founder = $team->founder;
99
-        row2("Founder email validated", $founder->email_validated?"Yes":"No (team will not be exported)");
99
+        row2("Founder email validated", $founder->email_validated ? "Yes" : "No (team will not be exported)");
100 100
     }
101 101
     if (strlen($team->url)) {;
102 102
         if (strstr($team->url, "http://")) {
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
     }
170 170
     row1(tra('Members'));
171 171
     row2(tra('Founder'),
172
-        $team->founder?user_links($team->founder, BADGE_HEIGHT_MEDIUM):"---"
172
+        $team->founder ?user_links($team->founder, BADGE_HEIGHT_MEDIUM) : "---"
173 173
     );
174 174
     if (count($team->admins)) {
175 175
         $first = true;
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
     foreach ($deltas as $delta) {
355 355
         $u = BoincUser::lookup_id($delta->userid);
356 356
         if ($u->teamid == $teamid) {
357
-            $new_members[] = $u;  // they might have later quit
357
+            $new_members[] = $u; // they might have later quit
358 358
         }
359 359
     }
360 360
     return array_unique($new_members);
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
     if (!$user->teamid) return;
437 437
     $user->update("teamid=0");
438 438
     $team = BoincTeam::lookup_id($user->teamid);
439
-    if ($team && $team->ping_user==$user->id) {
439
+    if ($team && $team->ping_user == $user->id) {
440 440
         $team->update("ping_user=-ping_user");
441 441
     }
442 442
     BoincTeamAdmin::delete("teamid=$user->teamid and userid=$user->id");
@@ -475,34 +475,34 @@  discard block
 block discarded – undo
475 475
     start_table();
476 476
     row2(tra('Team name, text version').'
477 477
         <br><p class=\"text-muted\">'.tra('Don\'t use HTML tags.').'</p>',
478
-        '<input class="form-control" name="name" type="text" size="50" value="'.($team?$team->name:"").'">'
478
+        '<input class="form-control" name="name" type="text" size="50" value="'.($team ? $team->name : "").'">'
479 479
     );
480 480
     row2(tra('Team name, HTML version').'
481 481
         <br><p class=\"text-muted\">
482 482
         '.tra('You may use %1 limited HTML tags %2.', '<a href="html.php" target="_new">', '</a>').'
483 483
         '.tra('If you don\'t know HTML, leave this box blank.').'</p>',
484
-        '<input class="form-control" name="name_html" type="text" size="50" value="'.str_replace('"',"'",($team?$team->name_html:"")).'">'
484
+        '<input class="form-control" name="name_html" type="text" size="50" value="'.str_replace('"', "'", ($team ? $team->name_html : "")).'">'
485 485
     );
486 486
     row2(tra('URL of team web page, if any').':<br><font size=-2>('.tra('without "http://"').')
487 487
         '.tra('This URL will be linked to from the team\'s page on this site.'),
488
-        '<input class="form-control" type="text" name="url" size="60" value="'.($team?$team->url:"").'">'
488
+        '<input class="form-control" type="text" name="url" size="60" value="'.($team ? $team->url : "").'">'
489 489
     );
490 490
     row2(tra('Description of team').':
491 491
         <br><p class=\"text-muted\">
492 492
         '.tra('You may use %1 limited HTML tags %2.', '<a href="html.php" target="_new">', '</a>').'
493 493
         </p>',
494
-        '<textarea class="form-control" name="description" rows=10>'.($team?$team->description:"").'</textarea>'
494
+        '<textarea class="form-control" name="description" rows=10>'.($team ? $team->description : "").'</textarea>'
495 495
     );
496 496
 
497
-    row2(tra('Type of team').':', team_type_select($team?$team->type:null));
497
+    row2(tra('Type of team').':', team_type_select($team ? $team->type : null));
498 498
 
499 499
     row2_init(tra('Country'),
500 500
         '<select class="form-control" name="country">'
501 501
     );
502
-    echo country_select_options($team?$team->country:null);
502
+    echo country_select_options($team ? $team->country : null);
503 503
 
504 504
     echo "</select></td></tr>\n";
505
-    $x = (!$team || $team->joinable)?"checked":"";
505
+    $x = (!$team || $team->joinable) ? "checked" : "";
506 506
     row2(tra("Accept new members?"), "<input type=checkbox name=joinable $x>");
507 507
     // Check if we're using reCaptcha to prevent spam accounts
508 508
     //
@@ -566,12 +566,12 @@  discard block
 block discarded – undo
566 566
 //
567 567
 function new_transfer_request_ok($team, $now) {
568 568
     if ($team->ping_user <= 0) {
569
-        if ($team->ping_time < $now - 60 * 86400) {
569
+        if ($team->ping_time < $now - 60*86400) {
570 570
             return true;
571 571
         }
572 572
         return false;
573 573
     }
574
-    if ($team->ping_time < $now - 90 * 86400) {
574
+    if ($team->ping_time < $now - 90*86400) {
575 575
         return true;
576 576
     }
577 577
     return false;
@@ -606,7 +606,7 @@  discard block
 block discarded – undo
606 606
     if (!is_valid_country($country)) {
607 607
         $country = tra('None');
608 608
     }
609
-    $country = BoincDb::escape_string($country);  // for Cote d'Ivoire
609
+    $country = BoincDb::escape_string($country); // for Cote d'Ivoire
610 610
 
611 611
     $clause = sprintf(
612 612
         "(userid, create_time, name, name_lc, url, type, name_html, description, country, nusers, expavg_time) values(%d, %d, '%s', '%s', '%s', %d, '%s', '%s', '%s', %d, unix_timestamp())",
@@ -629,6 +629,6 @@  discard block
 block discarded – undo
629 629
     }
630 630
 }
631 631
 
632
-$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
632
+$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit
633 633
 
634 634
 ?>
Please login to merge, or discard this patch.
html/inc/bootstrap.inc 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -141,12 +141,12 @@  discard block
 block discarded – undo
141 141
         // prefix for links; needed for pages not in top dir
142 142
     $user,
143 143
         // logged-in user, if any
144
-    $fixed=false,
144
+    $fixed = false,
145 145
         // if true, navbar is fixed at top of page.
146 146
         // NOTE: if you do this, you must set a global var $fixed_navbar
147 147
         // to true at compile time
148 148
         // (it needs to be set when page_head() is called).
149
-    $inverse=false
149
+    $inverse = false
150 150
         // white on black?
151 151
 ) {
152 152
     global $master_url;
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 // output a panel.
215 215
 // $content_func is a function that generates the panel contents
216 216
 //
217
-function panel($title, $content_func, $class="panel-primary", $body_class="") {
217
+function panel($title, $content_func, $class = "panel-primary", $body_class = "") {
218 218
     echo sprintf('<div class="panel %s">
219 219
         ', $class
220 220
     );
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
 // are functions that generate the top, left, and right content
241 241
 // $left_width is the width of left column in 1/12 units.
242 242
 //
243
-function grid($top_func, $left_func, $right_func, $left_width=6) {
243
+function grid($top_func, $left_func, $right_func, $left_width = 6) {
244 244
     echo '
245 245
         <div class="container-fluid">
246 246
     ';
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
             </div>
256 256
         ';
257 257
     }
258
-    $right_width = 12-$left_width;
258
+    $right_width = 12 - $left_width;
259 259
     echo '
260 260
         <div class="row">
261 261
         <div class="col-sm-'.$left_width.'">
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 //      use extra = "name=x"
280 280
 //      call forum_focus(x, foo) after defining the field
281 281
 //
282
-function form_start($action, $method='get', $extra='') {
282
+function form_start($action, $method = 'get', $extra = '') {
283 283
     echo sprintf(
284 284
         '<div class="container-fluid">
285 285
         <form class="form-horizontal" method="%s" action="%s" %s>'
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
 // just the input field
312 312
 //
313 313
 function form_input_text_field(
314
-    $name, $value='', $type='text', $attrs='', $extra=''
314
+    $name, $value = '', $type = 'text', $attrs = '', $extra = ''
315 315
 ) {
316 316
     return sprintf(
317 317
         '<input %s type="%s" class="form-control" name="%s" value="%s">%s',
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
 // the whole row
323 323
 //
324 324
 function form_input_text(
325
-    $label, $name, $value='', $type='text', $attrs='', $extra=''
325
+    $label, $name, $value = '', $type = 'text', $attrs = '', $extra = ''
326 326
 ) {
327 327
     echo sprintf('
328 328
         <div class="form-group">
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
     );
351 351
 }
352 352
 
353
-function form_input_textarea($label, $name, $value='', $nrows=4) {
353
+function form_input_textarea($label, $name, $value = '', $nrows = 4) {
354 354
     echo sprintf('
355 355
         <div class="form-group">
356 356
             <label align=right class="%s" for="%s">%s</label>
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
     );
401 401
     $n = 0;
402 402
     foreach ($items as $i) {
403
-        $s = ($flags && $flags[$n])?'selected':'';
403
+        $s = ($flags && $flags[$n]) ? 'selected' : '';
404 404
         echo '<option '.$s.' value="'.$i[0].'">'.$i[1].'</option>
405 405
         ';
406 406
         $n++;
@@ -410,12 +410,12 @@  discard block
 block discarded – undo
410 410
 
411 411
 // return a list of string for checkbox items
412 412
 //
413
-function checkbox_item_strings($items, $attrs='') {
413
+function checkbox_item_strings($items, $attrs = '') {
414 414
     $x = [];
415 415
     foreach ($items as $i) {
416 416
         $x[] = sprintf('<input %s type="checkbox" name="%s" %s> %s
417 417
             ',
418
-            $attrs, $i[0], $i[2]?"checked":"", $i[1]
418
+            $attrs, $i[0], $i[2] ? "checked" : "", $i[1]
419 419
         );
420 420
     }
421 421
     return $x;
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
 
424 424
 // $items is list of (name, label, checked)
425 425
 //
426
-function form_checkboxes($label, $items, $attrs='') {
426
+function form_checkboxes($label, $items, $attrs = '') {
427 427
     echo sprintf('
428 428
         <div class="form-group">
429 429
             <label align=right class="%s">%s</label>
@@ -449,7 +449,7 @@  discard block
 block discarded – undo
449 449
         FORM_LEFT_CLASS, $label, FORM_RIGHT_CLASS
450 450
     );
451 451
     foreach ($items as $i) {
452
-        $checked = ($selected == $i[0])?"checked":"";
452
+        $checked = ($selected == $i[0]) ? "checked" : "";
453 453
         echo sprintf('<input type="radio" name="%s" value="%s" %s> %s <br>
454 454
             ',
455 455
             $name, $i[0], $checked, $i[1]
@@ -482,7 +482,7 @@  discard block
 block discarded – undo
482 482
 ';
483 483
 }
484 484
 
485
-function form_submit($text, $attrs='') {
485
+function form_submit($text, $attrs = '') {
486 486
     form_general(
487 487
         "",
488 488
         sprintf('<button %s type="submit" class="btn btn-success">%s</button>',
@@ -491,11 +491,11 @@  discard block
 block discarded – undo
491 491
     );
492 492
 }
493 493
 
494
-function form_checkbox($label, $name, $checked=false) {
494
+function form_checkbox($label, $name, $checked = false) {
495 495
     echo sprintf('
496 496
         <div class="form-group">
497 497
             <input type="checkbox" name="%s" %s> &nbsp; <span class="lead">%s</span>
498 498
         </div>
499
-        ', $name, $checked?"checked":"", $label
499
+        ', $name, $checked ? "checked" : "", $label
500 500
     );
501 501
 }
Please login to merge, or discard this patch.
html/inc/keywords.inc 1 patch
Spacing   +61 added lines, -61 removed lines patch added patch discarded remove patch
@@ -24,72 +24,72 @@
 block discarded – undo
24 24
 define('KW_CATEGORY_SCIENCE', 0);
25 25
 define('KW_CATEGORY_LOC', 1);
26 26
 
27
-define('KW_ASTRONOMY',      1);
28
-define('KW_SETI',           2);
29
-define('KW_PULSARS',        3);
30
-define('KW_GW',             4);
31
-define('KW_COSMOLOGY',      5);
32
-define('KW_PHYSICS',        6);
27
+define('KW_ASTRONOMY', 1);
28
+define('KW_SETI', 2);
29
+define('KW_PULSARS', 3);
30
+define('KW_GW', 4);
31
+define('KW_COSMOLOGY', 5);
32
+define('KW_PHYSICS', 6);
33 33
 define('KW_PARTICLE_PHYSICS', 7);
34
-define('KW_NANOSCIENCE',    8);
35
-define('KW_BIOMED',         9);
34
+define('KW_NANOSCIENCE', 8);
35
+define('KW_BIOMED', 9);
36 36
 define('KW_DRUG_DISCOVERY', 10);
37
-define('KW_PROTEINS',       11);
38
-define('KW_GENETICS',       12);
39
-define('KW_DISEASE',        13);
40
-define('KW_CANCER',         14);
41
-define('KW_MATH_CS',        15);
42
-define('KW_AI',             16);
43
-define('KW_OCEANIA',        17);
44
-define('KW_AUSTRALIA',      18);
37
+define('KW_PROTEINS', 11);
38
+define('KW_GENETICS', 12);
39
+define('KW_DISEASE', 13);
40
+define('KW_CANCER', 14);
41
+define('KW_MATH_CS', 15);
42
+define('KW_AI', 16);
43
+define('KW_OCEANIA', 17);
44
+define('KW_AUSTRALIA', 18);
45 45
 
46
-define('KW_EUROPE',         20);
47
-define('KW_GERMANY',        21);
48
-define('KW_ASIA',           22);
49
-define('KW_AMERICAS',       23);
50
-define('KW_US',             24);
51
-define('KW_UCB',            25);
52
-define('KW_AEI',            26);
53
-define('KW_CERN',           27);
54
-define('KW_UW',             28);
55
-define('KW_EARTH_SCI',      29);
56
-define('KW_SPAIN',          30);
57
-define('KW_SAN_JORGE',      31);
58
-define('KW_NUMBER_THEORY',  32);
59
-define('KW_CRYPTO',         33);
60
-define('KW_ENV_RESEARCH',   34);
61
-define('KW_CLIMATE',        35);
62
-define('KW_CZECH',          36);
46
+define('KW_EUROPE', 20);
47
+define('KW_GERMANY', 21);
48
+define('KW_ASIA', 22);
49
+define('KW_AMERICAS', 23);
50
+define('KW_US', 24);
51
+define('KW_UCB', 25);
52
+define('KW_AEI', 26);
53
+define('KW_CERN', 27);
54
+define('KW_UW', 28);
55
+define('KW_EARTH_SCI', 29);
56
+define('KW_SPAIN', 30);
57
+define('KW_SAN_JORGE', 31);
58
+define('KW_NUMBER_THEORY', 32);
59
+define('KW_CRYPTO', 33);
60
+define('KW_ENV_RESEARCH', 34);
61
+define('KW_CLIMATE', 35);
62
+define('KW_CZECH', 36);
63 63
 define('KW_CHARLES_PRAGUE', 37);
64
-define('KW_RECHENKRAFT',    38);
65
-define('KW_RHEINMAIN',      39);
66
-define('KW_HUNGARY',        40);
67
-define('KW_IRELAND',        41);
68
-define('KW_UC_DUBLIN',      42);
69
-define('KW_POLAND',         43);
70
-define('KW_RUSSIA',         44);
64
+define('KW_RECHENKRAFT', 38);
65
+define('KW_RHEINMAIN', 39);
66
+define('KW_HUNGARY', 40);
67
+define('KW_IRELAND', 41);
68
+define('KW_UC_DUBLIN', 42);
69
+define('KW_POLAND', 43);
70
+define('KW_RUSSIA', 44);
71 71
 define('KW_SW_STATE_RUSSIA', 45);
72
-define('KW_RAS',            46);
73
-define('KW_PRBB',           47);
74
-define('KW_UK',             48);
75
-define('KW_OXFORD',         49);
76
-define('KW_CHINA',          50);
77
-define('KW_U_DAYTON',       51);
78
-define('KW_WRIGHT_STATE',   52);
79
-define('KW_USC',            53);
80
-define('KW_FULLERTON',      54);
81
-define('KW_ARIZONA_STATE',  55);
82
-define('KW_U_ILLINOIS',     56);
83
-define('KW_U_WARSAW',       57);
84
-define('KW_RPI',            58);
85
-define('KW_INTERNATIONAL',  59);
86
-define('KW_UND',            60);
87
-define('KW_HOLLAND',        61);
88
-define('KW_CHEMISTRY',      62);
89
-define('KW_GAMES',          63);
90
-define('KW_VIRUS',          64);
91
-define('KW_FRANCE',         65);
92
-define('KW_CANADA',         66);
72
+define('KW_RAS', 46);
73
+define('KW_PRBB', 47);
74
+define('KW_UK', 48);
75
+define('KW_OXFORD', 49);
76
+define('KW_CHINA', 50);
77
+define('KW_U_DAYTON', 51);
78
+define('KW_WRIGHT_STATE', 52);
79
+define('KW_USC', 53);
80
+define('KW_FULLERTON', 54);
81
+define('KW_ARIZONA_STATE', 55);
82
+define('KW_U_ILLINOIS', 56);
83
+define('KW_U_WARSAW', 57);
84
+define('KW_RPI', 58);
85
+define('KW_INTERNATIONAL', 59);
86
+define('KW_UND', 60);
87
+define('KW_HOLLAND', 61);
88
+define('KW_CHEMISTRY', 62);
89
+define('KW_GAMES', 63);
90
+define('KW_VIRUS', 64);
91
+define('KW_FRANCE', 65);
92
+define('KW_CANADA', 66);
93 93
 
94 94
 $job_keywords = array();
95 95
 
Please login to merge, or discard this patch.
html/inc/util_basic.inc 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -46,10 +46,10 @@  discard block
 block discarded – undo
46 46
     ";
47 47
 }
48 48
 
49
-function xml_error($num=-1, $msg=null, $file=null, $line=null) {
49
+function xml_error($num = -1, $msg = null, $file = null, $line = null) {
50 50
     global $xml_outer_tag;
51 51
     if (!$msg) {
52
-        switch($num) {
52
+        switch ($num) {
53 53
         case -112: $msg = "Invalid XML"; break;
54 54
         case -136: $msg = "Not found"; break;
55 55
         case -137: $msg = "Name or email address is not unique"; break;
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 // If it's a single-tag element, and it's present, just return the tag
96 96
 //
97 97
 function parse_element($xml, $tag) {
98
-    $closetag = "</" . substr($tag,1);
98
+    $closetag = "</".substr($tag, 1);
99 99
     $x = strstr($xml, $tag);
100 100
     if ($x) {
101 101
         if (strstr($tag, "/>")) return $tag;
@@ -111,8 +111,8 @@  discard block
 block discarded – undo
111 111
 
112 112
 function parse_next_element($xml, $tag, &$cursor) {
113 113
     $element = null;
114
-    $closetag = "</" . substr($tag,1);
115
-    $pos = substr($xml,$cursor);
114
+    $closetag = "</".substr($tag, 1);
115
+    $pos = substr($xml, $cursor);
116 116
     $x = strstr($pos, $tag);
117 117
     if ($x) {
118 118
         if (strstr($tag, "/>")) return $tag;
Please login to merge, or discard this patch.