@@ -51,7 +51,7 @@ |
||
51 | 51 | { |
52 | 52 | $this->_load_schemadb(); |
53 | 53 | $this->_controller = midcom_helper_datamanager2_controller::create('simple'); |
54 | - $this->_controller->schemadb =& $this->_schemadb; |
|
54 | + $this->_controller->schemadb = & $this->_schemadb; |
|
55 | 55 | $this->_controller->set_storage($this->_request_data['directory'], $this->_schema); |
56 | 56 | if (!$this->_controller->initialize()) { |
57 | 57 | throw new midcom_error("Failed to initialize a DM2 controller instance for task {$this->_directory->id}."); |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | $ownerwg = $this->get_parameter('org.openpsa.core', 'orgOpenpsaOwnerWg'); |
21 | 21 | $accesstype = $this->get_parameter('org.openpsa.core', 'orgOpenpsaAccesstype'); |
22 | 22 | |
23 | - if ( $ownerwg |
|
23 | + if ($ownerwg |
|
24 | 24 | && $accesstype) { |
25 | 25 | // Sync the object's ACL properties into MidCOM ACL system |
26 | 26 | $sync = new org_openpsa_core_acl_synchronizer(); |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | private function _update_parent_timestamp() |
42 | 42 | { |
43 | 43 | $parent = $this->get_parent(); |
44 | - if ( $parent |
|
44 | + if ($parent |
|
45 | 45 | && $parent->component == 'org.openpsa.documents') { |
46 | 46 | midcom::get()->auth->request_sudo('org.openpsa.documents'); |
47 | 47 |
@@ -115,7 +115,7 @@ |
||
115 | 115 | $request->addHeader('User-Agent: Midgard/' . substr(mgd_version(), 0, 4)); |
116 | 116 | |
117 | 117 | // Handle basic auth |
118 | - if ( !empty($username) |
|
118 | + if (!empty($username) |
|
119 | 119 | && !empty($password)) { |
120 | 120 | // Set basic auth |
121 | 121 | $request->addHeader('Authorization: Basic ' . base64_encode($username . ':' . $password)); |
@@ -129,7 +129,8 @@ |
||
129 | 129 | |
130 | 130 | try { |
131 | 131 | $response = $browser->send($request); |
132 | - } catch (Exception $e) { |
|
132 | + } |
|
133 | + catch (Exception $e) { |
|
133 | 134 | $this->error = $e->getMessage(); |
134 | 135 | debug_add("Got error '{$this->error}' from HTTP request", MIDCOM_LOG_INFO); |
135 | 136 | return false; |
@@ -17,7 +17,7 @@ |
||
17 | 17 | |
18 | 18 | } else { |
19 | 19 | $client = new org_openpsa_httplib(); |
20 | - if ( !empty($_REQUEST['username']) |
|
20 | + if (!empty($_REQUEST['username']) |
|
21 | 21 | && !empty($_REQUEST['password'])) { |
22 | 22 | $client->basicauth['user'] = $_REQUEST['username']; |
23 | 23 | $client->basicauth['password'] = $_REQUEST['password']; |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | midcom::get()->auth->require_admin_user(); |
3 | 3 | |
4 | -if ( empty($_POST['to']) |
|
4 | +if (empty($_POST['to']) |
|
5 | 5 | || empty($_POST['from'])) { |
6 | 6 | ?> |
7 | 7 | <h2>Send test email</h2> |
@@ -111,7 +111,7 @@ |
||
111 | 111 | foreach ($this->_parameters as $key => $value) { |
112 | 112 | $this->_patterns[] = "/__({$key})__/"; |
113 | 113 | |
114 | - if ( is_array($value) |
|
114 | + if (is_array($value) |
|
115 | 115 | || is_object($value)) { |
116 | 116 | $this->_patterns[] = "/__({$key})_([^ \.>\"-]*?)__/"; |
117 | 117 | } |
@@ -57,7 +57,8 @@ discard block |
||
57 | 57 | try { |
58 | 58 | $deliverable = org_openpsa_sales_salesproject_deliverable_dba::get_cached($at_entry->arguments['deliverable']); |
59 | 59 | $salesproject = org_openpsa_sales_salesproject_dba::get_cached($deliverable->salesproject); |
60 | - } catch (midcom_error $e) { |
|
60 | + } |
|
61 | + catch (midcom_error $e) { |
|
61 | 62 | $e->log(); |
62 | 63 | return $invoice; |
63 | 64 | } |
@@ -95,7 +96,8 @@ discard block |
||
95 | 96 | $object = $classname::get_cached($id); |
96 | 97 | $invoice[$fieldname] = $object->render_link(); |
97 | 98 | $invoice['index_' . $fieldname] = $object->get_label(); |
98 | - } catch (midcom_error $e) { |
|
99 | + } |
|
100 | + catch (midcom_error $e) { |
|
99 | 101 | $e->log(); |
100 | 102 | } |
101 | 103 | } |
@@ -24,7 +24,7 @@ |
||
24 | 24 | return $this->fail($this->_l10n->get('no invoice number was handed over')); |
25 | 25 | } |
26 | 26 | |
27 | - $invoicenumber = (int) $_GET['query'] ; |
|
27 | + $invoicenumber = (int) $_GET['query']; |
|
28 | 28 | |
29 | 29 | if ($invoice = org_openpsa_invoices_invoice_dba::get_by_number($invoicenumber)) { |
30 | 30 | return new midcom_response_relocate('invoice/' . $invoice->guid . '/'); |
@@ -113,7 +113,8 @@ |
||
113 | 113 | try { |
114 | 114 | $this->_request_data['customer'] = new org_openpsa_contacts_group_dba($guid); |
115 | 115 | $qb->add_constraint('customer', '=', $this->_request_data['customer']->id); |
116 | - } catch (midcom_error $e) { |
|
116 | + } |
|
117 | + catch (midcom_error $e) { |
|
117 | 118 | $this->_request_data['customer'] = new org_openpsa_contacts_person_dba($guid); |
118 | 119 | $qb->add_constraint('customerContact', '=', $this->_request_data['customer']->id); |
119 | 120 | } |