@@ -28,7 +28,7 @@ |
||
28 | 28 | new type\radiocheckselect, |
29 | 29 | new type\subform, |
30 | 30 | new type\select, |
31 | - new type\tinymce, |
|
31 | + new type\tinymce, |
|
32 | 32 | new type\toolbar, |
33 | 33 | ); |
34 | 34 | } |
@@ -312,17 +312,17 @@ |
||
312 | 312 | private static $_privileges_cache = array(); |
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 = array(); |
327 | 327 | |
328 | 328 | /** |
@@ -474,7 +474,7 @@ |
||
474 | 474 | { |
475 | 475 | return |
476 | 476 | ( |
477 | - $this->string_exists($string, $this->_language) |
|
477 | + $this->string_exists($string, $this->_language) |
|
478 | 478 | || $this->string_exists($string, $this->_fallback_language) |
479 | 479 | ); |
480 | 480 | } |
@@ -58,7 +58,6 @@ |
||
58 | 58 | * @property string $revisor The person that modified the object, read-only. |
59 | 59 | * @property integer $approved The time of approval of the object, or 0 if not approved. Set automatically through approve/unapprove. |
60 | 60 | * @property string $approver The person that approved/unapproved the object. Set automatically through approve/unapprove. |
61 | - |
|
62 | 61 | * @package midcom.helper |
63 | 62 | */ |
64 | 63 | class midcom_helper_metadata |
@@ -407,7 +407,7 @@ |
||
407 | 407 | |
408 | 408 | $parent = $parent->get_parent_group(); |
409 | 409 | } |
410 | - */ |
|
410 | + */ |
|
411 | 411 | $this->_inheritance_chains[$id] = $inheritance_chain; |
412 | 412 | } |
413 | 413 | } |
@@ -183,17 +183,17 @@ |
||
183 | 183 | } |
184 | 184 | |
185 | 185 | /** |
186 | - * Inserts a link detector to the given HTML source. All outgoing |
|
187 | - * HTTP links in the source HTML are replaced with the given |
|
188 | - * link detector address so that the token "URL" is replaced with |
|
189 | - * encoded form of the original link. It is expected that the link detector |
|
190 | - * address points to a script that records the passed link and |
|
191 | - * forwards the client to the real link target. |
|
192 | - * |
|
193 | - * @param string $html the HTML source |
|
194 | - * @param string $address the link detector address |
|
195 | - * @return HTML source with the link detector |
|
196 | - */ |
|
186 | + * Inserts a link detector to the given HTML source. All outgoing |
|
187 | + * HTTP links in the source HTML are replaced with the given |
|
188 | + * link detector address so that the token "URL" is replaced with |
|
189 | + * encoded form of the original link. It is expected that the link detector |
|
190 | + * address points to a script that records the passed link and |
|
191 | + * forwards the client to the real link target. |
|
192 | + * |
|
193 | + * @param string $html the HTML source |
|
194 | + * @param string $address the link detector address |
|
195 | + * @return HTML source with the link detector |
|
196 | + */ |
|
197 | 197 | private function _insert_link_detector($html, $address) |
198 | 198 | { |
199 | 199 | $address = addslashes($address); |
@@ -813,7 +813,7 @@ |
||
813 | 813 | { |
814 | 814 | if ( $this->storage->object |
815 | 815 | && midcom::get()->config->get('indexer_backend') |
816 | - //check if there is an index_method set |
|
816 | + //check if there is an index_method set |
|
817 | 817 | && ( !array_key_exists('index_method', $this->_datamanager->schema->fields[$this->name]) |
818 | 818 | || |
819 | 819 | // do not index the attachment for index_method attachment & noindex |
@@ -252,9 +252,9 @@ |
||
252 | 252 | break; |
253 | 253 | case 'delete': |
254 | 254 | if (empty($_POST['guids'])) { |
255 | - throw new midcom_error('Invalid request'); |
|
256 | - } |
|
257 | - break; |
|
255 | + throw new midcom_error('Invalid request'); |
|
256 | + } |
|
257 | + break; |
|
258 | 258 | default: |
259 | 259 | throw new midcom_error('Invalid request'); |
260 | 260 | } |
@@ -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 = array(); |
|
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 = array(); |
|
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 | } |