Index: branches/5.1.x/core/units/reviews/reviews_event_handler.php =================================================================== diff -u -r12657 -r13086 --- branches/5.1.x/core/units/reviews/reviews_event_handler.php (.../reviews_event_handler.php) (revision 12657) +++ branches/5.1.x/core/units/reviews/reviews_event_handler.php (.../reviews_event_handler.php) (revision 13086) @@ -1,6 +1,6 @@ Special == 'product' && !$this->Application->IsAdmin()) { + if ($event->Special == 'product' && !$this->Application->isAdmin) { // rev.product should auto-link return ''; } @@ -172,7 +172,7 @@ $object =& $event->getObject(); /* @var $object kDBList */ - if (!$this->Application->IsAdmin()) { + if (!$this->Application->isAdminUser) { $object->addFilter('active', '%1$s.Status = '.STATUS_ACTIVE); } @@ -264,7 +264,8 @@ $object->SetDBField('ItemType', $item_type); $object->SetDBField('Module', $this->Application->findModule('Var', $parent_info['ParentPrefix'], 'Name')); - if ($this->Application->IsAdmin()) { + if ($this->Application->isAdminUser) { + // don't perform spam control on admin return ; } @@ -315,7 +316,7 @@ { $this->updateSubitemCounters($event); - if (!$this->Application->IsAdmin()) { + if (!$this->Application->isAdminUser) { $spam_helper =& $this->Application->recallObject('SpamHelper'); /* @var $spam_helper SpamHelper */ @@ -352,7 +353,7 @@ $object =& $event->getObject(); /* @var $object kDBItem */ - if ($this->Application->IsAdmin() && !$object->IsTempTable()) { + if ($this->Application->isAdminUser && !$object->IsTempTable()) { // send email on review status change from reviews grid in admin $review_status = $object->GetDBField('Status'); $process_status = Array (STATUS_ACTIVE, STATUS_DISABLED); @@ -481,7 +482,7 @@ { parent::OnCreate($event); - if ($event->status != erSUCCESS || $this->Application->IsAdmin()) { + if ($event->status != erSUCCESS || $this->Application->isAdmin) { return ; }