/** * set That a notice has been read (per/user) **/ public function isRead($notice) { // first get the file path $path_filename = ComponentbuilderHelper::getFilePath('user', 'notice', JFactory::getUser()->username, $fileType = '.md', JPATH_COMPONENT_ADMINISTRATOR); // set as read if not already set if (($content = @file_get_contents($path_filename)) !== FALSE) { if ($notice == $content) { return true; } } return $this->saveFile($notice, $path_filename); }