Completed
Push — 1.11.x ( a9bf33...0cc0b0 )
by José
55:09 queued 28:08
created
main/inc/lib/extra_field.lib.php 1 patch
Spacing   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -27,19 +27,19 @@  discard block
 block discarded – undo
27 27
     );
28 28
 
29 29
     public $ops = array(
30
-        'eq' => '=',        //equal
31
-        'ne' => '<>',       //not equal
32
-        'lt' => '<',        //less than
33
-        'le' => '<=',       //less than or equal
34
-        'gt' => '>',        //greater than
35
-        'ge' => '>=',       //greater than or equal
36
-        'bw' => 'LIKE',     //begins with
30
+        'eq' => '=', //equal
31
+        'ne' => '<>', //not equal
32
+        'lt' => '<', //less than
33
+        'le' => '<=', //less than or equal
34
+        'gt' => '>', //greater than
35
+        'ge' => '>=', //greater than or equal
36
+        'bw' => 'LIKE', //begins with
37 37
         'bn' => 'NOT LIKE', //doesn't begin with
38
-        'in' => 'LIKE',     //is in
38
+        'in' => 'LIKE', //is in
39 39
         'ni' => 'NOT LIKE', //is not in
40
-        'ew' => 'LIKE',     //ends with
40
+        'ew' => 'LIKE', //ends with
41 41
         'en' => 'NOT LIKE', //doesn't end with
42
-        'cn' => 'LIKE',     //contains
42
+        'cn' => 'LIKE', //contains
43 43
         'nc' => 'NOT LIKE'  //doesn't contain
44 44
     );
45 45
 
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
      */
385 385
     public static function get_extra_fields_by_handler($handler)
386 386
     {
387
-        $types= array();
387
+        $types = array();
388 388
         $types[self::FIELD_TYPE_TEXT] = get_lang('FieldTypeText');
389 389
         $types[self::FIELD_TYPE_TEXTAREA] = get_lang('FieldTypeTextarea');
390 390
         $types[self::FIELD_TYPE_RADIO] = get_lang('FieldTypeRadio');
@@ -1072,7 +1072,7 @@  discard block
 block discarded – undo
1072 1072
                         // chzn-select doesn't work for sessions??
1073 1073
                         $form->addElement(
1074 1074
                             'select',
1075
-                            'extra_' . $field_details['variable'],
1075
+                            'extra_'.$field_details['variable'],
1076 1076
                             $field_details['display_text'],
1077 1077
                             $options,
1078 1078
                             array('id' => 'extra_'.$field_details['variable'])
@@ -1131,7 +1131,7 @@  discard block
 block discarded – undo
1131 1131
 
1132 1132
                         if (!$admin_permissions) {
1133 1133
                             if ($field_details['visible_to_self'] == 0) {
1134
-                                $form->freeze('extra_' . $field_details['variable']);
1134
+                                $form->freeze('extra_'.$field_details['variable']);
1135 1135
                             }
1136 1136
                         }
1137 1137
                         break;
@@ -1208,7 +1208,7 @@  discard block
 block discarded – undo
1208 1208
                             }
1209 1209
                         });';
1210 1210
 
