Changeset 17655
- Timestamp:
- 09/22/08 15:34:22 (2 months ago)
- Files:
-
- trunk/midcom/midcom.core/midcom/exec/object_test.php (copied) (copied from branches/MidCOM_2_8/midcom.core/midcom/exec/object_test.php)
- trunk/midcom/midcom.helper.reflector/exec/test.php (modified) (1 diff)
- trunk/midcom/net.nemein.favourites/favourite.php (modified) (2 diffs)
- trunk/midcom/net.nemein.registrations/registration.php (modified) (1 diff)
- trunk/midcom/org.openpsa.projects/resource.php (modified) (4 diffs)
- trunk/midcom/org.openpsa.sales/salesproject/member.php (modified) (1 diff)
- trunk/midcom/org.routamc.positioning/aerodrome.php (modified) (1 diff)
- trunk/midcom/org.routamc.positioning/country.php (modified) (2 diffs)
- trunk/midcom/org.routamc.positioning/log.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/midcom/midcom.helper.reflector/exec/test.php
r17648 r17655 23 23 // this will exit 24 24 } 25 $reflector = new midcom_helper_reflector($object);25 $reflector =& midcom_helper_reflector::get($object); 26 26 27 27 echo "Got " . $reflector->get_class_label() . ' "' . $reflector->get_object_label($object) . "\", dump<pre>\n"; trunk/midcom/net.nemein.favourites/favourite.php
r16448 r17655 33 33 function get_parent_guid_uncached() 34 34 { 35 return $this->metadata->creator; 35 if ( isset($this->metadata) 36 && isset($this->metadata->creator)) 37 { 38 return $this->metadata->creator; 39 } 36 40 } 37 41 … … 87 91 } 88 92 $qb = net_nemein_favourites_favourite_dba::new_query_builder(); 89 $qb->add_constraint('objectGuid', '=', $this->objectGuid);93 $qb->add_constraint('objectGuid', '=', (string)$this->objectGuid); 90 94 91 95 if ($this->bury) trunk/midcom/net.nemein.registrations/registration.php
r17003 r17655 128 128 function _run_pricing_plugin() 129 129 { 130 if ( !isset($this->_config) 131 || !is_object($this->_config)) 132 { 133 // Could not read config 134 return false; 135 } 130 136 // The plugin is likely to update us (perhaps many times if it sets parameters...), thus causing loops unless we take care 131 137 $flag = "net_nemein_registrations_registration_dba__run_pricing_plugin_{$this->guid}"; trunk/midcom/org.openpsa.projects/resource.php
r17595 r17655 51 51 $qb = org_openpsa_contacts_buddy::new_query_builder(); 52 52 $user = $_MIDCOM->auth->user->get_storage(); 53 $qb->add_constraint('account', '=', $account->guid);54 $qb->add_constraint('buddy', '=', $this->_personobject->guid);53 $qb->add_constraint('account', '=', (string)$account->guid); 54 $qb->add_constraint('buddy', '=', (string)$this->_personobject->guid); 55 55 $qb->add_constraint('blacklisted', '=', false); 56 56 $buddies = $qb->execute(); … … 70 70 { 71 71 $qb = org_openpsa_projects_task_resource::new_query_builder(); 72 $qb->add_constraint('person', '=', $this->person);73 $qb->add_constraint('task', '=', $this->task);74 $qb->add_constraint('orgOpenpsaObtype', '=', $this->orgOpenpsaObtype);72 $qb->add_constraint('person', '=', (int)$this->person); 73 $qb->add_constraint('task', '=', (int)$this->task); 74 $qb->add_constraint('orgOpenpsaObtype', '=', (int)$this->orgOpenpsaObtype); 75 75 76 76 if ($this->id) 77 77 { 78 $qb->add_constraint('id', '<>', $this->id);78 $qb->add_constraint('id', '<>', (int)$this->id); 79 79 } 80 80 … … 112 112 // Add resource to other resources' buddy lists 113 113 $qb = org_openpsa_projects_task_resource::new_query_builder(); 114 $qb->add_constraint('task', '=', $this->task);114 $qb->add_constraint('task', '=', (int)$this->task); 115 115 $qb->add_constraint('orgOpenpsaObtype', '=', ORG_OPENPSA_OBTYPE_PROJECTRESOURCE); 116 $qb->add_constraint('id', '<>', $this->id);116 $qb->add_constraint('id', '<>', (int)$this->id); 117 117 $resources = $qb->execute(); 118 118 foreach ($resources as $resource) … … 148 148 149 149 $qb = org_openpsa_projects_task_resource::new_query_builder(); 150 $qb->add_constraint('person', '=', $_MIDGARD['user']);150 $qb->add_constraint('person', '=', (int)$_MIDGARD['user']); 151 151 $qb->add_constraint('orgOpenpsaObtype', '=', ORG_OPENPSA_OBTYPE_PROJECTRESOURCE); 152 152 $qb->add_constraint('task.orgOpenpsaObtype', '<>', ORG_OPENPSA_OBTYPE_PROJECT); trunk/midcom/org.openpsa.sales/salesproject/member.php
r17297 r17655 52 52 $qb = org_openpsa_contacts_buddy::new_query_builder(); 53 53 $user =& $_MIDCOM->auth->user->get_storage(); 54 $qb->add_constraint('account', '=', $owner->guid);55 $qb->add_constraint('buddy', '=', $person->guid);54 $qb->add_constraint('account', '=', (string)$owner->guid); 55 $qb->add_constraint('buddy', '=', (string)$person->guid); 56 56 $qb->add_constraint('blacklisted', '=', false); 57 57 $buddies = $qb->execute(); trunk/midcom/org.routamc.positioning/aerodrome.php
r14613 r17655 74 74 } 75 75 76 $qb = org_routamc_positioning_aerodrome_dba::new_query_builder(); 77 $qb->add_constraint('icao', '=', $this->icao); 78 $qb->set_limit(1); 79 $matches = $qb->execute_unchecked(); 80 if (count($matches) > 0) 76 if (!empty($this->icao)) 81 77 { 82 // We don't need to save duplicate entries 83 return false; 78 $qb = org_routamc_positioning_aerodrome_dba::new_query_builder(); 79 $qb->add_constraint('icao', '=', $this->icao); 80 $qb->set_limit(1); 81 $matches = $qb->execute_unchecked(); 82 if (count($matches) > 0) 83 { 84 // We don't need to save duplicate entries 85 mgd_set_errno(MGD_ERR_DUPLICATE); 86 return false; 87 } 84 88 } 85 89 return parent::_on_creating(); trunk/midcom/org.routamc.positioning/country.php
r14622 r17655 34 34 { 35 35 $qb = org_routamc_positioning_country_dba::new_query_builder(); 36 $qb->add_constraint('name', '=', $this->name);36 $qb->add_constraint('name', '=', (string)$this->name); 37 37 $qb->set_limit(1); 38 38 $matches = $qb->execute_unchecked(); … … 40 40 { 41 41 // We don't need to save duplicate entries 42 mgd_set_errno(MGD_ERR_DUPLICATE); 42 43 return false; 43 44 } trunk/midcom/org.routamc.positioning/log.php
r17141 r17655 70 70 MIDCOM_LOG_WARN); 71 71 debug_pop(); 72 mgd_set_errno(MGD_ERR_DUPLICATE); 72 73 return false; 73 74 } … … 87 88 } 88 89 $qb = org_routamc_positioning_log_dba::new_query_builder(); 89 $qb->add_constraint('person', '=', $this->person);90 $qb->add_constraint('date', '<=', $this->date);90 $qb->add_constraint('person', '=', (int)$this->person); 91 $qb->add_constraint('date', '<=', (int)$this->date); 91 92 $qb->add_order('date', 'DESC'); 92 93 $qb->set_limit(1); … … 111 112 } 112 113 $qb = org_routamc_positioning_log_dba::new_query_builder(); 113 $qb->add_constraint('person', '=', $this->person);114 $qb->add_constraint('date', '>', $this->date);114 $qb->add_constraint('person', '=', (int)$this->person); 115 $qb->add_constraint('date', '>', (int)$this->date); 115 116 $qb->add_order('date', 'ASC'); 116 117 $qb->set_limit(1);
