function removeInvalidDisposes($moderationList) { /* check all dispose messages */ $tmpArray = $this->_spotDao->getDisposedSpots($moderationList); foreach ($tmpArray as $value) { if (!empty($moderationList[$value['messageid']]['spotterid'])) { if ($moderationList[$value['messageid']]['spotterid'] != $value['spotterid']) { unset($moderationList[$value['messageid']]); } else { $stmod = $moderationList[$value['messageid']]['stamp']; $stspot = $value['stamp']; $diff = $stmod - $stspot; if ($diff > 432000) { unset($moderationList[$value['messageid']]); } } } } return $moderationList; }