@@ -94,7 +94,7 @@ |
||
| 94 | 94 | 'midcom' => [ |
| 95 | 95 | 'style-init' => '', |
| 96 | 96 | 'style-finish' => '', |
| 97 | - ] |
|
| 97 | + ] |
|
| 98 | 98 | ], |
| 99 | 99 | 'nodes' => [], |
| 100 | 100 | ]; |
@@ -312,17 +312,17 @@ |
||
| 312 | 312 | private static $_privileges_cache = []; |
| 313 | 313 | |
| 314 | 314 | /** |
| 315 | - * Internal cache of the content privileges of users on content objects, this is |
|
| 316 | - * an associative array using a combination of the user identifier and the object's |
|
| 317 | - * guid as index. The privileges for the anonymous user use the magic |
|
| 318 | - * EVERYONE as user identifier. |
|
| 319 | - * |
|
| 320 | - * This must not be merged with the class-wide privileges_cache, because otherwise |
|
| 321 | - * class_default_privileges for child objects might be overridden by parent default |
|
| 322 | - * privileges |
|
| 323 | - * |
|
| 324 | - * @var Array |
|
| 325 | - */ |
|
| 315 | + * Internal cache of the content privileges of users on content objects, this is |
|
| 316 | + * an associative array using a combination of the user identifier and the object's |
|
| 317 | + * guid as index. The privileges for the anonymous user use the magic |
|
| 318 | + * EVERYONE as user identifier. |
|
| 319 | + * |
|
| 320 | + * This must not be merged with the class-wide privileges_cache, because otherwise |
|
| 321 | + * class_default_privileges for child objects might be overridden by parent default |
|
| 322 | + * privileges |
|
| 323 | + * |
|
| 324 | + * @var Array |
|
| 325 | + */ |
|
| 326 | 326 | private static $_content_privileges_cache = []; |
| 327 | 327 | |
| 328 | 328 | /** |
@@ -102,12 +102,12 @@ |
||
| 102 | 102 | if (null !== $guid) { |
| 103 | 103 | //pass the urls & titles for the tabs |
| 104 | 104 | $tabdata[] = [ |
| 105 | - 'url' => '__mfa/org.openpsa.relatedto/journalentry/' . $guid . '/', |
|
| 106 | - 'title' => midcom::get()->i18n->get_string('journal entries', 'org.openpsa.relatedto'), |
|
| 105 | + 'url' => '__mfa/org.openpsa.relatedto/journalentry/' . $guid . '/', |
|
| 106 | + 'title' => midcom::get()->i18n->get_string('journal entries', 'org.openpsa.relatedto'), |
|
| 107 | 107 | ]; |
| 108 | 108 | $tabdata[] = [ |
| 109 | - 'url' => '__mfa/org.openpsa.relatedto/render/' . $guid . '/both/', |
|
| 110 | - 'title' => midcom::get()->i18n->get_string('related objects', 'org.openpsa.relatedto'), |
|
| 109 | + 'url' => '__mfa/org.openpsa.relatedto/render/' . $guid . '/both/', |
|
| 110 | + 'title' => midcom::get()->i18n->get_string('related objects', 'org.openpsa.relatedto'), |
|
| 111 | 111 | ]; |
| 112 | 112 | } |
| 113 | 113 | |
@@ -35,31 +35,31 @@ |
||
| 35 | 35 | return $output; |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | - /** |
|
| 39 | - * @param midcom_core_dbaobject $object The object we're working on |
|
| 40 | - * @param string $field The schema field name |
|
| 41 | - * @return midcom_db_attachment[] List of attachments, indexed by identifier |
|
| 42 | - */ |
|
| 43 | - public static function get_dm2_attachments($object, $field) |
|
| 44 | - { |
|
| 45 | - $attachments = []; |
|
| 46 | - $identifiers = explode(',', $object->get_parameter('midcom.helper.datamanager2.type.blobs', 'guids_' . $field)); |
|
| 47 | - if (empty($identifiers)) { |
|
| 48 | - return $attachments; |
|
| 49 | - } |
|
| 50 | - foreach ($identifiers as $identifier) { |
|
| 51 | - $parts = explode(':', $identifier); |
|
| 52 | - if (sizeof($parts) != 2) { |
|
| 53 | - continue; |
|
| 54 | - } |
|
| 55 | - $guid = $parts[1]; |
|
| 56 | - try { |
|
| 57 | - $attachments[$parts[0]] = midcom_db_attachment::get_cached($guid); |
|
| 58 | - } catch (midcom_error $e) { |
|
| 59 | - $e->log(); |
|
| 60 | - } |
|
| 61 | - } |
|
| 38 | + /** |
|
| 39 | + * @param midcom_core_dbaobject $object The object we're working on |
|
| 40 | + * @param string $field The schema field name |
|
| 41 | + * @return midcom_db_attachment[] List of attachments, indexed by identifier |
|
| 42 | + */ |
|
| 43 | + public static function get_dm2_attachments($object, $field) |
|
| 44 | + { |
|
| 45 | + $attachments = []; |
|
| 46 | + $identifiers = explode(',', $object->get_parameter('midcom.helper.datamanager2.type.blobs', 'guids_' . $field)); |
|
| 47 | + if (empty($identifiers)) { |
|
| 48 | + return $attachments; |
|
| 49 | + } |
|
| 50 | + foreach ($identifiers as $identifier) { |
|
| 51 | + $parts = explode(':', $identifier); |
|
| 52 | + if (sizeof($parts) != 2) { |
|
| 53 | + continue; |
|
| 54 | + } |
|
| 55 | + $guid = $parts[1]; |
|
| 56 | + try { |
|
| 57 | + $attachments[$parts[0]] = midcom_db_attachment::get_cached($guid); |
|
| 58 | + } catch (midcom_error $e) { |
|
| 59 | + $e->log(); |
|
| 60 | + } |
|
| 61 | + } |
|
| 62 | 62 | |
| 63 | - return $attachments; |
|
| 64 | - } |
|
| 63 | + return $attachments; |
|
| 64 | + } |
|
| 65 | 65 | } |
@@ -187,11 +187,11 @@ |
||
| 187 | 187 | * (to avoid stupid one second overlaps) |
| 188 | 188 | */ |
| 189 | 189 | $this->start = mktime(date('G', $this->start), |
| 190 | - date('i', $this->start), |
|
| 191 | - 1, |
|
| 192 | - date('n', $this->start), |
|
| 193 | - date('j', $this->start), |
|
| 194 | - date('Y', $this->start)); |
|
| 190 | + date('i', $this->start), |
|
| 191 | + 1, |
|
| 192 | + date('n', $this->start), |
|
| 193 | + date('j', $this->start), |
|
| 194 | + date('Y', $this->start)); |
|
| 195 | 195 | $this->end = mktime(date('G', $this->end), |
| 196 | 196 | date('i', $this->end), |
| 197 | 197 | 0, |
@@ -9,11 +9,11 @@ |
||
| 9 | 9 | use midcom\datamanager\indexer\client; |
| 10 | 10 | use midcom\datamanager\datamanager; |
| 11 | 11 | |
| 12 | - /** |
|
| 13 | - * Indexer client class |
|
| 14 | - * |
|
| 15 | - * @package org.openpsa.invoices |
|
| 16 | - */ |
|
| 12 | + /** |
|
| 13 | + * Indexer client class |
|
| 14 | + * |
|
| 15 | + * @package org.openpsa.invoices |
|
| 16 | + */ |
|
| 17 | 17 | class org_openpsa_invoices_midcom_indexer extends client |
| 18 | 18 | { |
| 19 | 19 | public function prepare_document(midcom_services_indexer_document &$document, datamanager $dm) |
@@ -306,7 +306,7 @@ |
||
| 306 | 306 | * See http://trac.midgard-project.org/ticket/1442 |
| 307 | 307 | $topic->set_parameter($this->_request_data['name'], var_export($value, true)); |
| 308 | 308 | */ |
| 309 | - continue; |
|
| 309 | + continue; |
|
| 310 | 310 | } |
| 311 | 311 | |
| 312 | 312 | if ($value === false) { |
@@ -3,7 +3,7 @@ |
||
| 3 | 3 | |
| 4 | 4 | if ($data['first_post']) { |
| 5 | 5 | $summary .= ' ' . sprintf($data['l10n']->get('first post was made on %s.'), |
| 6 | - $data['l10n']->get_formatter()->date($data['first_post'])); |
|
| 6 | + $data['l10n']->get_formatter()->date($data['first_post'])); |
|
| 7 | 7 | } |
| 8 | 8 | ?> |
| 9 | 9 | |
@@ -82,25 +82,25 @@ discard block |
||
| 82 | 82 | <tr> |
| 83 | 83 | <td class="title"><?php echo $data['l10n']->get('cost'); ?></td> |
| 84 | 84 | <?php |
| 85 | - if ($data['deliverable']->costType == '%') { |
|
| 86 | - ?> |
|
| 85 | + if ($data['deliverable']->costType == '%') { |
|
| 86 | + ?> |
|
| 87 | 87 | <td class="numeric"><?php echo $view['costPerUnit']; ?> %</td> |
| 88 | 88 | <td class="numeric"> </td> |
| 89 | 89 | <td class="numeric"> </td> |
| 90 | 90 | <?php |
| 91 | - } else { |
|
| 92 | - ?> |
|
| 91 | + } else { |
|
| 92 | + ?> |
|
| 93 | 93 | <td class="numeric"><?php echo $formatter->number($data['deliverable']->costPerUnit); ?></td> |
| 94 | 94 | <td class="numeric"><?php echo $view['plannedUnits']; ?></td> |
| 95 | 95 | <td class="numeric"><?php echo $view['units']; ?></td> |
| 96 | 96 | <?php |
| 97 | - } ?> |
|
| 97 | + } ?> |
|
| 98 | 98 | <td class="numeric"><?php echo $formatter->number($data['deliverable']->cost); ?></td> |
| 99 | 99 | </tr> |
| 100 | 100 | </tbody> |
| 101 | 101 | </table> |
| 102 | 102 | <?php if ($data['deliverable']->invoiceByActualUnits) { |
| 103 | - ?> |
|
| 103 | + ?> |
|
| 104 | 104 | <ul> |
| 105 | 105 | <li><?php echo $data['l10n']->get('invoice by actual units'); ?></li> |
| 106 | 106 | <?php |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | } ?> |
| 110 | 110 | </ul> |
| 111 | 111 | <?php |
| 112 | - } ?> |
|
| 112 | + } ?> |
|
| 113 | 113 | </div> |
| 114 | 114 | </div> |
| 115 | 115 | <?php |