Completed
Push — develop ( bcb506 )
by Adam
23:26 queued 05:42
created
modules/AOS_PDF_Templates/templateParser.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -59,33 +59,33 @@  discard block
 block discarded – undo
59 59
             if (isset($field_def['name']) && $field_def['name'] != '') {
60 60
                 $fieldName = $field_def['name'];
61 61
                 if ($field_def['type'] == 'currency') {
62
-                    $repl_arr[$key . "_" . $fieldName] = currency_format_number($focus->$fieldName, $params = array('currency_symbol' => false));
62
+                    $repl_arr[$key."_".$fieldName] = currency_format_number($focus->$fieldName, $params = array('currency_symbol' => false));
63 63
                 } else if (($field_def['type'] == 'radioenum' || $field_def['type'] == 'enum' || $field_def['type'] == 'dynamicenum') && isset($field_def['options'])) {
64
-                    $repl_arr[$key . "_" . $fieldName] = translate($field_def['options'], $focus->module_dir, $focus->$fieldName);
64
+                    $repl_arr[$key."_".$fieldName] = translate($field_def['options'], $focus->module_dir, $focus->$fieldName);
65 65
                 } else if ($field_def['type'] == 'multienum' && isset($field_def['options'])) {
66 66
                     $mVals = unencodeMultienum($focus->$fieldName);
67 67
                     $translatedVals = array();
68
-                    foreach($mVals as $mVal){
68
+                    foreach ($mVals as $mVal) {
69 69
                         $translatedVals[] = translate($field_def['options'], $focus->module_dir, $mVal);
70 70
                     }
71
-                    $repl_arr[$key . "_" . $fieldName] = implode(", ", $translatedVals);
71
+                    $repl_arr[$key."_".$fieldName] = implode(", ", $translatedVals);
72 72
                 } //Fix for Windows Server as it needed to be converted to a string.
73 73
                 else if ($field_def['type'] == 'int') {
74
-                    $repl_arr[$key . "_" . $fieldName] = strval($focus->$fieldName);
74
+                    $repl_arr[$key."_".$fieldName] = strval($focus->$fieldName);
75 75
                 } else if ($field_def['type'] == 'image') {
76
-                    $secureLink = $sugar_config['site_url'] . '/' . "public/". $focus->id .  '_' . $fieldName;
77
-                    $file_location = $sugar_config['upload_dir'] . '/'  . $focus->id .  '_' . $fieldName;
76
+                    $secureLink = $sugar_config['site_url'].'/'."public/".$focus->id.'_'.$fieldName;
77
+                    $file_location = $sugar_config['upload_dir'].'/'.$focus->id.'_'.$fieldName;
78 78
                     // create a copy with correct extension by mime type
79
-                    if(!file_exists('public')) {
79
+                    if (!file_exists('public')) {
80 80
                         sugar_mkdir('public', 0777);
81 81
                     }
82
-                    if(!copy($file_location, "public/{$focus->id}".  '_' . "$fieldName")) {
83
-                        $secureLink = $sugar_config['site_url'] . '/'. $file_location;
82
+                    if (!copy($file_location, "public/{$focus->id}".'_'."$fieldName")) {
83
+                        $secureLink = $sugar_config['site_url'].'/'.$file_location;
84 84
                     }
85 85
                     $link = $secureLink;
86
-                    $repl_arr[$key . "_" . $fieldName] = '<img src="' . $link . '" width="'.$field_def['width'].'" height="'.$field_def['height'].'"/>';
86
+                    $repl_arr[$key."_".$fieldName] = '<img src="'.$link.'" width="'.$field_def['width'].'" height="'.$field_def['height'].'"/>';
87 87
                 } else {
88
-                    $repl_arr[$key . "_" . $fieldName] = $focus->$fieldName;
88
+                    $repl_arr[$key."_".$fieldName] = $focus->$fieldName;
89 89
                 }
90 90
             }
91 91
         } // end foreach()
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
                 if ($value != '' && $value != '0.00') {
99 99
                     if ($repl_arr['aos_products_quotes_discount'] == 'Percentage') {
100 100
                         $sep = get_number_seperators();
101
-                        $value = rtrim(rtrim(format_number($value), '0'), $sep[1]);//.$app_strings['LBL_PERCENTAGE_SYMBOL'];
101
+                        $value = rtrim(rtrim(format_number($value), '0'), $sep[1]); //.$app_strings['LBL_PERCENTAGE_SYMBOL'];
102 102
                     } else {
103 103
                         $value = currency_format_number($value, $params = array('currency_symbol' => false));
104 104
                     }
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
                 }
108 108
             }
109 109
             if ($name === 'aos_products_product_image' && !empty($value)) {
110
-                $value = '<img src="' . $value . '"width="50" height="50"/>';
110
+                $value = '<img src="'.$value.'"width="50" height="50"/>';
111 111
             }
112 112
             if ($name === 'aos_products_quotes_product_qty') {
113 113
                 $sep = get_number_seperators();
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
             }
116 116
             if ($name === 'aos_products_quotes_vat' || strpos($name, 'pct') > 0 || strpos($name, 'percent') > 0 || strpos($name, 'percentage') > 0) {
117 117
                 $sep = get_number_seperators();
118
-                $value = rtrim(rtrim(format_number($value), '0'), $sep[1]) . $app_strings['LBL_PERCENTAGE_SYMBOL'];
118
+                $value = rtrim(rtrim(format_number($value), '0'), $sep[1]).$app_strings['LBL_PERCENTAGE_SYMBOL'];
119 119
             }
120 120
             if (strpos($name, 'date') > 0 || strpos($name, 'expiration') > 0) {
121 121
                 if ($value != '') {
Please login to merge, or discard this patch.
include/ListView/ListViewSubPanel.php 1 patch
Spacing   +62 added lines, -62 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
                 $this->createSmartyTemplate();
137 137
             }
138 138
 
139
-            $html_var = $this->subpanel_module . "_CELL";
139
+            $html_var = $this->subpanel_module."_CELL";
140 140
 
141 141
             $list_data = $this->processUnionBeans($sugarbean, $subpanel_def, $html_var);
142 142
 
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
                 }
292 292
             }
293 293
 
