@@ -40,7 +40,7 @@ |
||
40 | 40 | <div class="value"><?php echo $formatter->number($salesproject->profit); ?></div> |
41 | 41 | </div> |
42 | 42 | <?php |
43 | - $owner_card = org_openpsa_widgets_contact::get($salesproject->owner); |
|
43 | + $owner_card = org_openpsa_widgets_contact::get($salesproject->owner); |
|
44 | 44 | ?> |
45 | 45 | <div class="field"> |
46 | 46 | <div class="title"><?php echo $data['l10n']->get('owner'); ?></div> |
@@ -41,7 +41,7 @@ |
||
41 | 41 | public static function get_by_object(org_openpsa_invoices_interfaces_customer $object) |
42 | 42 | { |
43 | 43 | if ( !($bd = self::get_billing_data(org_openpsa_contacts_group_dba::class, $object->customer)) |
44 | - // check if the customerContact is set and has invoice_data |
|
44 | + // check if the customerContact is set and has invoice_data |
|
45 | 45 | && !($bd = self::get_billing_data(org_openpsa_contacts_person_dba::class, $object->customerContact))) { |
46 | 46 | $bd = new org_openpsa_invoices_billing_data_dba(); |
47 | 47 | $due = midcom_baseclasses_components_configuration::get('org.openpsa.invoices', 'config')->get('default_due_days'); |
@@ -26,7 +26,7 @@ |
||
26 | 26 | echo '<span class="toolbar_label">' . $data['l10n_midcom']->get('delete') . '</span></a></li>'; |
27 | 27 | if ( midcom::get()->config->get('auth_allow_trusted') === true |
28 | 28 | && $data['person']->can_do('org.openpsa.user:su')) { |
29 | - echo '<li><a class="button" href="' . $data['router']->generate('account_su', ['guid' => $data['person']->guid]) . '" />' . $data['l10n']->get('switch to user') . "</a></li>\n"; |
|
29 | + echo '<li><a class="button" href="' . $data['router']->generate('account_su', ['guid' => $data['person']->guid]) . '" />' . $data['l10n']->get('switch to user') . "</a></li>\n"; |
|
30 | 30 | } |
31 | 31 | echo "</ul>\n"; |
32 | 32 | } |
@@ -37,7 +37,6 @@ |
||
37 | 37 | - 1: MIDCOM_PRIVILEGE_ALLOW |
38 | 38 | - 2: MIDCOM_PRIVILEGE_DENY |
39 | 39 | - 3: MIDCOM_PRIVILEGE_INHERIT |
40 | - |
|
41 | 40 | * @property string $guid |
42 | 41 | * @package midcom |
43 | 42 | */ |
@@ -269,17 +269,17 @@ |
||
269 | 269 | private static $_default_magic_class_privileges = []; |
270 | 270 | |
271 | 271 | /** |
272 | - * Internal cache of the content privileges of users on content objects, this is |
|
273 | - * an associative array using a combination of the user identifier and the object's |
|
274 | - * guid as index. The privileges for the anonymous user use the magic |
|
275 | - * EVERYONE as user identifier. |
|
276 | - * |
|
277 | - * This must not be merged with the class-wide privileges_cache, because otherwise |
|
278 | - * class_default_privileges for child objects might be overridden by parent default |
|
279 | - * privileges |
|
280 | - * |
|
281 | - * @var Array |
|
282 | - */ |
|
272 | + * Internal cache of the content privileges of users on content objects, this is |
|
273 | + * an associative array using a combination of the user identifier and the object's |
|
274 | + * guid as index. The privileges for the anonymous user use the magic |
|
275 | + * EVERYONE as user identifier. |
|
276 | + * |
|
277 | + * This must not be merged with the class-wide privileges_cache, because otherwise |
|
278 | + * class_default_privileges for child objects might be overridden by parent default |
|
279 | + * privileges |
|
280 | + * |
|
281 | + * @var Array |
|
282 | + */ |
|
283 | 283 | private static $_content_privileges_cache = []; |
284 | 284 | |
285 | 285 | /** |
@@ -40,31 +40,31 @@ |
||
40 | 40 | return $output; |
41 | 41 | } |
42 | 42 | |
43 | - /** |
|
44 | - * @param midcom_core_dbaobject $object The object we're working on |
|
45 | - * @param string $field The schema field name |
|
46 | - * @return midcom_db_attachment[] List of attachments, indexed by identifier |
|
47 | - */ |
|
48 | - public static function get_dm2_attachments($object, $field) |
|
49 | - { |
|
50 | - $attachments = []; |
|
51 | - $identifiers = explode(',', $object->get_parameter('midcom.helper.datamanager2.type.blobs', 'guids_' . $field)); |
|
52 | - if (empty($identifiers)) { |
|
53 | - return $attachments; |
|
54 | - } |
|
55 | - foreach ($identifiers as $identifier) { |
|
56 | - $parts = explode(':', $identifier); |
|
57 | - if (count($parts) != 2) { |
|
58 | - continue; |
|
59 | - } |
|
60 | - $guid = $parts[1]; |
|
61 | - try { |
|
62 | - $attachments[$parts[0]] = midcom_db_attachment::get_cached($guid); |
|
63 | - } catch (midcom_error $e) { |
|
64 | - $e->log(); |
|
65 | - } |
|
66 | - } |
|
43 | + /** |
|
44 | + * @param midcom_core_dbaobject $object The object we're working on |
|
45 | + * @param string $field The schema field name |
|
46 | + * @return midcom_db_attachment[] List of attachments, indexed by identifier |
|
47 | + */ |
|
48 | + public static function get_dm2_attachments($object, $field) |
|
49 | + { |
|
50 | + $attachments = []; |
|
51 | + $identifiers = explode(',', $object->get_parameter('midcom.helper.datamanager2.type.blobs', 'guids_' . $field)); |
|
52 | + if (empty($identifiers)) { |
|
53 | + return $attachments; |
|
54 | + } |
|
55 | + foreach ($identifiers as $identifier) { |
|
56 | + $parts = explode(':', $identifier); |
|
57 | + if (count($parts) != 2) { |
|
58 | + continue; |
|
59 | + } |
|
60 | + $guid = $parts[1]; |
|
61 | + try { |
|
62 | + $attachments[$parts[0]] = midcom_db_attachment::get_cached($guid); |
|
63 | + } catch (midcom_error $e) { |
|
64 | + $e->log(); |
|
65 | + } |
|
66 | + } |
|
67 | 67 | |
68 | - return $attachments; |
|
69 | - } |
|
68 | + return $attachments; |
|
69 | + } |
|
70 | 70 | } |
@@ -103,12 +103,12 @@ |
||
103 | 103 | if (!empty($guid)) { |
104 | 104 | //pass the urls & titles for the tabs |
105 | 105 | $tabdata[] = [ |
106 | - 'url' => '__mfa/org.openpsa.relatedto/journalentry/' . $guid . '/', |
|
107 | - 'title' => midcom::get()->i18n->get_string('journal entries', 'org.openpsa.relatedto'), |
|
106 | + 'url' => '__mfa/org.openpsa.relatedto/journalentry/' . $guid . '/', |
|
107 | + 'title' => midcom::get()->i18n->get_string('journal entries', 'org.openpsa.relatedto'), |
|
108 | 108 | ]; |
109 | 109 | $tabdata[] = [ |
110 | - 'url' => '__mfa/org.openpsa.relatedto/render/' . $guid . '/both/', |
|
111 | - 'title' => midcom::get()->i18n->get_string('related objects', 'org.openpsa.relatedto'), |
|
110 | + 'url' => '__mfa/org.openpsa.relatedto/render/' . $guid . '/both/', |
|
111 | + 'title' => midcom::get()->i18n->get_string('related objects', 'org.openpsa.relatedto'), |
|
112 | 112 | ]; |
113 | 113 | } |
114 | 114 |
@@ -5,29 +5,29 @@ |
||
5 | 5 | ?> |
6 | 6 | <div class="area org_openpsa_helper_box"><h3><?php echo $data['l10n']->get('offers'); ?></h3> |
7 | 7 | <ul><?php |
8 | - foreach ($data['offers'] as $offer) { |
|
9 | - echo '<li><span class="org_openpsa_helpers_fileinfo">'; |
|
10 | - $attachment = $offer->get_file(); |
|
11 | - $delete_link = $data['router']->generate('delete_offer', ['guid' => $offer->guid]); |
|
12 | - $edit_link = $data['router']->generate('edit_offer', ['guid' => $offer->guid]); |
|
8 | + foreach ($data['offers'] as $offer) { |
|
9 | + echo '<li><span class="org_openpsa_helpers_fileinfo">'; |
|
10 | + $attachment = $offer->get_file(); |
|
11 | + $delete_link = $data['router']->generate('delete_offer', ['guid' => $offer->guid]); |
|
12 | + $edit_link = $data['router']->generate('edit_offer', ['guid' => $offer->guid]); |
|
13 | 13 | |
14 | - if (!empty($attachment)) { |
|
15 | - $url = midcom_db_attachment::get_url($attachment); |
|
16 | - echo '<a href="' . $url . '" class="icon"><i class="fa fa-file-text-o"></i></a>'; |
|
17 | - } |
|
18 | - echo '<span class="info">'; |
|
19 | - echo '<span class="filename">' . $offer->get_label(); |
|
20 | - echo ' <a class="actions" href="' . $delete_link . '"><i class="fa fa-trash" title="' . $data['l10n_midcom']->get('delete') . '"></i></a>'; |
|
21 | - echo ' <a class="actions" ' . $wf->render_attributes() . ' href="' . $edit_link . '"><i class="fa fa-pencil" title="' . $data['l10n_midcom']->get('edit') . '"></i></a>'; |
|
22 | - echo "</span>\n"; |
|
23 | - if (!empty($attachment)) { |
|
24 | - echo ' <span class="date">' . $formatter->datetime($attachment->metadata->revised) . '</span> '; |
|
25 | - $person_card = org_openpsa_widgets_contact::get($attachment->metadata->revisor); |
|
26 | - echo $person_card->show_inline(); |
|
27 | - } |
|
28 | - echo "</span></span></li>\n"; |
|
29 | - } |
|
30 | - ?> |
|
14 | + if (!empty($attachment)) { |
|
15 | + $url = midcom_db_attachment::get_url($attachment); |
|
16 | + echo '<a href="' . $url . '" class="icon"><i class="fa fa-file-text-o"></i></a>'; |
|
17 | + } |
|
18 | + echo '<span class="info">'; |
|
19 | + echo '<span class="filename">' . $offer->get_label(); |
|
20 | + echo ' <a class="actions" href="' . $delete_link . '"><i class="fa fa-trash" title="' . $data['l10n_midcom']->get('delete') . '"></i></a>'; |
|
21 | + echo ' <a class="actions" ' . $wf->render_attributes() . ' href="' . $edit_link . '"><i class="fa fa-pencil" title="' . $data['l10n_midcom']->get('edit') . '"></i></a>'; |
|
22 | + echo "</span>\n"; |
|
23 | + if (!empty($attachment)) { |
|
24 | + echo ' <span class="date">' . $formatter->datetime($attachment->metadata->revised) . '</span> '; |
|
25 | + $person_card = org_openpsa_widgets_contact::get($attachment->metadata->revisor); |
|
26 | + echo $person_card->show_inline(); |
|
27 | + } |
|
28 | + echo "</span></span></li>\n"; |
|
29 | + } |
|
30 | + ?> |
|
31 | 31 | </ul> |
32 | 32 | </div> |
33 | 33 | <?php } ?> |
34 | 34 | \ No newline at end of file |
@@ -316,13 +316,13 @@ |
||
316 | 316 | * Stuff below here is executed *after* we have flushed output, |
317 | 317 | * so here we should only write out our caches but do nothing else |
318 | 318 | */ |
319 | - if ($this->_uncached) { |
|
320 | - debug_add('Not writing cache file, we are in uncached operation mode.'); |
|
321 | - return; |
|
322 | - } |
|
323 | - $content_id = 'C-' . $etag; |
|
324 | - $this->write_meta_cache($content_id, $etag, $request); |
|
325 | - $this->_data_cache->save($content_id, $cache_data); |
|
319 | + if ($this->_uncached) { |
|
320 | + debug_add('Not writing cache file, we are in uncached operation mode.'); |
|
321 | + return; |
|
322 | + } |
|
323 | + $content_id = 'C-' . $etag; |
|
324 | + $this->write_meta_cache($content_id, $etag, $request); |
|
325 | + $this->_data_cache->save($content_id, $cache_data); |
|
326 | 326 | } |
327 | 327 | |
328 | 328 | /** |