public function restore($user, $reason = '') { $this->unMarkInProps(WPP_WALL_REMOVE); $this->unMarkInProps(WPP_WALL_ADMINDELETE); $this->customActionNotifyRC($user, 'wall_restore', $reason); $wne = $this->getAdminNotificationEntity($user, $reason); $wh = F::build('WallHistory', array($this->cityId)); $wh->add(WH_RESTORE, $wne, $user); $this->addWatch($user); $wn = new WallNotifications(); if ($this->isMain()) { $wn->unhideNotificationsForUniqueID($this->cityId, $this->getId()); $this->getWall()->invalidateCache(); $wna = new WallNotificationsAdmin(); $wna->removeForThread($this->cityId, $this->getId()); $wno = new WallNotificationsOwner(); $wno->removeForThread($this->cityId, $this->getWallOwner()->getId(), $this->getId()); } else { $this->getThread()->invalidateCache(); $wna = new WallNotificationsAdmin(); $wna->removeForReply($this->cityId, $this->getId()); $wno = new WallNotificationsOwner(); $wno->removeForReply($this->cityId, $this->getWallOwner()->getId(), $this->getId()); } }