1211
-                        $first_id  = null;
1211
+                        $first_id = null;
1212 1212
                         if (!empty($extraData)) {
1213 1213
                             if (isset($extraData['extra_'.$field_details['variable']])) {
1214 1214
                                 $first_id = $extraData['extra_'.$field_details['variable']]['extra_'.$field_details['variable']];
@@ -1468,9 +1468,9 @@  discard block
 block discarded – undo
1468 1468
 
1469 1469
                         if (is_array($extraData) && array_key_exists($fieldVariable, $extraData)) {
1470 1470
 
1471
-                            if (file_exists(api_get_path(SYS_UPLOAD_PATH) . $extraData[$fieldVariable])) {
1471
+                            if (file_exists(api_get_path(SYS_UPLOAD_PATH).$extraData[$fieldVariable])) {
1472 1472
                                 $fieldTexts[] = Display::img(
1473
-                                    api_get_path(WEB_UPLOAD_PATH) . $extraData[$fieldVariable],
1473
+                                    api_get_path(WEB_UPLOAD_PATH).$extraData[$fieldVariable],
1474 1474
                                     $field_details['display_text'],
1475 1475
                                     ['width' => '300']
1476 1476
                                 );
@@ -1493,7 +1493,7 @@  discard block
 block discarded – undo
1493 1493
                         $allowed_picture_types = ['jpg', 'jpeg', 'png', 'gif'];
1494 1494
                         $form->addRule(
1495 1495
                             'extra_'.$field_details['variable'],
1496
-                            get_lang('OnlyImagesAllowed') . ' ('.implode(',', $allowed_picture_types).')',
1496
+                            get_lang('OnlyImagesAllowed').' ('.implode(',', $allowed_picture_types).')',
1497 1497
                             'filetype',
1498 1498
                             $allowed_picture_types
1499 1499
                         );
@@ -1535,10 +1535,10 @@  discard block
 block discarded – undo
1535 1535
                         if (is_array($extraData) &&
1536 1536
                             array_key_exists($fieldVariable, $extraData)
1537 1537
                         ) {
1538
-                            if (file_exists(api_get_path(SYS_UPLOAD_PATH) . $extraData[$fieldVariable])) {
1538
+                            if (file_exists(api_get_path(SYS_UPLOAD_PATH).$extraData[$fieldVariable])) {
1539 1539
                                 $fieldTexts[] = Display::url(
1540
-                                    api_get_path(WEB_UPLOAD_PATH) . $extraData[$fieldVariable],
1541
-                                    api_get_path(WEB_UPLOAD_PATH) . $extraData[$fieldVariable],
1540
+                                    api_get_path(WEB_UPLOAD_PATH).$extraData[$fieldVariable],
1541
+                                    api_get_path(WEB_UPLOAD_PATH).$extraData[$fieldVariable],
1542 1542
                                     array(
1543 1543
                                         'title' => $field_details['display_text'],
1544 1544
                                         'target' => '_blank'
@@ -1578,12 +1578,12 @@  discard block
 block discarded – undo
1578 1578
                             "extra_{$field_details['variable']}",
1579 1579
                             $field_details['display_text']
1580 1580
                         );
1581
-                        $form->applyFilter('extra_' . $field_details['variable'], 'stripslashes');
1581
+                        $form->applyFilter('extra_'.$field_details['variable'], 'stripslashes');
1582 1582
 
1583 1583
                         if (!$admin_permissions) {
1584 1584
                             if ($field_details['visible_to_self'] == 0) {
1585 1585
                                 $form->freeze(
1586
-                                    'extra_' . $field_details['variable']
1586
+                                    'extra_'.$field_details['variable']
1587 1587
                                 );
1588 1588
                             }
1589 1589
                         }
@@ -1594,13 +1594,13 @@  discard block
 block discarded – undo
1594 1594
                             $field_details['display_text']
1595 1595
                         );
1596 1596
                         $form->applyFilter(
1597
-                            'extra_' . $field_details['variable'],
1597
+                            'extra_'.$field_details['variable'],
1598 1598
                             'stripslashes'
1599 1599
                         );
1600 1600
                         if (!$admin_permissions) {
1601 1601
                             if ($field_details['visible_to_self'] == 0) {
1602 1602
                                 $form->freeze(
1603
-                                    'extra_' . $field_details['variable']
1603
+                                    'extra_'.$field_details['variable']
1604 1604
                                 );
1605 1605
                             }
1606 1606
                         }
@@ -1610,12 +1610,12 @@  discard block
 block discarded – undo
1610 1610
                             "extra_{$field_details['variable']}",
1611 1611
                             $field_details['display_text']
1612 1612
                         );
1613
-                        $form->applyFilter('extra_' . $field_details['variable'], 'stripslashes');
1613
+                        $form->applyFilter('extra_'.$field_details['variable'], 'stripslashes');
1614 1614
 
1615 1615
                         if (!$admin_permissions) {
1616 1616
                             if ($field_details['visible_to_self'] == 0) {
1617 1617
                                 $form->freeze(
1618
-                                    'extra_' . $field_details['variable']
1618
+                                    'extra_'.$field_details['variable']
1619 1619
                                 );
1620 1620
                             }
1621 1621
                         }
@@ -1626,13 +1626,13 @@  discard block
 block discarded – undo
1626 1626
                             $field_details['display_text']
1627 1627
                         );
1628 1628
                         $form->applyFilter(
1629
-                            'extra_' . $field_details['variable'],
1629
+                            'extra_'.$field_details['variable'],
1630 1630
                             'stripslashes'
1631 1631
                         );
1632 1632
                         if (!$admin_permissions) {
1633 1633
                             if ($field_details['visible_to_self'] == 0) {
1634 1634
                                 $form->freeze(
1635
-                                    'extra_' . $field_details['variable']
1635
+                                    'extra_'.$field_details['variable']
1636 1636
                                 );
1637 1637
                             }
1638 1638
                         }
@@ -1663,7 +1663,7 @@  discard block
 block discarded – undo
1663 1663
                                     
1664 1664
                                     if (typeof google === "object") {
1665 1665
                                         
1666
-                                        var address = "' . $dataValue . '";
1666
+                                        var address = "' . $dataValue.'";
1667 1667
                                         initializeGeo'.$field_details['variable'].'(address, false);
1668 1668
     
1669 1669
                                         $("#geolocalization_extra_'.$field_details['variable'].'").on("click", function() {
@@ -1685,7 +1685,7 @@  discard block
 block discarded – undo
1685 1685
                                         });
1686 1686
                                         
1687 1687
                                     } else {
1688
-                                        $("#map_extra_'.$field_details['variable'].'").html("<div class=\"alert alert-info\">' . get_lang('YouNeedToActivateTheGoogleMapsPluginInAdminPlatformToSeeTheMap') . '</div>");
1688
+                                        $("#map_extra_'.$field_details['variable'].'").html("<div class=\"alert alert-info\">'.get_lang('YouNeedToActivateTheGoogleMapsPluginInAdminPlatformToSeeTheMap').'</div>");
1689 1689
                                     }
1690 1690
                                     
1691 1691
                                 });
@@ -1700,7 +1700,7 @@  discard block
 block discarded – undo
1700 1700
                                         };
1701 1701
 
1702 1702
                                         var geoError = function(error) {
1703
-                                            alert("Geocode ' . get_lang('Error') . ': " + error);
1703
+                                            alert("Geocode ' . get_lang('Error').': " + error);
1704 1704
                                         };
1705 1705
 
1706 1706
                                         var geoOptions = {
@@ -1751,11 +1751,11 @@  discard block
 block discarded – undo
1751 1751
                                                         infowindow.open(map_'.$field_details['variable'].', marker);
1752 1752
                                                     });
1753 1753
                                                 } else {
1754
-                                                    alert("' . get_lang("NotFound") . '");
1754
+                                                    alert("' . get_lang("NotFound").'");
1755 1755
                                                 }
1756 1756
 
1757 1757
                                             } else {
1758
-                                                alert("Geocode ' . get_lang('Error') . ': ' . get_lang("AddressField") . ' ' . get_lang("NotFound") . '");
1758
+                                                alert("Geocode ' . get_lang('Error').': '.get_lang("AddressField").' '.get_lang("NotFound").'");
1759 1759
                                             }