294
-            foreach($data as $aVal => $aItem) {
294
+            foreach ($data as $aVal => $aItem) {
295 295
                 $widget_contents[$aVal] = array();
296 296
                 $subpanel_item_count++;
297 297
                 $aItem->check_date_relationships_load();
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
 
325 325
                 if ($this->shouldProcess) {
326 326
                     if ($aItem->ACLAccess('EditView')) {
327
-                        $widget_contents[$aVal][0] = "<input type='checkbox' class='checkbox' name='mass[]' value='" . $fields['ID'] . "' />";
327
+                        $widget_contents[$aVal][0] = "<input type='checkbox' class='checkbox' name='mass[]' value='".$fields['ID']."' />";
328 328
                     }
329 329
                     else {
330 330
                         $widget_contents[$aVal][0] = '';
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
 //                    else {
336 336
 //                        $this->smartyTemplate->assign('TAG_NAME', 'span');
337 337
 //                    }
338
-                    $this->smartyTemplate->assign('CHECKALL', "<input type='checkbox'  title='" . $GLOBALS['app_strings']['LBL_SELECT_ALL_TITLE'] . "' class='checkbox' name='massall' id='massall' value='' onclick='sListView.check_all(document.MassUpdate, \"mass[]\", this.checked);' />");
338
+                    $this->smartyTemplate->assign('CHECKALL', "<input type='checkbox'  title='".$GLOBALS['app_strings']['LBL_SELECT_ALL_TITLE']."' class='checkbox' name='massall' id='massall' value='' onclick='sListView.check_all(document.MassUpdate, \"mass[]\", this.checked);' />");
339 339
 
340 340
                 }
341 341
                 $oddRow = !$oddRow;
@@ -415,8 +415,8 @@  discard block
 block discarded – undo
415 415
                         if ($usage != 'query_only') {
416 416
                             $list_field['name'] = $field_name;
417 417
 
418
-                            $module_field = $field_name . '_mod';
419
-                            $owner_field = $field_name . '_owner';
418
+                            $module_field = $field_name.'_mod';
419
+                            $owner_field = $field_name.'_owner';
420 420
                             if (!empty($aItem->$module_field)) {
421 421
 
422 422
                                 $list_field['owner_id'] = $aItem->$owner_field;
@@ -504,11 +504,11 @@  discard block
 block discarded – undo
504 504
                                         unset($_content);
505 505
                                     }
506 506
                                     else {
507
-                                        $doNotProcessTheseActions = array("edit_button", "close_button","remove_button");
508
-                                        if(!in_array($list_field['name'],$doNotProcessTheseActions) && '' != ($_content = $layout_manager->widgetDisplay($list_field))){
507
+                                        $doNotProcessTheseActions = array("edit_button", "close_button", "remove_button");
508
+                                        if (!in_array($list_field['name'], $doNotProcessTheseActions) && '' != ($_content = $layout_manager->widgetDisplay($list_field))) {
509 509
                                             $button_contents[$aVal][] = $_content;
510 510
                                             unset($_content);
511
-                                        }else{
511
+                                        } else {
512 512
                                             $button_contents[$aVal][] = '';
513 513
                                         }
514 514
                                     }
@@ -545,9 +545,9 @@  discard block
 block discarded – undo
545 545
             global $currentModule;
546 546
             global $app_strings;
547 547
 
548
-            if(!isset($current_offset) || empty($current_offset))
548
+            if (!isset($current_offset) || empty($current_offset))
549 549
 	    {
550
-  		$current_offset=0;
550
+  		$current_offset = 0;
551 551
 	    }
552 552
 	    $start_record = $current_offset + 1;
553 553
 
@@ -579,21 +579,21 @@  discard block
 block discarded – undo
579 579
                 $dynamic_url = '';
580 580
 
581 581
                 if ($this->is_dynamic) {
582
-                    $dynamic_url .= '&' . $this->getSessionVariableName($html_varName, 'ORDER_BY') . '=' . $this->getSessionVariable($html_varName, 'ORDER_BY') . '&sort_order=' . $this->sort_order . '&to_pdf=true&action=SubPanelViewer&subpanel=' . $this->subpanel_module;
582
+                    $dynamic_url .= '&'.$this->getSessionVariableName($html_varName, 'ORDER_BY').'='.$this->getSessionVariable($html_varName, 'ORDER_BY').'&sort_order='.$this->sort_order.'&to_pdf=true&action=SubPanelViewer&subpanel='.$this->subpanel_module;
583 583
                 }
584 584
 
585
-                $current_URL = htmlentities($this->base_URL . $current_offset . $dynamic_url);
586
-                $start_URL = htmlentities($this->base_URL . "0" . $dynamic_url);
587
-                $previous_URL = htmlentities($this->base_URL . $previous_offset . $dynamic_url);
588
-                $next_URL = htmlentities($this->base_URL . $next_offset . $dynamic_url);
589
-                $end_URL = htmlentities($this->base_URL . 'end' . $dynamic_url);
585
+                $current_URL = htmlentities($this->base_URL.$current_offset.$dynamic_url);
586
+                $start_URL = htmlentities($this->base_URL."0".$dynamic_url);
587
+                $previous_URL = htmlentities($this->base_URL.$previous_offset.$dynamic_url);
588
+                $next_URL = htmlentities($this->base_URL.$next_offset.$dynamic_url);
589
+                $end_URL = htmlentities($this->base_URL.'end'.$dynamic_url);
590 590
 
591 591
                 if (!empty($this->start_link_wrapper)) {
592
-                    $current_URL = $this->start_link_wrapper . $current_URL . $this->end_link_wrapper;
593
-                    $start_URL = $this->start_link_wrapper . $start_URL . $this->end_link_wrapper;
594
-                    $previous_URL = $this->start_link_wrapper . $previous_URL . $this->end_link_wrapper;
595
-                    $next_URL = $this->start_link_wrapper . $next_URL . $this->end_link_wrapper;
596
-                    $end_URL = $this->start_link_wrapper . $end_URL . $this->end_link_wrapper;
592
+                    $current_URL = $this->start_link_wrapper.$current_URL.$this->end_link_wrapper;
593
+                    $start_URL = $this->start_link_wrapper.$start_URL.$this->end_link_wrapper;
594
+                    $previous_URL = $this->start_link_wrapper.$previous_URL.$this->end_link_wrapper;
595
+                    $next_URL = $this->start_link_wrapper.$next_URL.$this->end_link_wrapper;
596
+                    $end_URL = $this->start_link_wrapper.$end_URL.$this->end_link_wrapper;
597 597
                 }
598 598
 
599 599
                 $moduleString = htmlspecialchars("{$currentModule}_{$html_varName}_offset");
@@ -606,7 +606,7 @@  discard block
 block discarded – undo
606 606
                     $uids = empty($_REQUEST['uid']) || $massUpdateRun ? '' : $_REQUEST['uid'];
607 607
                     $select_entire_list = ($massUpdateRun) ? 0 : (isset($_POST['select_entire_list']) ? $_POST['select_entire_list'] : (isset($_REQUEST['select_entire_list']) ? htmlspecialchars($_REQUEST['select_entire_list']) : 0));
608 608
 
609
-                    echo "<textarea style='display: none' name='uid'>{$uids}</textarea>\n" . "<input type='hidden' name='select_entire_list' value='{$select_entire_list}'>\n" . "<input type='hidden' name='{$moduleString}' value='0'>\n" . "<input type='hidden' name='{$moduleStringOrder}' value='0'>\n";
609
+                    echo "<textarea style='display: none' name='uid'>{$uids}</textarea>\n"."<input type='hidden' name='select_entire_list' value='{$select_entire_list}'>\n"."<input type='hidden' name='{$moduleString}' value='0'>\n"."<input type='hidden' name='{$moduleStringOrder}' value='0'>\n";
610 610
 
611 611
                 }
612 612
 
@@ -614,17 +614,17 @@  discard block
 block discarded – undo
614 614
                 $GLOBALS['log']->debug("Offsets: (start, previous, next, last)(0, $previous_offset, $next_offset, $last_offset)");
615 615
 
616 616
                 if (0 == $current_offset) {
617
-                    $start_link = "<button type='button' name='listViewStartButton' title='{$this->local_app_strings['LNK_LIST_START']}' class='button' disabled>" . SugarThemeRegistry::current()->getImage("start_off", "aborder='0' align='absmiddle'", null, null, '.gif', $this->local_app_strings['LNK_LIST_START']) . "</button>";
618
-                    $previous_link = "<button type='button' name='listViewPrevButton' title='{$this->local_app_strings['LNK_LIST_PREVIOUS']}' class='button' disabled>" . SugarThemeRegistry::current()->getImage("previous_off", "border='0' align='absmiddle'", null, null, '.gif', $this->local_app_strings['LNK_LIST_PREVIOUS']) . "</button>";
617
+                    $start_link = "<button type='button' name='listViewStartButton' title='{$this->local_app_strings['LNK_LIST_START']}' class='button' disabled>".SugarThemeRegistry::current()->getImage("start_off", "aborder='0' align='absmiddle'", null, null, '.gif', $this->local_app_strings['LNK_LIST_START'])."</button>";
618
+                    $previous_link = "<button type='button' name='listViewPrevButton' title='{$this->local_app_strings['LNK_LIST_PREVIOUS']}' class='button' disabled>".SugarThemeRegistry::current()->getImage("previous_off", "border='0' align='absmiddle'", null, null, '.gif', $this->local_app_strings['LNK_LIST_PREVIOUS'])."</button>";
619 619
                 }
620 620
                 else {
621 621
                     if ($this->multi_select_popup) {// nav links for multiselect popup, submit form to save checks.
622
-                        $start_link = "<button type='button' class='button' name='listViewStartButton' title='{$this->local_app_strings['LNK_LIST_START']}' onClick='javascript:save_checks(0, \"{$moduleString}\");'>" . SugarThemeRegistry::current()->getImage("start", "border='0' align='absmiddle'", null, null, '.gif', $this->local_app_strings['LNK_LIST_START']) . "</button>";
623
-                        $previous_link = "<button type='button' class='button' name='listViewPrevButton' title='{$this->local_app_strings['LNK_LIST_PREVIOUS']}' onClick='javascript:save_checks($previous_offset, \"{$moduleString}\");'>" . SugarThemeRegistry::current()->getImage("previous", "border='0' align='absmiddle'", null, null, '.gif', $this->local_app_strings['LNK_LIST_PREVIOUS']) . "</button>";
622
+                        $start_link = "<button type='button' class='button' name='listViewStartButton' title='{$this->local_app_strings['LNK_LIST_START']}' onClick='javascript:save_checks(0, \"{$moduleString}\");'>".SugarThemeRegistry::current()->getImage("start", "border='0' align='absmiddle'", null, null, '.gif', $this->local_app_strings['LNK_LIST_START'])."</button>";
623
+                        $previous_link = "<button type='button' class='button' name='listViewPrevButton' title='{$this->local_app_strings['LNK_LIST_PREVIOUS']}' onClick='javascript:save_checks($previous_offset, \"{$moduleString}\");'>".SugarThemeRegistry::current()->getImage("previous", "border='0' align='absmiddle'", null, null, '.gif', $this->local_app_strings['LNK_LIST_PREVIOUS'])."</button>";
624 624
                     }
625 625
                     elseif ($this->shouldProcess) {
626
-                        $start_link = "<button type='button' class='button' name='listViewStartButton' title='{$this->local_app_strings['LNK_LIST_START']}' onClick='location.href=\"$start_URL\"; sListView.save_checks(0, \"{$moduleString}\");'>" . SugarThemeRegistry::current()->getImage("start", "border='0' align='absmiddle'", null, null, '.gif', $this->local_app_strings['LNK_LIST_START']) . "</button>";
627
-                        $previous_link = "<button type='button' class='button' name='listViewPrevButton' title='{$this->local_app_strings['LNK_LIST_PREVIOUS']}' onClick='location.href=\"$previous_URL\"; sListView.save_checks($previous_offset, \"{$moduleString}\");'>" . SugarThemeRegistry::current()->getImage("previous", "border='0' align='absmiddle'", null, null, '.gif', $this->local_app_strings['LNK_LIST_PREVIOUS']) . "</button>";
626
+                        $start_link = "<button type='button' class='button' name='listViewStartButton' title='{$this->local_app_strings['LNK_LIST_START']}' onClick='location.href=\"$start_URL\"; sListView.save_checks(0, \"{$moduleString}\");'>".SugarThemeRegistry::current()->getImage("start", "border='0' align='absmiddle'", null, null, '.gif', $this->local_app_strings['LNK_LIST_START'])."</button>";
627
+                        $previous_link = "<button type='button' class='button' name='listViewPrevButton' title='{$this->local_app_strings['LNK_LIST_PREVIOUS']}' onClick='location.href=\"$previous_URL\"; sListView.save_checks($previous_offset, \"{$moduleString}\");'>".SugarThemeRegistry::current()->getImage("previous", "border='0' align='absmiddle'", null, null, '.gif', $this->local_app_strings['LNK_LIST_PREVIOUS'])."</button>";
628 628
                     }
629 629
                     else {
630 630
                         $onClick = '';
@@ -634,7 +634,7 @@  discard block
 block discarded – undo
634 634
                         else {
635 635
                             $onClick = "'location.href=\"$start_URL\";'";
636 636
                         }
637
-                        $start_link = "<button type='button' class='button' name='listViewStartButton' title='{$this->local_app_strings['LNK_LIST_START']}' onClick=" . $onClick . ">" . SugarThemeRegistry::current()->getImage("start", "border='0' align='absmiddle'", null, null, '.gif', $this->local_app_strings['LNK_LIST_START']) . "</button>";
637
+                        $start_link = "<button type='button' class='button' name='listViewStartButton' title='{$this->local_app_strings['LNK_LIST_START']}' onClick=".$onClick.">".SugarThemeRegistry::current()->getImage("start", "border='0' align='absmiddle'", null, null, '.gif', $this->local_app_strings['LNK_LIST_START'])."</button>";
638 638
 
639 639
                         $onClick = '';
640 640
                         if (0 != preg_match('/javascript.*/', $previous_URL)) {
@@ -643,25 +643,25 @@  discard block
 block discarded – undo
643 643
                         else {
644 644
                             $onClick = "'location.href=\"$previous_URL\";'";
645 645
                         }
646
-                        $previous_link = "<button type='button' class='button' name='listViewPrevButton' title='{$this->local_app_strings['LNK_LIST_PREVIOUS']}' onClick=" . $onClick . ">" . SugarThemeRegistry::current()->getImage("previous", "border='0' align='absmiddle'", null, null, '.gif', $this->local_app_strings['LNK_LIST_PREVIOUS']) . "</button>";
646
+                        $previous_link = "<button type='button' class='button' name='listViewPrevButton' title='{$this->local_app_strings['LNK_LIST_PREVIOUS']}' onClick=".$onClick.">".SugarThemeRegistry::current()->getImage("previous", "border='0' align='absmiddle'", null, null, '.gif', $this->local_app_strings['LNK_LIST_PREVIOUS'])."</button>";
647 647
                     }
648 648
                 }
649 649
 
650 650
                 if ($last_offset <= $current_offset) {
651
-                    $end_link = "<button type='button' name='listViewEndButton' title='{$this->local_app_strings['LNK_LIST_END']}' class='button' disabled>" . SugarThemeRegistry::current()->getImage("end_off", "border='0' align='absmiddle'", null, null, '.gif', $this->local_app_strings['LNK_LIST_END']) . "</button>";
652
-                    $next_link = "<button type='button' name='listViewNextButton' title='{$this->local_app_strings['LNK_LIST_NEXT']}' class='button' disabled>" . SugarThemeRegistry::current()->getImage("next_off", "aborder='0' align='absmiddle'", null, null, '.gif', $this->local_app_strings['LNK_LIST_NEXT']) . "</button>";
651
+                    $end_link = "<button type='button' name='listViewEndButton' title='{$this->local_app_strings['LNK_LIST_END']}' class='button' disabled>".SugarThemeRegistry::current()->getImage("end_off", "border='0' align='absmiddle'", null, null, '.gif', $this->local_app_strings['LNK_LIST_END'])."</button>";
652
+                    $next_link = "<button type='button' name='listViewNextButton' title='{$this->local_app_strings['LNK_LIST_NEXT']}' class='button' disabled>".SugarThemeRegistry::current()->getImage("next_off", "aborder='0' align='absmiddle'", null, null, '.gif', $this->local_app_strings['LNK_LIST_NEXT'])."</button>";
653 653
                 }
654 654
                 else {
655 655
                     if ($this->multi_select_popup) { // nav links for multiselect popup, submit form to save checks.
656
-                        $end_link = "<button type='button' name='listViewEndButton' class='button' title='{$this->local_app_strings['LNK_LIST_END']}' onClick='javascript:save_checks($last_offset, \"{$moduleString}\");'>" . SugarThemeRegistry::current()->getImage("end", "border='0' align='absmiddle'", null, null, '.gif', $this->local_app_strings['LNK_LIST_END']) . "</button>";
656
+                        $end_link = "<button type='button' name='listViewEndButton' class='button' title='{$this->local_app_strings['LNK_LIST_END']}' onClick='javascript:save_checks($last_offset, \"{$moduleString}\");'>".SugarThemeRegistry::current()->getImage("end", "border='0' align='absmiddle'", null, null, '.gif', $this->local_app_strings['LNK_LIST_END'])."</button>";
657 657
                         if (!empty($sugar_config['disable_count_query'])) {
658 658
                             $end_link = '';
659 659
                         }
660
-                        $next_link = "<button type='button' name='listViewNextButton' title='{$this->local_app_strings['LNK_LIST_NEXT']}' class='button' onClick='javascript:save_checks($next_offset, \"{$moduleString}\");'>" . SugarThemeRegistry::current()->getImage("next", "border='0' align='absmiddle'", null, null, '.gif', $this->local_app_strings['LNK_LIST_NEXT']) . "</button>";
660
+                        $next_link = "<button type='button' name='listViewNextButton' title='{$this->local_app_strings['LNK_LIST_NEXT']}' class='button' onClick='javascript:save_checks($next_offset, \"{$moduleString}\");'>".SugarThemeRegistry::current()->getImage("next", "border='0' align='absmiddle'", null, null, '.gif', $this->local_app_strings['LNK_LIST_NEXT'])."</button>";
661 661
                     }
662 662
                     elseif ($this->shouldProcess) {
663
-                        $end_link = "<button type='button' name='listViewEndButton' class='button' title='{$this->local_app_strings['LNK_LIST_END']}' onClick='location.href=\"$end_URL\"; sListView.save_checks(\"end\", \"{$moduleString}\");'>" . SugarThemeRegistry::current()->getImage("end", "border='0' align='absmiddle'", null, null, '.gif', $this->local_app_strings['LNK_LIST_END']) . "</button>";
664
-                        $next_link = "<button type='button' name='listViewNextButton' class='button' title='{$this->local_app_strings['LNK_LIST_NEXT']}' onClick='location.href=\"$next_URL\"; sListView.save_checks($next_offset, \"{$moduleString}\");'>" . SugarThemeRegistry::current()->getImage("next", "border='0' align='absmiddle'", null, null, '.gif', $this->local_app_strings['LNK_LIST_NEXT']) . "</button>";
663
+                        $end_link = "<button type='button' name='listViewEndButton' class='button' title='{$this->local_app_strings['LNK_LIST_END']}' onClick='location.href=\"$end_URL\"; sListView.save_checks(\"end\", \"{$moduleString}\");'>".SugarThemeRegistry::current()->getImage("end", "border='0' align='absmiddle'", null, null, '.gif', $this->local_app_strings['LNK_LIST_END'])."</button>";
664
+                        $next_link = "<button type='button' name='listViewNextButton' class='button' title='{$this->local_app_strings['LNK_LIST_NEXT']}' onClick='location.href=\"$next_URL\"; sListView.save_checks($next_offset, \"{$moduleString}\");'>".SugarThemeRegistry::current()->getImage("next", "border='0' align='absmiddle'", null, null, '.gif', $this->local_app_strings['LNK_LIST_NEXT'])."</button>";
665 665
                     }
666 666
                     else {
667 667
                         $onClick = '';
@@ -671,7 +671,7 @@  discard block
 block discarded – undo
671 671
                         else {
672 672
                             $onClick = "'location.href=\"$next_URL\";'";
673 673
                         }
674
-                        $next_link = "<button type='button' name='listViewNextButton' class='button' title='{$this->local_app_strings['LNK_LIST_NEXT']}' onClick=" . $onClick . ">" . SugarThemeRegistry::current()->getImage("next", "border='0' align='absmiddle'", null, null, '.gif', $this->local_app_strings['LNK_LIST_NEXT']) . "</button>";
674
+                        $next_link = "<button type='button' name='listViewNextButton' class='button' title='{$this->local_app_strings['LNK_LIST_NEXT']}' onClick=".$onClick.">".SugarThemeRegistry::current()->getImage("next", "border='0' align='absmiddle'", null, null, '.gif', $this->local_app_strings['LNK_LIST_NEXT'])."</button>";
675 675
 
676 676
                         $onClick = '';
677 677
                         if (0 != preg_match('/javascript.*/', $end_URL)) {
@@ -680,7 +680,7 @@  discard block
 block discarded – undo
680 680
                         else {
681 681
                             $onClick = "'location.href=\"$end_URL\";'";
682 682
                         }
683
-                        $end_link = "<button type='button' name='listViewEndButton' class='button' title='{$this->local_app_strings['LNK_LIST_END']}' onClick=" . $onClick . ">" . SugarThemeRegistry::current()->getImage("end", "border='0' align='absmiddle'", null, null, '.gif', $this->local_app_strings['LNK_LIST_END']) . "</button>";
683
+                        $end_link = "<button type='button' name='listViewEndButton' class='button' title='{$this->local_app_strings['LNK_LIST_END']}' onClick=".$onClick.">".SugarThemeRegistry::current()->getImage("end", "border='0' align='absmiddle'", null, null, '.gif', $this->local_app_strings['LNK_LIST_END'])."</button>";
684 684
 
685 685
                     }
686 686
                 }
@@ -690,14 +690,14 @@  discard block
 block discarded – undo
690 690
 
691 691
                 $end_record = $end_record - 1;
692 692
 
693
-                $script_href = "<a style=\'width: 150px\' name=\"thispage\" class=\'menuItem\' onmouseover=\'hiliteItem(this,\"yes\");\' onmouseout=\'unhiliteItem(this);\' onclick=\'if (document.MassUpdate.select_entire_list.value==1){document.MassUpdate.select_entire_list.value=0;sListView.check_all(document.MassUpdate, \"mass[]\", true, $this->records_per_page)}else {sListView.check_all(document.MassUpdate, \"mass[]\", true)};\' href=\'#\'>{$this->local_app_strings['LBL_LISTVIEW_OPTION_CURRENT']}&nbsp;&#x28;{$this->records_per_page}&#x29;&#x200E;</a>" . "<a style=\'width: 150px\' name=\"selectall\" class=\'menuItem\' onmouseover=\'hiliteItem(this,\"yes\");\' onmouseout=\'unhiliteItem(this);\' onclick=\'sListView.check_entire_list(document.MassUpdate, \"mass[]\",true,{$row_count});\' href=\'#\'>{$this->local_app_strings['LBL_LISTVIEW_OPTION_ENTIRE']}&nbsp;&#x28;{$row_count}&#x29;&#x200E;</a>" . "<a style=\'width: 150px\' name=\"deselect\" class=\'menuItem\' onmouseover=\'hiliteItem(this,\"yes\");\' onmouseout=\'unhiliteItem(this);\' onclick=\'sListView.clear_all(document.MassUpdate, \"mass[]\", false);\' href=\'#\'>{$this->local_app_strings['LBL_LISTVIEW_NONE']}</a>";
693
+                $script_href = "<a style=\'width: 150px\' name=\"thispage\" class=\'menuItem\' onmouseover=\'hiliteItem(this,\"yes\");\' onmouseout=\'unhiliteItem(this);\' onclick=\'if (document.MassUpdate.select_entire_list.value==1){document.MassUpdate.select_entire_list.value=0;sListView.check_all(document.MassUpdate, \"mass[]\", true, $this->records_per_page)}else {sListView.check_all(document.MassUpdate, \"mass[]\", true)};\' href=\'#\'>{$this->local_app_strings['LBL_LISTVIEW_OPTION_CURRENT']}&nbsp;&#x28;{$this->records_per_page}&#x29;&#x200E;</a>"."<a style=\'width: 150px\' name=\"selectall\" class=\'menuItem\' onmouseover=\'hiliteItem(this,\"yes\");\' onmouseout=\'unhiliteItem(this);\' onclick=\'sListView.check_entire_list(document.MassUpdate, \"mass[]\",true,{$row_count});\' href=\'#\'>{$this->local_app_strings['LBL_LISTVIEW_OPTION_ENTIRE']}&nbsp;&#x28;{$row_count}&#x29;&#x200E;</a>"."<a style=\'width: 150px\' name=\"deselect\" class=\'menuItem\' onmouseover=\'hiliteItem(this,\"yes\");\' onmouseout=\'unhiliteItem(this);\' onclick=\'sListView.clear_all(document.MassUpdate, \"mass[]\", false);\' href=\'#\'>{$this->local_app_strings['LBL_LISTVIEW_NONE']}</a>";
694 694
 
695 695
                 $close_inline_img = SugarThemeRegistry::current()->getImage('close_inline', 'border=0', null, null, ".gif", $app_strings['LBL_CLOSEINLINE']);
696 696
 
697 697
                 echo "<script>
698 698
                 function select_dialog() {
699 699
                 	var \$dialog = \$('<div></div>')
700
-					.html('<a style=\'width: 150px\' name=\"thispage\" class=\'menuItem\' onmouseover=\'hiliteItem(this,\"yes\");\' onmouseout=\'unhiliteItem(this);\' onclick=\'if (document.MassUpdate.select_entire_list.value==1){document.MassUpdate.select_entire_list.value=0;sListView.check_all(document.MassUpdate, \"mass[]\", true, $this->records_per_page)}else {sListView.check_all(document.MassUpdate, \"mass[]\", true)};\' href=\'javascript:void(0)\'>{$this->local_app_strings['LBL_LISTVIEW_OPTION_CURRENT']}&nbsp;&#x28;{$this->records_per_page}&#x29;&#x200E;</a>" . "<a style=\'width: 150px\' name=\"selectall\" class=\'menuItem\' onmouseover=\'hiliteItem(this,\"yes\");\' onmouseout=\'unhiliteItem(this);\' onclick=\'sListView.check_entire_list(document.MassUpdate, \"mass[]\",true,{$row_count});\' href=\'javascript:void(0)\'>{$this->local_app_strings['LBL_LISTVIEW_OPTION_ENTIRE']}&nbsp;&#x28;{$row_count}&#x29;&#x200E;</a>" . "<a style=\'width: 150px\' name=\"deselect\" class=\'menuItem\' onmouseover=\'hiliteItem(this,\"yes\");\' onmouseout=\'unhiliteItem(this);\' onclick=\'sListView.clear_all(document.MassUpdate, \"mass[]\", false);\' href=\'javascript:void(0)\'>{$this->local_app_strings['LBL_LISTVIEW_NONE']}</a>')
700
+					.html('<a style=\'width: 150px\' name=\"thispage\" class=\'menuItem\' onmouseover=\'hiliteItem(this,\"yes\");\' onmouseout=\'unhiliteItem(this);\' onclick=\'if (document.MassUpdate.select_entire_list.value==1){document.MassUpdate.select_entire_list.value=0;sListView.check_all(document.MassUpdate, \"mass[]\", true, $this->records_per_page)}else {sListView.check_all(document.MassUpdate, \"mass[]\", true)};\' href=\'javascript:void(0)\'>{$this->local_app_strings['LBL_LISTVIEW_OPTION_CURRENT']}&nbsp;&#x28;{$this->records_per_page}&#x29;&#x200E;</a>"."<a style=\'width: 150px\' name=\"selectall\" class=\'menuItem\' onmouseover=\'hiliteItem(this,\"yes\");\' onmouseout=\'unhiliteItem(this);\' onclick=\'sListView.check_entire_list(document.MassUpdate, \"mass[]\",true,{$row_count});\' href=\'javascript:void(0)\'>{$this->local_app_strings['LBL_LISTVIEW_OPTION_ENTIRE']}&nbsp;&#x28;{$row_count}&#x29;&#x200E;</a>"."<a style=\'width: 150px\' name=\"deselect\" class=\'menuItem\' onmouseover=\'hiliteItem(this,\"yes\");\' onmouseout=\'unhiliteItem(this);\' onclick=\'sListView.clear_all(document.MassUpdate, \"mass[]\", false);\' href=\'javascript:void(0)\'>{$this->local_app_strings['LBL_LISTVIEW_NONE']}</a>')
701 701
 					.dialog({
702 702
 						autoOpen: false,
703 703
 						width: 150
@@ -714,7 +714,7 @@  discard block
 block discarded – undo
714 714
                     if (!empty($GLOBALS['sugar_config']['disable_count_query']) && $GLOBALS['sugar_config']['disable_count_query'] === true && $total > $pageTotal) {
715 715
                         $this->show_plus = true;
716 716
                         $total = $pageTotal;
717
-                        $total_label = $total . '+';
717
+                        $total_label = $total.'+';
718 718
                     }
719 719
                     else {
720 720
                         $this->show_plus = false;
@@ -725,7 +725,7 @@  discard block
 block discarded – undo
725 725
                     //Bug#52931: Replace with actionMenu
726 726
                     //$select_link = "<a id='select_link' onclick='return select_dialog();' href=\"javascript:void(0)\">".$this->local_app_strings['LBL_LINK_SELECT']."&nbsp;".SugarThemeRegistry::current()->getImage('MoreDetail', 'border=0', 11, 7, '.png', $app_strings['LBL_MOREDETAIL'])."</a>";
727 727
                     $menuItems = array(
728
-                        "<input title=\"" . $app_strings['LBL_SELECT_ALL_TITLE'] . "\" type='checkbox' class='checkbox massall' name='massall' id='massall' value='' onclick='sListView.check_all(document.MassUpdate, \"mass[]\", this.checked);' /><a href='javascript: void(0);'></a>", "<a  name='thispage' id='button_select_this_page' class='menuItem' onmouseover='hiliteItem(this,\"yes\");' onmouseout='unhiliteItem(this);' onclick='if (document.MassUpdate.select_entire_list.value==1){document.MassUpdate.select_entire_list.value=0;sListView.check_all(document.MassUpdate, \"mass[]\", true, $pageTotal)}else {sListView.check_all(document.MassUpdate, \"mass[]\", true)};' href='#'>{$app_strings['LBL_LISTVIEW_OPTION_CURRENT']}&nbsp;&#x28;{$pageTotal}&#x29;&#x200E;</a>", "<a  name='selectall' id='button_select_all' class='menuItem' onmouseover='hiliteItem(this,\"yes\");' onmouseout='unhiliteItem(this);' onclick='sListView.check_entire_list(document.MassUpdate, \"mass[]\",true,{$total});' href='#'>{$app_strings['LBL_LISTVIEW_OPTION_ENTIRE']}&nbsp;&#x28;{$total_label}&#x29;&#x200E;</a>", "<a name='deselect' id='button_deselect' class='menuItem' onmouseover='hiliteItem(this,\"yes\");' onmouseout='unhiliteItem(this);' onclick='sListView.clear_all(document.MassUpdate, \"mass[]\", false);' href='#'>{$app_strings['LBL_LISTVIEW_NONE']}</a>",
728
+                        "<input title=\"".$app_strings['LBL_SELECT_ALL_TITLE']."\" type='checkbox' class='checkbox massall' name='massall' id='massall' value='' onclick='sListView.check_all(document.MassUpdate, \"mass[]\", this.checked);' /><a href='javascript: void(0);'></a>", "<a  name='thispage' id='button_select_this_page' class='menuItem' onmouseover='hiliteItem(this,\"yes\");' onmouseout='unhiliteItem(this);' onclick='if (document.MassUpdate.select_entire_list.value==1){document.MassUpdate.select_entire_list.value=0;sListView.check_all(document.MassUpdate, \"mass[]\", true, $pageTotal)}else {sListView.check_all(document.MassUpdate, \"mass[]\", true)};' href='#'>{$app_strings['LBL_LISTVIEW_OPTION_CURRENT']}&nbsp;&#x28;{$pageTotal}&#x29;&#x200E;</a>", "<a  name='selectall' id='button_select_all' class='menuItem' onmouseover='hiliteItem(this,\"yes\");' onmouseout='unhiliteItem(this);' onclick='sListView.check_entire_list(document.MassUpdate, \"mass[]\",true,{$total});' href='#'>{$app_strings['LBL_LISTVIEW_OPTION_ENTIRE']}&nbsp;&#x28;{$total_label}&#x29;&#x200E;</a>", "<a name='deselect' id='button_deselect' class='menuItem' onmouseover='hiliteItem(this,\"yes\");' onmouseout='unhiliteItem(this);' onclick='sListView.clear_all(document.MassUpdate, \"mass[]\", false);' href='#'>{$app_strings['LBL_LISTVIEW_NONE']}</a>",
729 729
                     );
730 730
                     require_once('include/Smarty/plugins/function.sugar_action_menu.php');
731 731
                     $select_link = smarty_function_sugar_action_menu(array(
@@ -737,10 +737,10 @@  discard block
 block discarded – undo
737 737
                     $select_link = "&nbsp;";
738 738
                 }
739 739
 
740
-                $export_link = '<input class="button" type="button" value="' . $this->local_app_strings['LBL_EXPORT'] . '" ' . 'onclick="return sListView.send_form(true, \'' . $_REQUEST['module'] . '\', \'index.php?entryPoint=export\',\'' . $this->local_app_strings['LBL_LISTVIEW_NO_SELECTED'] . '\')">';
740
+                $export_link = '<input class="button" type="button" value="'.$this->local_app_strings['LBL_EXPORT'].'" '.'onclick="return sListView.send_form(true, \''.$_REQUEST['module'].'\', \'index.php?entryPoint=export\',\''.$this->local_app_strings['LBL_LISTVIEW_NO_SELECTED'].'\')">';
741 741
 
742 742
                 if ($this->show_delete_button) {
743
-                    $delete_link = '<input class="button" type="button" id="delete_button" name="Delete" value="' . $this->local_app_strings['LBL_DELETE_BUTTON_LABEL'] . '" onclick="return sListView.send_mass_update(\'selected\',\'' . $this->local_app_strings['LBL_LISTVIEW_NO_SELECTED'] . '\', 1)">';
743
+                    $delete_link = '<input class="button" type="button" id="delete_button" name="Delete" value="'.$this->local_app_strings['LBL_DELETE_BUTTON_LABEL'].'" onclick="return sListView.send_mass_update(\'selected\',\''.$this->local_app_strings['LBL_LISTVIEW_NO_SELECTED'].'\', 1)">';
744 744
                 }
745 745
                 else {
746 746
                     $delete_link = '&nbsp;';
@@ -750,7 +750,7 @@  discard block
 block discarded – undo
750 750
                 $admin->retrieveSettings('system');
751 751
 
752 752
                 $user_merge = $current_user->getPreference('mailmerge_on');
753
-                if($user_merge == 'on' && isset($admin->settings['system_mailmerge_on']) && $admin->settings['system_mailmerge_on']) {
753
+                if ($user_merge == 'on' && isset($admin->settings['system_mailmerge_on']) && $admin->settings['system_mailmerge_on']) {
754 754
                     echo "<script>
755 755
                 function mailmerge_dialog(el) {
756 756
                    	var \$dialog = \$('<div></div>')
@@ -759,7 +759,7 @@  discard block
 block discarded – undo
759 759
                         . "<a  class=\'menuItem\' onmouseover=\'hiliteItem(this,\"yes\");\' onmouseout=\'unhiliteItem(this);\' href=\'index.php?action=index&module=MailMerge&entire=true\'>{$this->local_app_strings['LBL_LISTVIEW_OPTION_ENTIRE']}</a>')
760 760
 					.dialog({
761 761
 						autoOpen: false,
762
-						title: '". $this->local_app_strings['LBL_MAILMERGE']."',
762
+						title: '".$this->local_app_strings['LBL_MAILMERGE']."',
763 763
 						width: 150,
764 764
 						position: {
765 765
 						    my: myPos,
@@ -775,7 +775,7 @@  discard block
 block discarded – undo
775 775
                     $merge_link = "&nbsp;";
776 776
                 }
777 777
 
778
-                $selected_objects_span = "&nbsp;|&nbsp;{$this->local_app_strings['LBL_LISTVIEW_SELECTED_OBJECTS']}<input  style='border: 0px; background: transparent; font-size: inherit; color: inherit' type='text' readonly name='selectCount[]' value='" . ((isset($_POST['mass'])) ? count($_POST['mass']) : 0) . "' />";
778
+                $selected_objects_span = "&nbsp;|&nbsp;{$this->local_app_strings['LBL_LISTVIEW_SELECTED_OBJECTS']}<input  style='border: 0px; background: transparent; font-size: inherit; color: inherit' type='text' readonly name='selectCount[]' value='".((isset($_POST['mass'])) ? count($_POST['mass']) : 0)."' />";
779 779
 
780 780
                 if ($_REQUEST['module'] == 'Home' || $this->local_current_module == 'Import' || $this->show_export_button == false || (!empty($sugar_config['disable_export'])) || (!empty($sugar_config['admin_export_only']) && !(is_admin($current_user) || (ACLController::moduleSupportsACL($_REQUEST['module']) && ACLAction::getUserAccessLevel($current_user->id, $_REQUEST['module'], 'access') == ACL_ALLOW_ENABLED && (ACLAction::getUserAccessLevel($current_user->id, $_REQUEST['module'], 'admin') == ACL_ALLOW_ADMIN || ACLAction::getUserAccessLevel($current_user->id, $_REQUEST['module'], 'admin') == ACL_ALLOW_ADMIN_DEV))))) {
781 781
                     if ($_REQUEST['module'] != 'InboundEmail' && $_REQUEST['module'] != 'EmailMan' && $_REQUEST['module'] != 'iFrames') {
@@ -807,7 +807,7 @@  discard block
 block discarded – undo
807 807
 
808 808
                         //attempt to get the query to recreate this subpanel
809 809
                         if (!empty($this->response)) {
810
-                            $response =& $this->response;
810
+                            $response = & $this->response;
811 811
                         }
812 812
                         else {
813 813
                             $response = SugarBean::get_union_related_list($sugarbean, $this->sortby, $this->sort_order, $this->query_where, $current_offset, -1, $this->records_per_page, $this->query_limit, $subpanel_def);
@@ -824,7 +824,7 @@  discard block
 block discarded – undo
824 824
                     else {
825 825
                         $html_text .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr><td align=\"left\"  nowrap>$select_link&nbsp;$export_link&nbsp;$delete_link&nbsp;$selected_objects_span";
826 826
                     }
827
-                    $html_text .= "</td>\n<td nowrap align=\"right\">" . $start_link . "&nbsp;&nbsp;" . $previous_link . "&nbsp;&nbsp;<span class='pageNumbers'>(" . $start_record . " - " . $end_record . " " . $this->local_app_strings['LBL_LIST_OF'] . " " . $row_count . ")</span>&nbsp;&nbsp;" . $next_link . "&nbsp;&nbsp;" . $end_link . "</td></tr></table>\n";
827
+                    $html_text .= "</td>\n<td nowrap align=\"right\">".$start_link."&nbsp;&nbsp;".$previous_link."&nbsp;&nbsp;<span class='pageNumbers'>(".$start_record." - ".$end_record." ".$this->local_app_strings['LBL_LIST_OF']." ".$row_count.")</span>&nbsp;&nbsp;".$next_link."&nbsp;&nbsp;".$end_link."</td></tr></table>\n";
828 828
                     $html_text .= "</td>\n";
829 829
                     $html_text .= "</tr>\n";
830 830
                     $this->smartyTemplate->assign("PAGINATION", $html_text);
@@ -843,42 +843,42 @@  discard block
 block discarded – undo
843 843
                 $this->base_URL = $_SERVER['PHP_SELF'];
844 844
 
845 845
                 if (isset($_SERVER['QUERY_STRING'])) {
846
-                    $this->base_URL = preg_replace("/\&" . $this->getSessionVariableName($html_varName, "ORDER_BY") . "=[0-9a-zA-Z\_\.]*/", "", $this->base_URL . '?' . $_SERVER['QUERY_STRING']);
847
-                    $this->base_URL = preg_replace("/\&" . $this->getSessionVariableName($html_varName, "offset") . "=[0-9]*/", "", $this->base_URL);
846
+                    $this->base_URL = preg_replace("/\&".$this->getSessionVariableName($html_varName, "ORDER_BY")."=[0-9a-zA-Z\_\.]*/", "", $this->base_URL.'?'.$_SERVER['QUERY_STRING']);
847
+                    $this->base_URL = preg_replace("/\&".$this->getSessionVariableName($html_varName, "offset")."=[0-9]*/", "", $this->base_URL);
848 848
                 }
849 849
                 if ($_SERVER['REQUEST_METHOD'] == 'POST') {
850 850
                     $this->base_URL .= '?';
851 851
                     if (isset($_REQUEST['action'])) {
852
-                        $this->base_URL .= '&action=' . $_REQUEST['action'];
852
+                        $this->base_URL .= '&action='.$_REQUEST['action'];
853 853
                     }
854 854
                     if (isset($_REQUEST['record'])) {
855
-                        $this->base_URL .= '&record=' . $_REQUEST['record'];
855
+                        $this->base_URL .= '&record='.$_REQUEST['record'];
856 856
                     }
857 857
                     if (isset($_REQUEST['module'])) {
858
-                        $this->base_URL .= '&module=' . $_REQUEST['module'];
858
+                        $this->base_URL .= '&module='.$_REQUEST['module'];
859 859
                     }
860 860
                 }
861
-                $this->base_URL .= "&" . $this->getSessionVariableName($html_varName, "offset") . "=";
861
+                $this->base_URL .= "&".$this->getSessionVariableName($html_varName, "offset")."=";
862 862
             }
863 863
 
864 864
             if ($this->is_dynamic) {
865
-                $this->base_URL .= '&to_pdf=true&action=SubPanelViewer&subpanel=' . $this->source_module;
865
+                $this->base_URL .= '&to_pdf=true&action=SubPanelViewer&subpanel='.$this->source_module;
866 866
             }
867 867
 
868 868
             //bug43465 start
869 869
             if (isset($this->appendToBaseUrl) && is_array($this->appendToBaseUrl)) {
870 870
                 foreach ($this->appendToBaseUrl as $key => $value) {
871
-                    $fullRequestString = $key . '=' . $value;
871
+                    $fullRequestString = $key.'='.$value;
872 872
 
873 873
                     if ($this->base_URL == "/index.php") {
874 874
                         $this->base_URL .= "?";
875 875
                     }
876 876
                     else {
877
-                        if ($fullRequestString == substr($this->baseURL, '-' . strlen($fullRequestString))) {
878
-                            $this->base_URL = preg_replace("/&" . $key . "\=.*/", "", $this->base_URL);
877
+                        if ($fullRequestString == substr($this->baseURL, '-'.strlen($fullRequestString))) {
878
+                            $this->base_URL = preg_replace("/&".$key."\=.*/", "", $this->base_URL);
879 879
                         }
880 880
                         else {
881
-                            $this->base_URL = preg_replace("/&" . $key . "\=.*?&/", "&", $this->base_URL);
881
+                            $this->base_URL = preg_replace("/&".$key."\=.*?&/", "&", $this->base_URL);
882 882
                         }
883 883
                         $this->base_URL .= "&";
884 884
                     }
@@ -889,7 +889,7 @@  discard block
 block discarded – undo
889 889
             }
890 890
             //bug43465 end
891 891
 
892
-            $sort_URL_base = $this->base_URL . "&" . $this->getSessionVariableName($html_varName, "ORDER_BY") . "=";
892
+            $sort_URL_base = $this->base_URL."&".$this->getSessionVariableName($html_varName, "ORDER_BY")."=";
893 893
 
894 894
             if ($sort_URL_base !== "") {
895 895
                 $this->smartyTemplate->assign("ORDER_BY", $sort_URL_base);
Please login to merge, or discard this patch.