@@ -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 |
@@ -658,7 +658,8 @@ |
||
658 | 658 | && mgd_is_guid($guid)) { |
659 | 659 | try { |
660 | 660 | $object = midcom::get()->dbfactory->get_object_by_guid($guid); |
661 | - } catch (midcom_error $e) { |
|
661 | + } |
|
662 | + catch (midcom_error $e) { |
|
662 | 663 | debug_add("Failed to create a metadata instance for the GUID {$guid}: " . $e->getMessage(), MIDCOM_LOG_WARN); |
663 | 664 | debug_print_r("Source was:", $source); |
664 | 665 |
@@ -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 | } |
@@ -180,7 +180,8 @@ discard block |
||
180 | 180 | } |
181 | 181 | try { |
182 | 182 | $this->_storage = new $person_class($id); |
183 | - } catch (midgard_error_exception $e) { |
|
183 | + } |
|
184 | + catch (midgard_error_exception $e) { |
|
184 | 185 | debug_add("Failed to retrieve the person ID {$id}: " . $e->getMessage(), MIDCOM_LOG_INFO); |
185 | 186 | throw new midcom_error_midgard($e, $id); |
186 | 187 | } |
@@ -228,7 +229,8 @@ discard block |
||
228 | 229 | if (mgd_is_guid($id)) { |
229 | 230 | try { |
230 | 231 | return new $person_class($id); |
231 | - } catch (midgard_error_exception $e) { |
|
232 | + } |
|
233 | + catch (midgard_error_exception $e) { |
|
232 | 234 | debug_add("Failed to retrieve the person GUID {$id}: " . $e->getMessage(), MIDCOM_LOG_INFO); |
233 | 235 | throw new midcom_error_midgard($e, $id); |
234 | 236 | } |
@@ -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 |
@@ -188,7 +188,8 @@ |
||
188 | 188 | { |
189 | 189 | try { |
190 | 190 | $attachment = new midcom_db_attachment($guid); |
191 | - } catch (midcom_error $e) { |
|
191 | + } |
|
192 | + catch (midcom_error $e) { |
|
192 | 193 | debug_add("Failed to load the attachment {$guid} from disk, aborting.", MIDCOM_LOG_INFO); |
193 | 194 | $e->log(); |
194 | 195 | return; |
@@ -136,7 +136,8 @@ |
||
136 | 136 | { |
137 | 137 | $ret = array('org_openpsa_relatedto' => array()); |
138 | 138 | foreach ($array as $rel) { |
139 | - if (!midcom::get()->dbfactory->is_a($rel, 'org_openpsa_relatedto_dba')) { //Matches also 'org_openpsa_relatedto' |
|
139 | + if (!midcom::get()->dbfactory->is_a($rel, 'org_openpsa_relatedto_dba')) { |
|
140 | +//Matches also 'org_openpsa_relatedto' |
|
140 | 141 | //Wrong type of object found in array, cruelly abort the whole procedure |
141 | 142 | return false; |
142 | 143 | } |
@@ -30,7 +30,8 @@ |
||
30 | 30 | try { |
31 | 31 | midcom::get()->dbfactory->get_object_by_guid($result->fromGuid); |
32 | 32 | midcom::get()->dbfactory->get_object_by_guid($result->toGuid); |
33 | - } catch (midcom_error $e) { |
|
33 | + } |
|
34 | + catch (midcom_error $e) { |
|
34 | 35 | echo $i . "/" . $total . ": Deleting relatedto #" . $result->id . "\n"; |
35 | 36 | flush(); |
36 | 37 | $result->delete(); |