public function isWallsAllowed($photoId) { $photo = JTable::getInstance('Photo', 'CTable'); $photo->load($photoId); $album = JTable::getInstance('Album', 'CTable'); $album->load($photo->albumid); if (CEventHelper::allowPhotoWall($album->eventid)) { return true; } return false; }