@@ -68,7 +68,7 @@ |
||
| 68 | 68 | $status_changer_label = $this->l10n->get('system'); |
| 69 | 69 | $target_person_label = $this->l10n->get('system'); |
| 70 | 70 | |
| 71 | - if ( $status_change->metadata->creator |
|
| 71 | + if ($status_change->metadata->creator |
|
| 72 | 72 | && $status_change->metadata->creator != $fallback_creator->guid) { |
| 73 | 73 | $status_changer = org_openpsa_widgets_contact::get($status_change->metadata->creator); |
| 74 | 74 | $status_changer_label = $status_changer->show_inline(); |
@@ -152,7 +152,7 @@ |
||
| 152 | 152 | // Set the "now working on" status |
| 153 | 153 | $workingon = new org_openpsa_mypage_workingon(); |
| 154 | 154 | if (!$workingon->set($_POST['task'])) { |
| 155 | - midcom::get()->uimessages->add($this->_l10n->get('org.openpsa.mypage'), 'Failed to set "working on" parameter to "' . $_POST['task'] . '", reason ' . midcom_connection::get_error_string(), 'error'); |
|
| 155 | + midcom::get()->uimessages->add($this->_l10n->get('org.openpsa.mypage'), 'Failed to set "working on" parameter to "' . $_POST['task'] . '", reason ' . midcom_connection::get_error_string(), 'error'); |
|
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | return new midcom_response_relocate($relocate . "workingon/"); |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | { |
| 55 | 55 | $this->calculate_price(false); |
| 56 | 56 | |
| 57 | - if ( $this->orgOpenpsaObtype == org_openpsa_products_product_dba::DELIVERY_SUBSCRIPTION |
|
| 57 | + if ($this->orgOpenpsaObtype == org_openpsa_products_product_dba::DELIVERY_SUBSCRIPTION |
|
| 58 | 58 | && $this->continuous == true) { |
| 59 | 59 | $this->end = 0; |
| 60 | 60 | } elseif ($this->end < $this->start) { |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | $calculator->run($this); |
| 141 | 141 | $cost = $calculator->get_cost(); |
| 142 | 142 | $price = $calculator->get_price(); |
| 143 | - if ( $price != $this->price |
|
| 143 | + if ($price != $this->price |
|
| 144 | 144 | || $cost != $this->cost) { |
| 145 | 145 | $this->price = $price; |
| 146 | 146 | $this->cost = $cost; |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | $units = $agreement_hours['invoiceable']; |
| 188 | 188 | $uninvoiceableUnits = $agreement_hours['reported'] - ($agreement_hours['invoiceable'] + $agreement_hours['invoiced']); |
| 189 | 189 | |
| 190 | - if ( $units != $this->units |
|
| 190 | + if ($units != $this->units |
|
| 191 | 191 | || $uninvoiceableUnits != $this->uninvoiceableUnits) { |
| 192 | 192 | debug_add("agreement values have changed, setting units to " . $units . ", uninvoiceable: " . $uninvoiceableUnits); |
| 193 | 193 | $this->units = $units; |
@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | |
| 243 | 243 | public function invoice() |
| 244 | 244 | { |
| 245 | - if ( $this->state >= self::STATE_INVOICED |
|
| 245 | + if ($this->state >= self::STATE_INVOICED |
|
| 246 | 246 | || $this->orgOpenpsaObtype == org_openpsa_products_product_dba::DELIVERY_SUBSCRIPTION) { |
| 247 | 247 | return false; |
| 248 | 248 | } |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | */ |
| 54 | 54 | private function _find_suspects_event(midcom_core_dbaobject $object, $defaults, array &$links_array) |
| 55 | 55 | { |
| 56 | - if ( !is_array($object->participants) |
|
| 56 | + if (!is_array($object->participants) |
|
| 57 | 57 | || count($object->participants) < 2) { |
| 58 | 58 | //We have invalid list or less than two participants, abort |
| 59 | 59 | return; |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | */ |
| 145 | 145 | public function new_subscription_cycle(array $args, midcom_baseclasses_components_cron_handler $handler) |
| 146 | 146 | { |
| 147 | - if ( !isset($args['deliverable']) |
|
| 147 | + if (!isset($args['deliverable']) |
|
| 148 | 148 | || !isset($args['cycle'])) { |
| 149 | 149 | $handler->print_error('deliverable GUID or cycle number not set, aborting'); |
| 150 | 150 | return false; |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | } |
| 91 | 91 | } |
| 92 | 92 | $profit = $value - $cost; |
| 93 | - if ( $this->value != $value |
|
| 93 | + if ($this->value != $value |
|
| 94 | 94 | || $this->profit != $profit) { |
| 95 | 95 | $this->value = $value; |
| 96 | 96 | $this->profit = $value - $cost; |
@@ -220,12 +220,12 @@ discard block |
||
| 220 | 220 | |
| 221 | 221 | public function _on_updating() |
| 222 | 222 | { |
| 223 | - if ( $this->state != self::STATE_ACTIVE |
|
| 223 | + if ($this->state != self::STATE_ACTIVE |
|
| 224 | 224 | && !$this->end) { |
| 225 | 225 | //Not active anymore and end not set, set it to now |
| 226 | 226 | $this->end = time(); |
| 227 | 227 | } |
| 228 | - if ( $this->end |
|
| 228 | + if ($this->end |
|
| 229 | 229 | && $this->state == self::STATE_ACTIVE) { |
| 230 | 230 | //Returned to active state, clear the end marker. |
| 231 | 231 | $this->end = 0; |
@@ -78,7 +78,7 @@ |
||
| 78 | 78 | { |
| 79 | 79 | parent::__set($property, $value); |
| 80 | 80 | |
| 81 | - if ( $property == 'firstname' |
|
| 81 | + if ($property == 'firstname' |
|
| 82 | 82 | || $property == 'lastname' |
| 83 | 83 | || $property == 'homepage' |
| 84 | 84 | || $property == 'email') { |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | { |
| 38 | 38 | return preg_replace_callback( |
| 39 | 39 | "%(<\s*)+(/\s*)+{$element}%i", |
| 40 | - function ($matches) { |
|
| 40 | + function($matches) { |
|
| 41 | 41 | return htmlentities($matches[0]); |
| 42 | 42 | }, |
| 43 | 43 | $input |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | if ($uplink == $root_id) { |
| 223 | 223 | return true; |
| 224 | 224 | } |
| 225 | - if ( $uplink == false |
|
| 225 | + if ($uplink == false |
|
| 226 | 226 | || $uplink == -1) { |
| 227 | 227 | return false; |
| 228 | 228 | } |
@@ -446,7 +446,7 @@ discard block |
||
| 446 | 446 | $entry = "<span class=\"{$current_class}\">{$entry}</span>"; |
| 447 | 447 | } |
| 448 | 448 | } else { |
| 449 | - if ( !empty($data['napobject'][MIDCOM_NAV_GUID]) |
|
| 449 | + if (!empty($data['napobject'][MIDCOM_NAV_GUID]) |
|
| 450 | 450 | && in_array($data['napobject'][MIDCOM_NAV_GUID], $skip_guids)) { |
| 451 | 451 | continue; |
| 452 | 452 | } |
@@ -569,7 +569,7 @@ discard block |
||
| 569 | 569 | $id = "custom-{$key}"; |
| 570 | 570 | |
| 571 | 571 | $url = "{$prefix}{$entry[MIDCOM_NAV_URL]}"; |
| 572 | - if ( substr($entry[MIDCOM_NAV_URL], 0, 1) == '/' |
|
| 572 | + if (substr($entry[MIDCOM_NAV_URL], 0, 1) == '/' |
|
| 573 | 573 | || preg_match('|^https?://|', $entry[MIDCOM_NAV_URL])) { |
| 574 | 574 | $url = $entry[MIDCOM_NAV_URL]; |
| 575 | 575 | } |
@@ -84,7 +84,7 @@ |
||
| 84 | 84 | $variable = $parts[0] . '->' . $parts[1]; |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | - if ( isset($variable_parts[1]) |
|
| 87 | + if (isset($variable_parts[1]) |
|
| 88 | 88 | && array_key_exists($variable_parts[1], self::$_filters)) { |
| 89 | 89 | switch ($variable_parts[1]) { |
| 90 | 90 | case 's': |