Completed
Pull Request — master (#194)
by
unknown
15:06
created
lib/org/openpsa/directmarketing/support/bounce_detector.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 }
46 46
 $recipient = $_ENV["RECIPIENT"];
47 47
 $token_length = strlen($recipient) - strlen($prefix) - strlen($suffix);
48
-if (   $token_length <= 0
48
+if ($token_length <= 0
49 49
     || substr($recipient, 0, strlen($prefix)) != $prefix
50 50
     || substr($recipient, strlen($prefix) + $token_length) != $suffix) {
51 51
     error_log("Recipient address does not match address template: $recipient");
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         fclose($fh);
62 62
         exit(0);
63 63
     }
64
-} elseif (   substr($BOUNCE_LOGGER, 0, strlen("http://")) == "http://"
64
+} elseif (substr($BOUNCE_LOGGER, 0, strlen("http://")) == "http://"
65 65
           || substr($BOUNCE_LOGGER, 0, strlen("https://")) == "https://") {
66 66
     $client = new org_openpsa_httplib();
67 67
     $client->post($BOUNCE_LOGGER, ["token" => $token]);
Please login to merge, or discard this patch.
lib/org/openpsa/documents/document.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
             return;
75 75
         }
76 76
         $parent = $this->get_parent();
77
-        if (   $parent
77
+        if ($parent
78 78
             && $parent->component == 'org.openpsa.documents') {
79 79
             midcom::get()->auth->request_sudo('org.openpsa.documents');
80 80
 
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
          * if nothing matched so far and the subtype is alphanumeric, uppercase it on the theory
171 171
          * that it's probably a file extension
172 172
          */
173
-        if (   $st_orig == $subtype
173
+        if ($st_orig == $subtype
174 174
             && preg_match('/^[a-z0-9]+$/', $subtype)) {
175 175
             $subtype = strtoupper($subtype);
176 176
         }
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
         $properties = $this->get_properties();
186 186
         // Copy current properties
187 187
         foreach ($properties as $key) {
188
-            if (   $key != 'guid'
188
+            if ($key != 'guid'
189 189
                 && $key != 'id'
190 190
                 && $key != 'metadata') {
191 191
                 $backup->$key = $this->{$key};
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
             $backup_attachment = $backup->create_attachment($original_attachment->name, $original_attachment->title, $original_attachment->mimetype);
218 218
 
219 219
             $original_handle = $original_attachment->open('r');
220
-            if (   !$backup_attachment
220
+            if (!$backup_attachment
221 221
                 || !$original_handle) {
222 222
                 // Failed to copy the attachment, abort
223 223
                 return $backup->delete();
Please login to merge, or discard this patch.
src/midcom/workflow/datamanager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -93,8 +93,8 @@
 block discarded – undo
93 93
 
94 94
     private function prepare_url($url)
95 95
     {
96
-        if (   substr($url, 0, 1) != '/'
97
-            && ! preg_match('|^https?://|', $url)) {
96
+        if (substr($url, 0, 1) != '/'
97
+            && !preg_match('|^https?://|', $url)) {
98 98
             $url = midcom_core_context::get()->get_key(MIDCOM_CONTEXT_ANCHORPREFIX) . $url;
99 99
         }
100 100
         return '"' . $url . '"';
Please login to merge, or discard this patch.
src/midcom/datamanager/storage/container/dbacontainer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
             }
33 33
             $config['name'] = $name;
34 34
             $field = $this->prepare_field($config);
35
-            if (   isset($config['default'])
35
+            if (isset($config['default'])
36 36
                 && (!$this->object->id || $field instanceof transientnode)) {
37 37
                 $field->set_value($config['default']);
38 38
             }
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
      */
65 65
     private function prepare_field(array $config)
66 66
     {
67
-        if (   empty($config['storage']['location'])
67
+        if (empty($config['storage']['location'])
68 68
                // This line is needed because a parameter default is set by the schema parser and then ignored
69 69
                // by the type. The things we do for backwards compatibility...
70 70
             || $config['storage']['location'] === 'parameter') {
Please login to merge, or discard this patch.
lib/org/openpsa/invoices/handler/billingdata.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
     private function load_controller(org_openpsa_invoices_billing_data_dba $bd)
31 31
     {
32 32
         $schemadb = schemadb::from_path($this->_config->get('schemadb_billing_data'));
33
-        $vat =& $schemadb->get('default')->get_field('vat');
34
-        $due =& $schemadb->get('default')->get_field('due');
33
+        $vat = & $schemadb->get('default')->get_field('vat');
34
+        $due = & $schemadb->get('default')->get_field('due');
35 35
         // Fill VAT select
36 36
         $vat_array = explode(',', $this->_config->get('vat_percentages'));
37 37
         if (!empty($vat_array)) {
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
         $data['controller'] = $this->load_controller($bd);
75 75
 
76 76
         $workflow = $this->get_workflow('datamanager', ['controller' => $data['controller']]);
77
-        if (   $mode == 'edit'
77
+        if ($mode == 'edit'
78 78
             && $bd->can_do('midgard:delete')) {
79 79
             $delete = $this->get_workflow('delete', [
80 80
                 'object' => $bd,
Please login to merge, or discard this patch.
lib/net/nemein/rss/handler/admin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
         }
83 83
 
84 84
         // OPML subscription list import support
85
-        if (   array_key_exists('net_nemein_rss_manage_opml', $_FILES)
85
+        if (array_key_exists('net_nemein_rss_manage_opml', $_FILES)
86 86
             && is_uploaded_file($_FILES['net_nemein_rss_manage_opml']['tmp_name'])) {
87 87
             $opml_file = $_FILES['net_nemein_rss_manage_opml']['tmp_name'];
88 88
 
Please login to merge, or discard this patch.
src/midcom/datamanager/storage/parameter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
     {
26 26
         // workaround for weird mgd API behavior where setting empty (i.e. deleting) a
27 27
         // nonexistent parameter returns false
28
-        if (   ($this->value === false || $this->value === null || $this->value === "")
28
+        if (($this->value === false || $this->value === null || $this->value === "")
29 29
             && $this->load() === null) {
30 30
             return true;
31 31
         }
Please login to merge, or discard this patch.
lib/org/openpsa/contacts/handler/group/create.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
 
73 73
         $this->_group = new org_openpsa_contacts_group_dba();
74 74
 
75
-        if (   $this->_type == 'organization'
75
+        if ($this->_type == 'organization'
76 76
             && $this->_parent_group) {
77 77
             $this->_group->owner = $this->_parent_group->id;
78 78
         } else {
Please login to merge, or discard this patch.
lib/org/openpsa/documents/handler/directory/create.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,6 +50,6 @@
 block discarded – undo
50 50
         $indexer = new org_openpsa_documents_midcom_indexer($this->_topic);
51 51
         $indexer->index($controller->get_datamanager());
52 52
 
53
-        return $controller->get_datamanager()->get_storage()->get_value()->name. "/";
53
+        return $controller->get_datamanager()->get_storage()->get_value()->name . "/";
54 54
     }
55 55
 }
Please login to merge, or discard this patch.