3 * FusionForge file release system
5 * Copyright 2017, Franck Villaume - TrivialDev
7 * This file is part of FusionForge. FusionForge is free software;
8 * you can redistribute it and/or modify it under the terms of the
9 * GNU General Public License as published by the Free Software
10 * Foundation; either version 2 of the Licence, or (at your option)
13 * FusionForge is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License along
19 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 class FRSManager extends FFError {
34 function __construct(&$Group) {
35 parent::__construct();
36 if (!$Group || !is_object($Group)) {
37 $this->setError(_('Invalid Project'));
40 if ($Group->isError()) {
41 $this->setError('FRSManager: '.$Group->getErrorMessage());
44 if (!$Group->usesFRS()) {
45 $this->setError(_('This Group does not use FRS'));
48 $this->Group =& $Group;
51 function getSettings() {
53 $settings['send_all_frs'] = $this->Group->frsEmailAll();
54 $settings['new_frs_address'] = $this->Group->getFRSEmailAddress();
55 $settings['group_id'] = $this->Group->getID();