1760 1760
                                         });
1761 1761
                                     }
@@ -1819,8 +1819,8 @@  discard block
 block discarded – undo
1819 1819
                                 $(document).ready(function() {
1820 1820
                                     if (typeof google === "object") {
1821 1821
                                         
1822
-                                        var lat = "' . $lat . '";
1823
-                                        var lng = "' . $lng . '";
1822
+                                        var lat = "' . $lat.'";
1823
+                                        var lng = "' . $lng.'";
1824 1824
                                         var latLng = new google.maps.LatLng(lat, lng);
1825 1825
                                         initializeGeo'.$field_details['variable'].'(false, latLng);
1826 1826
     
@@ -1845,7 +1845,7 @@  discard block
 block discarded – undo
1845 1845
                                             }
1846 1846
                                         });
1847 1847
                                     } else {
1848
-                                        $("#map_extra_'.$field_details['variable'].'").html("<div class=\"alert alert-info\">' . get_lang('YouNeedToActivateTheGoogleMapsPluginInAdminPlatformToSeeTheMap') . '</div>");
1848
+                                        $("#map_extra_'.$field_details['variable'].'").html("<div class=\"alert alert-info\">'.get_lang('YouNeedToActivateTheGoogleMapsPluginInAdminPlatformToSeeTheMap').'</div>");
1849 1849
                                     }
1850 1850
                                     
1851 1851
                                 });
@@ -1860,7 +1860,7 @@  discard block
 block discarded – undo
1860 1860
                                         };
1861 1861
 
1862 1862
                                         var geoError = function(error) {
1863
-                                            alert("Geocode ' . get_lang('Error') . ': " + error);
1863
+                                            alert("Geocode ' . get_lang('Error').': " + error);
1864 1864
                                         };
1865 1865
 
1866 1866
                                         var geoOptions = {
@@ -1911,11 +1911,11 @@  discard block
 block discarded – undo
1911 1911
                                                         infowindow.open(map_'.$field_details['variable'].', marker);
1912 1912
                                                     });
1913 1913
                                                 } else {
1914
-                                                    alert("' . get_lang("NotFound") . '");
1914
+                                                    alert("' . get_lang("NotFound").'");
1915 1915
                                                 }
1916 1916
 
