Changeset 6159
- Timestamp:
- 06/03/07 02:17:12 (1 year ago)
- Files:
-
- trunk/midcom/fi.mik.lentopaikkakisa/flight.php (modified) (1 diff)
- trunk/midcom/midcom.helper.replicator/config/mgdschema.xml (modified) (1 diff)
- trunk/midcom/midgard.admin.asgard/handler/object/manage.php (modified) (5 diffs)
- trunk/midcom/midgard.admin.asgard/plugin.php (modified) (1 diff)
- trunk/midcom/midgard.admin.asgard/reflector.php (modified) (1 diff)
- trunk/midcom/net.nehmer.buddylist/entry.php (modified) (1 diff)
- trunk/midcom/org.routamc.photostream/config/mgdschema.xml (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/midcom/fi.mik.lentopaikkakisa/flight.php
r6148 r6159 13 13 function get_parent_guid_uncached() 14 14 { 15 if ($this->pilot) 16 { 17 $pilot = new midcom_db_person($this->pilot); 18 return $pilot->guid; 19 } 15 20 return null; 16 21 } trunk/midcom/midcom.helper.replicator/config/mgdschema.xml
r5617 r6159 4 4 <property name="id" type="integer" primaryfield="id"/> 5 5 6 <property name="title" type=" text"/>6 <property name="title" type="string"/> 7 7 <property name="description" type="text"/> 8 8 9 <property name="exporter" type=" text"/>10 <property name="transporter" type=" text"/>9 <property name="exporter" type="string"/> 10 <property name="transporter" type="string"/> 11 11 12 12 <property name="status" type="integer"/> trunk/midcom/midgard.admin.asgard/handler/object/manage.php
r6152 r6159 535 535 case 'save': 536 536 if ( is_a($this->_object, 'midgard_style') 537 || is_a($this->_object, 'midgard_element')) 537 || is_a($this->_object, 'midgard_element') 538 || is_a($this->_object, 'midgard_page') 539 || is_a($this->_object, 'midgard_pageelement')) 538 540 { 539 541 mgd_cache_invalidate(); … … 573 575 // Figure out the linking property 574 576 $new_type_reflector = midgard_admin_asgard_reflector::get($new_type); 575 $link_properties = $new_type_reflector->get_link_properties(); 577 $link_properties = $new_type_reflector->get_link_properties(); 576 578 $type_to_link_to = midgard_admin_asgard_reflector::class_rewrite(get_class($this->_object)); 577 579 foreach ($link_properties as $new_type_property => $link) 578 580 { 579 581 $linked_type = midgard_admin_asgard_reflector::class_rewrite($link['class']); 580 //echo "{$type_to_link_to} : {$linked_type}<br />\n"; 581 if ( $linked_type == $type_to_link_to 582 || is_a($this->_object, $linked_type)) 582 583 if (midgard_admin_asgard_reflector::is_same_class( $linked_type, $type_to_link_to)) 583 584 { 584 585 $parent_property = $link['target']; … … 747 748 { 748 749 // Deletion confirmed. 750 $parent = $this->_object->get_parent(); 749 751 if (! $this->_object->delete()) 750 752 { … … 763 765 $indexer->delete($this->_object->guid); 764 766 765 // Delete ok, relocating to welcome.766 // TODO: Relocate to parent767 767 768 768 if ($data['language_code'] != '') … … 772 772 // This will exit() 773 773 } 774 775 if ($parent) 776 { 777 $_MIDCOM->relocate("__mfa/asgard/object/view/{$parent->guid}/"); 778 // This will exit() 779 } 780 774 781 $_MIDCOM->relocate('__mfa/asgard/'); 775 782 // This will exit. trunk/midcom/midgard.admin.asgard/plugin.php
r6151 r6159 164 164 function get_type_label($type) 165 165 { 166 // Figure out nice short name for the type 167 $type_parts = explode('_', $type); 168 $type_label = $type_parts[count($type_parts) - 1]; 169 if ( $type_label == 'dba' 170 || $type_label == 'db') 171 { 172 $type_label = $type_parts[count($type_parts) - 2]; 173 } 174 return $_MIDCOM->i18n->get_string($type_label, 'midgard.admin.asgard'); 166 $ref = midgard_admin_asgard_reflector_tree::get($type); 167 return $ref->get_class_label(); 175 168 } 176 169 trunk/midcom/midgard.admin.asgard/reflector.php
r6156 r6159 533 533 534 534 $target = $ref->get_link_target($property); 535 535 536 debug_add("get_link_target returned '{$target}'"); 536 537 if (!empty($target)) trunk/midcom/net.nehmer.buddylist/entry.php
r6153 r6159 22 22 } 23 23 24 function get_parent_guid_uncached() 25 { 26 if ($this->account) 27 { 28 $parent = new midcom_db_person($this->account); 29 return $parent->guid; 30 } 31 return null; 32 } 33 24 34 /** 25 35 * Human-readable label for cases like Asgard navigation trunk/midcom/org.routamc.photostream/config/mgdschema.xml
r5900 r6159 17 17 18 18 <!-- Descriptive fields are MLd --> 19 <property name="title" multilang="yes" table="org_routamc_photostream_photo_i" type=" text" />19 <property name="title" multilang="yes" table="org_routamc_photostream_photo_i" type="string" /> 20 20 <property name="description" multilang="yes" table="org_routamc_photostream_photo_i" type="text" /> 21 21 <property name="lang" multilang="yes" table="org_routamc_photostream_photo_i" type="integer" /> … … 27 27 <!-- Integer for rating, typically of the "1-5 stars" variety --> 28 28 <property name="rating" type="integer"/> 29 30 <!-- required 1.7 metadata -->31 <property name="revised" type="string"/>32 <property name="created" type="string"/>33 <property name="creator" link="midgard_person:id" reverse="no" type="integer"/>34 <property name="revisor" link="midgard_person:id" reverse="no" type="integer"/>35 <!-- /required metadata -->36 29 </type> 37 30 </Schema>
