Changeset 14381
- Timestamp:
- 01/12/08 11:50:03 (9 months ago)
- Files:
-
- trunk/midcom/midcom.admin.folder/handler/metadata.php (modified) (3 diffs)
- trunk/midcom/midcom.admin.folder/handler/move.php (modified) (1 diff)
- trunk/midcom/midcom.admin.libconfig/midcom/interfaces.php (modified) (1 diff)
- trunk/midcom/midcom.core/midcom/baseclasses/core/dbobject.php (modified) (80 diffs)
- trunk/midcom/midcom.core/midcom/core/privilege.php (modified) (2 diffs)
- trunk/midcom/midcom.core/midcom/core/user.php (modified) (2 diffs)
- trunk/midcom/midcom.core/midcom/exec/index-legacy-attachments.php (modified) (1 diff)
- trunk/midcom/midcom.core/midcom/helper/_dbfactory.php (modified) (2 diffs)
- trunk/midcom/midcom.core/midcom/helper/metadata.php (modified) (1 diff)
- trunk/midcom/midcom.core/midcom/helper/misc.php (modified) (3 diffs)
- trunk/midcom/midcom.core/midcom/helper/toolbars.php (modified) (4 diffs)
- trunk/midcom/midcom.core/midcom/services/auth.php (modified) (1 diff)
- trunk/midcom/midcom.core/midcom/services/dbclassloader.php (modified) (5 diffs)
- trunk/midcom/midcom.core/midcom/services/indexer.php (modified) (2 diffs)
- trunk/midcom/midcom.core/midcom/services/indexer/document.php (modified) (1 diff)
- trunk/midcom/midcom.core/midcom/services/toolbars.php (modified) (1 diff)
- trunk/midcom/midcom.helper.datamanager/datamanager.php (modified) (1 diff)
- trunk/midcom/midcom.helper.datamanager/midcom/interfaces.php (modified) (1 diff)
- trunk/midcom/midcom.helper.datamanager2/controller.php (modified) (4 diffs)
- trunk/midcom/midcom.helper.datamanager2/datamanager.php (modified) (1 diff)
- trunk/midcom/midcom.helper.datamanager2/widget/table.php (modified) (1 diff)
- trunk/midcom/midgard.admin.asgard/handler/object/metadata.php (modified) (3 diffs)
- trunk/midcom/midgard.admin.wizards/viewer.php (modified) (12 diffs)
- trunk/midcom/midgard.webdav.styles/viewer.php (modified) (6 diffs)
- trunk/midcom/net.nehmer.blog/handler/api/email.php (modified) (1 diff)
- trunk/midcom/net.nehmer.blog/midcom/interfaces.php (modified) (3 diffs)
- trunk/midcom/net.nehmer.blog/navigation.php (modified) (1 diff)
- trunk/midcom/net.nehmer.blog/viewer.php (modified) (15 diffs)
- trunk/midcom/net.nehmer.branchenbuch/entry.php (modified) (1 diff)
- trunk/midcom/net.nehmer.comments/handler/view.php (modified) (1 diff)
- trunk/midcom/net.nehmer.jobmarket/entry.php (modified) (1 diff)
- trunk/midcom/net.nehmer.marketplace/entry.php (modified) (1 diff)
- trunk/midcom/net.nehmer.publications/entry.php (modified) (1 diff)
- trunk/midcom/net.nehmer.static/midcom/interfaces.php (modified) (1 diff)
- trunk/midcom/net.nehmer.static/viewer.php (modified) (3 diffs)
- trunk/midcom/net.nemein.alphabeticalindex/viewer.php (modified) (13 diffs)
- trunk/midcom/net.nemein.calendar/viewer.php (modified) (24 diffs)
- trunk/midcom/net.nemein.discussion/viewer.php (modified) (13 diffs)
- trunk/midcom/net.nemein.featured/handler/featured.php (modified) (1 diff)
- trunk/midcom/net.nemein.featured/handler/view.php (modified) (1 diff)
- trunk/midcom/net.nemein.feedcollector/viewer.php (modified) (5 diffs)
- trunk/midcom/net.nemein.netmon/viewer.php (modified) (4 diffs)
- trunk/midcom/net.nemein.organizations/viewer.php (modified) (2 diffs)
- trunk/midcom/net.nemein.personnel/viewer.php (modified) (17 diffs)
- trunk/midcom/net.nemein.ping/main.php (modified) (1 diff)
- trunk/midcom/net.nemein.ping/midcom/interfaces.php (modified) (1 diff)
- trunk/midcom/net.nemein.quickpoll/viewer.php (modified) (16 diffs)
- trunk/midcom/net.nemein.registrations/event.php (modified) (5 diffs)
- trunk/midcom/net.nemein.tag/handler.php (modified) (22 diffs)
- trunk/midcom/net.nemein.teams/viewer.php (modified) (1 diff)
- trunk/midcom/net.nemein.updatenotification/viewer.php (modified) (1 diff)
- trunk/midcom/net.nemein.wiki/viewer.php (modified) (19 diffs)
- trunk/midcom/no.odindata.quickform2/emailgenerator.php (modified) (1 diff)
- trunk/midcom/no.odindata.quickform2/viewer.php (modified) (5 diffs)
- trunk/midcom/org.maemo.calendar/viewer.php (modified) (22 diffs)
- trunk/midcom/org.maemo.calendarwidget/main.php (modified) (2 diffs)
- trunk/midcom/org.openpsa.calendarwidget/main.php (modified) (2 diffs)
- trunk/midcom/org.openpsa.calendarwidget/month.php (modified) (1 diff)
- trunk/midcom/org.openpsa.contactwidget/midcom/interfaces.php (modified) (1 diff)
- trunk/midcom/org.openpsa.httplib/main.php (modified) (1 diff)
- trunk/midcom/org.openpsa.products/viewer.php (modified) (18 diffs)
- trunk/midcom/org.routamc.photostream/viewer.php (modified) (1 diff)
- trunk/midcom/pl.olga.mnogosearch/midcom/interfaces.php (modified) (1 diff)
- trunk/midcom/scaffold/viewer.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/midcom/midcom.admin.folder/handler/metadata.php
r14329 r14381 21 21 * 22 22 * @access private 23 * @var $_objectmixed Object for metadata editing23 * @var mixed Object for metadata editing 24 24 */ 25 25 var $_object = null; … … 29 29 * 30 30 * @access private 31 * @var $_controllermidcom_helper_datamanager2_controller31 * @var midcom_helper_datamanager2_controller 32 32 */ 33 33 var $_controller = null; … … 37 37 * 38 38 * @access private 39 * @var $_schemadbmidcom_helper_datamanager2_schema39 * @var midcom_helper_datamanager2_schema 40 40 */ 41 41 var $_schemadb = null; trunk/midcom/midcom.admin.folder/handler/move.php
r14140 r14381 21 21 * 22 22 * @access private 23 * @var $_objectmixed Object for move editing23 * @var mixed Object for move editing 24 24 */ 25 25 var $_object = null; trunk/midcom/midcom.admin.libconfig/midcom/interfaces.php
r13809 r14381 1 1 <?php 2 /** 3 * @package midcom.admin.libconfig 4 * @author The Midgard Project, http://www.midgard-project.org 5 * @version $Id$ 6 * @copyright The Midgard Project, http://www.midgard-project.org 7 * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License 8 */ 9 2 10 /** 3 11 * Library configuration Interface Class. This is a pure code library. trunk/midcom/midcom.core/midcom/baseclasses/core/dbobject.php
r14329 r14381 39 39 * 40 40 * Separated so that dbfactory->import() can reuse the code 41 * 42 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.41 * 42 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 43 43 * @return boolean Indicating success. 44 44 */ … … 73 73 * 4. void $object->_on_updated() is executed to notify the class from a successful DB update. 74 74 * 75 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.75 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 76 76 * @return boolean Indicating success. 77 77 */ … … 107 107 * 108 108 * Separated so that dbfactory->import() can reuse the code 109 * 110 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.109 * 110 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 111 111 */ 112 112 function update_post_ops(&$object) … … 116 116 midcom_baseclasses_core_dbobject::_rewrite_timestamps_to_unixdate($object); 117 117 118 if ($object->_use_rcs) 118 if ($object->_use_rcs) 119 119 { 120 120 $rcs =& $_MIDCOM->get_service('rcs'); … … 123 123 124 124 $object->_on_updated(); 125 125 126 126 $_MIDCOM->cache->invalidate($object->guid); 127 127 128 128 if ($GLOBALS['midcom_config']['attachment_cache_enabled']) 129 129 { … … 145 145 mgd_cache_invalidate(); 146 146 } 147 147 148 148 $_MIDCOM->componentloader->trigger_watches(MIDCOM_OPERATION_DBA_UPDATE, $object); 149 149 debug_pop(); … … 155 155 * record if the corresponding fields exists. 156 156 * 157 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.157 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 158 158 * @access private 159 159 */ … … 181 181 182 182 /** 183 * This is an internal helper which updates the created and metadata.published timestamps 183 * This is an internal helper which updates the created and metadata.published timestamps 184 184 * and the creator and metadata.authors links on a record if the corresponding fields exists. 185 185 * 186 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.186 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 187 187 * @access private 188 188 */ … … 190 190 { 191 191 debug_push_class($object, __FUNCTION__); 192 192 193 193 if (array_key_exists('creator', $object)) 194 194 { 195 195 // Bypass MidCOM ACL here, at least for now. 196 196 if (is_null($_MIDCOM->auth->user)) 197 { 197 { 198 198 $object->creator = 0; 199 199 } … … 203 203 } 204 204 } 205 205 206 206 if (array_key_exists('created', $object)) 207 207 { 208 208 $object->created = time(); 209 209 } 210 210 211 211 if (!is_null($_MIDCOM->auth->user)) 212 212 { … … 217 217 $object->metadata->authors = "|{$_MIDCOM->auth->user->_storage->guid}|"; 218 218 } 219 219 220 220 // Default the owner to first group of current user 221 221 if (!$object->metadata->owner) … … 227 227 $object->metadata->owner = str_replace('group:', '', $first_group->id); 228 228 } 229 } 230 } 231 229 } 230 } 231 232 232 // Default the publication time to current date/time 233 233 if (!$object->metadata->published) … … 235 235 $object->metadata->published = time(); 236 236 } 237 237 238 238 debug_pop(); 239 239 } … … 243 243 * This is essentially sets the midgard:owner privilege for the current user. 244 244 * 245 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.245 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 246 246 * @access private 247 247 */ … … 279 279 * 280 280 * Separated so that dbfactory->import() can reuse the code 281 * 282 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.281 * 282 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 283 283 */ 284 284 function create_pre_checks(&$object) … … 314 314 return false; 315 315 } 316 316 317 317 debug_pop(); 318 318 return true; … … 329 329 * 4. void $object->_on_created() is executed to notify the class from a successful DB creation. 330 330 * 331 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.331 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 332 332 * @return boolean Indicating success. 333 333 */ … … 342 342 return false; 343 343 } 344 344 345 345 // Legacy Midgard Metadata emulation 346 346 // Now, if possible, set created and creator. 347 347 midcom_baseclasses_core_dbobject::_set_creator($object); 348 348 midcom_baseclasses_core_dbobject::_set_revisor($object); 349 349 350 350 midcom_baseclasses_core_dbobject::_rewrite_timestamps_to_isodate($object); 351 351 … … 369 369 * 370 370 * Separated so that dbfactory->import() can reuse the code 371 * 372 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.371 * 372 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 373 373 */ 374 374 function create_post_ops(&$object) … … 407 407 $object->_on_created(); 408 408 $_MIDCOM->componentloader->trigger_watches(MIDCOM_OPERATION_DBA_CREATE, $object); 409 if ($object->_use_rcs) 409 if ($object->_use_rcs) 410 410 { 411 411 $rcs =& $_MIDCOM->get_service('rcs'); 412 412 $rcs->update(&$object, $object->get_rcs_message()); 413 413 } 414 414 415 415 $parent = $object->get_parent(); 416 416 if ( $parent … … 420 420 $_MIDCOM->cache->invalidate($parent->guid); 421 421 } 422 422 423 423 // Invalidate Midgard pagecache if we touched style/page element 424 424 if ( function_exists('mgd_cache_invalidate') … … 438 438 * 439 439 * Separated so that dbfactory->import() can reuse the code 440 * 441 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.440 * 441 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 442 442 */ 443 443 function delete_pre_checks(&$object) … … 475 475 * 5. void $object->_on_deleted() is executed to notify the class from a successful DB deletion. 476 476 * 477 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.477 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 478 478 * @return boolean Indicating success. 479 479 */ … … 540 540 * 541 541 * Separated so that dbfactory->import() can reuse the code 542 * 543 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.542 * 543 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 544 544 */ 545 545 function delete_post_ops(&$object) … … 549 549 $object->_on_deleted(); 550 550 $_MIDCOM->componentloader->trigger_watches(MIDCOM_OPERATION_DBA_DELETE, $object); 551 if ($object->_use_rcs) 551 if ($object->_use_rcs) 552 552 { 553 553 $rcs =& $_MIDCOM->get_service('rcs'); 554 554 $rcs->update(&$object, $object->get_rcs_message()); 555 555 } 556 556 557 557 $_MIDCOM->cache->invalidate($object->guid); 558 558 … … 573 573 * Copies values from oldobject to newobject in case the types are compatible 574 574 * 575 * @param MidgardObject $newobject A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.576 * @param MidgardObject $oldobject a parent object (usually a midgard_* base class) which to copy.575 * @param MidgardObject &$newobject A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 576 * @param MidgardObject &$oldobject a parent object (usually a midgard_* base class) which to copy. 577 577 * @return boolean Indicating success. 578 578 */ … … 617 617 * This method is usually only called from the constructor of the class. 618 618 * 619 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.619 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 620 620 * @param mixed $id The object to load from the database. This can be either null (the default), indicating an empty object, 621 621 * a Midgard database row-ID or a Midgard GUID, the latter is detected using mgd_is_guid(). In addition, you can … … 682 682 return false; 683 683 } 684 684 685 685 return midcom_baseclasses_core_dbobject::post_db_load_checks($object); 686 686 } … … 689 689 * After we instantiated the midgard object do some post processing and ACL checks 690 690 * 691 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.691 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 692 692 * @return boolean Indicating success. 693 693 * @see midcom_baseclasses_core_dbobject::load … … 704 704 // TODO: Some other error code might be nicer here 705 705 mgd_set_errno(MGD_ERR_ACCESS_DENIED); 706 706 707 707 debug_push_class($object, __FUNCTION__); 708 708 debug_add("Failed to load object, language {$object->lang} does not match Midgard's global language setting.", … … 735 735 midcom_baseclasses_core_dbobject::_clear_object($object); 736 736 } 737 737 738 738 // Register the GUID as loaded in this request 739 739 $_MIDCOM->cache->content->register($object->guid); 740 740 741 741 return $result; 742 742 } … … 755 755 * is in theory incorrect, but this is what is expected by the legacy applications. 756 756 * 757 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.757 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 758 758 */ 759 759 function _rewrite_timestamps_to_unixdate(&$object) … … 761 761 $metadata_timestamps = array 762 762 ( 763 'created', 764 'revised', 765 'exported', 766 'imported', 767 'approved', 763 'created', 764 'revised', 765 'exported', 766 'imported', 767 'approved', 768 768 'published', 769 769 'locked', … … 806 806 } 807 807 } 808 808 809 809 /** 810 810 * This function parses the loaded object and detects all meta timestamps of the original … … 813 813 * It processes all metadata timestamps. 814 814 * 815 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.815 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 816 816 */ 817 817 public static function rewrite_timestamps_to_datetime(&$object) … … 819 819 $metadata_timestamps = array 820 820 ( 821 'created', 822 'revised', 823 'exported', 824 'imported', 825 'approved', 821 'created', 822 'revised', 823 'exported', 824 'imported', 825 'approved', 826 826 'published', 827 827 'locked', … … 838 838 } 839 839 } 840 840 841 841 /** 842 842 * This function parses the loaded object and detects all meta timestamps of the original … … 845 845 * It processes all metadata timestamps. 846 846 * 847 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.847 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 848 848 */ 849 849 public static function rewrite_datetimes_to_timestamp(&$object) … … 851 851 $metadata_timestamps = array 852 852 ( 853 'created', 854 'revised', 855 'exported', 856 'imported', 857 'approved', 853 'created', 854 'revised', 855 'exported', 856 'imported', 857 'approved', 858 858 'published', 859 859 'locked', … … 882 882 * 2. Zero timestamps are converted to the magic '0000-00-00 00:00:00' timestamp. 883 883 * 884 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.884 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 885 885 */ 886 886 function _rewrite_timestamps_to_isodate(&$object) … … 888 888 $metadata_timestamps = array 889 889 ( 890 'created', 891 'revised', 892 'published', 893 'exported', 894 'imported', 895 'approved', 890 'created', 891 'revised', 892 'published', 893 'exported', 894 'imported', 895 'approved', 896 896 'locked', 897 897 'schedulestart', … … 918 918 } 919 919 } 920 920 921 921 /** 922 922 * Generates URL-safe name for an object and stores it if needed 923 * 924 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.923 * 924 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 925 925 */ 926 926 function generate_urlname($object, $titlefield = 'title') … … 930 930 return false; 931 931 } 932 932 933 933 if ( !isset($object->$titlefield) 934 934 || empty($object->$titlefield)) … … 936 936 return false; 937 937 } 938 938 939 939 if (!$_MIDCOM->serviceloader->can_load('midcom_core_service_urlgenerator')) 940 940 { 941 941 return false; 942 942 } 943 943 944 944 $urlgenerator = $_MIDCOM->serviceloader->load('midcom_core_service_urlgenerator'); 945 945 $name = $urlgenerator->from_string($object->$titlefield); … … 951 951 return true; 952 952 } 953 953 954 954 $object->name = $name; 955 955 $tries = 0; … … 973 973 * On any failure, the object is cleared. 974 974 * 975 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.975 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 976 976 * @return boolean Indicating Success 977 977 */ … … 985 985 * The calling sequence is as with the corresponding constructor. 986 986 * 987 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.987 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 988 988 * @param int $id The id of the object to load from the database. 989 989 * @return boolean Indicating Success … … 1030 1030 * The calling sequence is as with the corresponding constructor. 1031 1031 * 1032 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.1032 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 1033 1033 * @param string $guid The guid of the object to load from the database. 1034 1034 * @return boolean Indicating Success … … 1075 1075 * The calling sequence is as with the corresponding constructor. 1076 1076 * 1077 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.1077 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 1078 1078 * @param string $path The path of the object to load from the database. 1079 1079 * @return boolean Indicating Success … … 1121 1121 * permission check for example. 1122 1122 * 1123 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.1123 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 1124 1124 * @access private 1125 1125 */ … … 1144 1144 * drop all privileges assigned to the given object. 1145 1145 * 1146 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.1146 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 1147 1147 * @return boolean Indicating Success. 1148 1148 * @access private … … 1187 1187 * No event handlers are called here yet. 1188 1188 * 1189 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.1189 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 1190 1190 * @param string $domain The parameter domain. 1191 1191 * @param string $name The parameter name. … … 1210 1210 * It is used by various other objects for parameter manipulation. 1211 1211 * 1212 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.1212 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 1213 1213 * @param string $domain The parameter domain. 1214 1214 * @param string $name The parameter name. … … 1267 1267 debug_add("We have multiple results for parameter {$domain} / {$name} for {$object->__table__} ID {$object->id}: The query returned more then one result, this should not happen and is most probably a DB incosistency.", 1268 1268 MIDCOM_LOG_INFO); 1269 1269 1270 1270 $keep_parameter = null; 1271 1271 foreach ($result as $parameter) … … 1281 1281 } 1282 1282 } 1283 1283 1284 1284 debug_pop(); 1285 1285 return $keep_parameter; … … 1335 1335 * false will indicate a failure while querying the database. 1336 1336 * 1337 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.1337 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 1338 1338 * @param string $domain The parameter domain to query, this may be null to indicate a full listing. 1339 1339 * @return Array Parameter list (see above for details) or false on failure. … … 1362 1362 * No event handlers are called here yet. 1363 1363 * 1364 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.1364 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 1365 1365 * @param string $domain The parameter domain to query. 1366 1366 * @return Array Parameter listing or false on failure. … … 1373 1373 $mc->set_key_property('name'); 1374 1374 $mc->add_value_property('value'); 1375 1375 1376 1376 $mc->execute(); 1377 1377 1378 1378 $results = array(); 1379 1379 1380 1380 $params = $mc->list_keys(); 1381 1381 foreach ($params as $name => $param) … … 1383 1383 $results[$name] = $mc->get_subkey($name, 'value'); 1384 1384 } 1385 1385 1386 1386 return $results; 1387 1387 } … … 1392 1392 * No event handlers are called here yet. 1393 1393 * 1394 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.1394 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 1395 1395 * @return Array Parameter listing or false on failure. 1396 1396 * @see list_parameters() … … 1402 1402 $mc->add_value_property('domain'); 1403 1403 $mc->add_value_property('name'); 1404 $mc->add_value_property('value'); 1405 1404 $mc->add_value_property('value'); 1405 1406 1406 $mc->execute(); 1407 1407 1408 1408 $results = array(); 1409 1409 1410 1410 $params = $mc->list_keys(); 1411 1411 foreach ($params as $guid => $param) … … 1418 1418 $results[$domain][$mc->get_subkey($guid, 'name')] = $mc->get_subkey($guid, 'value'); 1419 1419 } 1420 1420 1421 1421 return $results; 1422 1422 } … … 1430 1430 * The user needs both update and parameter manipulation permission on the parent object for updates. 1431 1431 * 1432 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.1432 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 1433 1433 * @param string $domain The Parameter Domain. 1434 1434 * @param string $name The Parameter name. … … 1499 1499 * The user needs both update and parameter manipulation permission on the parent object for updates. 1500 1500 * 1501 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.1501 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 1502 1502 * @param string $domain The Parameter Domain. 1503 1503 * @param string $name The Parameter name. … … 1538 1538 * construction) and midgard:privileges) otherwise, the call will fail. 1539 1539 * 1540 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.1540 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 1541 1541 * @return Array A list of midcom_core_privilege objects or false on failure. 1542 1542 */ … … 1566 1566 * combination suitable for usage with create_new_privilege_object() (see there). 1567 1567 * 1568 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.1568 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 1569 1569 * @param mixed $privilege Either the full privilege object (midcom_core_privilege) to set or the name of the privilege (string). 1570 1570 * If the name was specified, the other parameters must be specified as well. … … 1589 1589 return false; 1590 1590 } 1591 1591 1592 1592 // PONDER: will this cause issues with class based privileges ?? 1593 1593 /* yes … … 1628 1628 * Unset a privilege on an object (e.g. set it to INHERIT). 1629 1629 * 1630 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.1630 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 1631 1631 * @param mixed $privilege Either the full privilege object (midcom_core_privilege) to set or the name of the privilege (string). 1632 1632 * If the name was specified, the other parameters must be specified as well. … … 1690 1690 * Looks up a privilege by its parameters. 1691 1691 * 1692 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.1692 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 1693 1693 * @param string $privilege The name of the privilege. 1694 1694 * @param mixed $assignee Either a valid magic assignee (SELF, EVERYONE, USERS, ANONYMOUS), a midcom_core_user or a … … 1723 1723 * Unsets all privilege on an object . 1724 1724 * 1725 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.1725 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 1726 1726 * @return boolean Indicating success. 1727 1727 */ … … 1754 1754 * first match will be returned. 1755 1755 * 1756 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.1756 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 1757 1757 * @param string $name The name of the attachment to look up. 1758 1758 * @return midcom_baseclasses_database_attachment The attachment found, or false on failure. … … 1790 1790 * first match will be deleted. 1791 1791 * 1792 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.1792 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 1793 1793 * @param string $name The name of the attachment to delete. 1794 1794 * @return boolean Indicating success. … … 1822 1822 * Creates a new attachment at the current object and returns it for usage. 1823 1823 * 1824 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.1824 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 1825 1825 * @param string $name The name of the attachment. 1826 1826 * @param string $title The title of the attachment. … … 1876 1876 * Creates a new attachment at the current object and returns it for usage. 1877 1877 * 1878 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.1878 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 1879 1879 * @param string $name The name of the attachment. 1880 1880 * @param string $title The title of the attachment. … … 1899 1899 * Opens an attachment for File IO operations. 1900 1900 * 1901 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.1901 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 1902 1902 * @param string $name The name of the attachment to look up. 1903 1903 * @param string $mode The mode which should be used to open the attachment, same as … … 1922 1922 * object. 1923 1923 * 1924 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.1924 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 1925 1925 * @return midgard_query_builder Prepared QueryBuilder or false on failure. 1926 1926 */ … … 1948 1948 * attachments, an empty array is returned. 1949 1949 * 1950 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.1950 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 1951 1951 * @return Array A list of midcom_baseclasses_database_attachment objects or false on failure. 1952 1952 */ … … 1974 1974 * Returns a fetchable of all attachments for the current object. 1975 1975 * 1976 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.1976 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 1977 1977 * @return object A fetchable which can be used to traverse the attachments to the object, or false on failure. 1978 1978 * @deprecated Deprecated since MidCOM 2.5.0 … … 2001 2001 * silently return true. 2002 2002 * 2003 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.2003 * @param MidgardObject &$object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 2004 2004 * @param mixed $person A midcom_baseclasses_database_person object or an identifier usable to retrieve one. You may set 2005 2005 * this to NULL to use the currently authenticated user as a default. … … 2064 2064 * This call requires the <i>midgard:privileges</i> privilege. 2065 2065 * 2066 * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks.2066 * @param MidgardObject &$object A class inherit