1917 1917
                                             } else {
1918
-                                                alert("Geocode ' . get_lang('Error') . ': " + status);
1918
+                                                alert("Geocode ' . get_lang('Error').': " + status);
1919 1919
                                             }
1920 1920
                                         });
1921 1921
                                     }
@@ -2111,7 +2111,7 @@  discard block
 block discarded – undo
2111 2111
         $form->addElement('header', $header);
2112 2112
 
2113 2113
         if ($action == 'edit') {
2114
-            $translateUrl = api_get_path(WEB_CODE_PATH) . 'extrafield/translate.php?' . http_build_query([
2114
+            $translateUrl = api_get_path(WEB_CODE_PATH).'extrafield/translate.php?'.http_build_query([
2115 2115
                 'extra_field' => $id
2116 2116
             ]);
2117 2117
             $translateButton = Display::toolbarButton(get_lang('TranslateThisTerm'), $translateUrl, 'language', 'link');
@@ -2448,7 +2448,7 @@  discard block
 block discarded – undo
2448 2448
                 foreach ($extra_fields as $extra_info) {
2449 2449
                     $extra_field_info = $extra_info['extra_field_info'];
2450 2450
                     $inject_joins .= " INNER JOIN $this->table_field_values fv$counter
2451
-                                       ON (s." . $this->primaryKey . " = fv$counter." . $this->handler_id . ") ";
2451
+                                       ON (s.".$this->primaryKey." = fv$counter.".$this->handler_id.") ";
2452 2452
                     // Add options
2453 2453
                     if (isset($extra_field_info['field_type']) && in_array(
2454 2454
                             $extra_field_info['field_type'],
@@ -2461,7 +2461,7 @@  discard block
 block discarded – undo
2461 2461
                     ) {
2462 2462
                         $options['where'] = str_replace(
2463 2463
                             $extra_info['field'],
2464
-                            'fv' . $counter . '.field_id = ' . $extra_info['id'] . ' AND fvo' . $counter . '.option_value',
2464
+                            'fv'.$counter.'.field_id = '.$extra_info['id'].' AND fvo'.$counter.'.option_value',
2465 2465
                             $options['where']
2466 2466
                         );
2467 2467
                         $inject_joins .= "
@@ -2476,13 +2476,13 @@  discard block
 block discarded – undo
2476 2476
                     ) {
2477 2477
                         $options['where'] = str_replace(
2478 2478
                             $extra_info['field'],
2479
-                            'tag' . $counter . '.tag ',
2479
+                            'tag'.$counter.'.tag ',
2480 2480
                             $options['where']
2481 2481
                         );
2482 2482
 
2483 2483
                         $inject_joins .= "
2484 2484
                             INNER JOIN $this->table_field_rel_tag tag_rel$counter
2485
-                            ON (tag_rel$counter.field_id = ".$extra_info['id']." AND tag_rel$counter.item_id = s." . $this->primaryKey.")
2485
+                            ON (tag_rel$counter.field_id = ".$extra_info['id']." AND tag_rel$counter.item_id = s.".$this->primaryKey.")
2486 2486
                             INNER JOIN $this->table_field_tag tag$counter
2487 2487
                             ON (tag$counter.id =  tag_rel$counter.tag_id)
2488 2488
                         ";
@@ -2688,19 +2688,19 @@  discard block
 block discarded – undo
2688 2688
                         break;
2689 2689
                     }
2690 2690
 
2691
-                    if (!file_exists(api_get_path(SYS_UPLOAD_PATH) . $valueData['value'])) {
2691
+                    if (!file_exists(api_get_path(SYS_UPLOAD_PATH).$valueData['value'])) {
2692 2692
                         break;
2693 2693
                     }
2694 2694
 
2695 2695
                     $image = Display::img(
2696
-                        api_get_path(WEB_UPLOAD_PATH) . $valueData['value'],
2696
+                        api_get_path(WEB_UPLOAD_PATH).$valueData['value'],
2697 2697
                         $field['display_text'],
2698 2698
                         array('width' => '300')
2699 2699
                     );
2700 2700
 
2701 2701
                     $displayedValue = Display::url(
2702 2702
                         $image,
2703
-                        api_get_path(WEB_UPLOAD_PATH) . $valueData['value'],
2703
+                        api_get_path(WEB_UPLOAD_PATH).$valueData['value'],
2704 2704
                         array('target' => '_blank')
2705 2705
                     );
2706 2706
                     break;
@@ -2709,13 +2709,13 @@  discard block
 block discarded – undo
2709 2709
                         break;
2710 2710
                     }
2711 2711
 
2712
-                    if (!file_exists(api_get_path(SYS_UPLOAD_PATH) . $valueData['value'])) {
2712
+                    if (!file_exists(api_get_path(SYS_UPLOAD_PATH).$valueData['value'])) {
2713 2713
                         break;
2714 2714
                     }
2715 2715
 
2716 2716
                     $displayedValue = Display::url(
2717 2717
                         get_lang('Download'),
2718
-                        api_get_path(WEB_UPLOAD_PATH) . $valueData['value'],
2718
+                        api_get_path(WEB_UPLOAD_PATH).$valueData['value'],
2719 2719
                         array(
2720 2720
                             'title' => $field['display_text'],
2721 2721
                             'target' => '_blank'
Please login to merge, or discard this patch.
plugin/google_maps/lang/spanish.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 <br><br>
7 7
 <img src='//maps.google.com/mapfiles/ms/icons/red-dot.png'> <img src='//maps.google.com/mapfiles/ms/icons/green-dot.png'> <img src='//maps.google.com/mapfiles/ms/icons/blue-dot.png'> <img src='//maps.google.com/mapfiles/ms/icons/yellow-dot.png'> <img src='//maps.google.com/mapfiles/ms/icons/purple-dot.png'>
8 8
 <br><br>
9
-siga el siguiente link para ver el mapa : <a href='". api_get_path(WEB_PLUGIN_PATH) . "google_maps/src/map_coordinates.php'>" . api_get_path(WEB_PLUGIN_PATH) . "google_maps/src/map_coordinates.php</a>";
9
+siga el siguiente link para ver el mapa : <a href='". api_get_path(WEB_PLUGIN_PATH)."google_maps/src/map_coordinates.php'>".api_get_path(WEB_PLUGIN_PATH)."google_maps/src/map_coordinates.php</a>";
10 10
 $strings['enable_api'] = "Activar API";
11 11
 $strings['api_key'] = "Api Key";
12 12
 $strings['extra_field_name'] = "Nombre del campo extra";
Please login to merge, or discard this patch.
plugin/google_maps/lang/english.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 <br><br>
7 7
 <img src='//maps.google.com/mapfiles/ms/icons/red-dot.png'> <img src='//maps.google.com/mapfiles/ms/icons/green-dot.png'> <img src='//maps.google.com/mapfiles/ms/icons/blue-dot.png'> <img src='//maps.google.com/mapfiles/ms/icons/yellow-dot.png'> <img src='//maps.google.com/mapfiles/ms/icons/purple-dot.png'>
8 8
 <br><br>
9
-siga el siguiente link para ver el mapa : <a href='". api_get_path(WEB_PLUGIN_PATH) . "google_maps/src/map_coordinates.php'>" . api_get_path(WEB_PLUGIN_PATH) . "google_maps/src/map_coordinates.php</a>";
9
+siga el siguiente link para ver el mapa : <a href='". api_get_path(WEB_PLUGIN_PATH)."google_maps/src/map_coordinates.php'>".api_get_path(WEB_PLUGIN_PATH)."google_maps/src/map_coordinates.php</a>";
10 10
 $strings['enable_api'] = "Activar API";
11 11
 $strings['api_key'] = "Api Key";
12 12
 $strings['extra_field_name'] = "Nombre del campo extra";
Please login to merge, or discard this patch.
plugin/google_maps/lang/french.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 <br><br>
7 7
 <img src='//maps.google.com/mapfiles/ms/icons/red-dot.png'> <img src='//maps.google.com/mapfiles/ms/icons/green-dot.png'> <img src='//maps.google.com/mapfiles/ms/icons/blue-dot.png'> <img src='//maps.google.com/mapfiles/ms/icons/yellow-dot.png'> <img src='//maps.google.com/mapfiles/ms/icons/purple-dot.png'>
8 8
 <br><br>
9
-siga el siguiente link para ver el mapa : <a href='". api_get_path(WEB_PLUGIN_PATH) . "google_maps/src/map_coordinates.php'>" . api_get_path(WEB_PLUGIN_PATH) . "google_maps/src/map_coordinates.php</a>";
9
+siga el siguiente link para ver el mapa : <a href='". api_get_path(WEB_PLUGIN_PATH)."google_maps/src/map_coordinates.php'>".api_get_path(WEB_PLUGIN_PATH)."google_maps/src/map_coordinates.php</a>";
10 10
 $strings['enable_api'] = "Activar API";
11 11
 $strings['api_key'] = "Api Key";
12 12
 $strings['extra_field_name'] = "Nombre del campo extra";
Please login to merge, or discard this patch.