@@ -42,7 +42,8 @@ discard block |
||
| 42 | 42 | // We're creating invoice for chosen customer |
| 43 | 43 | try { |
| 44 | 44 | $this->customer = new org_openpsa_contacts_group_dba($company); |
| 45 | - } catch (midcom_error) { |
|
| 45 | + } |
|
| 46 | + catch (midcom_error) { |
|
| 46 | 47 | $contact = new org_openpsa_contacts_person_dba($company); |
| 47 | 48 | $this->contact_id = $contact->id; |
| 48 | 49 | } |
@@ -143,7 +144,8 @@ discard block |
||
| 143 | 144 | if (!empty($this->invoice->customer)) { |
| 144 | 145 | try { |
| 145 | 146 | $this->customer = org_openpsa_contacts_group_dba::get_cached($this->invoice->customer); |
| 146 | - } catch (midcom_error $e) { |
|
| 147 | + } |
|
| 148 | + catch (midcom_error $e) { |
|
| 147 | 149 | $customer_field['hidden'] = true; |
| 148 | 150 | $e->log(); |
| 149 | 151 | } |
@@ -49,7 +49,8 @@ discard block |
||
| 49 | 49 | try { |
| 50 | 50 | $deliverable = org_openpsa_sales_salesproject_deliverable_dba::get_cached($task->get_agreement()); |
| 51 | 51 | $item->deliverable = $deliverable->id; |
| 52 | - } catch (midcom_error $e) { |
|
| 52 | + } |
|
| 53 | + catch (midcom_error $e) { |
|
| 53 | 54 | $e->log(); |
| 54 | 55 | } |
| 55 | 56 | $item->invoice = $invoice->id; |
@@ -121,7 +122,8 @@ discard block |
||
| 121 | 122 | $customer = org_openpsa_contacts_group_dba::get_cached($customer_id); |
| 122 | 123 | $data['customer_label'] = $customer->official; |
| 123 | 124 | $data['disabled'] = ''; |
| 124 | - } catch (midcom_error) { |
|
| 125 | + } |
|
| 126 | + catch (midcom_error) { |
|
| 125 | 127 | $data['customer_label'] = $this->_l10n->get('no customer'); |
| 126 | 128 | $data['disabled'] = ' disabled="disabled"'; |
| 127 | 129 | } |
@@ -144,7 +146,8 @@ discard block |
||
| 144 | 146 | } else { |
| 145 | 147 | $data['invoiceable_units'] = $task->plannedHours; |
| 146 | 148 | } |
| 147 | - } catch (midcom_error $e) { |
|
| 149 | + } |
|
| 150 | + catch (midcom_error $e) { |
|
| 148 | 151 | $e->log(); |
| 149 | 152 | if ($this->_config->get('default_hourly_price')) { |
| 150 | 153 | $data['default_price'] = $this->_config->get('default_hourly_price'); |
@@ -87,7 +87,8 @@ discard block |
||
| 87 | 87 | $customer = org_openpsa_contacts_group_dba::get_cached($invoice->customer); |
| 88 | 88 | $entry['customer'] = "<a href=\"{$this->router->generate('list_customer_all', ['guid' => $customer->guid])}\">" . $customer->get_label() . "</a>"; |
| 89 | 89 | $entry['index_customer'] = $customer->get_label(); |
| 90 | - } catch (midcom_error) { |
|
| 90 | + } |
|
| 91 | + catch (midcom_error) { |
|
| 91 | 92 | $entry['customer'] = ''; |
| 92 | 93 | $entry['index_customer'] = ''; |
| 93 | 94 | } |
@@ -101,7 +102,8 @@ discard block |
||
| 101 | 102 | $entry['contact'] = "<a href=\"{$this->router->generate('list_customer_all', ['guid' => $contact->guid])}\">" . $contact->get_label() . "</a>"; |
| 102 | 103 | $entry['contact'] = $contact_widget->show_inline(); |
| 103 | 104 | $entry['index_contact'] = $contact->get_label(); |
| 104 | - } catch (midcom_error) { |
|
| 105 | + } |
|
| 106 | + catch (midcom_error) { |
|
| 105 | 107 | $entry['contact'] = ''; |
| 106 | 108 | $entry['index_contact'] = ''; |
| 107 | 109 | } |
@@ -248,7 +250,8 @@ discard block |
||
| 248 | 250 | { |
| 249 | 251 | try { |
| 250 | 252 | $this->_customer = new org_openpsa_contacts_group_dba($guid); |
| 251 | - } catch (midcom_error) { |
|
| 253 | + } |
|
| 254 | + catch (midcom_error) { |
|
| 252 | 255 | $this->_customer = new org_openpsa_contacts_person_dba($guid); |
| 253 | 256 | } |
| 254 | 257 | $data['customer'] = $this->_customer; |
@@ -21,7 +21,8 @@ |
||
| 21 | 21 | $original = new midcom_db_attachment($image->attachment); |
| 22 | 22 | $original_url = midcom_db_attachment::get_url($original); |
| 23 | 23 | $name = $original->name; |
| 24 | - } catch (midcom_error) { |
|
| 24 | + } |
|
| 25 | + catch (midcom_error) { |
|
| 25 | 26 | $url = MIDCOM_STATIC_URL . '/stock-icons/mime/gnome-text-blank.png'; |
| 26 | 27 | $name = $data['l10n']->get('attachment missing'); |
| 27 | 28 | $original_url = ''; |
@@ -70,7 +70,8 @@ discard block |
||
| 70 | 70 | } else { |
| 71 | 71 | $entry['customer'] = $customer->official; |
| 72 | 72 | } |
| 73 | - } catch (midcom_error) { |
|
| 73 | + } |
|
| 74 | + catch (midcom_error) { |
|
| 74 | 75 | } |
| 75 | 76 | |
| 76 | 77 | if ($entry['status'] === 'canceled') { |
@@ -82,7 +83,8 @@ discard block |
||
| 82 | 83 | $entry['index_contact'] = $contact->rname; |
| 83 | 84 | $contact_card = org_openpsa_widgets_contact::get($invoice->customerContact); |
| 84 | 85 | $entry['contact'] = $contact_card->show_inline(); |
| 85 | - } catch (midcom_error) { |
|
| 86 | + } |
|
| 87 | + catch (midcom_error) { |
|
| 86 | 88 | } |
| 87 | 89 | |
| 88 | 90 | $entries[] = $entry; |
@@ -98,7 +98,8 @@ |
||
| 98 | 98 | $node_guid = $siteconfig->get_node_guid($component); |
| 99 | 99 | try { |
| 100 | 100 | $available_generators[$component] = midcom_db_topic::get_cached($node_guid)->get_label(); |
| 101 | - } catch (midcom_error) { |
|
| 101 | + } |
|
| 102 | + catch (midcom_error) { |
|
| 102 | 103 | debug_add("topic for component '{$component}' not found or accessible"); |
| 103 | 104 | } |
| 104 | 105 | } |
@@ -132,7 +132,8 @@ |
||
| 132 | 132 | && $deliverable->end > $this->_request_data['start'])) { |
| 133 | 133 | $invoices = array_merge($invoices, $this->_get_invoices_for_subscription($deliverable, $at_entry)); |
| 134 | 134 | } |
| 135 | - } catch (midcom_error) { |
|
| 135 | + } |
|
| 136 | + catch (midcom_error) { |
|
| 136 | 137 | } |
| 137 | 138 | } |
| 138 | 139 | $invoices = array_merge($invoices, $this->_get_deliverable_invoices()); |
@@ -25,7 +25,8 @@ |
||
| 25 | 25 | $row['creator_index'] = $creator->rname; |
| 26 | 26 | $creator_card = org_openpsa_widgets_contact::get($entry->metadata->creator); |
| 27 | 27 | $row['creator'] = $creator_card->show_inline(); |
| 28 | - } catch (midcom_error) { |
|
| 28 | + } |
|
| 29 | + catch (midcom_error) { |
|
| 29 | 30 | $row['creator_index'] = ''; |
| 30 | 31 | $row['creator'] = ''; |
| 31 | 32 | } |
@@ -25,7 +25,8 @@ |
||
| 25 | 25 | try { |
| 26 | 26 | midcom::get()->dbfactory->get_object_by_guid($result->fromGuid); |
| 27 | 27 | midcom::get()->dbfactory->get_object_by_guid($result->toGuid); |
| 28 | - } catch (midcom_error) { |
|
| 28 | + } |
|
| 29 | + catch (midcom_error) { |
|
| 29 | 30 | echo $i . "/" . $total . ": Deleting relatedto #" . $result->id . "\n"; |
| 30 | 31 | $result->delete(); |
| 31 | 32 | } |